Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-29-2014, 12:56 AM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 65,837
Hwona is on a distinguished road
Default Displaying Stats On Levelup Page

This post will cover how to display stats on an adoptable's click page


1. Go to the "class_ownedadoptable.php" file(inside the "classes" folder). There, at the top, there's a bunch of "protected" variables. Add this below them:
protected $statname;
Add this function to the list of functions below:
public function getAdoptstatname(){
return $this->statname;
}

2. Got to the "levelup.php" file. On line 29, there should be something like this:
$ip = secure($_SERVER['REMOTE_ADDR']);
Under that with this:
$adoptablestatname = $this->adopt->getAdoptstatname();
On line 33, there's a piece of code like this:
PHP Code:
$message = ($mysidia->user instanceof Member)?$mysidia->lang->already_leveled_member:$mysidia->lang->already_leveled_guest
Replace that with:
PHP Code:
$message "<div id='stats'>Statname: {$adoptablestatname}</div>";
$message $message .= (($mysidia->user instanceof Member)?$mysidia->lang->already_leveled_member:$mysidia->lang->already_leveled_guest); 
Replace lines 38 and 39, which should contain something like this:
PHP Code:
$document->setTitle($mysidia->lang->frozen_title);
            
$document->addLangvar($mysidia->lang->frozen); 
With:
PHP Code:
    $message $message .= "
<div id='stats'>
Statname: 
{$adoptablestatname}
</div><br>
We're sorry, but you cannot add clicks to this adoptable at this time because its owner has chosen to freeze it.  Frozen adoptables do not accept new clicks and do not level up.  Thanks anyway for the click though, but the owner of this adoptable wants to keep this adoptable young so it will not be counted."
;
            
$document->setTitle($mysidia->lang->frozen_title);
            
$document->addLangvar($message); 
On line 41, there should be:
else{
Under that, put:
PHP Code:
$message $message .= "<br><text align ='center'><div id='clickpagelink'><a href='{$mysidia->path->getAbsolute()}levelup/click/{$this->adopt->getAdoptID()}'>Click here to visit {$adoptablename}</a><br></div>"
On line 67, there should be something like this:
$document->add($summary);
Under that, put:
$document->addLangvar($message);

Tada! The next section will go over the "stat-raising system".
__________________

Last edited by Hwona; 07-02-2014 at 10:03 AM.
Reply With Quote
 


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
Trade System Kyttias Questions and Supports 4 05-29-2016 12:29 AM
Making v.1.3.3 Stat Mod Compatible with V.1.3.4 Hwona Questions and Supports 0 07-08-2014 01:37 PM
Stat Inheritance Mod * thanks to Wallie! * Missy Master Mys v1.3.x Mods 0 06-30-2014 02:23 PM
Anyone Want to Have a Stat System Hwona Feedback and Suggestions 12 06-30-2014 09:30 AM
Basic Stat System Hedgen Questions and Supports 3 03-10-2013 02:47 PM


All times are GMT -5. The time now is 08:01 AM.

Currently Active Users: 3220 (0 members and 3220 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636