Go Back   EA Forums > Hideaway Forums > amykhar's Hideaway

amykhar's Hideaway A premium support forum for my vbulletin modifications. Members of this forum receive extra help, bug fixes, etc. for my code. To join, Subscribe to the Vbulletin Plan Minor feature requests will be considered, but major mod alterations will require a special contract.

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-04-2006, 03:48 AM
New Member
 
Join Date: Mar 2006
Posts: 12
aeroguy is on a distinguished road
flame Myfirst mod: Adsense Sharing Mod to v3.5.4

Amy, could you look over at my conversion for Alexanders hack
for for some reason my variables are not showing.
Where about would i put an if statment so that it does the following:

# For threads you start, your AdSense client ID will be used 50% of the time when the thread is viewed as a thread.
# Your AdSense client ID will be used 50% of the time when the thread is viewed by post (and you made the post).

I still have to put 2 fields (adsense id & channel) in the usercp panel, will do that once i figure out what is going wrong.

Attached file
 
Attached Files
File Type: xml AdsenseSharing.xml (4.0 KB, 1 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 04-04-2006, 11:41 AM
amykhar's Avatar
Forum Code Administrator
 
Join Date: Jun 2000
Location: PA
Posts: 19,953
amykhar has a spectacular aura aboutamykhar has a spectacular aura about
Re Myfirst mod: Adsense Sharing Mod to v3.5.4

I'll look at it later today when I have a few minutes.
 
__________________
Salt makes mistakes taste great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 04-04-2006, 11:45 AM
New Member
 
Join Date: Mar 2006
Posts: 12
aeroguy is on a distinguished road
Re Myfirst mod: Adsense Sharing Mod to v3.5.4

thanks, i did make some progress, have attached the updated xml
 
Attached Files
File Type: xml AdsenseSharing.xml (4.2 KB, 8 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 04-05-2006, 04:09 PM
amykhar's Avatar
Forum Code Administrator
 
Join Date: Jun 2000
Location: PA
Posts: 19,953
amykhar has a spectacular aura aboutamykhar has a spectacular aura about
Re Myfirst mod: Adsense Sharing Mod to v3.5.4

The first thing I see is that you can kill one query from every page because $useradsenseid will be picked up as part of userinfo.
 
__________________
Salt makes mistakes taste great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 04-05-2006, 04:44 PM
amykhar's Avatar
Forum Code Administrator
 
Join Date: Jun 2000
Location: PA
Posts: 19,953
amykhar has a spectacular aura aboutamykhar has a spectacular aura about
Re Myfirst mod: Adsense Sharing Mod to v3.5.4

Try using this for the global_start plugin:

Code:
$userinfo[posts]=$vbulletin->userinfo['posts'];
$userinfo[userid]=$vbulletin->userinfo['userid'];
$useradsenseid =  $vbulletin->userinfo[adsenseid];
$google_ad_client = $vbulletin->options['adsenseclientid'];
$google_ad_channel = $vbulletin->options['adsenseclientchannel'];
$debugging=rand(1, 100);
// The system is on
if($vbulletin->options['adsense'] == 1)
{
  // The user meets the post requirements
  if(($vbulletin->userinfo[posts] >= $adsensesettings['minposts']) AND ($debugging <= $adsensesettings['share'])AND (!empty($useradsenseid)))
    {
       $google_ad_client = $useradsenseid;
         $google_ad_channel = $userinfo[adsensechl];
    }
}
 
__________________
Salt makes mistakes taste great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 04-06-2006, 03:36 AM
New Member
 
Join Date: Mar 2006
Posts: 12
aeroguy is on a distinguished road
Re Myfirst mod: Adsense Sharing Mod to v3.5.4

thanks amykhar, i updated the script. I think i was going about it the wrong way, for one thing i think the hook show be in the threadbit_display. I have updated the script to do the following

1) If page viewer not on showthread.php then use the defaults board adsense id and channel.

2) if page viewer is on showthread.php then there is an equally possibility of showing either the defaults board adsense, the adsense of thread starter (if this user does not have the required posts or adsense then the $google_ad_client, and $google_ad_channel do not change, hence it shows the default board adsense id and channel), the adsense of last reply user (...same info here as thread starter)

i dont know how to take the userid and post count from thread starters and last reply users.
 
Attached Files
File Type: xml AdsenseSharingupdated.xml (3.9 KB, 2 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 04-06-2006, 07:01 AM
amykhar's Avatar
Forum Code Administrator
 
Join Date: Jun 2000
Location: PA
Posts: 19,953
amykhar has a spectacular aura aboutamykhar has a spectacular aura about
Re Myfirst mod: Adsense Sharing Mod to v3.5.4

Aero, with the plugin I gave you, I was just trying to get the part right for determining the adsenseid for you. I assumed you had more you wanted to do on the showthread part The global plugin had issues in that it was never correctly setting a default value for the adsense id.
 
__________________
Salt makes mistakes taste great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Even better than file sharing! hadassahchana Current Events 4 03-22-2005 06:12 AM
Profit Sharing Sooner95 Business Beat 5 11-18-2004 09:35 PM
sharing photos theworm Archives 2 06-15-2003 01:09 PM


All times are GMT -4. The time now is 08:51 PM.


Menu
Quizzes
More Forums
Gallery


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5
Content on EA Forums may not be duplicated without permission
Page generated in 0.19524 seconds with 12 queries