Fixed : Collection items pagination, for some unknown it stopped working

Fixed : Default thumb output
Fixed : pagination function
Fixed : Photo thumb height in channel page
Fixed : view_photo.html, Photo rating was not showing
Fixed : collection in watch_video.html
Fixed : Unwanted queries in view_collection.html
This commit is contained in:
Fawaz 2011-01-29 10:50:02 +00:00
parent 3d3a344d7d
commit 150ff59ad3
7 changed files with 20 additions and 19 deletions

View file

@ -894,7 +894,7 @@ if(!empty($mode))
echo json_encode($itemsArray);
} else
return false;
echo json_encode(array("error"=>TRUE));
}
break;

View file

@ -1183,7 +1183,7 @@ class CBPhotos
$query_field[] = "userid";
if(!$array['userid'])
{ $query_val[] = $userid; $userid = userid(); }
{ $userid = userid(); $query_val[] = $userid; }
else
{ $query_val[] = $array['userid']; $userid = $array['userid']; }
@ -1623,9 +1623,10 @@ class CBPhotos
{
global $Cbucket;
$details = $p['details'];
$output = $p['output'];
if(empty($details))
{
return $this->default_thumb($size);
return $this->default_thumb($size,$output);
} else {
//Calling Custom Functions
if(count($Cbucket->custom_get_photo_funcs) > 0)
@ -1655,7 +1656,7 @@ class CBPhotos
$photo = $details;
if(empty($photo['photo_id']) || empty($photo['photo_key']))
return $this->default_thumb($size);
return $this->default_thumb($size,$output);
else
{
if(!empty($photo['filename']) && !empty($photo['ext']))
@ -1699,7 +1700,7 @@ class CBPhotos
if(empty($return_thumb))
{
$this->default_thumb($size);
$this->default_thumb($size,$output);
} else {
if($p['assign'] != NULL)
assign($p['assign'],$return_thumb);
@ -1784,7 +1785,7 @@ class CBPhotos
return $img;
}
} else {
return $this->default_thumb($size);
return $this->default_thumb($size,$output);
}
}
}
@ -2014,7 +2015,7 @@ class CBPhotos
/**
* Used to return default thumb
*/
function default_thumb($size=NULL,$output='html')
function default_thumb($size=NULL,$output=NULL)
{
if($size != "_t" && $size != "_m")
$size = "_m";

View file

@ -1166,12 +1166,12 @@ function onReload_item()
function pagination(object,cid,type,pageNumber)
{
var obj = $(object), objID = obj.id,
parent = obj.parent(), parentID, innerHTML = obj.html();
paginationParent = obj.parent(), paginationParentID, paginationInnerHTML = obj.html();
if(parent.attr('id'))
parentID = parent.attr('id')
if(paginationParent.attr('id'))
paginationParentID = parent.attr('id')
else
{ parent.attr('id','loadMoreParent'); parentID = parent.attr('id'); }
{ paginationParent.attr('id','loadMoreParent'); paginationParentID = paginationParent.attr('id'); }
newCall =
$.ajax({
@ -1181,7 +1181,7 @@ function pagination(object,cid,type,pageNumber)
data: { mode: "moreItems", page:pageNumber, cid: cid, type: type },
beforeSend: function() { obj.removeAttr('onClick'); obj.html(loading) },
success : function(data) {
if(!data)
if(data['error'])
{
if(object.tagName == "BUTTON")
obj.attr('disabled','disabled');
@ -1189,7 +1189,7 @@ function pagination(object,cid,type,pageNumber)
} else {
$('#collectionItemsList').append(data['content']);
$('#NewPagination').html(data['pagination']);
obj.html(innerHTML);
obj.html(paginationInnerHTML);
}
}
});

View file

@ -50,6 +50,6 @@
{if $display_type == "channel_page"}
<li class="itemBox" onclick="loadObject(this,'photos','{$photo.photo_id}','viewingArea')">
{get_photo details=$photo output='html' width='110' size='m' style='display:block;margin:0px auto;'}
{get_photo details=$photo output='html' width='110' height='64' size='m' style='display:block;margin:0px auto;'}
</li> <!-- itemBox {$photo.photo_key} end -->
{/if}

View file

@ -9,7 +9,7 @@
<div style="height:10px;"></div>
<div class="video_actions_cont clearfix">
<div class="rating_container">
{show_rating rating=$photo.rating ratings=$photo.rated_by total='10' id=$photo.photo_id type=photo}
{show_video_rating rating=$photo.rating ratings=$photo.rated_by total='10' id=$photo.photo_id type=photo}
</div>
<div style="float:left; margin-left:5px;" class="actions clearfix">
<ul>

View file

@ -158,7 +158,7 @@ onclick='$(this).toggleClass("watch_vids_head_closed");$("#vid_collections").sli
This video is found in following collections
{foreach from=$collections item=collection name=collect}
<div class="watch_collect_item">
{$smarty.foreach.collect.iteration}. <a href="{$cbcollection->collection_links($collection,'view')}">{$collection.collection_name}</a>
{$smarty.foreach.collect.iteration}. <a href="{$cbcollection->collection_links($collection.collection_id,'view')}">{$collection.collection_name}</a>
</div>
{/foreach}
{/if}

View file

@ -33,7 +33,7 @@ if($cbcollection->is_viewable($c))
case "v":
{
$items = $cbvideo->collection->get_collection_items_with_details($c,$order,$get_limit);
$count = $cbvideo->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
//$count = $cbvideo->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
}
break;
@ -42,7 +42,7 @@ if($cbcollection->is_viewable($c))
case "p":
{
$items = $cbphoto->collection->get_collection_items_with_details($c,$order,$get_limit);
$count = $cbphoto->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
//$count = $cbphoto->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
}
break;
}