[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1074] Moving top track to stats page (or at least att
From: |
Toby Inkster |
Subject: |
[Librefm-commits] [1074] Moving top track to stats page (or at least attempting to) |
Date: |
Thu, 30 Apr 2009 18:24:51 +0000 |
Revision: 1074
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1074
Author: tobyink
Date: 2009-04-30 18:24:51 +0000 (Thu, 30 Apr 2009)
Log Message:
-----------
Moving top track to stats page (or at least attempting to)
Modified Paths:
--------------
trunk/nixtape/themes/librefm/templates/user-profile.tpl
trunk/nixtape/themes/librefm/templates/user-stats.tpl
trunk/nixtape/user-profile.php
trunk/nixtape/user-stats.php
Modified: trunk/nixtape/themes/librefm/templates/user-profile.tpl
===================================================================
--- trunk/nixtape/themes/librefm/templates/user-profile.tpl 2009-04-30
18:06:11 UTC (rev 1073)
+++ trunk/nixtape/themes/librefm/templates/user-profile.tpl 2009-04-30
18:24:51 UTC (rev 1074)
@@ -54,13 +54,6 @@
{/section}
</ul>
-<h3>{$me->name}'s Top Tracks</h3>
-<ul>
-{section name=i loop=$toptracks}
-<li style="width:{$toptracks[i].width}" class="toptrack"><a
href="{$toptracks[i].artisturl}">{$toptracks[i].artist}</a> - <a
href="{$toptracks[i].trackurl}">{$toptracks[i].track}<a></li>
-{/section}
-</ul>
-
<!-- Column break -->
</div></div><div class="yui-u" id="sidebar"><div style="padding: 10px;">
Modified: trunk/nixtape/themes/librefm/templates/user-stats.tpl
===================================================================
--- trunk/nixtape/themes/librefm/templates/user-stats.tpl 2009-04-30
18:06:11 UTC (rev 1073)
+++ trunk/nixtape/themes/librefm/templates/user-stats.tpl 2009-04-30
18:24:51 UTC (rev 1074)
@@ -1,11 +1,11 @@
{include file='header.tpl'}
-<h2 property="dc:title">{$user|escape:'html':'UTF-8'}'s statistics</h2>
+<h2 property="dc:title">{$me->name|escape:'html':'UTF-8'}'s statistics</h2>
{include file='maxiprofile.tpl'}
-<h3 id="stats_by_artist">{$user}'s most played artists</h3>
-<table class="stats_artists" about="{$id}">
+<h3 id="stats_by_artist">{$me->name|escape:'html':'UTF-8'}'s most played
artists</h3>
+<table class="stats_artists" about="{$me->id}">
{section name=i loop=$user_playstats}
<tr><td class="counts">{$user_playstats[i].count}</td><td class="bar"
style="width: {$stat_barwidth}px"><div
style="width:{$user_playstats[i].size}px" class="artist"></div></td><td><a
href="{$user_playstats[i].pageurl|escape:'html':'UTF-8'}" rel="{if
$user_playstats[i].size|substr:-5 ==
@@ -13,8 +13,26 @@
{/section}
</table>
-<h3 id="stats_by_day">{$user}'s scrobbles by day</h3>
-<table class="stats_artists" about="{$id}">
+<h3 id="stats_by_track">{$me->name|escape:'html':'UTF-8'}'s Top Tracks</h3>
+<table class="stats_artists" about="{$me->id}">
+{section name=i loop=$toptracks}
+ <tr>
+ <td class="counts">{$toptracks[i].c}</td>
+ <td class="bar" style="width: {$toptracks[i].width}px">
+ <div style="width:{$toptracks[i].width}px"
class="track"></div>
+ </td>
+ <td>
+ <a
href="{$toptracks[i].artisturl|escape:'html':'UTF-8'}">{$toptracks[i].artist|escape:'html':'UTF-8'}</a>
+ </td>
+ <td>
+ <a
href="{$toptracks[i].trackurl|escape:'html':'UTF-8'}">{$toptracks[i].track|escape:'html':'UTF-8'}</a>
+ </td>
+ </tr>
+{/section}
+</table>
+
+<h3 id="stats_by_day">{$me->name|escape:'html':'UTF-8'}'s scrobbles by day</h3>
+<table class="stats_artists" about="{$me->id}">
{section name=i loop=$user_daystats}
<tr><td class="counts">{$user_daystats[i].count}</td><td class="bar"
style="width: {$stat_barwidth}px"><div style="width:{$user_daystats[i].size}px"
class="artist"></div></td><td class="date">{$user_daystats[i].date}</td></tr>
{/section}
Modified: trunk/nixtape/user-profile.php
===================================================================
--- trunk/nixtape/user-profile.php 2009-04-30 18:06:11 UTC (rev 1073)
+++ trunk/nixtape/user-profile.php 2009-04-30 18:24:51 UTC (rev 1074)
@@ -76,8 +76,6 @@
)
));
- $smarty->assign('toptracks', $user->getTopTracks());
-
$smarty->display('user-profile.tpl');
} else {
$smarty->assign('error', 'User not found');
Modified: trunk/nixtape/user-stats.php
===================================================================
--- trunk/nixtape/user-stats.php 2009-04-30 18:06:11 UTC (rev 1073)
+++ trunk/nixtape/user-stats.php 2009-04-30 18:24:51 UTC (rev 1074)
@@ -35,12 +35,7 @@
$user = new User($_GET['user']);
if(isset($user->name)) {
- $smarty->assign("id", $user->id);
- $smarty->assign("acctid", $user->acctid);
- $smarty->assign('user', $user->name);
- $smarty->assign('homepage', $user->homepage);
- $smarty->assign('location', $user->location);
- $smarty->assign('location_uri', $user->location_uri);
+
$aUserScrobbles = $user->getScrobbles(20);
if (!PEAR::isError ($aUserScrobbles)) {
$smarty->assign('scrobbles', $aUserScrobbles);
@@ -67,6 +62,8 @@
$smarty->assign('user_daystats',$aUserDayStat);
}
+ $smarty->assign('toptracks', $user->getTopTracks());
+
$smarty->assign('me', $user);
$smarty->assign('isme', ($_SESSION['user']->name == $user->name));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1074] Moving top track to stats page (or at least attempting to),
Toby Inkster <=