Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2016, 07:16 AM
sangita sangita is offline
 
Join Date: Feb 2015
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Please HELP on customize code .

Hello

Dearest vbulletin Support Team.

Can you please guide me how to hide ads code on vbulletin forum ? is there any code or mod for that in order to hide particular ads code that I implement on forum/board ?
(I place ads through AdminCP > Advertisement)

Note : I don't Wish to Disable Right Click on board .

Thank you.
Reply With Quote
  #2  
Old 01-18-2016, 08:15 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure, use a conditional.

PHP Code:
<vb:if condition="!in_array($GLOBALS[forumid], array(###,###))">

Your ad code here
</vb:if> 
Replace ## with your forum ids..ad more forums if needed, use commas
Reply With Quote
  #3  
Old 01-18-2016, 02:55 PM
sangita sangita is offline
 
Join Date: Feb 2015
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
Sure, use a conditional.

PHP Code:
<vb:if condition="!in_array($GLOBALS[forumid], array(###,###))">

Your ad code here
</vb:if> 
Replace ## with your forum ids..ad more forums if needed, use commas
Thanks for your reply.

I have tried it, when I use this code it show a message at the top of the forum & it didn't work - see the error below
"Parse error: syntax error, unexpected ';', expecting ')' in /home/****/public_html/includes/class_core.php(415) : eval()'d code on line 7"

Can you please let know why I have to put forum ids there ? as I want to display ads all over the forum .
Reply With Quote
  #4  
Old 01-18-2016, 03:50 PM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sangita View Post
Can you please let know why I have to put forum ids there ? as I want to display ads all over the forum .
? You asked how to hide ads, now you say you want to show them everywhere?
Reply With Quote
Благодарность от:
RichieBoy67
  #5  
Old 01-18-2016, 05:40 PM
sangita sangita is offline
 
Join Date: Feb 2015
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dragonsys View Post
? You asked how to hide ads, now you say you want to show them everywhere?
No dear, I asked how to hide "ads code" but not ads . I mean to say - people won't be able to see the "ads code" from the source page (using ctrl+u or right click > view page source)

Can you help on this Dragonsys ?
Reply With Quote
  #6  
Old 01-18-2016, 05:50 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sangita View Post
No dear, I asked how to hide "ads code" but not ads . I mean to say - people won't be able to see the "ads code" from the source page (using ctrl+u or right click > view page source)

Can you help on this Dragonsys ?
There is nothing that can stop people from viewing the page source. There is a way to make it harder for an unknowing user, but nothing to completely prevent it.
Reply With Quote
  #7  
Old 01-18-2016, 06:10 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sangita View Post
No dear, [B]I asked how to hide "ads code" but not ads . I mean to say - people won't be able to see the "ads code" from the source page (using ctrl+u or right click > view page source)
If it is not in the source code, it will not render on the page.
Reply With Quote
  #8  
Old 01-19-2016, 01:02 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I ask why you care if people see your ad code?

I believe it can be done using javascript:

http://www.htmlgoodies.com/beyond/ar...ource-Code.htm
Reply With Quote
  #9  
Old 01-19-2016, 01:09 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
Can I ask why you care if people see your ad code?

I believe it can be done using javascript:

http://www.htmlgoodies.com/beyond/ar...ource-Code.htm
I can just disable JavaScript or you can just open the page and press F12 to open up the developer tools to see the HTML. It's impossible to hide such stuff at the client side.
Reply With Quote
  #10  
Old 01-19-2016, 01:19 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah Dave, ofcourse you and I can do that but the average person may not want to waste the time or know how to do so.
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 02:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04163 seconds
  • Memory Usage 2,263KB
  • Queries Executed 11 (?)
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_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete