Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 04-04-2009, 05:44 PM
kisazeky kisazeky is offline
Member
 
Join Date: Mar 2009
Posts: 44
Credits: 18,930
kisazeky
Default Show who recently leveled up a given adoptable

What!? OMG ANOTHER MOD!!?

This one is kind of tricky so pay attention!!

---
[size=medium]
If you have installed my profile mod[/size]

Wherever in the code there is:
PHP Code:
$article_content $article_content."$voter "
change it to:

PHP Code:
$article_content $article_content."<a href='profile.php?owner=$voter'>$voter</a> "
This will link their name to their profile.

----

Step 1:

Run this query (this is the only easy part)

PHP Code:
ALTER vote_voters ADD (voteid INT NOT NULL AUTO_INCREMENT PRIMARY KEY
Step 2:


Open levelup.php and look for something like this code. It may vary if you have changed the "already leveled up" message.

PHP Code:
if($checkdate == $todaydate){
                
//We've gone this far, this means that we found a match because a date was returned
                //Cannot vote because we already voted today...
                
$article_title "You already voted for me today!";
                
$article_date date('Y-m-d');    
                
$article_content "You already voted for this adoptable today.  Please come back in 24 hours to level up this adoptable again."
Below it, put:

PHP Code:
$article_content=$article_content."<p>Recently leveled up by:</p>";

$query "SELECT * FROM vote_voters WHERE adoptableid = '".$id."' AND date = '".$todaydate."' ORDER BY voteid DESC LIMIT 20";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i $num) {

$voter=@mysql_result($result,$i,"username");

$article_content $article_content."$voter ";

$i++;


Step 3:
[size=medium]
This is if you have not installed my currency mod
[/size]

Find something like this bit of code (it will not be exact if you changed the level up message):

PHP Code:
            mysql_query("UPDATE owned_adoptables SET currentlevel='".$levelup."' WHERE uid='".$id."'");
            
mysql_query("UPDATE owned_adoptables SET imageurl='".$img."' WHERE uid='".$id."'");
            
$flag 1;
            
$currentlevel $levelup;
            }


            }    

            if(
$flag == 1){
            
$imageurl $img;
            }

            
$article_content "You just gave ".$name." 1 LevelUP point!<br><br><img src='".$imageurl."' border='0'><br>
            <b>"
.$name."'s Current Level: ".$currentlevel."</b><br><br>Be sure and come back tomorrow to rank ".$name." up again!"
Below it...insert this code:

PHP Code:
$article_content=$article_content."<p>Recently leveled up by:</p>";

$query "SELECT * FROM vote_voters WHERE adoptableid = '".$id."' AND date = '".$todaydate."' ORDER BY voteid DESC LIMIT 20";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i $num) {

$voter=@mysql_result($result,$i,"username");

$article_content $article_content."$voter ";

$i++;


[size=medium]If you have installed my currency mod then...[/size]

Find something similar to this code. The article content may vary if you changed the message.

PHP Code:
mysql_query("UPDATE `users` SET `money`='".$newbalance."' WHERE `username`='".$luser."'");
            
            
$article_content=$article_content"
            <p>You have earned 10 currency name for leveling up this pet.
            <br>You now have a total of "
.$newbalance." currency name."
Erase the "; at the end of your message for earning currency. Then below it, paste this:

PHP Code:
<p>Recently leveled up by:</p>";

$query = "SELECT FROM vote_voters WHERE adoptableid '".$id."' AND date '".$todaydate."' ORDER BY voteid DESC LIMIT 20";
$result = mysql_query($query);
$num = mysql_numrows($result);

//Loop out code
$i=0;
while (
$i < $num) {

$voter=@mysql_result($result,$i,"username");

$article_content = $article_content."$voter ";

$i++;

Step 4:

Find
PHP Code:
mysql_query("INSERT INTO vote_voters VALUES ('$todaydate', '','$ip','$id')"); 
Change it to
PHP Code:
mysql_query("INSERT INTO vote_voters VALUES ('$todaydate', '','$ip','$id', '')"); 
Then find
PHP Code:
mysql_query("INSERT INTO vote_voters VALUES ('$todaydate', '$username','','$id')"); 
again

and change it to
PHP Code:
mysql_query("INSERT INTO vote_voters VALUES ('$todaydate', '$username','','$id', '')"); 
  #2  
Old 04-04-2009, 05:50 PM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 9,948
Ashje
Default RE: Show who recently leveled up a given adoptable

Looks cool =)
  #3  
Old 04-04-2009, 05:51 PM
kisazeky kisazeky is offline
Member
 
Join Date: Mar 2009
Posts: 44
Credits: 18,930
kisazeky
Default RE: Show who recently leveled up a given adoptable

Do you think it's confusing Ashje?
  #4  
Old 04-04-2009, 05:56 PM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 9,948
Ashje
Default RE: Show who recently leveled up a given adoptable

Not really. If you read it carefully then it's fine. I have to go to a concert soon but I'll install it later. =)
Closed Thread

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adoptable Change When Leveled. NobodysHero Questions and Supports 0 06-25-2014 01:01 PM
What did you work on recently? AlexC Other Chat 7 12-16-2013 06:46 PM
Recently Uploaded Gashu Suggestions and Feature Requests 27 11-15-2011 02:27 PM
How to show the name of adoptable in the profile page? SieghartZeke Questions and Supports 10 10-12-2009 09:39 AM
Different Pages in Show Adoptable rosepose Suggestions and Feature Requests 1 03-15-2009 04:58 PM


All times are GMT -5. The time now is 04:27 PM.

Currently Active Users: 459 (0 members and 459 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