Log in

View Full Version : How this code works in vBulletin 5


Emad ELsayed
03-13-2018, 08:42 PM
This code is for blocking ads in specific channels

He was working at vb4

<vb:if condition="!in_array($GLOBALS[forumid], array(5,47,2))">
Ads Here
</vb:if>

How to use it with vBulletin 5
I changed [forumid] to [nodeid] but did not work
I hope to find the solution

Best Regards

delicjous
03-18-2018, 07:34 AM
This code is for blocking ads in specific channels

He was working at vb4



How to use it with vBulletin 5
I changed [forumid] to [nodeid] but did not work
I hope to find the solution

Best Regards

Try this:
<vb:if condition="!in_array($page['nodeid'], array(5,47,2))">
Ads Here
</vb:if>

If you use a hook you have to put page=page into the arguments

Emad ELsayed
03-18-2018, 08:23 AM
Try this:
<vb:if condition="!in_array($page['nodeid'], array(5,47,2))">
Ads Here
</vb:if>

If you use a hook you have to put page=page into the arguments

Thank you dear
It works now excellently
And I modify it also works but do not know which one is better

<vb:if condition="in_array($page['channelid'], array(16,26,30))">
Ads Here
</vb:if>

Waiting for your assistance
Best Regards

delicjous
03-18-2018, 09:02 AM
Look at the sourcecode (Firefox, press cmd + u) of the pages and look what is print out there.
Than you could decide by yourself ;-)

Emad ELsayed
03-18-2018, 10:44 AM
Look at the sourcecode (Firefox, press cmd + u) of the pages and look what is print out there.
Than you could decide by yourself ;-)

Thank you for your cooperation and everything is fine now
Best Regards