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)

goranbaxy 02-14-2008 05:51 AM

edit postbit_legacy

SVTCobraLTD 02-14-2008 01:29 PM

Sorry to hijack, but how much are some of you making on your boards roughly? How many members?

toprak 02-16-2008 01:15 AM

<if condition="!in_array($bbuserinfo['forumid'], array(2, 6, 7))">
guys do you think this code will work ??

I would like to show ad in some forumid so I exclude 2 6 7 ??
do you guys have any prefer except this

neonneon 02-23-2008 04:54 AM

thank you
:)

SgtRumble 02-25-2008 08:41 PM

Is it possible to incorporate yahoo ads instead of Adsense?

stelthius 03-02-2008 05:25 PM

THank you Reserved :)

nectons 03-10-2008 09:34 PM

i have 3.6.8 and it is now working.. im seeing so many problems.. so i dont install it ... but a good idea though

GTX2 03-31-2008 01:30 PM

how can i put this on the left side of the post, just like this attached picture has, on the first and second post? I've been using on the right side as shown, but without any good results.

see example:

raja811 04-04-2008 08:54 PM

Thx

l2ride55 04-19-2008 07:16 AM

Absolutely a great mod! Love it!

Forum Link

Installed the Template Mod with these changes....

Installed in postbit_legacy, not postbit - Did not work in postbit

Replaced float "right" to "left" - Awesome!

To space the Adsense away from the text in the thread - Added 12px to width (larger than adsense) - ie 300 width for Adsense box - 312px in mod template

Added 10px to height (larger than adsense) - ie 250 width for Adsense box - 260px in mod template

Great Mod! Thanks! :D

basketmen 04-25-2008 09:09 PM

i am sorry, is it the tumbnail break TOS or not??

isnt we need border so not break TOS??

https://vborg.vbsupport.ru/external/2008/04/20.jpg

hnjco 04-26-2008 09:18 PM

installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?

saka 05-28-2008 03:50 PM

Quote:

Originally Posted by hnjco (Post 1500122)
installed on 3.6.10 in both postbit and postbit_legacy but not working...
anyone?

same as me. it didnt work.

newguy 05-31-2008 10:10 PM

What do you have to do to keep your edit, quote, multi quote ect images under the adsence unit? Also I noted that the content moves around based on the post. Like if the member has a signature or if the post has a quoted post in it.

da_judge 06-04-2008 10:31 PM

Works very well if thread is a long one or you have big signiture...

If short post dont look good at all

Any ideas on best way round it

Attached pic

Cheers

da_judge 06-05-2008 07:15 PM

I worked this out

If you want it under post slightly

Search for
Code:

<!-- controls -->
in postbit

After add

Code:

<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<span style="margin: 2px; float: right; width: 201px; height: 201px;">
<script type="text/javascript"><!--
google_ad_client = "pub-3894247933641517";
/* 200x200, created 04/06/08 */
google_ad_slot = "9908865295";
google_ad_width = 200;
google_ad_height = 200;
google_cpa_choice = ""; // on file//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</span>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</if>

This will correct the button thing...

Depending on what skin you may need to add or remove some of the <br>

Attached what it does

Cheers

Mike Vollmer 06-14-2008 11:21 PM

I've been trying to incorporate this into my 3.7.0 vB today, two problems become apparent:

1. A lot of experienced users set their profiles to show the newest posts first. Basing your condition on ($post[postcount] % $vboptions[maxposts] == 1) is selecting the first post ever made in the thread, not the first post viewed. If you're trying to max ad revenue by putting that 300x250 rectangle in the first ad viewed, this has the opposite effect -- it's buried at bottom of the page for user who have chosen to view newest first.

2. 3.7.0 allows threaded & hybrid views, with a preset # of cached posts. Selecting based on ($post[postcount] % $vboptions[maxposts] == 1) seems to work for the posts that are displayed initially, but if that post is later retrieved from the cache & shown again, the ad is missing, although the post is still formatted as if it were there -- with 300x250 pixels of white space on the right side.

I doubt most of my potential users are sophisticated enough to care (or even notice) if the threaded/hybrid views are missing, so I've simply disabled them. However, a workaround for the first problem would be nice. :)

Later (and yes, I did sleep): This code addresses the first problem above:
<if condition="(

(($bbuserinfo[postorder] == '') and
($post[postcount] % ($bbuserinfo[maxposts] == -1 ? $vboptions[maxposts] : $bbuserinfo[maxposts]) == 1))

or

(($bbuserinfo[postorder] != '') and
($GLOBALS[qrfirstpostid] == $post[postid]))

)">
Evaluating $bbuserinfo[postorder] tells me whether the user is displaying newest or oldest first. Total post count seems not to be available, but the first post that is displayed on the screen is flagged by $GLOBALS[qrfirstpostid] == $post[postid].

Another potential problem is the use of $vboptions[maxposts] in the original mod. If user has elected to display more than the default # of posts per page, the condition potentially could be satisfied as many as 3 times & push the page over one of AdSense's max-ads-allowed limits. Using $bbuserinfo[maxposts] is preferable, but because it has a default value of -1, the conditional evaluation above is needed.

balance12 07-16-2008 12:31 AM

I am using Version 3.7.1. I do this and it dont shows me nothing.. i use postbit_legacy... i algo return to the original and re code the mod.... nothingg.. what it might be?

zerokarma 09-05-2008 07:44 PM

Is there a way to restrict this by a certain style rather then usergroup?

Desi-Home 11-28-2008 08:13 PM

It moves up the buttons of reply, quotes etc. Is there a way i keep them down even if the post is not too long?

xlguy 12-09-2008 11:42 AM

Did anyone work out how to edit the code to get the ad to display in the last post as well?

Riccardo83 01-01-2009 08:45 PM

Does this show the ad inside the first post only or the first post on every page? that would be more useful?

Canadianbacon 07-24-2011 07:29 PM

this still work?

Naijasite 10-01-2012 01:01 PM

how do make it to be at the middle of the fist post on 4.2.0 ?

mangmel 12-14-2015 03:08 AM

good source......


All times are GMT. The time now is 05:07 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.01124 seconds
  • Memory Usage 1,767KB
  • 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
  • (1)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
  • (25)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