PDA

View Full Version : Stop notices from appearing in-thread?


tambo
05-10-2012, 06:17 AM
Is this possible?

For example, if I have a notice that is set to display in Forum X, is there a way of making sure it only displays on Forum X's thread index, and not inside the actual threads?

I'm assuming it's possible as the URL changes from:

http://www.domain/vb/forums/forumnumber-forumname

to

http://www.domain/vb/threads/threadnumber-threadname

...when you enter a thread.

I'm therefore assuming that the solution lies with an "if this script" conditional

<if condition=" THIS_SCRIPT == 'forumdisplay' ">


...but I'm not quite sure how or where to structure it. Can anybody point me in the right direction?

LifesGreatestGift
05-10-2012, 06:27 AM
to apply this to all notices (not show them in any threads) you would open your navbar template and
Find:
<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'">

Replace With:
<vb:if condition="$show['notices'] AND (!in_array(THIS_SCRIPT, array('register','showthread')))">

tambo
05-10-2012, 07:08 AM
Ah ha! I can confirm that it works.

I think I understand why as well. :D

Thankyou for the instruction. Really appreciated.