Showtime 3.0

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Pedrosken

Re: Showtime 3.0 update -> 3.2

Post 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
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

Re: Showtime 3.0 update -> 3.2

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Showtime 3.0

Post 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}
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

Re: Showtime 3.0

Post 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...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Showtime 3.0

Post by Dr.CSS »

May I ask why you added the truncate part?...
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 173
Joined: Fri Feb 06, 2009 2:08 pm

Re: Showtime 3.0

Post 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).
Locked

Return to “Modules/Add-Ons”