Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Tutorials and Tips (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=27)
-   -   M.A.S. Uber-Reference Guide (http://www.mysidiaadoptables.com/forum/showthread.php?t=4979)

Distortion 01-11-2016 12:34 PM

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 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.

Kyttias 01-11-2016 02:42 PM

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.

Distortion 01-12-2016 08:24 PM

Updated!

And thank you Kyttias.

Distortion 01-13-2016 04:05 PM

Added random name generator and instant inbox message delete redirect modifications.


All times are GMT -5. The time now is 04:59 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.