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
  #52  
Old 05-10-2005, 06:55 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Polo
good questions yes, each person must have adsense (to put their id in their usercp pannel) and second well I really dont think so... I think it may be possible, but this hack I dont think supports that right now
It would be rather easy to implement that. But the question do you really want to click on any google ads appearing on your site? Why taking the risk? If you have a site with a lot of visitors, your own clicks would be marginalized anyways. I am currently using this hack only for my editors, and it is a policy on my board that noone of us clicks on ads appearing on our site.
Reply With Quote
  #53  
Old 05-10-2005, 07:38 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couldnt we do something like...

If $post[ad_client_id] = users fieldX>
DIFFERENT AD HERE (NON-Adsense)
else

Show the adsense ads
</if>

I would test but I dont know how to get the fieldX of the user viewing...
Reply With Quote
  #54  
Old 05-10-2005, 08:27 PM
biagrin's Avatar
biagrin biagrin is offline
 
Join Date: Mar 2005
Location: uk
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well basically to sum up what i would like to see added:

adsense rotation being split between admin and thread starter only. that way the thread starter would know that the ad is either his account or admin account. that would instantly remove any problems.

yb the way when i tried to install it i followed the instructions to the dot but for some reason after it had been installed, when i tried to view a post i just got a warning saying something like "unexpected string /forums/showthread.php on line 31" which is where it says 'adsensesettings'

any idea what i have done wrong?
Reply With Quote
  #55  
Old 05-10-2005, 09:05 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by biagrin
well basically to sum up what i would like to see added:

adsense rotation being split between admin and thread starter only. that way the thread starter would know that the ad is either his account or admin account. that would instantly remove any problems.
And that is how it is currently implemented.

Quote:
something like "unexpected string /forums/showthread.php on line 31" which is where it says 'adsensesettings'
Do you have other hacks installed? Can you show us the line above and below 'hidprofilecache' (around line 30, before you applied my hack)? If you don't have any other hacks installed, make sure to follow the instruction closely:
Code:
Find:
      'hidprofilecache'

REPLACE IT with:
      'hidprofilecache',
      'adsensesettings'
(e.g. don't forget to add the comma after 'hidprofilecache').
Reply With Quote
  #56  
Old 05-10-2005, 09:05 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by biagrin
well basically to sum up what i would like to see added:

adsense rotation being split between admin and thread starter only. that way the thread starter would know that the ad is either his account or admin account. that would instantly remove any problems.
I think thats the way it is. Plus it never shows the Thread starter his own if you used the right if conditional I believe...
Reply With Quote
  #57  
Old 05-10-2005, 10:30 PM
biagrin's Avatar
biagrin biagrin is offline
 
Join Date: Mar 2005
Location: uk
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i get this error now

"parse error: unexpected T_ELSE"

meaning the else in this code
Code:
{
				$post['ad_client_id'] = $post['field11'];
				if (!empty($post['field12'])) {
					$post['ad_channel'] = $post['field12'];
				}
			}
			else {
				$post['ad_client_id'] = $adsensesettings['clientid'];
				if (!empty($adsensesettings['channel'])) {
					$post['ad_channel'] = $adsensesettings['channelid'];
Reply With Quote
  #58  
Old 05-10-2005, 10:35 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

biagrin that excerpt isn't really helpful. Did you include the entire snippet as was described in step 6? Also make sure you add it just below $FIRSTPOSTID = $post['postid']; (as was also described in 6).
Reply With Quote
  #59  
Old 05-10-2005, 10:48 PM
biagrin's Avatar
biagrin biagrin is offline
 
Join Date: Mar 2005
Location: uk
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well for some reason its working now even though i done the same thing as last time.

thanks for the help mate i really appreciate it. im new to all this.

one last thing (i hope )

how do i set it so that EVERY user group sees the ads but will NEVER see their own ads.

for example: bob makes a thread. his account is picked randomly. he doesnt see the ad but i do.

next time bob view the thread, my account is shown and he sees it but i dont.
Reply With Quote
  #60  
Old 05-12-2005, 02:00 PM
beano33 beano33 is offline
 
Join Date: Feb 2003
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone get this to work in the showthread template so the ad shows after the last post instead of the first as I asked in this post:
https://vborg.vbsupport.ru/showpost....9&postcount=32
Reply With Quote
  #61  
Old 05-13-2005, 12:29 PM
CallieJo's Avatar
CallieJo CallieJo is offline
 
Join Date: May 2004
Location: Snowville
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by beano33
You can use conditionals in the modifyoptions template so the new profile fields added are only visable for the usergroups you want.

See #2 in this thread
I am trying this but the instructions are not sinking in very good. Like here:

Quote:
This profile field needs to be the only custom profile field under the selected options category. Any other custom profile fields in the same category will be hidden as well.
I have more than one under edit profile.

Quote:
Go to your:

Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Modify User Option Templates -> modifyoptions

In this template you will find several $customfields variables, one for each category in your options (the same categories as the ones for your profile fields). You need to enclose the appropriate $customfields variable with this conditional:
I go here and I do not understand what category? Is it edit profile? And where or what is it called in here?

Thanks!
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 06:11 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.04951 seconds
  • Memory Usage 2,313KB
  • 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
  • (7)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