Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Adsense Revenue Sharing Hack 1.1 (0 queries version) Details »»
Adsense Revenue Sharing Hack 1.1 (0 queries version)
Version: 1.00, by AlexanderT AlexanderT is offline
Developer Last Online: Jul 2021 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-27-2005 Last Update: Never Installs: 48
 
No support by the author.

Upgrade 1.1 notice:
The upgrade from 1.0 to 1.1 is optional; it makes sure ads don't display in private messages. Thanks to venomx for the tip.

Hack Description:
This hack will allow you to offer Google Adsense revenue sharing to your vBulletin board users. Revenue sharing is a great way to reward your board members for their loyalty and adds a feeling of ownership in the board and it's success. Revenue is split between board administrator and thread starters. The percentage of probability is customizable by the administrator.

This hack is fundamentally the same like this hack; however, it adds some customization plus does not use any additional queries!

I wrote this hack a couple of months ago and didn't know there was any interest for it (you certainly don't want to spend money on something that doesn't take much time to code).

My time is *very* limited so I am not good at giving support. I hope the instruction included is self-explanatory. It is easy to expand the hack to your needs.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 05-05-2005, 09:47 PM
beano33 beano33 is offline
 
Join Date: Feb 2003
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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/
Reply With Quote
  #33  
Old 05-07-2005, 06:50 AM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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%
Reply With Quote
  #34  
Old 05-07-2005, 01:25 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm this makes adsense show on PMs too... does google allow that?
Reply With Quote
  #35  
Old 05-07-2005, 03:55 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #36  
Old 05-07-2005, 04:11 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #37  
Old 05-07-2005, 04:50 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So noone else has had this happen?
Reply With Quote
  #38  
Old 05-07-2005, 06:04 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #39  
Old 05-07-2005, 06:07 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #40  
Old 05-07-2005, 06:12 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #41  
Old 05-10-2005, 12:06 AM
LEAD_WEIGHT LEAD_WEIGHT is offline
 
Join Date: Feb 2005
Location: Canada
Posts: 369
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

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 02:15 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.04713 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete