diff --git a/htdocs/images/rating-star-shadow.png b/htdocs/images/rating-star-shadow.png new file mode 100644 index 000000000..cfdcc4667 Binary files /dev/null and b/htdocs/images/rating-star-shadow.png differ diff --git a/htdocs/mytop5.php b/htdocs/mytop5.php index 0347ad512..6b9728f98 100644 --- a/htdocs/mytop5.php +++ b/htdocs/mytop5.php @@ -37,9 +37,10 @@ } } - $rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `cache_rating`.`rating_date`, `caches`.`wp_oc` AS `wp`, `caches`.`name` AS `cachename`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly` + $rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `cache_rating`.`rating_date`, `caches`.`wp_oc` AS `wp`, `caches`.`name` AS `cachename`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly`, `stat_caches`.`toprating` AS `countrating` FROM `cache_rating` INNER JOIN `caches` ON `cache_rating`.`cache_id`=`caches`.`cache_id` + LEFT JOIN `stat_caches` ON `stat_caches`.`cache_id`=`cache_rating`.`cache_id` LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6 WHERE `cache_rating`.`user_id`='&1' ORDER BY `rating_date` DESC", $login->userid); diff --git a/htdocs/templates2/ocstyle/mytop5.tpl b/htdocs/templates2/ocstyle/mytop5.tpl index 015d28f8a..663494a54 100644 --- a/htdocs/templates2/ocstyle/mytop5.tpl +++ b/htdocs/templates2/ocstyle/mytop5.tpl @@ -24,16 +24,19 @@ {t}Type{/t} {t}State{/t} - {t}Name{/t} + {t}Name{/t} + {t}Recommended on{/t} + {foreach from=$ratings item=ratingItem} {cycle assign=listcolor values="listcolor1,listcolor2"} {include file="res_cacheicon_22.tpl" cachetype=$ratingItem.type|escape} {include file="res_cachestatus.tpl" status=$ratingItem.status} {$ratingItem.cachename|escape} {include file="res_oconly.tpl" oconly=$ratingItem.oconly} + {$ratingItem.countrating} {$ratingItem.rating_date|date_format:$opt.format.date} [{t}Remove recommendation{/t}] diff --git a/htdocs/templates2/ocstyle/usertops.tpl b/htdocs/templates2/ocstyle/usertops.tpl index a8bbc546a..6aa664cad 100644 --- a/htdocs/templates2/ocstyle/usertops.tpl +++ b/htdocs/templates2/ocstyle/usertops.tpl @@ -9,13 +9,14 @@ {t 1=$userid 2=$username|escape}Recommendations of %2{/t} - +
- + + {foreach from=$ratings item=ratingItem} @@ -23,6 +24,7 @@ + {foreachelse} diff --git a/htdocs/usertops.php b/htdocs/usertops.php index 4f80101e2..0de931e6a 100644 --- a/htdocs/usertops.php +++ b/htdocs/usertops.php @@ -20,11 +20,12 @@ $tpl->assign('username', $sUsername); $tpl->assign('oconly',$oconly); - $rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `caches`.`name` AS `cachename`, `user`.`username` AS `ownername`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly` + $rs = sql("SELECT `cache_rating`.`cache_id` AS `cacheid`, `caches`.`name` AS `cachename`, `user`.`username` AS `ownername`, `caches`.`type` AS `type`, `caches`.`status` AS `status`, `ca`.`attrib_id` IS NOT NULL AS `oconly`, `stat_caches`.`toprating` AS `countrating` FROM `cache_rating` INNER JOIN `caches` ON `cache_rating`.`cache_id` = `caches`.`cache_id` INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id` INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` + LEFT JOIN `stat_caches` ON `stat_caches`.`cache_id`=`cache_rating`.`cache_id` LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6 WHERE `cache_status`.`allow_user_view`=1 AND `cache_rating`.`user_id`='&1'
{t}Type{/t}{t}Name{/t}{t}Name{/t} {t}State{/t}
{include file="res_cacheicon_22.tpl" cachetype=$ratingItem.type|escape} {$ratingItem.cachename|escape} {include file="res_oconly.tpl" oconly=$ratingItem.oconly} {t 1=$ratingItem.ownername|escape}by %1{/t}{$ratingItem.countrating} {include file="res_cachestatus.tpl" status=$ratingItem.status}