vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Adsense after first post (https://vborg.vbsupport.ru/showthread.php?t=96249)

artonex 09-13-2005 10:00 PM

Adsense after first post
 
Hey guys i think many of you will find this very usefull :)

With the template edit you can display adsense or banner after every 1st post. i have chosen to use my amazon affilite code.

Add this to the bottom of your postbit template.

Demo

PHP Code:

<if condition="!$GLOBALS['FIRSTPOSTID']">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead" align="left">Sponsored Links</td>
</
tr>
<
tr>
    <
td class="alt1" align="center">
        <
adsense code here>
</if>
    </
td>
</
tr>
</
table>

</
div>
$spacer_close

</if> 


jluerken 09-14-2005 11:26 AM

Hi,

I want to have the adsense stuff for people NOT in specific groups.

For example: Admins, mods, staff etc. should not get the adsense stuff.

Can you give an example how to modify your template to make this possible?

btw. thanks for sharing :D

jugo 09-14-2005 12:01 PM

Didn't Kirby post this somewhere??

Thanks anyway.

Andreas 09-14-2005 12:04 PM

Yup.
https://vborg.vbsupport.ru/showpost....10&postcount=2 :)

Mental Note: Tagging the post was a good idea :D

junkiesnetwork 09-14-2005 04:00 PM

Quote:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
<td class="alt1" align="center">
<adsense code here>
</if>
</td>
</tr>
</table>
This idea sounds great but i tried using it on my board but it did not work.
i copied this code and pasted at the end of postbit template as you said and i put all the adsense code in this space u provided , if i am not mistaken. (<adsense code here> )
Could you please tell me where i went wrong??
Thanks

sajjid 09-14-2005 05:02 PM

try this one
Code:

<if condition="$post[postcount] == 1">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" <td align="center">
<tr>
        <td class="thead" align="left">SpinZone Sponsored Links</td>
</tr>
<tr>
        <td class="alt1" align="center">
ADSENSE CODE HERE

        </td>

</tr>
</table>

</div>
$spacer_close

</if>

change the text what ever you want where its says spinzone sponsered links

amykhar 09-14-2005 05:51 PM

What's more fun and challenging - because of ajax issues, is adsense in the last post. ;) That really gets the ad right where the reader's eyes are.

http://www.eaforums.com/forums/364919-post1.html

Find:
Code:

<!-- message -->
                <div id="post_message_$post[postid]">$post[message]</div>
                <!-- / message -->

Add above:
Code:

                <if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">


<span id="google" style="float:left;margin:2px;" width="340" height="290" align="center" valign="top">
put banner code here
</span></if>


Andreas 09-14-2005 06:10 PM

Hmm, keeping database read marking in mind:
Wouldn't the first unread post be the best place?
Cause the last Post doesn't necessarily get read - the first unread post will.

amykhar 09-14-2005 06:22 PM

True. But, is there a conditional for it?

Andreas 09-14-2005 06:24 PM

There must be as Posts carry Icons for Read/Unread.
So if this Icon changes to Unread for the first time it is the right Post.


All times are GMT. The time now is 08:00 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.04306 seconds
  • Memory Usage 1,754KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)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