Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2016, 12:34 PM
Distortion's Avatar
Distortion Distortion is offline
Member
 
Join Date: Dec 2015
Location: Somewhere beyond the sea
Posts: 31
Gender: Female
Credits: 3,806
Distortion is on a distinguished road
Post M.A.S. Reference Guide

Just thought I'd post some links to helpful threads and posts

free stuff



tutorials, tips, and reference
  Spoiler: . 



others
  Spoiler: . 
Changing the name of a file
Say if we want to rename http://yoursite.com/inventory to http://yoursite.com/stash. We look for the following:
  • inventory.php Rename this file to stash.php, and open it in another tab.
  • inventory.php (found in the view folder.) Rename this file to stashview.php and open it in another tab.
  • lang_inventory.php Just rename to lang_stash.php
In stashview.php, you'll find:
PHP Code:
<?php
use Resource\Collection\LinkedList;

class 
InventoryView extends View{

(...)
Change InventoryView to StashView.

In stash.php, you'll find:
PHP Code:
<?php

class InventoryController extends AppController{

(...)
Change InventoryController to StashController.
Make sure to update any links that don't match up.

Random Name Generator
(Credit goes to Wallie987)
In adopt.php, under $gender = $adopt->getGender();, add:
PHP Code:
$randName = array('NAME','NAME','NAME'); #List of possible outcomes
            
shuffle($randName); #Picking random outcome
            
foreach ($randName as $randName) {
            
$name "$randName"#Assigning variable to chosen outcome
            

and comment/delete this line:
PHP Code:
$name = (!$mysidia->input->post("name"))?$adopt->getType():$mysidia->input->post("name"); 
Repeat in class_promo.php and class_breeding.php.

Instant Inbox Delete Redirect
In inbox.php, find the delete function and and replace with this:
PHP Code:
public function delete(){
    
header"Location: /inbox" ); #Redirect
        
$mysidia Registry::get("mysidia");
        try{
            
$this->message = new PrivateMessage($mysidia->input->get("id"));
            
$this->message->remove();
        }
        catch(
MessageNotfoundException $pne){
            
$this->setFlagss("nonexist_title""nonexist");
        }    
    } 


Feel free to suggest threads or alert me of errs.
__________________

Last edited by Distortion; 01-14-2016 at 11:37 AM.
Reply With Quote
  #2  
Old 01-11-2016, 02:42 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,960
Kyttias is on a distinguished road
Default

Man, I sure have contributed a lot! (Actually my two year anniversary on the site will be soon - on January 26th!)

Thanks for putting stuff together, I'm sure people will appreciate it. I might add a few links here over time, myself.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #3  
Old 01-12-2016, 08:24 PM
Distortion's Avatar
Distortion Distortion is offline
Member
 
Join Date: Dec 2015
Location: Somewhere beyond the sea
Posts: 31
Gender: Female
Credits: 3,806
Distortion is on a distinguished road
Default

Updated!

And thank you Kyttias.
__________________
Reply With Quote
  #4  
Old 01-13-2016, 04:05 PM
Distortion's Avatar
Distortion Distortion is offline
Member
 
Join Date: Dec 2015
Location: Somewhere beyond the sea
Posts: 31
Gender: Female
Credits: 3,806
Distortion is on a distinguished road
Default

Added random name generator and instant inbox message delete redirect modifications.
__________________
Reply With Quote
Reply

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


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

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