M.A.S. Uber-Reference Guide

Forum
Last Post
Threads / Messages

Distortion

Member
Member
Joined
Dec 1, 2015
Messages
31
Points
0
Location
Somewhere beyond the sea
Mysidian Dollar
2,744
M.A.S. Reference Guide

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

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:
<?php
use Resource\Collection\LinkedList;

class InventoryView extends View{

(...)
Change InventoryView to StashView.

In stash.php, you'll find:
PHP:
<?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:
$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:
$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:
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:
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.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top