View Full Version : Please HELP on customize code .
sangita
01-18-2016, 07:16 AM
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.
<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
Sure, use a conditional.
<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
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
? 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
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
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/article.php/3875651/Web-Developer-Class-How-to-Hide-your-Source-Code.htm
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/article.php/3875651/Web-Developer-Class-How-to-Hide-your-Source-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.
Indeed, the average person wont bother. :p
But to keep it short for OP, it's not possible.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.