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 12-29-2014, 09:30 PM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How NOT to show ads on vbcmps home page?

I have banner ads on the forum which I have put from admincp > advertising.

I also have a vbCMPS homepage. But I don't want these ads to show up on the home page, while I want them to show up on all other pages (like they currently are).

So how to remove these ads just from the vbCMPS homepage?
Reply With Quote
  #2  
Old 12-29-2014, 10:42 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perhaps wrap the ad code in a conditional.

Code:
<vb:if condition="THIS_SCRIPT != 'vbcms'">
    add code here
</vb:if>
Reply With Quote
  #3  
Old 12-29-2014, 11:19 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think he may be talking about the vbadvanced CMPS in which case I have no idea what THIS_SCRIPT is set to for their page. You will need to look it up on the php file.
Reply With Quote
Благодарность от:
ozzy47
  #4  
Old 12-29-2014, 11:24 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If he is talking about vBAdvanced, then it would be this.

Code:
<vb:if condition="THIS_SCRIPT != 'adv_index'">
    add code here
</vb:if>
Reply With Quote
Благодарность от:
Lynne
  #5  
Old 12-29-2014, 11:39 PM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
If he is talking about vBAdvanced, then it would be this.

Code:
<vb:if condition="THIS_SCRIPT != 'adv_index'">
    add code here
</vb:if>
Yes, I am talking about vBAdvanced CMPS.

Where should I put this code? In the advertising place where I put the banner code?

What is the meaning of this code? Does your code mean that the ads should not be displayed in adv_index?
Reply With Quote
  #6  
Old 12-29-2014, 11:42 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you wrap the code you added in the advertising with that conditional. Yes, it means the ad should not display on the vBAdvanced page.
Reply With Quote
  #7  
Old 04-26-2015, 09:00 AM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This successfully worked.

Now what, I want to do is display separate (different) banners on the vBAdvanced CMPS. Is that possible to do?

I put ozzy47's code in the advertising area above all the banner codes and it successfully removed the banners from the home page. Now I want to display banners on this home page which are different from other pages.

Which vBAdvanced CMPS file will I have to edit and put the banner code there for it to be displayed on the top of the home page?
Reply With Quote
  #8  
Old 04-26-2015, 09:14 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<vb:if condition="THIS_SCRIPT == 'adv_index'">
    add code here
</vb:if>
Same place where you put the banner code. Then it should only show on that page.
Reply With Quote
  #9  
Old 04-26-2015, 09:20 AM
XYZ500 XYZ500 is offline
 
Join Date: Aug 2014
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Code:
<vb:if condition="THIS_SCRIPT == 'adv_index'">
    add code here
</vb:if>
Same place where you put the banner code. Then it should only show on that page.
Is there a difference between this code and the code you posted in post 4? It looks the same to me.
I am using the code you posted in post 4 and it did what I wanted it to i.e display banners on all pages EXCEPT the home page.

Now I want to put banners on the home page as well but different from the ones that are currently on all other pages.

For example,

When you go to mysite.com, you will see vBAdvanced CMPS home page and banner A there.

Then you go to mysite.com/forum, you will see the forum and banner B, banner C there.

This is what I want to do.

Currently there are banner B and C on mysite.com/forum and there is nothing on the home page (since I put that code of yours). But now I want to display banner A on the home page.

Do you understand what I'm trying to do?
Reply With Quote
  #10  
Old 04-26-2015, 09:25 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is slightly different, the first one don't show the ads on the vBAdvanced page THIS_SCRIPT != 'adv_index' the second one shows the ads on the vBAdvanced page THIS_SCRIPT == 'adv_index'
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 11:11 PM.


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.04474 seconds
  • Memory Usage 2,259KB
  • 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
  • (5)bbcode_code
  • (2)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
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)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