vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Mini Mods - Adsense Inside the Post (https://vborg.vbsupport.ru/showthread.php?t=140664)

popowich 04-15-2007 12:34 AM

Quote:

Originally Posted by kpascal (Post 1221803)
I changed the placement of this mod when I applied it. (link to example) With the ad placed under the post, instead of beside it, I have not experienced an [img] or [quote] problem.

Hello,

Where do you insert the code for this mod to look like your version?

-Raymond

kpascal 04-15-2007 09:12 AM

Quote:

Originally Posted by popowich (Post 1227941)
Hello,

Where do you insert the code for this mod to look like your version?

-Raymond


Hi Raymond, instead of using the suggested code below:
Quote:

<!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
ADSENSE CODE HERE
</span>
</if>
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

I used his instead:
Quote:

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

<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and !is_member_of($bbuserinfo,10,11,12,14)"><br />
<center><span style="margin: 5px; width: 470px; height: 62px;">

ADSENSE CODE HERE

</span></center>
</if>
<!-- / message -->

The !is_member_of($bbuserinfo,10,11,12,14) part of the <if> statement specifies which usergroups do not see the ads.

abakus 04-15-2007 05:40 PM

very nice thanks man

Digital Girl 04-16-2007 08:27 AM

Great Mod but it does not seem to be working for me?

Mrdby 04-18-2007 12:45 AM

anybody?

Smitty 04-18-2007 08:59 AM

Quote:

Originally Posted by Digital Girl (Post 1228852)
Great Mod but it does not seem to be working for me?

It is working for me, but only shows in the first post.

How do I get it to show in the last post on the page as well as the first post?

Edit Add:

In my postbit I've put
Code:

<!-- Start AdSense Google within post message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) or ($post[islastshown]))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
GOOGLE ADSENSE CODE HERE
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
                <!-- End AdSense Google within post message -->

to work, but if someone uses the 'quick edit' on a post with adsense in it (first or last post in a thread), the ajax of Quick Edit kicks in but the google ad that is there is superimposed over part of the editing box....

smestas 06-01-2007 08:05 AM

Thanks for the great MOD!

I just installed it and it seems to be working for the most part but I did remove the code to show to all users and now I'm getting more then one add per page. Usuall this wouldnt be so bad but I already have 2 other Adsense adds running. Is there a way to keep it only on the first post of every page?

here is and example: http://www.alfabb.com/bb/forums/showthread.php?t=7645


Code:

                <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
       
<script type="text/javascript"><!--
google_ad_client = "pub-8924331979110227";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text";
//2007-06-01: AlfaBB postbit
google_ad_channel = "3930652802";
google_color_border = "F6F6F6";
google_color_bg = "F6F6F6";
google_color_link = "CC0000";
google_color_text = "333333";
google_color_url = "CC0000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

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


smestas 06-01-2007 08:18 AM

Hmmmmmmmmmm....

I just noticed that the adds overlap image attachements. depending on how much text is in the post before the attachments. See my screenshot below.

Smitty 06-01-2007 11:26 AM

I had to remove the mod. My forum regulars went ballistic. The complaints started rolling in within minutes. Some even complained that when ads showed up in their posts they felt it may appear to some people that they personally 'approved' the advertisement(s). There were also many justification issues (such as overlap noted above) in many posts.

Nice idea, though.

smestas 06-01-2007 09:39 PM

Anyone figure out how to fix this so it doesn't show multiple times on a single page?

I can live with the justification problems for now but I would like to control how many times it shows on a single page. Since its showing more then once my other Adsense adds aren't loading.

smestas 06-04-2007 07:50 PM

Anyone......

Buler...... Buler....... Buler.....

MRGTB 07-22-2007 11:22 PM

when you click edit button on a thread that has the adsence displayed in it, the adsence is shown at the top of the edit box. Anybody know how to stop it from being displayed in the edit box

FoReX 09-05-2007 11:17 PM

It didn't work to my forum. (version 3.6.8)

Can anyone work on 3.6.8?

jscieza 09-26-2007 05:34 PM

Yes, it works fine for me in 3.6.8. Thanks unitedpunjab! ;)

Just a question. I want to show AdSense to all my subforums and exclude one (id=XX). I have tried to do it with the following lines:

PHP Code:

<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<if 
condition="!in_array($forumid, array(XX))">
<
span style="margin: 2px; float: left; width: 301px; height: 251px;">
ADSENSE CODE HERE
</span>
</if>
</if> 

But don't work, Ads continues being impressed on all subforums. Any ideas?

Thank you!

kontrabass 11-01-2007 03:56 PM

Just a tidbit: After a 1-on-1 phone discussion Google Adsense, I've learned that they are pushing this medium rectangle-in-first-post more than anything - according to them with the forum sites they've worked with so far it results in a huge rev boost, as the medium rectangle brings in the most site-targeted ads... Whether or not your forum regulars will put up with it, that's a different story. But he convinced me to give it a try.

d8tabyte 11-04-2007 06:00 PM

Ive noticed that in the last post display of the ads, the buttons are not staying in the bottom right of the post.

