Page 2 of 2
Re: Showtime 3.0 update -> 3.2
Posted: Mon Apr 02, 2012 6:39 pm
by Pedrosken
in this version :
Some bugfixes
You now can use showt name in showtime tag like: {Showtime show="showname"}
You can now use more then one Nivo slider in one page.
Added translations
de_DE.php
fr_FR.php
nl_NL.php
ru_RU.php
sr_YU.php
tr_TR.php
download here
Re: Showtime 3.0 update -> 3.2
Posted: Thu Apr 05, 2012 2:58 pm
by PinkElephant
Thanks for a great module, Pedrosken!
Looking at 3.2, I'd like to be able to do something like this:
{Showtime name="$page_alias"}
... in a template. Ideally, if no Show matches the current page alias then a default show is loaded. How might I go about that? For example, could a UDT test for the presence of a show name before defining the call?
In the longer run, I'm wondering about efficiency and whether this is better done within the module with a new optional parameter:
{Showtime name="$page_alias" fallback="DefaultShow"}
... but maybe that's getting greedy.
Any ideas welcome, thanks.
Re: Showtime 3.0
Posted: Thu Apr 05, 2012 8:01 pm
by Dr.CSS
You can try...
{capture assign='test'}{Showtime name="$page_alias"}{/capture}
{if !empty($test)} this means "if not empty"
{$test}
{else}
{Showtime name="default"}
{/if}
Re: Showtime 3.0
Posted: Thu Apr 05, 2012 11:12 pm
by PinkElephant
Thanks for the pointer Dr.Css. I'm getting close with this:
Code: Select all
{capture assign='showtime_show'}{Showtime show="$page_alias"}{/capture}
{if $showtime_show|truncate:14:"" != 'No show found!'}
{$showtime_show}
{else}
{Showtime show="Default"}
{/if}
... but somehow I've lost the caption formatting when non-default shows load. It'll probably make more sense tomorrow...
Re: Showtime 3.0
Posted: Thu Apr 05, 2012 11:19 pm
by Dr.CSS
May I ask why you added the truncate part?...
Re: Showtime 3.0
Posted: Fri Apr 06, 2012 7:33 am
by PinkElephant
@Dr.CSS The truncation is to match the start of the full (en_us) 'no show' message which appears to be:
Code: Select all
$lang['changepic_noshow'] = 'No show found! <strong>show="%s"</strong> does not exist.';
(where %s === $page_alias).