Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #31 (permalink)  
Old 04-16-2007, 04:32 PM
New Pligger
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question libs/link.php

I've been following closely to your instructions without checking on the actual backup site. When trying to access it, I now get the error database pligg.link missing.

I tracked that error down to this modification
Quote:
Originally Posted by Dravis View Post
Approximately line 192 (in the read() function):
Code:
$id = $this->id;
//***** PlugIM.com mod: Adsense Revenue Sharing
//if(($link = $db->get_row("SELECT links.*, users.user_login, users.user_email FROM links, users WHERE link_id = $id AND user_id=link_author"))) {
if(($link = $db->get_row("SELECT links.*, users.user_login, users.user_email, users.google_adsense_id, users.google_adsense_channel, users.google_adsense_percent FROM links, users WHERE link_id = $id AND user_id=link_author"))) {
//***** End PlugIM.com mod 
Whenever I uncomment the modification, it works again... so I tried to alter your mod with the way the script looks in my pligg release:

Code:
//if(($link = $db->get_row("SELECT " . table_links . ".*, " . table_users . ".user_login, " . table_users . ".user_email FROM " . table_links . ", " . table_users . " WHERE link_id = $id AND user_id=link_author"))) {
if(($link = $db->get_row("SELECT links.*, users.user_login, users.user_email, users.google_adsense_id, users.google_adsense_channel, users.google_adsense_percent FROM links, users WHERE link_id = $id AND user_id=link_author"))) {
Still, I am getting nowhere - any hints?

Last edited by tinus2; 04-16-2007 at 04:57 PM.. Reason: spelling mistake
Reply With Quote
  #32 (permalink)  
Old 04-16-2007, 08:00 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
tinus2, what version of Pligg are you running?
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #33 (permalink)  
Old 04-16-2007, 08:56 PM
New Pligger
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
kbeeveer46, I am running Beta 9.1 02.18.2007 - the latest release.

Thanks for looking into this!
Reply With Quote
  #34 (permalink)  
Old 04-16-2007, 09:09 PM
New Pligger
 
Join Date: Sep 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
solved?

I believe this is the way it should look like - haven't tested it on different profiles, though:
Code:
//***** Begin Adsense Revenue Sharing MOD
//if(($link = $db->get_row("SELECT " . table_links . ".*, " . table_users . ".user_login, " . table_users . ".user_email FROM " . table_links . ", " . table_users . " WHERE link_id = $id AND user_id=link_author"))) {
if(($link = $db->get_row("SELECT " . table_links . ".*, " . table_users . ".user_login, " . table_users . ".google_adsense_id, " . table_users . ".google_adsense_channel, " . table_users . ".google_adsense_percent, " . table_users . ".user_email FROM " . table_links . ", " . table_users . " WHERE link_id = $id AND user_id=link_author"))) {
As it is early in the morning here, I will follow up late this day... please let me know if everything looks right, I am unfortunately by no means a coder
Reply With Quote
  #35 (permalink)  
Old 04-16-2007, 09:21 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Are you trying to install Adsense Revenue Sharing? This should already be installed. All you have to do is enable it in admin > modules management.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #36 (permalink)  
Old 05-05-2007, 09:04 PM
peppolone's Avatar
Pligg Donor
Pligg Version: 995-54
Pligg Template: upnews.it
 
Join Date: Dec 2006
Location: rome
Posts: 124
Thanks: 2
Thanked 35 Times in 13 Posts
I want the ads appears only if the user submit a story from his site. How can i do?
I thought something like
Code:
	// make sure the url_short is the same of the user homepage
	if (strcasecmp($tpl->get_template_vars("url_short"), $tpl->get_template_vars("user_url")) != 0){
		$tpl->assign($params['assign'], 0);
		return;
How can i put the user_url here, because it isn't in the link_summary.
Sorry for my english.
Reply With Quote
  #37 (permalink)  
Old 05-09-2007, 02:02 AM
New Pligger
 
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
I'm using Pligg 9.5 (Yget Template) and How do I modify the placement of ads for Revenue sharing? Right now they appear bellow comments and I want to have them above Comments.
Reply With Quote
  #38 (permalink)  
Old 12-24-2007, 03:57 PM
Casual Pligger
 
Join Date: Oct 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for developing a great mod. I will be implementing this within the next couple of days.

How hard would it be to add something to this mod where it will also show ads for users that have commented on a story. For example, I would like the person who posted the story to get 50% of the ad displays and any users who posted comments on the story could share another 10-25% of the ad displays. I get some decent traffic but I am having problems trying to get users to post comments and I think that this feature would help a lot.
Reply With Quote
  #39 (permalink)  
Old 03-13-2008, 09:57 AM
New Pligger
 
Join Date: Feb 2008
Posts: 25
Thanks: 0
Thanked 2 Times in 2 Posts
I'm running the v9.9 and I've some problem getting adsense revenue sharing to work.
I've posted a thread here:
Adsense revenue sharing not working (my adsense id disapear)
Please help me, please.
No one wants to help me, why ?
Reply With Quote
Reply

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 On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Adsense Revenue Sharing v0.1 problem? mapperkids General Help 2 08-17-2008 10:54 PM
EASY NO WORRIES PAINLESS adsense revenue sharing mod placement mod guide johntheentrepreneur Modification Tutorials 3 03-11-2008 01:47 PM
Google adsense revenue sharing, question dadaas Modification Tutorials 0 10-03-2007 01:13 PM
Google Adsense Revenue Sharing v0.1 error for 9.6 xbizsky Modification Tutorials 7 09-15-2007 06:35 AM
Adsense Revenue Sharing Placement Question??? onouchs General Help 8 03-26-2007 06:14 PM


Search Engine Friendly URLs by vBSEO 3.2.0