Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-04-2014, 11:19 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 23,568
IntoRain is on a distinguished road
Default

PHP Code:
if($this->adopt->hasVoter($mysidia->user$date)){
            
// The user has leveled up this adoptable today, show error message
            
$message 'Name:' $adoptablename 'Species:' $species 'Gender:' $gender 'Total Clicks:' $totalclicks 'Trade Status:' $tradestatus;
            
$message = ($mysidia->user instanceof Member)?$mysidia->lang->already_leveled_member:$mysidia->lang->already_leveled_guest;
            
$document->setTitle($mysidia->lang->already_leveled_title);
            
$document->addLangvar($message);
        } 
Saying message equals something and then message equals something else overwrites the previous value of message. Basically you are saying message = 1; and then message = 2;
I don't quite remember the appending operator, but you can do this:

$message = "Name: {$adoptablename}<br>
Species: {$species}<br>
Gender: {$gender}<br>
Total Clicks: {$totalclicks}<br>
Trade Status: {$tradestatus}<br>";
$message = $message .= (($mysidia->user instanceof Member)?$mysidia->lang->already_leveled_member:$mysidia->lang->already_leveled_guest);

PHP Code:
        $gender $mysidia -> db -> select ("owned_adoptables", array("gender"), "aid='{$adopt->aid}'") -> fetchColumn();
        
$adoptablename $mysidia -> db -> select ("owned_adoptables", array("name"), "aid='{$adopt->aid}'") -> fetchColumn();
        
$species $mysidia -> db -> select ("owned_adoptables", array("type"), "aid='{$adopt->aid}'") -> fetchColumn();
        
$totalclicks $mysidia -> db -> select ("owned_adoptables", array("name"), "aid='{$adopt->aid}'") -> fetchColumn();
        
$tradestatus $mysidia -> db -> select ("owned_adoptables", array("tradestatus"), "aid='{$adopt->aid}'") -> fetchColumn(); 
Also you don't need to do so many database queries. You already have the adoptable as a private variable, it's an object that has all the information you need about it, go to class_ownedadoptable.php to check which functions you can use to get the values. That way you only do one database access, and not 5 or 6. For example to get the gender $this->adopt->getGender() and the tradestatus $this->adopt->getTradeStatus();
__________________


asp.net stole my soul.
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
Editing Stats Page & Little Icon Glow Questions and Supports 4 12-07-2014 09:29 AM
Online list ... and a Stats Page for Players Missy Master Questions and Supports 2 07-07-2014 10:58 AM
Help Making Stats Page = Click Page & Lineages? squiggler Questions and Supports 2 02-22-2014 05:42 AM
Adoptable Stats Abronsyth Suggestions and Feature Requests 2 09-10-2011 03:28 PM
Random Adoptable Click page AlkseeyaKC Suggestions and Feature Requests 4 07-01-2011 03:49 PM


All times are GMT -5. The time now is 05:34 PM.

Currently Active Users: 10160 (0 members and 10160 guests)
Threads: 4,082, Posts: 32,047, 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