Is there anyway to fix this? They seem to move left and up to the very bottom of the message.

http://digitalet.net/forum/showthrea...647#post117647 check there for an example

bijju 12-11-2007 08:39 PM

searching for this one

pcoskat 12-13-2007 07:37 PM

Is there a way this mod can be 'forum specific'?

I'd only like to use it in one of my forums.

Thanks! (great mod)

ETA
I just saw the post quoted below. It articulates, beautifully, why I need to restrict this to one forum :)

Quote:

Originally Posted by Smitty (Post 1258982)
I had to remove the mod. My forum regulars went ballistic. The complaints started rolling in within minutes. Some even complained that when ads showed up in their posts they felt it may appear to some people that they personally 'approved' the advertisement(s). There were also many justification issues (such as overlap noted above) in many posts.

Nice idea, though.


pcoskat 12-15-2007 01:10 PM

Quote:

Originally Posted by pcoskat (Post 1400597)
Is there a way this mod can be 'forum specific'?

I'd only like to use it in only one of the forums on my board.

Anyone???:confused:

bosal 12-16-2007 12:25 PM

How to show ad only after first post per page?
not so quite simple. Becouse when i use your script it shows after first post on every page if the page has default post count. Eg. if the page has 20 posts by default it show only after first post. But if user has changed that he want to show 40 post per page, the ad shows after 1 post and after 20 post, if the thread has more than 20 posts. How to fix it ?

edenx 12-16-2007 02:00 PM

I need this 2 conditionals

1) If I want to show it only in First Post to everyone

2) If I want to show it only in First Post only to Guests

Thanks

bosal 12-16-2007 03:05 PM

One more thing i want to show this only when thread has 2 or more posts

valdet 12-16-2007 11:59 PM

Quote:

Originally Posted by pcoskat (Post 1400597)
Is there a way this mod can be 'forum specific'?

I'd only like to use it in one of my forums.

Thanks! (great mod)

ETA
I just saw the post quoted below. It articulates, beautifully, why I need to restrict this to one forum :)

use this conditional

Code:

<if condition="$forumid == X">
        <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
      ADSENSE CODE HERE
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
              <!-- / message -->
</if>

with X being your specific forum id

Regards,
Val.

Teresa 12-19-2007 08:09 PM

The placement also messes up my edit buttons and whatnot. The buttons are appearing in the middle of the post when it's not a LONG post. Suggestions? Fix?

Artes_Marciales 12-20-2007 03:02 PM

Great!!!
Thanks :)

ahmed83 12-22-2007 12:59 PM

It's working for me only in the first post.
how to add it to the last post or after (x)posts

GTGT 12-22-2007 08:42 PM

For soem reason this doesnt work? It simly doesnt show up?

GTGT 12-22-2007 08:43 PM

I have version vBulletin 3.6.8

GTGT 12-22-2007 09:06 PM

Could this have to do somethgn with it?

"Your AdSense unit has been saved. Changes may not appear for up to 10 minutes. [?]"

siliconfinance 12-25-2007 03:18 PM

How can I make the ad display after the text in the post?

Forum Lover 12-25-2007 04:06 PM

cool, planning it for future plan.

iulianh 12-26-2007 10:33 AM

Great hack and easy to install ! Thanks .

Prince 12-31-2007 02:13 AM

I had the same problem, with the way Google does the managed ads now it can actually take up to an hour for a new ad to appear, and in IE it will show "site cannot be found" in your post, Firefox will not display anything, but it does work fine in both browsers.

applyimage 01-14-2008 11:29 PM

Installed but not yet seeing anything in several browers, it may be just the way google ads are done as explained above though.

applyimage 01-15-2008 10:29 AM

----------------------------------------------------------------------------------------------------
Nope, still don't see a thing.

Uninstalled*

Prince 01-22-2008 02:45 AM

Quote:

Originally Posted by applyimage (Post 1421578)
Installed but not yet seeing anything in several browsers, it may be just the way google ads are done as explained above though.

were you logged in?

the way the code is it only shows to GUESTS, unless you remove that portion of the statement.

goranbaxy 01-25-2008 10:05 AM

I was not loged in, and I couldn't see it, it doesn't generate html code for that div, but I'm using vbulletin 3.6.8

ChrisSy 01-27-2008 03:10 PM

Having difficulty with this, anyone know the if conditional to show ads in the first post for a specific forum only? - for all usergroups.

abrecher 02-13-2008 06:07 PM

Quote:

Originally Posted by ahmed83 (Post 1406814)
It's working for me only in the first post.
how to add it to the last post or after (x)posts

Same here. Does anybody know how to get this working please ?

abrecher 02-13-2008 11:57 PM

Quote:

Originally Posted by Smitty (Post 1230300)
if someone uses the 'quick edit' on a post with adsense in it (first or last post in a thread), the ajax of Quick Edit kicks in but the google ad that is there is superimposed over part of the editing box....

I have the same problem, I'm running 3.6.8

Has anybody figured out a solution ? This is a GREAT mod.


All times are GMT. The time now is 09:43 PM.

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.01337 seconds
  • Memory Usage 1,830KB
  • 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
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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