vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - vB Ad Management 4 (https://vborg.vbsupport.ru/showthread.php?t=131150)

John W Smith 01-15-2007 04:55 PM

Quote:

Originally Posted by RedTyger (Post 1158709)
That I couldn't tell you, I don't actually use advertisements myself so I'm not au fait with Adsense's TOS. But I believe roughly speaking they require original "content" on a page displayed with advertisements. So search results, registration pages, redirection pages and so on where there is none would be a no-go.

Don't take my word for it though, be sure to look it up yourself.

Specifically, if I wish to prevent an ad on a login page, which script would I enter in the exclude. How can I tell which script produces which page. Is there a list somewhere?

project-Buckfas 01-15-2007 05:27 PM

Hope this helps....

Quote:

Originally Posted by John W Smith (Post 1159964)
Specifically, if I wish to prevent an ad on a login page, which script would I enter in the exclude. How can I tell which script produces which page. Is there a list somewhere?

Code:

<if condition="!(
(THIS_SCRIPT == 'login') OR
(THIS_SCRIPT == 'register') OR
(THIS_SCRIPT == 'usercp') OR
(THIS_SCRIPT == 'private') OR
(THIS_SCRIPT == 'subscription') OR
(THIS_SCRIPT == 'payments') OR
(THIS_SCRIPT == 'invites') OR
(THIS_SCRIPT == 'memberlist') OR
(THIS_SCRIPT == 'online') OR
(THIS_SCRIPT == 'member') OR
(THIS_SCRIPT == 'spiders') OR
(THIS_SCRIPT == 'psistats') OR
(THIS_SCRIPT == 'profile') OR
(THIS_SCRIPT == 'faq') OR
(THIS_SCRIPT == 'sendmessage') OR
(THIS_SCRIPT == 'arcade') OR
(THIS_SCRIPT == 'showgroups') OR
(THIS_SCRIPT == 'calendar') OR
(THIS_SCRIPT == 'calendar') AND $_REQUEST['do'] == 'add') OR
(THIS_SCRIPT == 'misc') AND $_REQUEST['moderator_stats'] == '') OR
(THIS_SCRIPT == 'search') AND $_REQUEST['searchid'] == '') OR
(THIS_SCRIPT == 'THIS_SCRIPT')


Reece^B 01-15-2007 06:15 PM

Sweet hack mate, just a few questions.

The left column, how can I make it so it only displays on the forumhome.

RedTyger 01-15-2007 06:29 PM

Quote:

Originally Posted by Reece^B (Post 1160045)
Sweet hack mate, just a few questions.

The left column, how can I make it so it only displays on the forumhome.

Edit the leftcolumn_advertisement template. Surround the contents with:

Code:

<if condition="THIS_SCRIPT == 'forumhome'">
Contents of template
</if>


Reece^B 01-15-2007 07:04 PM

Cheers bud, I tried this but no joy, where exactly should I place it?

PHP Code:

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
    <
tr>
        <
td valign="top" align="left" style="padding-right:12px;">
            <
br />
            <
table align="left" border="1px" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]class="tborder">
                <
tr>
                    <
td class="thead">
                        
$adtitle
                    
</td>
                </
tr>
                <
tr>
                    <
td class="alt1">
                        
$leftcolumn_adcode
                    
</td>
                </
tr>
            </
table>
        </
td>
        <
td valign="top">
            <
table width="100%" cellpadding="0" cellspacing="0" border="0">
            <
tr>
                <
td valign="top"


RedTyger 01-15-2007 07:09 PM

Oh, I forgot. The column templates actually spread across two templates, not one. And also I gave you the wrong conditional. Faux pas, sorry 'bout that.

Because the columns use multiple templates, this means that you can't do the usual technique of just excluding it from a page because it would exclude everything between that template and the footer as well. Which is a lot.

So for a bit of a rough workaround, we can remove the adcode and just hide the table instead.

Replace the contents of the leftcolumn_advertisement template with:

PHP Code:

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" <if condition="THIS_SCRIPT == 'index'">style="display:none;"</if>>
    <
tr>
        <
td valign="top" align="left" style="padding-right:12px;">
            <
br />
            <
table align="left" border="1px" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]class="tborder">
                <
tr>
                    <
td class="thead">
                        
$adtitle
                    
</td>
                </
tr>
                <
tr>
                    <
td class="alt1">
                        <if 
condition="THIS_SCRIPT == 'index'">$leftcolumn_adcode</if>
                    </
td>
                </
tr>
            </
table>
        </
td>
        <
td valign="top">
            <
table width="100%" cellpadding="0" cellspacing="0" border="0">
            <
tr>
                <
td valign="top"

That should just hide the column and remove the adverts on the index page and shouldn't break XHTML validation either.

Reece^B 01-15-2007 08:26 PM

umm I added the code, but consequently it removed all my forums just leaving the header and footer, lol.

RedTyger 01-15-2007 08:29 PM

Quote:

Originally Posted by Reece^B (Post 1160135)
umm I added the code, but consequently it removed all my forums just leaving the header and footer, lol.

:D

Sorry, not my best time of night for clear thinking. Ok, try this:

PHP Code:

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
    <
tr>
        <
td valign="top" align="left" <if condition="THIS_SCRIPT == 'index'">style="padding-right:12px;"</if>>

<if 
condition="THIS_SCRIPT == 'index'">
            <
br />
            <
table align="left" border="1px" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]class="tborder">
                <
tr>
                    <
td class="thead">
                        
$adtitle
                    
</td>
                </
tr>
                <
tr>
                    <
td class="alt1">
                        
$leftcolumn_adcode
                    
</td>
                </
tr>
            </
table>
        </
td>
        <
td valign="top">
</if>
            <
table width="100%" cellpadding="0" cellspacing="0" border="0">
            <
tr>
                <
td valign="top"


Reece^B 01-15-2007 09:08 PM

Brilliant, cheers for that mate. Just one more thing, when you view a thread it's all centred, how can I make it so its the same as the default, see below.

Centred (not right) https://vborg.vbsupport.ru/external/2007/01/11.jpg

New default style, correctly aligned. https://vborg.vbsupport.ru/external/2007/01/12.jpg

Lordy 01-15-2007 09:33 PM

is there a way that you can have it display certain ads for certain usergroups?


All times are GMT. The time now is 08:36 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.02250 seconds
  • Memory Usage 1,790KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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