View Single Post
  #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,843
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