Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2009, 10:22 AM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adsense after first post AND after last post

I'd like to add my adsense after the first post and after the last post. Did I do this correctly?

PHP Code:
</div>
<!-- / 
post $post[postidpopup menu -->

[
COLOR="DarkOliveGreen"]<if condition="$post[postcount] % $vboptions[maxposts] == 1"> AND
 <if 
condition="$post['islastshown']">

$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
    
</td>
</
tr>
</
table>

</
div>
$spacer_close

</if>[/COLOR
Thanks!
Reply With Quote
  #2  
Old 08-31-2009, 11:25 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's an ad location template for after firstpost, ad_showthread_firstpost

For having an ad after all posts you're going to have to add it under $threadlist in the showthread template.
Reply With Quote
  #3  
Old 08-31-2009, 11:44 AM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK.

I did try it the way I mentioned and it worked but caused a horizontal scroll. Will your way cause a horizontal scroll?

Thanks!
Reply With Quote
  #4  
Old 08-31-2009, 04:32 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The only code you really need is the table itself, not sure why you added everything else, seems like you took it from a view source?

If the alignment is off in the first post one (it very well shouldn't be in the showthread, or in the postbit for that matter, but if it is in the first post) just use spacer open and close, nothing more.
Reply With Quote
  #5  
Old 09-03-2009, 02:31 AM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks dude. I appreciate it.

Everything works fine except that now for whatever reason my happy gif smilie isn't animated anymore.

--------------- Added [DATE]1251951306[/DATE] at [TIME]1251951306[/TIME] ---------------

Actually I take that back everything isn't working perfectly. Besides the animated gif.

When you're at the site as a guest the "Thread tools" are at the bottom as opposed to right there in the first post. And, you can just hover over them, you have to click.

Please advise.

--------------- Added [DATE]1251983753[/DATE] at [TIME]1251983753[/TIME] ---------------

For whatever reason the animated smilie works this morning.

Anyway:

Some people say to add the code above quickreply.
You mention to add it under $threadlist
And some people say postbit.

Are all the methods correct? Which is the best way in your or anyone's opinion?

Thanks!
Reply With Quote
  #6  
Old 09-09-2009, 03:06 AM
Bob_R Bob_R is offline
 
Join Date: Jun 2009
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've tried this code in the $threadlist, quick reply & ad location template and nothing works. Please advise.


<if condition="$post['islastshown']">

$spacer_open
<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">

<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXX";
google_ad_host = "pub-XXXXXXX";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF4400";
google_color_text = "000000";
google_color_url = "FF4400";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</td>
</tr>
</table>
$spacer_close
</if>

--------------- Added [DATE]1252495999[/DATE] at [TIME]1252495999[/TIME] ---------------

By the way I'm referring to after the last post and above quick reply.

I have it showing after the first post on every page that's fine.
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 08:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05100 seconds
  • Memory Usage 2,222KB
  • 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
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete