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)

banshee 10-25-2005 05:35 PM

I used the code a the very top of every page. Worked for me.

Xplorer4x4 10-25-2005 09:45 PM

Quote:

Originally Posted by banshee
I used the code a the very top of every page. Worked for me.

It will work....if your using Internet Explorer or something mostly IE compatibly such as Avant Browser or AOL Explorer browser.

If you or any members of your forum use FireFox it causes the browser to hang after using the quick reply.

Xplorer4x4 10-25-2005 09:53 PM

Quote:

Originally Posted by Slapyo
i've been going through this thread but can't seem to find code that works. :/ i see a bunch of different versions posted up.

i'm just looking to place 1 ad after the first post.

https://vborg.vbsupport.ru/showpost....9&postcount=78
There are several diffrent versions but mine is the only proper fix to prevent any hangs in FireFox.

My fix will actually show the ads under the first post of EVERY page and not just the first page.

Slapyo 10-25-2005 10:41 PM

Quote:

Originally Posted by Xplorer4x4
https://vborg.vbsupport.ru/showpost....9&postcount=78
There are several diffrent versions but mine is the only proper fix to prevent any hangs in FireFox.

My fix will actually show the ads under the first post of EVERY page and not just the first page.

Sweet thanks .... I'd say most use IE but a few here and there use FF.

So just take the code from the top of the page and then replace the IF statement with the one in your post?

Xplorer4x4 10-25-2005 11:01 PM

^Your right IE still leads the market but....

Quote:

As of the end of September, Mozilla's Firefox web browser is getting closer to the 10% margin. As reported on October 1st, 2005, Firefox is now used by 9.2% of internet users across the globe, while Microsoft's Internet Explorer is still leading with an astonishing 78%.
Credit: Wired.com
We have to keep in mind that while MOST use IE FireFox is quickly catching on and we have to take FireFox users into consideration. If you haven;t tried FireFox yet I highly suggest doing so. It is by far the better safer broswer. Plus you have to love the tab system. It can be found at http://www.mozilla.org/products/firefox/

Or I recomend avant, which takes most of the FireFox featuers but is built around IE for the most part making it more compatible then FireFox.
www.avant.com

If you don;t like them, you can always uninstall and go back to IE. ;)

Quote:

So just take the code from the top of the page and then replace the IF statement with the one in your post?
Yep, just replace the <if> statment and your good to go.

Slapyo 10-25-2005 11:33 PM

Yup yup ... I use both browsers.

Kihon Kata 10-26-2005 03:19 AM

What code amy? This one?
Quote:

Originally Posted by amykhar
Marco, my code fixes the quick reply problem.


Slapyo 10-26-2005 03:48 AM

hrm, i have a width of 760 and i use the 728x90 width and it sticks out the sides. :/ gonna have to work on it. ended up using a smaller sized ad.

DanLai 10-26-2005 03:56 AM

I have a problem, when i click on the #1 link on top-right corner, the single post interface shows up.

and the adsense looks ugly:

http://talkmusic.org/showpost.php?p=3310&postcount=1

How to fix it??

Xplorer4x4 10-26-2005 08:10 AM

Quote:

Originally Posted by TonysDesigns
What code amy? This one?

Does that version support postbit legacy style?

Tony you can use this code if you would like to display the ads between the second to last and last posts on a page.
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == $vboptions[maxposts] - 1"

Quote:

Originally Posted by DanLai
I have a problem, when i click on the #1 link on top-right corner, the single post interface shows up.

and the adsense looks ugly:http://talkmusic.org/showpost.php?p=3310&postcount=1
How to fix it??

Sorry DanLai I cfan;t help, but I wouldn't really worry about it.

Kihon Kata 10-26-2005 01:31 PM

Quote:

Originally Posted by Xplorer4x4
Does that version support postbit legacy style?

Tony you can use this code if you would like to display the ads between the second to last and last posts on a page.
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == $vboptions[maxposts] - 1"



Sorry DanLai I cfan;t help, but I wouldn't really worry about it.

I don't wanna display the ad between the second to the last post. I wanted to know how and what fixed the quick reply issue.

But thanks for tryin'

Xplorer4x4 10-26-2005 09:05 PM

Quote:

Originally Posted by TonysDesigns
I wanted to know how and what fixed the quick reply issue.

But thanks for tryin'

https://vborg.vbsupport.ru/showpost....9&postcount=78
I fixed it by changing the IF conidtion. If you read the thread everyone tried many diffrent variables for the IF condition but it was always the IF condition causing it to hang.

Here is the proper code:
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 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%" 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> 


RGSMDNR 10-30-2005 11:11 PM

i add this and get nothing on my forums, is it jsut right after the last line in the postbit template?

Xplorer4x4 10-31-2005 01:30 AM

Looks like you got it working fine to me. ;)

eXtremeTim 10-31-2005 01:34 AM

Quote:

Originally Posted by Xplorer4x4
https://vborg.vbsupport.ru/showpost....9&postcount=78
I fixed it by changing the IF conidtion. If you read the thread everyone tried many diffrent variables for the IF condition but it was always the IF condition causing it to hang.

Here is the proper code:
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 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%" 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> 


No when I looked at the code I was seeing two </if> close tags added while only one was opened. I removed that on tonys site and that fixed the quick reply problem on there.

Xplorer4x4 10-31-2005 01:40 AM

Hmm well it works just fine on my site with the extra </if> but i will proabbly remove that just to be safe.

WiBu 10-31-2005 03:42 PM

With that code it hangs when the post is about to create a new page. Otherwise it's fine.

