vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Adsense Revenue Sharing Hack 1.1 (0 queries version) (https://vborg.vbsupport.ru/showthread.php?t=80685)

beano33 05-05-2005 09:47 PM

Before I installed this hack I had my ad code in the showthread template where they were displayed after the last post. I modified that code for google_ad_client = "$post[ad_client_id]";
google_ad_channel ="$post[ad_channel]";
but it wasn't inserting any client id so no one way getting paid. :(

So I removed the ad code from showthread and put it in the postbit template as suggested in the hack instructions. It works fine as far as functionality is concerned, but now the ads appear after the first post and we'd prefer them to show after the last post.

Can anyone tell me how to do one of the following:

1) make the hack work with the ad code in the showthread template, OR
2) get the ad code in the postbit legacy template to display after the last post instead of the first post.

Thanks!

P.S. I changed it back to putting the ads after the last post so you can see where we'd like it. Here is the forum: http://hfboards.com/

venomx 05-07-2005 06:50 AM

Yeah what beano33 asked and is there a way to also have it pick a random member that has posted a reply?

Like:
Admin 50%
Thread starter: 25%
Random member who has replied: 25%

Or even:

Admin 50%
Thread starter: 25%
Last member to reply: 25%

venomx 05-07-2005 01:25 PM

hmm this makes adsense show on PMs too... does google allow that?

AlexanderT 05-07-2005 03:55 PM

Quote:

Originally Posted by venomx
hmm this makes adsense show on PMs too... does google allow that?

How should this make asense show on PMs if only postbit templates and showthread.php is modified?

venomx 05-07-2005 04:11 PM

Thats the only onnes I modified... I put the postbit part right in the bottom of the edit window, could that be it?

I edited the showthread.php as you said then opened postbit leg.. and dropped it right into the very bottom of it. Then when I got a PM it was right under the PM... I fixed it by adding a THIS_SCRIPT='SHOWTHREAD' to the postbit and it stopped showing...

venomx 05-07-2005 04:50 PM

So noone else has had this happen?

AlexanderT 05-07-2005 06:04 PM

Quote:

Originally Posted by venomx
So noone else has had this happen?

I see now. Thanks for the hint. The PM routines happen to use the same postbit templates that are also used by showthread (it never occured to me to check PM out). Your suggestion for an additional IF conditional is correct if you don't want to have ads shown in private messages.

I uploaded version 1.1 of this hack where ads are explicitely shown only in showthread instances. Upgrade instruction is included:

Quote:

If you plan on upgrading from 1.0 to 1.1 of this hack, you only need to edit your postbit templates.

In both postbit and postbit_legacy, find:

<if condition="($post['postid'] == $GLOBALS['FIRSTPOSTID']) AND (!$show['member'] OR $bbuserinfo[usergroupid] == 2)">

and replace it with:

<if condition="THIS_SCRIPT == 'showthread' AND ($post['postid'] == $GLOBALS['FIRSTPOSTID']) AND (!$show['member'] OR $bbuserinfo[usergroupid] == 2)">

Done.

venomx 05-07-2005 06:07 PM

So any suggestions on making it post below the posts in the showthread.php?
Though the placement after the first post is growing on me,,, lol

Anyone edit this to share with ALL posters in a thread and not just the starter?

One last question.. :)
Can we make it also post right under the last post in the thread? Was just thinking I could put a conditional around the one after the first ost to show to only non membes and have the other show after the last post on the page to all with a conditional that would only add it if there was 3 posts after the first post...

venomx 05-07-2005 06:12 PM

More thinking.. This would rock :)

Unregistered visitor
Post #1
Ad
Post #2
Post #3
Post #4
Post #5
Ad

Registered with 5 posts
Post #1
Post #2
Post #3
Post #4
Post #5
Ad

Unregistered and Registered with say 3 posts

Post #1
Ad
Post #2
Post #3

LEAD_WEIGHT 05-10-2005 12:06 AM

Quote:

Originally Posted by CallieJo2
Thanks for the tips to help me get started ;) I appreciate it bunches!
And thanks bunches for this cool hack! ;)

Have a splendid evening ;)

Another easy way or u can let everyone see it that is what I did to my site.
Code:

https://vborg.vbsupport.ru/showpost.php?p=648365&postcount=15

Code:

Originally Posted by AlexanderT
When you change the postbit templates,
Find this:
<if condition="($post['postid'] == $GLOBALS['FIRSTPOSTID']) AND (!$show['member'] OR $bbuserinfo[usergroupid] == 2)">

Replace with this:
<if condition="($post['postid'] == $GLOBALS['FIRSTPOSTID'])">

when applying the code changes in 7. of the instruction.



All times are GMT. The time now is 08:06 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.01173 seconds
  • Memory Usage 1,745KB
  • 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
  • (4)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
  • (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