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");
}
}