Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 09-26-2014, 11:40 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 27,695
parayna is on a distinguished road
Default

Oh, OK. I shall try that then! (I did them all at the same time ^_^'') I have just made a copy of my site for testing so now I won't ruin the actual one. So let's see if this works.. XD

EDIT: No... it still won't work.. I keep getting this:

Warning: require(../inc/config.php): failed to open stream: No such file or directory in /home/calamit2/public_html/classes/class_initializer.php on line 97

Warning: require(../inc/config.php): failed to open stream: No such file or directory in /home/calamit2/public_html/classes/class_initializer.php on line 97

Fatal error: require(): Failed opening required '../inc/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/calamit2/public_html/classes/class_initializer.php on line 97

I don't know if it'll help or not, but here is the class_initializer file:

PHP Code:
<?php

use \Resource\Native\Object;
use \
Resource\Native\String;

/**
 * The Initializer Class, it is responsible for the basic bootstraping of the system.
 * It handles basic Loader, Registry, System Object creation, further operations are delegated to Mysidia System Class.
 * This is a final class, cannot be extended by any child classes.
 * @category Resource
 * @package Utility
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.3
 * @todo Not much at this point.
 * @final
 *
 */

final class Initializer extends Object{

    
/**
     * The dir property, defines relative directory for Bootstraping process.
     * @access private
     * @var String
    */
    
private $dir

    
/**
     * The uri property, stores a reference of the URI from server variables.
     * @access private
     * @var String
    */
    
private $uri;   

    
/**
     * Constructor of Initializer Class, it delegates to the method initialize() to complete the request.
     * @access public
     * @return Void
     */
    
public function __construct(){
        
$this->setURI();
        
$this->setDir();
        
$this->initialize();
    }

    
/**
     * The getUri method, getter method for property $uri
     * @access public
     * @return Void
     */
    
public function getUri(){
        return 
$this->uri;
    } 

    
/**
     * The setUri method, setter method for property $uri
     * The property is set upon Initializer object instantiation, cannot be called from external class.
     * @access private
     * @return Void
     */
    
private function setUri(){
        
$this->uri $_SERVER['REQUEST_URI'];
    }   

    
/**
     * The getDir method, getter method for property $dir
     * @access public
     * @return Void
     */
    
public function getDir(){
        return 
$this->dir;
    } 

    
/**
     * The setDir method, setter method for property $dir
     * The property is set upon Initializer object instantiation, cannot be called from external class.
     * @access private
     * @return Void
     */
    
private function setDir(){
        if(
strpos($this->uri"admincp") !== FALSE or strpos($this->uri"install") !== FALSE){
            
$this->dir "../";
        }
        else 
$this->dir "";
    }   

    
/**
     * The initialize method, carries out the basic bootstraping steps.
     * It opens config file first, then include basic files and instantiate important objects.
     * @access private
     * @return Void
     */
    
private function initialize(){
        
$config "{$this->dir}inc/config.php";
        require 
$config;

        include(
"{$this->dir}functions/functions.php");
        include(
"{$this->dir}functions/functions_users.php");

        
$loader "{$this->dir}classes/class_loader.php";
        require 
$loader;
        
$loader = new Loader($this->dir);

        
$registry Registry::getInstance();
        
Registry::set(new String("loader"), $loaderTRUETRUE);
        
        
$mysidia = new Mysidia;        
        
$router = new Router($this->uri);
        
$router->route();
        
$dispatcher = new Dispatcher($router);
        
$dispatcher->dispatch();

        
$wol = new Online;
        
$wol->update();
        
Registry::set(new String("wol"), $wol);
    }
}
?>
Is there maybe something wrong with it? (That's what the warning seems to say... but I dunno XD)

I know I keep asking for help, but this is the only way I'll learn how to solve issues if I run into them in the future XD (Plus it's a great way of learning basic coding skills hehehe)

Last edited by parayna; 09-26-2014 at 12:02 PM.
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alchemy Mod - HoF Nieth Questions and Supports 4 11-13-2015 11:52 AM


All times are GMT -5. The time now is 07:55 PM.

Currently Active Users: 861 (0 members and 861 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636