Commit ba626abd authored by Matt Lee's avatar Matt Lee

more template fixes

parent af095214
......@@ -42,9 +42,10 @@ if(isset($_POST['login'])) {
if(empty($errors)) {
try {
$userid = $adodb->GetOne('SELECT uniqueid FROM Users WHERE '
$sql = 'SELECT uniqueid FROM Users WHERE '
. ' lower(username) = ' . $adodb->qstr(strtolower($username))
. ' AND password = ' . $adodb->qstr(md5($password)) . ' AND active = 1');
. ' AND password = ' . $adodb->qstr(md5($password)) . ' AND active = 1';
$userid = $adodb->GetOne($sql);
}
catch (exception $e) {
$errors .= 'A database error happened.';
......
......@@ -13,41 +13,17 @@
{/section}
{/if}
<div about="[_:seq1]" typeof="rdf:Seq" rev="rss:items">
<h3 typeof="rss:channel" property="rss:title" rel="rss:link" resource="#latest_plays" id="latest_plays" content="{$me->name|escape:'html':'UTF-8'}'s Latest Plays">{t plays=$scrobbles|@count}Latest %1 Plays:{/t}</h3>
</div>
<h3>{t plays=$scrobbles|@count}Latest %1 Plays:{/t}</h3>
<ul class="gobbles" about="{$me->id|escape:'html':'UTF-8'}" rev="gob:user">
{section name=i loop=$scrobbles}
<ol class="gobbles" about="{$me->id|escape:'html':'UTF-8'}" rev="gob:user">
<li class="play {if $scrobbles[i].license > 0}libre{/if}" about="{$scrobbles[i].id|escape:'html':'UTF-8'}" typeof="rss:item gob:ScrobbleEvent" rel="gob:track_played">
<div about="{$scrobbles[i].id_track|escape:'html':'UTF-8'}" typeof="mo:Track" class="haudio">
<div rev="mo:track">
<div about="{$scrobbles[i].id_album|escape:'html':'UTF-8'}" typeof="mo:Record"{if $scrobbles[i].album} property="dc:title" content="{$scrobbles[i].album|escape:'html':'UTF-8'}"{/if}>
{if $scrobbles[i].albumurl}<a rel="foaf:page" href="{$scrobbles[i].albumurl|escape:'html':'UTF-8'}">{/if}
<span{if $scrobbles[i].album_image} rel="foaf:depiction"{/if}{if $scrobbles[i].albumurl} about="{$scrobbles[i].id_album|escape:'html':'UTF-8'}"{/if}>
<img height="50" width="50"
src="{if !$scrobbles[i].album_image}http://s.libre.fm/librefm/img/qm50.png{else}{$scrobbles[i].album_image|escape:'html':'UTF-8'}{/if}"
class="albumart{if !$scrobbles[i].album_image} photo{/if}"
{if $scrobbles[i].album}title="{$scrobbles[i].album|escape:'html':'UTF-8'}" alt="Album: {$scrobbles[i].album|escape:'html':'UTF-8'}"{else}alt="Unknown album"{/if} />
</span>
{if $scrobbles[i].albumurl}</a>{/if}
</div>
</div>
<div rel="foaf:maker" class="contributor vcard">
<a about="{$scrobbles[i].id_artist|escape:'html':'UTF-8'}" typeof="mo:MusicArtist" property="foaf:name" rel="foaf:page"
{section name=i loop=$scrobbles}
<li>
<a href="{$scrobbles[i].trackurl|escape:'html':'UTF-8'}">{$scrobbles[i].track|escape:'html':'UTF-8'}</a> by <a about="{$scrobbles[i].id_artist|escape:'html':'UTF-8'}" typeof="mo:MusicArtist" property="foaf:name" rel="foaf:page"
class="fn url" href="{$scrobbles[i].artisturl|escape:'html':'UTF-8'}"
>{$scrobbles[i].artist|escape:'html':'UTF-8'}</a>
</div>
<div><a class="fn" property="dc:title" rel="foaf:page" href="{$scrobbles[i].trackurl|escape:'html':'UTF-8'}">{$scrobbles[i].track|escape:'html':'UTF-8'}</a></div>
<small about="{$scrobbles[i].id|escape:'html':'UTF-8'}" property="dc:date" content="{$scrobbles[i].timeiso}" datatype="xsd:dateTime">{$scrobbles[i].timehuman}</small>
<span about="{$scrobbles[i].id|escape:'html':'UTF-8'}" property="rss:link" content="{$scrobbles[i].trackurl|escape:'html':'UTF-8'}">
<span property="rss:description" content="{if $scrobbles[i].album}{$scrobbles[i].album}{else}Unknown album{/if}">
<span property="rss:title" content="{$scrobbles[i].artist|escape:'html':'UTF-8'}: {$scrobbles[i].track|escape:'html':'UTF-8'}" rev="rdf:_{$smarty.section.i.index_next}" resource="[_:seq1]"></span>
</span>
</span>
</div>
>{$scrobbles[i].artist|escape:'html':'UTF-8'}</a> {if $scrobbles[i].albumurl} on the album, <a href="{$scrobbles[i].albumurl|escape:'html':'UTF-8'}">{/if}
&mdash; {$scrobbles[i].timehuman}
</li>
{/section}
</ul>
</ol>
{include file='footer.tpl'}
......@@ -51,8 +51,6 @@ if(isset($user->name)) {
} catch (exception $e) {}
$smarty->assign('isme', ($this_user->name == $user->name));
$smarty->assign('me', $user);
$smarty->assign('sidebar', true);
$smarty->assign('sidebartemplate', 'profile-sidebar.tpl');
$smarty->assign('extra_head_links', array(
array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment