
Added : Set as avatar code Added : Avatar Collection for user Added : new param avatar_collection in get_collections() method Fixed : crop value in thumbs_dimensions Added : is_avatar param in get_photos() method Added : photo_dimensions filter in generate_photos() method Fixed : insert_photo() method Moved : insert_photo_colors in insert_photo() method from view_item.php page Updated : get_image_type() method Updated : getFileSmarty() method Added : An anchor in getFileSmarty() 'photo_thumb' Fixed : cropping cases in resizer.class.php Updated : $Upload->upload_user_file to upload_new_avatar Removed : cb_create_user_avatar_collection() from common.php Registered : delete_photo_avatar() function @delete_photo Added : validate_image_file() function. It uses our old image.class.php method Added : get_mature_thumb() function. It has three parameters, object_array, size, output. You can also register custom thumb @mature_thumb Added : Few new functions for photos. get_all_custom_size_photos(), get_photo_dimensions(), clean_custom_photo_size(), get_avatar_photos() and is_photo_viewable() Added : new js function, displayConfirm(). It accepts four parameters. id( modal box id), confirmMessage( modal box body), onConfirm( either url or function ) and heading(modal box header)
79 lines
No EOL
2.4 KiB
PHP
79 lines
No EOL
2.4 KiB
PHP
<?php
|
|
/*
|
|
****************************************************************
|
|
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
|
|
| @ Author : ArslanHassan
|
|
| @ Software : ClipBucket , © PHPBucket.com
|
|
****************************************************************
|
|
*/
|
|
|
|
define("THIS_PAGE",'user_collections');
|
|
define("PARENT_PAGE",'collections');
|
|
|
|
require 'includes/config.inc.php';
|
|
$pages->page_redir();
|
|
//$userquery->perm_check('view_videos',true);
|
|
|
|
$u = $_GET['user'];
|
|
$u = $u ? $u : $_GET['userid'];
|
|
$u = $u ? $u : $_GET['username'];
|
|
$u = $u ? $u : $_GET['uid'];
|
|
$u = $u ? $u : $_GET['u'];
|
|
|
|
$user = $userquery->get_user_details($u);
|
|
$page = mysql_clean($_GET['page']);
|
|
|
|
if($user)
|
|
{
|
|
assign('u',$user);
|
|
assign('p',$userquery->get_user_profile($udetails['userid']));
|
|
|
|
$mode = $_GET['mode'];
|
|
|
|
switch($mode)
|
|
{
|
|
case "collections":
|
|
case "uploaded":
|
|
default:
|
|
{
|
|
$limit = create_query_limit($page,config('collection_user_collections'));
|
|
assign("the_title",$user['username']." ".lang('collections'));
|
|
$collections = get_collections(array("limit"=>$limit,"user"=>$user['userid']));
|
|
$total_rows = get_collections(array("count_only"=>true,"user"=>$user['userid']));
|
|
$total_pages = count_pages($total_rows,config('collection_user_collections'));
|
|
$avatar_collection = cb_user_avatar_collection( $user );
|
|
if ( is_array( $collections ) && $avatar_collection ) {
|
|
array_unshift( $collections, $avatar_collection );
|
|
} else {
|
|
$collections = $avatar_collection;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case "favorites":
|
|
case "fav_collections":
|
|
case "favorite":
|
|
{
|
|
$limit = create_query_limit($page,config('collection_user_favorites'));
|
|
assign("the_title",$user['username']." ".lang('favorite')." ".lang('collections'));
|
|
$favC = array("user"=>$user['userid'],"limit",$limit);
|
|
$collections = $cbcollection->action->get_favorites($favC);
|
|
$favC['count_only'] = true;
|
|
$total_rows = $cbcollection->action->get_favorites($favC);
|
|
$total_pages = count_pages($total_rows,config('collection_user_favorites'));
|
|
}
|
|
break;
|
|
}
|
|
assign('collections',$collections);
|
|
|
|
$pages->paginate($total_pages,$page);
|
|
} else {
|
|
e(lang("usr_exist_err"));
|
|
$Cbucket->show_page = false;
|
|
}
|
|
|
|
if($Cbucket->show_page)
|
|
Template('user_collections.html');
|
|
else
|
|
display_it();
|
|
?>
|