SimplePortal

Customization => Custom Coding => Topic started by: wellwisher on April 22, 2016, 03:54:56 AM

Title: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 22, 2016, 03:54:56 AM
Hello Simpleportal develpers & Community,

SimplePortal Question: How do we show blocks for certain topics only?

Why would we need this?

Basically I wish to run an ad-unit for certain topics (topics which meet our advertisers demands/ TOS requirements), it will help us generate more revenue.

Much respect,

Wellwisher
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: ♦ Ninja ZX-10RR ♦ on April 22, 2016, 04:31:43 AM
Hi,

Please refer to our documentation, it should be clear about it already: http://simpleportal.net/index.php?action=docs;area=custom_blocks_display

In case it isn't, it should be ~topic|10.0 (replace 10.0 with the topic ID). This of course goes into custom display options in the block settings. That should do the trick.

Regards
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 22, 2016, 06:50:06 AM
Hi,

Please refer to our documentation, it should be clear about it already: http://simpleportal.net/index.php?action=docs;area=custom_blocks_display

In case it isn't, it should be ~topic|10.0 (replace 10.0 with the topic ID). This of course goes into custom display options in the block settings. That should do the trick.

Regards

I tried this, but the block isn't being displayed on the post I selected?

(http://i.imgur.com/k1uEujJ.jpg)
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 22, 2016, 07:08:54 AM
Nevermind I got it working, in Display Options > Make sure "Post" is checked.

Thank you for your help ♦ Ninja ZX-10RR ♦   :)

Works perfectly, I didn't know this was possible in SimplePortal, wow hats-off to you folks for the hard work you guys put into this project, it'll help me generate more revenue. I will contribute/ sponsor you folks with the first revenue I generate from using this trick (could be awhile).

Once again, really appreciate your hard work with SP.

Thank you,

Wellwisher!
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 27, 2016, 05:05:29 AM
Adding to this post. I am trying to create a block which is present on the front page (index.php) and boards but don't show on "posts/topic" pages. How do I add that on a custom html block? I am a little lost on this note tbh.  :3

Reading that article I put this in:

Ticked the "forum" in advance options and use:
Custom Display Options:~board,-~action|post

The block shows in index.php but not in boards/post list. I want it to show on index.php, boards with posts list basically if that makes sense.

(http://i.imgur.com/JfiRtM1.jpg)
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: ♦ Ninja ZX-10RR ♦ on April 27, 2016, 05:37:43 AM
I swear I had replied... Or... No, really, I could have sworn i did reply :(
Thanks for the kind words, we appreciate that :)
What you ask should be in custom display Custom Display Options: ~-topic
EDIT: Wait, then it should be what you set it up, plus select all the boards and then Custom Display Options: ~-topic, ~action|post
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 27, 2016, 05:46:54 AM
I swear I had replied... Or... No, really, I could have sworn i did reply :(
Thanks for the kind words, we appreciate that :)
What you ask should be in custom display Custom Display Options: ~-topic
EDIT: Wait, then it should be what you set it up, plus select all the boards and then Custom Display Options: ~-topic, ~action|post

I ticked "forum", and selected all boards and added "~-topic, ~action|post" but the block still shows on the post/topic page and I don't want it to be displayed there.
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: Chen Zhen on April 27, 2016, 06:03:32 AM

For a specific topic number...
ie. topic=1.0
Code: [Select]
~topic|1.0
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: ♦ Ninja ZX-10RR ♦ on April 27, 2016, 06:20:17 AM
I believe he wants to negate all topics, not just one >.<
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 27, 2016, 06:28:41 AM
I believe he wants to negate all topics, not just one >.<

You're reading my mind like some sort of Ninja. <3 Yes this is true, I wish to negate topics and only show the block on index.php, and on boards. Been trying to figure this out for a while now. I tried a dozen combinations.

Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: emanuele on April 27, 2016, 07:26:04 AM
I feel like the answer is the same as to this topic:
http://simpleportal.net/index.php?topic=14326.0

so:
http://simpleportal.net/index.php?topic=14326.msg71821#msg71821
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: ♦ Ninja ZX-10RR ♦ on April 27, 2016, 08:54:11 AM
Freaking kill me, I reversed the symbols, it's -~ and not the opposite! Of course it didn't work #_# Sorry :S
Title: Re: SimplePortal Question: How to show blocks for certain topics only?
Post by: wellwisher on April 27, 2016, 09:22:23 AM
I feel like the answer is the same as to this topic:
http://simpleportal.net/index.php?topic=14326.0

so:
http://simpleportal.net/index.php?topic=14326.msg71821#msg71821

Thank you @Emanuele, this worked! I wouldn't have figured this out on my own. Seriously my genuine thank you to good folks at Simpleportal. Thanks to @Ninja for helping me out previously. As you folks may be able to tell, I was a bit lost with this issue.  :P

You guys!

(http://i.imgur.com/MgTWKGY.gif)
SimplePortal 2.3.8 © 2008-2024, SimplePortal