Xplorer4x4 11-02-2005 09:38 AM

Turns out I did delete the extra <if> lol Ok well I personally put it between the secodn to last and last post. I tried to put it after the first unread post but the code i tried will not work in the postbit_legacy template.

smsmasters 11-04-2005 03:54 PM

How do you stop the code from displaying under PM's?

smsmasters 11-04-2005 08:50 PM

Why is it sometimes all I get is blank?

Xplorer4x4 11-05-2005 10:19 AM

Quote:

Originally Posted by smsmasters
How do you stop the code from displaying under PM's?

:ermm: Doesn't for me, are you sure your not thinking about the other ads in thread hack?

Quote:

Why is it sometimes all I get is blank?
I had to turn on the displayed on framed pages options on for my ads. Sometimes the ads can not target the content of the page if there isn;t enough thread content for the ads to decide what audience to target.

ChrisSy 11-07-2005 05:19 PM

Quote:

Originally Posted by WiBu
With that code it hangs when the post is about to create a new page. Otherwise it's fine.

same problem here

Xplorer4x4 11-07-2005 05:24 PM

Well if you haven't done so then just delete the </IF> right before </TD> if you have not done so already.

There is a whole thread of variations in the quick tips and custimizations forum over at vB in the 3.5 section. However the code for adsence before the last post does cause hangs in firefox everytime.

Snoop-It 11-07-2005 07:09 PM

Quote:

Originally Posted by Xplorer4x4
Well I finally have found the fix. This is tested and working in firefox, and does not create any more of those anoying empty tables when you edit.

REPLACE
PHP Code:

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

WITH
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1"

If you need to exclude a user group form seeing them,
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND $vbulletin->userinfo[usergroupid] != 'x' "



Nice one dude! It works like a charm!! Thank you!!

ubuntu-geek 11-09-2005 06:57 PM

What if I wanted to exlcude it from one forum? Is there a variable for that?

krg2k 11-11-2005 06:04 AM

Xplorer4x4

GREAT JOB man.... it fixed TWO issues
1. when using QR no more extra tables..
2. in my vbgallery now it only shows after the first comment, before it was showing after every single comment on photos ...

so thanks a milllll

romow 11-12-2005 03:53 AM

i really do NOT recommend using this mod.
after installing the mod, the page loading becomes noticeably slower..

that's because vb has to check "for each reply" whether to display adsense.
i do not want to sacrifice my members' viewing convenience this much.

pelican 11-15-2005 11:32 PM

Quote:

Originally Posted by romow
i really do NOT recommend using this mod.
after installing the mod, the page loading becomes noticeably slower..

that's because vb has to check "for each reply" whether to display adsense.
i do not want to sacrifice my members' viewing convenience this much.

actually it is just comparing of variables, the check whether to display or not is negligible. it is when the banner is display that will takes time because you are retrieving info from a 3rd party.

MissKalunji 11-16-2005 04:43 PM

Quote:

Originally Posted by romow
i really do NOT recommend using this mod.
after installing the mod, the page loading becomes noticeably slower..

that's because vb has to check "for each reply" whether to display adsense.
i do not want to sacrifice my members' viewing convenience this much.


just use iframe.....so the whole board will load then the iframe will........no?

MissKalunji 11-16-2005 05:02 PM

got a small problem when i add the script at the bottom of the postbit legacy

after a while it messes up the template example the 4 first shows up normal then the 5-6 shows up 3 times larger.....

dre 11-20-2005 09:42 AM

is this availablefor 3.5.1?

MissKalunji 11-20-2005 10:27 AM

Quote:

Originally Posted by dre
is this availablefor 3.5.1?


this is for 3.5 see in wich thread it is?

theodonnells 11-20-2005 01:45 PM

Quote:

Originally Posted by amykhar
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>


I tried this code but it puts an ad in the first post and a blank space in the last post ...Any ideas..

romow 11-21-2005 12:47 AM

no, when a thread gets really big with lots of replies, and there are lots of users browing a forum, that makes a difference.

Quote:

Originally Posted by pelican
actually it is just comparing of variables, the check whether to display or not is negligible. it is when the banner is display that will takes time because you are retrieving info from a 3rd party.


Mencius 11-26-2005 08:01 AM

Can somebody post a screenshot of this haack???

ConqSoft 12-01-2005 10:04 PM

Any idea how to make it show after the 1st post of EVERY page instead of just the first one?

Thanks

MissKalunji 12-01-2005 11:51 PM

Quote:

Originally Posted by ConqSoft
Any idea how to make it show after the 1st post of EVERY page instead of just the first one?

Thanks

thats what it does

ConqSoft 12-01-2005 11:57 PM

Oops. Actually, I thought I was replying to another hack that didn't. Now I see that this one does. ;)

romow 12-03-2005 06:19 AM

As this thread gets bigger with many updates, it's kinda difficult to find out what the most up-to-date and error-free version for this mod is.
Can someone post the clean version?
Is the one posted in the original thread most up-to-date?

MissKalunji 12-03-2005 11:26 AM

Quote:

Originally Posted by romow
As this thread gets bigger with many updates, it's kinda difficult to find out what the most up-to-date and error-free version for this mod is.
Can someone post the clean version?
Is the one posted in the original thread most up-to-date?

here u go
Quote:

<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">
---------- google advertisement -----------------
</td> </tr>
</table> </div>
$spacer_close
</if>


All times are GMT. The time now is 04:20 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.02139 seconds
  • Memory Usage 1,869KB
  • 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
  • (7)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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