SimplePortal

Support => English Support => Topic started by: Nothingness on November 20, 2011, 06:50:12 PM

Title: Blocks to display only on Topics View
Post by: Nothingness on November 20, 2011, 06:50:12 PM
Was trying to get some block to display only on topics view rather than allboards.

Was the reply directly at me?
http://www.simplemachines.org/community/index.php?topic=227599.msg3212332#msg3212332
Title: Re: Blocks to display only on Topics View
Post by: [SiNaN] on November 21, 2011, 01:15:35 PM
Yes. You can do it using the new Complex Display Options but it will not be possible otherwise with 2.3.3 version. 2.3.4 should become the new stable version very soon.
Title: Re: Blocks to display only on Topics View
Post by: Nothingness on November 21, 2011, 01:27:07 PM
Yes. You can do it using the new Complex Display Options but it will not be possible otherwise with 2.3.3 version. 2.3.4 should become the new stable version very soon.
It's not in the 2.3.4 RC1?
Title: Re: Blocks to display only on Topics View
Post by: [SiNaN] on November 21, 2011, 01:54:02 PM
It is available in 2.3.4 RC1, of course. But it's not our stable version yet. It's a Release Candidate. Once it becomes the stable release, I'll comfortably suggest using that version instead.
Title: Re: Blocks to display only on Topics View
Post by: Nothingness on November 21, 2011, 01:58:04 PM
I see, just tried the code on RC1, it doesn't show them on topics. I will wait for the stable release. Thanks, [SiNaN]
Title: Re: Blocks to display only on Topics View
Post by: [SiNaN] on November 21, 2011, 02:15:17 PM
Looks like that variable is not initialized at that point. This should work though:

Code: [Select]
$php global $context; return !empty($context['current_topic']) && empty($context['current_action']);
Title: Re: Blocks to display only on Topics View
Post by: Nothingness on November 21, 2011, 02:21:58 PM
Looks like that variable is not initialized at that point. This should work though:

Code: [Select]
$php global $context; return !empty($context['current_topic']) && empty($context['current_action']);
That does it. :)
Title: Re: Blocks to display only on Topics View
Post by: [SiNaN] on November 21, 2011, 02:26:21 PM
Cool. Marked as solved then. ;)
SimplePortal 2.3.8 © 2008-2024, SimplePortal