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)

burntire 11-26-2006 04:19 PM

[COLOR="Black"]
Quote:

Originally Posted by Greek76 (Post 1125531)
This does not work for me period. any ideas? I did the code exactly as it was shown and added my google code inbetween no luck though. IM using 3.6.2

This the the code I use to place the ad after the last post. I don't like it after the first post. I feel it aggravates my members.

Place this code at the very end of your Postbit_legacy template.

This works in all versions of 3.6

Code:


<!-- Adsense After LAST Post -->
<if condition="$post[postcount]!=1 and $post['islastshown']">
<!-- GOOGLE AD -->
<br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">       
        Sponsored Links
    </td>
</tr>
<tr>
    <td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>


Paste you Google Adsense Code Here


</td>
</tr>
</table>
</div>
$spacer_close
</if>
<!-- Google Ad  -->


Greek76 11-26-2006 06:14 PM

Great thanks alot. The problem was is that Im using postbit legacy as opposed to postbit template. Thanks for the code as well for keeping it in the bottom of the posts...

burntire 11-26-2006 09:53 PM

Quote:

Originally Posted by Greek76 (Post 1125734)
Great thanks alot. The problem was is that Im using postbit legacy as opposed to postbit template. Thanks for the code as well for keeping it in the bottom of the posts...


Glad it works

tansu 12-07-2006 01:21 AM

Quote:

Originally Posted by amykhar (Post 773130)
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>


This worked for me.. Thanks.
I tried to make it only visible to guests.. But couldn't
The starting is like this: What should I add to make it only visible to guests.
Code:

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

Nuguru 12-13-2006 09:05 PM

Hello Everyone,

I know this has been asked before, but no one has seemed to answer it, so I am going to ask it again. Besides, I am sure that are still several people including myself that is experiencing this issue.

This is a really good hack other than the fact that after it's installed, it also shows up in the personal message due to it being in the postbit_legacy file. It's not that it shows up in the personal message that is the problem, the problem is, is that it does not fit properly in the personal message page (below the message box itself).

However, if I change the formatting code to make it fit in the personal message page, then it does not show up properly after the 1st post in a thread. A catch 22 situation.

Therefore, I either need to find a way to fix the formatting so that it fits in both sitiuations or make it so that it does not show up in the personal message.

I do want to use the code and not want to have to delete it because it won't show up properly in the personal message, so I need some help.

Anyone know how to fix the code for either situations?


Thank You,

Nuguru :)

Kesmai 12-30-2006 07:47 PM

The code for adsense within the first and last post is not working. I added it below <!-- / message -->

Quote:

<if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 15;
google_ad_format = "468x15_0ads_al";
google_ad_channel = "5534775962";
google_color_border = "E2ECEF";
google_color_bg = "E2ECEF";
google_color_link = "E1771E";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</if>

I'm using 3.6.4

Kesmai 12-30-2006 07:50 PM

OK, it worked perfect in postbit but it is DOA when you put it in postbit_legacy

Nuguru 01-02-2007 10:49 PM

Quote:

Originally Posted by Nuguru (Post 1138054)
Hello Everyone,

I know this has been asked before, but no one has seemed to answer it, so I am going to ask it again. Besides, I am sure that are still several people including myself that is experiencing this issue.

This is a really good hack other than the fact that after it's installed, it also shows up in the personal message due to it being in the postbit_legacy file. It's not that it shows up in the personal message that is the problem, the problem is, is that it does not fit properly in the personal message page (below the message box itself).

However, if I change the formatting code to make it fit in the personal message page, then it does not show up properly after the 1st post in a thread. A catch 22 situation.

Therefore, I either need to find a way to fix the formatting so that it fits in both sitiuations or make it so that it does not show up in the personal message.

I do want to use the code and not want to have to delete it because it won't show up properly in the personal message, so I need some help.

Anyone know how to fix the code for either situations?


Thank You,

Nuguru :)



Hello and Happy New Year from WebbinZine.com,

Again, does anyone know how to fix this sizing and spacing issue between the PM and after the 1st post?


Thank You,

Nuguru :)

BigJimTheLug 01-05-2007 12:33 AM

Hello,
I'm having a slight problem with the Adsense displayed in the first post. I'm using this code to display the ads:
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

But then it gives me an alignment problem when the post is short. How can I fix this problem? Thanks.

http://i116.photobucket.com/albums/o...nseproblem.jpg

Webs007 01-05-2007 07:29 AM

Hi,

I am using the code as specified on Page 1 - Works fine - only problem is it puts the code under every post when you click to read a pm - and because of this - pushs he design out, is there a way not to show it when reading messages in the pm center?

Hope someone can help.

Webs :)


All times are GMT. The time now is 11:54 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.01403 seconds
  • Memory Usage 1,756KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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