[xiph-commits] r14680 - branches/dir.xiph.org/templates
balbinus at svn.xiph.org
balbinus at svn.xiph.org
Tue Apr 8 12:27:11 PDT 2008
Author: balbinus
Date: 2008-04-08 12:27:10 -0700 (Tue, 08 Apr 2008)
New Revision: 14680
Modified:
branches/dir.xiph.org/templates/menu_right.tpl
branches/dir.xiph.org/templates/streams_list.tpl
Log:
Smarty needs confirmation to capitalize strings like 'top40' (strings with numbers inside).
Modified: branches/dir.xiph.org/templates/menu_right.tpl
===================================================================
--- branches/dir.xiph.org/templates/menu_right.tpl 2008-04-08 19:02:32 UTC (rev 14679)
+++ branches/dir.xiph.org/templates/menu_right.tpl 2008-04-08 19:27:10 UTC (rev 14680)
@@ -26,7 +26,7 @@
{if !empty($tag_cloud)}
<ul class="tag-cloud">
{foreach item=tag from=$tag_cloud}
- <li class="popularity-{$tag.popularity}"><span class="context">{$tag.tag_usage} streams tagged with </span><a href="{$root_url}/by_genre/{$tag.tag_name|capitalize|escape}" class="tag">{$tag.tag_name|capitalize|escape}</a></li>
+ <li class="popularity-{$tag.popularity}"><span class="context">{$tag.tag_usage} streams tagged with </span><a href="{$root_url}/by_genre/{$tag.tag_name|capitalize:true|escape}" class="tag">{$tag.tag_name|capitalize:true|escape}</a></li>
{/foreach}
</ul>
{else}
Modified: branches/dir.xiph.org/templates/streams_list.tpl
===================================================================
--- branches/dir.xiph.org/templates/streams_list.tpl 2008-04-08 19:02:32 UTC (rev 14679)
+++ branches/dir.xiph.org/templates/streams_list.tpl 2008-04-08 19:27:10 UTC (rev 14680)
@@ -7,7 +7,7 @@
{/if}
<td class="description">
<p class="stream-name">
- <span class="name">{if $stream->getUrl() != ''}<a href="{$stream->getUrl()|escape}">{/if}{$stream->getStreamName()|escape}{if $stream->getUrl() != ''}</a>{/if}</span>
+ <span class="name">{if $stream->getUrl() != ''}<a href="{if substr($stream->getUrl(), 0, 4) == 'http'}{$stream->getUrl()|escape}{else}http://{$stream->getUrl()|escape}{/if}">{/if}{$stream->getStreamName()|escape}{if $stream->getUrl() != ''}</a>{/if}</span>
<span class="listeners">[{$stream->getListeners()|intval} listener{if (($stream->getListeners()|intval) != 1)}s{/if}]</span>
</p>
{*if $stream->getIcon()}
@@ -24,7 +24,7 @@
<div class="stream-tags"><strong>Tags:</strong>
<ul class="inline-tags">
{foreach item=tag_name key=tag_id from=$tags}
- <li><a href="{$root_url}/by_genre/{$tag_name|capitalize|escape}">{$tag_name|capitalize|escape}</a></li>
+ <li><a href="{$root_url}/by_genre/{$tag_name|capitalize:true|escape}">{$tag_name|capitalize|escape}</a></li>
{/foreach}
</ul>
</div>
More information about the commits
mailing list