Saqib Razzaq 2016-05-11 15:46:59 +05:00
parent a7ff74ecd2
commit 2dcc39d163
4 changed files with 33 additions and 17 deletions

View file

@ -71,6 +71,13 @@ $page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,COLLPP);
$clist = $cond;
$clist['limit'] = $get_limit;
if (!isSectionEnabled('photos') && isSectionEnabled('videos')) {
$clist['type'] = 'videos';
} elseif (isSectionEnabled('photos') && !isSectionEnabled('videos')) {
$clist['type'] = 'photos';
} elseif (!isSectionEnabled('photos') && !isSectionEnabled('videos')) {
$clist['type'] = 'none';
}
$collections = $cbcollection->get_collections($clist);
Assign('collections', $collections);

View file

@ -1,3 +1,4 @@
{ANCHOR place="display_head_sec"}
<div class="container">
<div id="fb-root"></div>
<script>(function(d, s, id) {

View file

@ -41,8 +41,12 @@ if($cbcollection->is_viewable($c))
case "photo":
case "p":
{
if (isSectionEnabled('photos')) {
$items = $cbphoto->collection->get_collection_items_with_details($c,$order,$get_limit);
$count = $cbphoto->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
} else {
$Cbucket->show_page = false;
}
}
break;
}

View file

@ -79,6 +79,7 @@ if($cbcollection->is_viewable($cid))
case "p":
{
global $cbphoto;
if (isSectionEnabled('photos')) {
$photo = $cbphoto->get_photo($item);
if($photo)
{
@ -101,6 +102,9 @@ if($cbcollection->is_viewable($cid))
e(lang("item_not_exist"));
$Cbucket->show_page = false;
}
} else {
$Cbucket->show_page = false;
}
}
break;
}