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 04-25-2017, 09:57 PM
aquapyrofan aquapyrofan is offline
Member
 
Join Date: Apr 2017
Posts: 48
Gender: Unknown/Other
Credits: 11,669
aquapyrofan is on a distinguished road
Default

Quote:
Originally Posted by Abronsyth View Post
Oh lords, I just typed out a bunch of information for you and the internet glitched and ate my entire post.

Okay, I'll edit this post in a moment, just adding the codes that you'll need at the moment.


Edit:

You will need to create two new files, one where the base files for your site are (adopt.php, account.php, etc):

personality.php
PHP Code:
<?php

class PersonalityController extends AppController{

    public function 
index(){
        
$mysidia Registry::get("mysidia");        
    }

}
?>
...and one in the view folder:

personalityview.php
PHP Code:
<?php 

use Resource\Native\String
use 
Resource\Collection\LinkedList

class 
PersonalityView extends View
     
    public function 
index(){ 
        
$mysidia Registry::get("mysidia"); 
        
$document $this->document;         
        
$document->setTitle("New Personality Trait"); 
        
    if(
$mysidia->input->post("add")){
        
$mysidia->db->insert("personalities", array("id" => NULL"pers" => $mysidia->input->post("type")));                
        
$document->add(new Comment"You have added the personality type {$mysidia->input->post("type")}.")); 
        
$document->add(new Comment("<meta http-equiv='refresh' content='1;url=personality' />")); 
        return 
TRUE;        
    }
            
        if(
$mysidia->user instanceof Admin){ 
        
$adoptablepersonality $mysidia->db->select("personalities", array("pers"), "1 ORDER BY RAND() DESC LIMIT 1")->fetchColumn();
        
$document->add(new Comment"<h2>Add New Personality Types</h2>")); 
             
$document->add(new Comment"Adding new possible personality types is easy! Just type it in the box and hit submit, then new adoptables have a chance of ending up with that personality type.<br><br>{$adoptablepersonality}<br><br>")); 
         
        
$persForm = new Form("addform""""post");
        
$persForm->add(new Comment("<br><u>Create A New Personality:</u><br>"TRUE"b"));
        
$persForm->add(new Comment("Type:"));
        
$persForm->add(new TextField("type"));
        
$persForm->add(new Button("Add""add""submit"));
        
$document->add($persForm);    
                     
                     
$document->add(new Comment"<hr>"));
        }
                else{ 
$document->add(new Comment"You do not have permission to access this page.")); 
}
          
        
            
            
     }
     
}
?>
With that done we need to go into the database and add one new table to the database called adopts_personalities with two columns. The two columns will need this data entered:
name: id
type: int(20)
null: No
default: None
extra: AUTO_INCREMENT

name: pers
type: varchar(100)
collation: latin1_swedish_ci
null: Yes
default: Null

Now move on over to owned_adoptables and add a new column with the following info:
name: personality
type: varchar(100)
collation: latin1_swedish_ci
null: No
default: Easy Going

Now for the tedious part. You will need to make the same edits, more or less, to the following five files:
adopt.php
classes/class_breeding.php
classes/class_promocode.php
classes/class_stockadopt.php
admincp/ownedadopt.php

Find the insert line in each file that starts like this:
$mysidia->db->insert("owned_adoptables", array("aid" => NULL...

At the end of that, before the closing )); add a comma behind whatever is last, and then add this:
PHP Code:
"personality" => $adoptablepersonality 
So all that's in, now how do I get to the add personality page and how do I view a pet's personality?
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


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

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