Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2011, 02:34 PM
jcga1992 jcga1992 is offline
Member
 
Join Date: Oct 2011
Posts: 6
Gender: Male
Credits: 1,309
jcga1992 is on a distinguished road
Default A modification

First, sorry for my bad english....

In this moment when i vote one adoptable i get money.

The modification that i want do is, when someone vote my adoptable I get the money.

I only know a little PHP if someone can show me how do it...

Thank you so much.
Reply With Quote
  #2  
Old 11-06-2011, 03:22 PM
jcga1992 jcga1992 is offline
Member
 
Join Date: Oct 2011
Posts: 6
Gender: Male
Credits: 1,309
jcga1992 is on a distinguished road
Default

Please.. Nobody can help me
Reply With Quote
  #3  
Old 11-06-2011, 03:31 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,230
SilverDragonTears is on a distinguished road
Default

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?
__________________

Check out SilvaTales
Reply With Quote
  #4  
Old 11-06-2011, 05:34 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 331,537
Hall of Famer is on a distinguished road
Default

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.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 11-07-2011, 05:20 AM
jcga1992 jcga1992 is offline
Member
 
Join Date: Oct 2011
Posts: 6
Gender: Male
Credits: 1,309
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
  #6  
Old 11-07-2011, 11:58 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 331,537
Hall of Famer is on a distinguished road
Default

Well I would do the following changes:

PHP Code:
if($owned_adoptable['isfrozen'] == "no"){
        
$result runquery("SELECT * FROM {$prefix}users WHERE username='{$owned_adoptable['owner']}'");
        
$user mysql_fetch_array($result);
        
$reward clickreward(grabanysetting('rewardmoney'), $owned_adoptable['owner'], $user['money']);     
        
$newamount $user['money'] + $reward;    
        
runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = '{$newamount}' WHERE `username` = '{$owned_adoptable['owner']}'"); 
As you can see, the program looks a bit confusing 'cause the adoptable owner's money data cannot be easily retrieved from database. The mysql SELECT query has to be executed and mysql_fetch_array needs to be manipulated. Also the $article_content line is removed for a good reason. Try this on your site and lemme know if it works.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 11-07-2011, 01:34 PM
jcga1992 jcga1992 is offline
Member
 
Join Date: Oct 2011
Posts: 6
Gender: Male
Credits: 1,309
jcga1992 is on a distinguished road
Default

WOW it work perfectly!!! Thank you!!!
Reply With Quote
  #8  
Old 11-07-2011, 02:31 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 331,537
Hall of Famer is on a distinguished road
Default

You are very welcome, glad it works for you.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modification Dictionary AlexC Mys v1.2.x Mods 2 07-05-2011 09:44 AM
Modification Directory Kaeliah Mys v1.1.x Mods 14 02-28-2011 05:14 PM
Custom Profile Modification Bloodrun Mys v1.1.x Mods 50 01-22-2011 09:17 PM
A quick Profile Add-on Modification Bloodrun Addons/Mods Graveyard 18 06-07-2009 10:15 PM
Modification Out-Dated New one will be added. Bloodrun Addons/Mods Graveyard 19 05-23-2009 01:52 AM


All times are GMT -5. The time now is 11:19 AM.

Currently Active Users: 620 (0 members and 620 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636