vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Adsense as Thread Title (https://vborg.vbsupport.ru/showthread.php?t=161554)

69lakalle 10-30-2007 08:34 PM

Adsense as Thread Title
 
1 Attachment(s)
As the image attached ... i want to know how is this done ?
any ideas ?:confused::confused:

here is a screenshot
http://img225.imageshack.us/img225/5304/adsenseer4.jpg

69lakalle 10-31-2007 10:53 PM

bumb ........ no one ?

nirvana43 11-05-2007 03:24 AM

1 Attachment(s)
Ok there u go bro.. props to original inventor! posting it as it is here :

Check the attached image before making any changes in templates.. to make sure this is what you are looking for or not! ;)
or Check this :
http://img122.imageshack.us/img122/1...tbanneruo5.gif

Adding The Banner
Edit this template:

Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Threadbit Templates -> threadbit

Add the red code to the top:
Code:

<if condition="$GLOBALS[threadcount] == X AND in_array(THIS_SCRIPT, array('forumdisplay', 'search'))">

        <if condition="$GLOBALS[threadcount] = 1"></if>

        <tr>
                <td class="alt1">
                        &nbsp;
                </td>
                <if condition="$show['threadicons']">
                        <td class="alt2">
                                &nbsp;
                        </td>
                </if>
                <td class="alt1">
                        YOUR AD CODE HERE
                </td>
                <td class="alt2">
                        &nbsp;
                </td>
                <td class="alt1" align="center">
                        &nbsp;
                </td>
                <td class="alt2" align="center">
                        &nbsp;
                </td>
                <if condition="$show['forumlink']">
                        <td class="alt1">
                                &nbsp;
                        </td>
                </if>
                <if condition="$show['inlinemod']">
                        <td class="alt1">
                                &nbsp;
                        </td>
                </if>
        </tr>

<else />

        <if condition="$GLOBALS[threadcount]++"></if>

</if>

<tr>
        <td class="alt1" id="td_status_$thread[realthreadid]">
                $thread[openclose_editable]
                <img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_status_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
        </td>
        <if condition="$show['threadicons']">
                <td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
        </if>

        <td class="alt1" id="td_title_$thread[realthreadid]" title="$thread[preview]">

                $thread[title_editable]
                <div>
                        <span style="float:$stylevar[right]">
                                <if condition="$show['moderated']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/moderated_small.gif" alt="<phrase 1="$thread[hiddencount]">$vbphrase[x_moderated_posts]</phrase>" /> </if>
                                <if condition="$show['paperclip']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /> </if>
                                <if condition="$show['subscribed']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /> </if>
                                <if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if>
                        </span>
                        <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
                        $thread[movedprefix]
                        $thread[typeprefix]
                        $thread[moderatedprefix]
                        <if condition="$show['gotonewpost']">
                                <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>
                        <else />
                                <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
                        </if>
                        <if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">(<img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav]<if condition="$show[pagenavmore]"> ... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if>)</span></if>
                </div>
       
                <div class="smallfont">
                        <if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
                        <if condition="$show['guestuser']">
                                $thread[postusername]
                        <else />
                                <span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
                        </if>
                </div>
               
                <if condition="$show['unsubscribe']">
                        <div class="smallfont">
                                <a href="newreply.php?$session[sessionurl]do=newreply&amp;t=$thread[threadid]" rel="nofollow">$vbphrase[reply]</a> |
                                <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;return=ucp&amp;t=$thread[threadid]" rel="nofollow">$vbphrase[unsubscribe]</a>
                        </div>
                </if>
               
        </td>
       
        <if condition="$show['threadmoved']">
        <td class="alt2" align="center">-</td>
        <else />
        <td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
                <div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
                        $thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
                        <phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase>  <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
                </div>
        </td>
        </if>
       
        <if condition="$show['notificationtype']">
                <td class="alt1"><div class="smallfont">
                        <label for="sub$subscribethread[$threadid]">$thread[notification]</label>
                </div></td>
                <td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
        <else />
                <td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
                <td class="alt2" align="center">$thread[views]</td>
                       
                <if condition="$show['forumlink']">
                        <td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
                </if>
        </if>
       
        <if condition="$show['inlinemod']">
                <td class="alt1">
                        <input type="checkbox" name="tlist[$thread[realthreadid]]" id="tlist_$thread[realthreadid]" value="$thread[checkbox_value]" <if condition="$show['disabled']">disabled="disabled"</if> />
                </td>
        </if>
</tr>

Where X is the number of threads after which you want the banner to show. Replace the blue code with your banner code.

Other Conditions
Here are some other conditions you can use:

Display Banner Only After X Number Of Threads, Not Repeating
Replace the green section from the previous code:
Code:

<if condition="$GLOBALS[threadcount] == X AND in_array(THIS_SCRIPT, array('forumdisplay', 'search'))">

        <if condition="$GLOBALS[threadcount] = 1"></if>

        <tr>
                <td class="alt1">
                        &nbsp;
                </td>

...with the purple code:
Code:

<if condition="$GLOBALS[threadcount] == X AND in_array(THIS_SCRIPT, array('forumdisplay', 'search'))">

        <if condition="$GLOBALS[threadcount]++"></if>

        <tr>
                <td class="alt1">
                        &nbsp;
                </td>

This way the counter just keeps incrementing and never resets. Now a banner will only show up once per page, after X number of threads:

Removing The Banners From Either The Forumdisplay Or Search Listings
Simply remove one of the green parts below (scroll right):
Code:

<if condition="$GLOBALS[threadcount] == X AND in_array(THIS_SCRIPT, array('forumdisplay', 'search'))">

        <if condition="$GLOBALS[threadcount] = 1"></if>

        <tr>
                <td class="alt1">
                        &nbsp;
                </td>

if this solved u r problem then kindly help me here : :o
https://vborg.vbsupport.ru/showthread.php?t=161059

Marco van Herwaarden 11-05-2007 04:58 AM

Not an expert on this, but this might break the adsense TOS. You are presenting the ad as something else (a thread).

nirvana43 11-08-2007 10:05 AM

Quote:

Originally Posted by Marco van Herwaarden (Post 1376044)
Not an expert on this, but this might break the adsense TOS. You are presenting the ad as something else (a thread).

very true!
actually as far as i know, we are suppose to use readymade ads placement mods available for vbulletin on official forums like this & vbulletin.com

because i guess adsense allow banner to be placed on any 2 of the following places (in case of forums!) :
1. on the top
2. below 1st reply of topic
3. in footer

i used to place ads in between message text of 1st reply of every topic to win accidential clicks! yeh... adsense kicked ma #$@%^! :D

reason is they dont like accidential clicks! & its considered as fraud!
@69lakalle, what you are asking for is to win accidential clicks! right? :D


All times are GMT. The time now is 08:43 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.02330 seconds
  • Memory Usage 1,763KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete