Thread: A modification
View Single Post
  #5  
Old 11-07-2011, 05:20 AM
jcga1992 jcga1992 is offline
Member
 
Join Date: Oct 2011
Posts: 6
Gender: Male
Credits: 2,091
jcga1992 is on a distinguished road
Default

Quote:
Originally Posted by SilverDragonTears View Post
So instead of members receiving money when they level up an adopt you want the person who's adopt is clicked to get the money? Or both?
Only the person who's adopt is clicked

Quote:
Originally Posted by Hall of Famer View Post
Umm this should be quite simple php programming. What I'd do is to edit the levelup.php file and find the line where money is added to users. If I recall, the user is specified to be $loggedinname, which corresponds to the one who click on adoptables. All that needs to b done is to change this variable to the actual owner of the pet getting clicks. Lemme know if this is helpful or not, if you really ain't comfortable with php I can show you a sample Php code on how to make such modification.
I think you say here?

Code:
if($owned_adoptable['isfrozen'] == "no"){ 
	$reward = clickreward(grabanysetting('rewardmoney'), $GLOBALS['username'], $GLOBALS['money']);
	$newamount = $GLOBALS['money'] + $reward;
	runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = '{$newamount}' WHERE `username` = '{$loggedinname}'");
	$article_content = $article_content . "<div align='center'><br />You have earned {$reward} ".grabanysetting('cost')." for leveling up this adoptable. <br />You now have {$newamount} ".grabanysetting('cost')."</div>";
What i should put in $loggedinname. Thank you a lot.

Last edited by jcga1992; 11-07-2011 at 05:23 AM.
Reply With Quote