vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Please HELP on customize code . (https://vborg.vbsupport.ru/showthread.php?t=321524)

sangita 01-18-2016 07:16 AM

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.

RichieBoy67 01-18-2016 08:15 AM

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

sangita 01-18-2016 02:55 PM

Quote:

Originally Posted by RichieBoy67 (Post 2562868)
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 .

Dragonsys 01-18-2016 03:50 PM

Quote:

Originally Posted by sangita (Post 2562886)
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?

sangita 01-18-2016 05:40 PM

Quote:

Originally Posted by Dragonsys (Post 2562895)
? 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 ?

nhawk 01-18-2016 05:50 PM

Quote:

Originally Posted by sangita (Post 2562909)
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.

Max Taxable 01-18-2016 06:10 PM

Quote:

Originally Posted by sangita (Post 2562909)
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.

RichieBoy67 01-19-2016 01:02 AM

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

Dave 01-19-2016 01:09 AM

Quote:

Originally Posted by RichieBoy67 (Post 2562939)
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.

RichieBoy67 01-19-2016 01:19 AM

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.


All times are GMT. The time now is 01:18 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.03866 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete