Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Mar 2018, 21:42
Emad ELsayed's Avatar
Emad ELsayed Emad ELsayed is offline
 
Join Date: Feb 2013
How this code works in vBulletin 5

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
Reply With Quote
  #2  
Old 18 Mar 2018, 08:34
delicjous's Avatar
delicjous delicjous is online now
 
Join Date: Nov 2014
Originally Posted by Emad ELsayed View Post
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
__________________
vBulletin-forum.de | Das deutschsprachige vBulletin 5 Forum! | Widgets, Mods und Anleitungen auf deutsch.
Team online, New: Show hook-positions, Moderation-Info, , Latest Likes, Auto-close Threads
Reply With Quote
  #3  
Old 18 Mar 2018, 09:23
Emad ELsayed's Avatar
Emad ELsayed Emad ELsayed is offline
 
Join Date: Feb 2013
Originally Posted by delicjous View Post
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
Reply With Quote
  #4  
Old 18 Mar 2018, 10:02
delicjous's Avatar
delicjous delicjous is online now
 
Join Date: Nov 2014
Look at the sourcecode (Firefox, press cmd + u) of the pages and look what is print out there.
Than you could decide by yourself ;-)
__________________
vBulletin-forum.de | Das deutschsprachige vBulletin 5 Forum! | Widgets, Mods und Anleitungen auf deutsch.
Team online, New: Show hook-positions, Moderation-Info, , Latest Likes, Auto-close Threads
Reply With Quote
  #5  
Old 18 Mar 2018, 11:44
Emad ELsayed's Avatar
Emad ELsayed Emad ELsayed is offline
 
Join Date: Feb 2013
Originally Posted by delicjous View Post
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 05:26.

Layout Options | Width: Wide Color: