Go Back   vb.org Archive > News and Announcements > vBulletin Pre-Sales Questions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2020, 08:13 AM
lakshadvio lakshadvio is offline
 
Join Date: Apr 2020
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 https://19216801.onl/ https://routerlogin.uno/https://192168ll.link/ 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 04-29-2020, 05:11 AM
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by lakshadvio View Post
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
try the variable $page['channelid']
If you want to select the channel only the $page['channelid'] have to be equal to $page['nodeid']
Reply With Quote
  #3  
Old 04-24-2023, 03:53 AM
AriahAnne AriahAnne is offline
 
Join Date: Apr 2023
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To adapt the code for vBulletin 5, you would need to make a few changes. Instead of using [forumid], you would need to use [nodeid] as you mentioned. However, you would also need to update the syntax to reflect the changes in vBulletin 5.

Here is an updated version of the code that should work in vBulletin 5:

<vb:if condition="!in_array($node->nodeid, array(5,47,2))">
Ads Here
</vb:if>
This code checks if the node ID of the current page is not in the array of blocked node IDs (5, 47, and 2 in this example), and only displays the "Ads Here" content if the condition is true.

Make sure to replace the node IDs in the array with the actual IDs of the channels where you want to block ads. You can find the node ID by going to the channel's page and looking at the URL in your browser's address bar. The node ID is the number after the last hyphen.

If you have already tried this updated code and it is still not working, you may need to check your vBulletin 5 installation to ensure that it is configured correctly and that there are no conflicts with other add-ons or customizations.
Reply With Quote
  #4  
Old 08-18-2023, 04:22 AM
Tylerbull Tylerbull is offline
 
Join Date: Aug 2023
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hii, Live The Orange Life

You can add this code for it:
Code:
<vb:if condition="!in_array($GLOBALS['nodeid'], array(5,47,2))">
Ads Here
</vb:if>
This may be help you to solve issue.

Best regard,
Tyler
Reply With Quote
  #5  
Old 09-29-2023, 11:53 AM
DrewDressler DrewDressler is offline
 
Join Date: Sep 2023
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, i am new, can i ask a question?
Reply With Quote
  #6  
Old 11-06-2023, 12:07 PM
Bovyue
Guest
 
Posts: n/a
Default

To adapt the code for blocking ads in specific channels from vBulletin 4 to vBulletin 5, you'll need to make a few changes. The primary difference is in how nodes (forums) are structured in vBulletin 5. The variable [nodeid] can be used, but you also need to specify the node IDs for the specific channels you want to block ads in. Here's how you can modify the code:

Code:
<vb:if condition="!in_array($GLOBALS['nodeid'], array(5, 47, 2))">
    Ads Here
</vb:if>
Make sure to replace the node IDs (5, 47, 2) with the actual node IDs of the channels where you want to block ads. This code should work in vBulletin 5 to block ads in the specified channels.
Reply With Quote
Reply


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


All times are GMT. The time now is 06:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04313 seconds
  • Memory Usage 2,208KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (5)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete