Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Strict Standards --- Need help, pre launch! (http://www.mysidiaadoptables.com/forum/showthread.php?t=4776)

Missy Master 01-29-2015 05:57 PM

I hope so too!

I really want to launch this site with this great script! :)

Hall of Famer 01-29-2015 07:58 PM

1 Attachment(s)
Sorry, it seems that the original fix was not correct. The setDivision() method in AdminSidebar should be just a different method than the original SetDivision() from Sidebar and Widget class. I rename it to setDivisions, and it should work now. Download the attachment from below and lemme know if you encounter further issues.

Missy Master 01-29-2015 08:22 PM

I think that's got it!! *hugs* HOF you totally rock as usual!!





As far as I can tell all is okay, if not I will report here but it's looking GOOD!!

Missy Master 01-29-2015 08:29 PM

its still doing the drop down list error, but the ACP is working now, and the massive amounts of Strict Standards errors aren't happening---



seems to be in Items and Breeding --- actually shop and breeding, yeaaaah -

Kyttias 01-29-2015 08:39 PM

I get
Code:

Fatal error: Uncaught exception 'Exception' with message 'Fatal Error: Class AdmincpView either does not exist, or has its include path misconfigured!' in /srv/disk3/1793798/www/novul/classes/class_loader.php:83
Stack trace:
#0 [internal function]: Loader->load('AdmincpView')
#1 /srv/disk3/1793798/www/novul/classes/class_controller.php(135): spl_autoload_call('AdmincpView')
#2 /srv/disk3/1793798/www/novul/classes/class_frontcontroller.php(72): Controller->loadView(Object(Resource\Native\String))
#3 /srv/disk3/1793798/www/novul/index.php(73): FrontController->getView()
#4 /srv/disk3/1793798/www/novul/index.php(78): IndexController::main()
#5 {main} thrown in /srv/disk3/1793798/www/novul/classes/class_loader.php on line 83

Now when trying to visit my AdminCP.

Missy Master 01-29-2015 08:51 PM

There you go!


No idea why that's still glitching but I can live with it if I have to .. I dont get why you can't access your ACP now ...

Code:



<?php

use Resource\Native\String;
use Resource\Collection\Collective;
use Resource\Collection\LinkedList;
use Resource\Collection\LinkedHashMap;

/**
 * The DropdownList Class, extends from abstract GUIContainer class.
 * It specifies a standard single-item dropdown list.
 * @category Resource
 * @package GUI
 * @author Hall of Famer
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.3
 * @todo Not much at this point.
 *
 */

class DropdownList extends GUIContainer{
       
        /**
        * The autofocus property, checks if the input component is autofocused.
        * @access protected
        * @var Boolean
    */
        protected $autofocus = FALSE;
       
        /**
        * The disabled property, checks if the input component is disabled.
        * @access protected
        * @var Boolean
    */
        protected $disabled = FALSE;
       
    /**
    * Constructor of SelectList Class, which assigns basic property to this list
        * @param String  $name
        * @param ArrayList  $components
        * @param String  $identity
        * @param Event  $event
    * @access public
    * @return Void
    */
        public function __construct($name = "", $components = "", $identity = "", $event = ""){
            if(!empty($name)){
                    $this->setName($name);
                        $this->setID($name);
                }
                if(!empty($identity)) $this->select($identity);
                if(!empty($event)) $this->setEvent($event);
               
                parent::__construct($components);
        $this->renderer = new ListRenderer($this);               
        }
       
        /**
    * The isAutofocus method, getter method for property $autofocus.   
    * @access public
    * @return Boolean
    */
        public function isAutofocus(){
            return $this->autofocus;   
        }

        /**
    * The setAutofocus method, setter method for property $autofocus.
        * @param Boolean  $autofocus     
    * @access public
    * @return Void
    */
        public function setAutofocus($autofocus = TRUE){
            $this->autofocus = $autofocus;
                $this->setAttributes("Autofocus");
        }       
       
        /**
    * The isDisabled method, getter method for property $disabled.   
    * @access public
    * @return Boolean
    */
        public function isDisabled(){
            return $this->disabled;
        }

        /**
    * The setDisabled method, setter method for property $disabled.
        * @param Boolean  $disabled     
    * @access public
    * @return Void
    */
        public function setDisabled($disabled = TRUE){
            $this->disabled = $disabled;
                $this->setAttributes("Disabled");
        }

        /**
    * The add method, sets an Option Object to a specific index.
        * @param Option|OptGroup  $option
    * @param int  $index       
    * @access public
    * @return Void
    */       
   
   
        public function add($option, $index = -1){
            if(!($option instanceof Option) and !($option instanceof OptGroup)) throw new GUIException("Cannot add a non-option type component to dropdown list.");
            parent::add($option, $index);                       
        }
       
       
       
       
        /**
    * The select method, determines which option in this list should be set selected.
        * @param String  $identity 
    * @access public
    * @return Void
    */
        public function select($identity){
            foreach($this->components as $components){
                    if($components->getValue() == $identity) $components->setSelected(TRUE);
                }               
        }
       
        /**
    * The fill method, fill in this dropdownlist with options from database starting at a given index.
        * To use it, you need PDO or MySQLi to fetch all rows with one or two properties to serve as collection list or map.
        * @param Collective $collection
        * @param String  $identity
    * @param Int  $index       
    * @access public
    * @return Void
    */
        public function fill(Collective $collection, $identity = "", $index = -1){
                if($index != -1) $this->currentIndex = $index;               
                if($collection instanceof LinkedList) $this->fillList($collection, $identity, $index);
        elseif($collection instanceof LinkedHashMap) $this->fillMap($collection, $identity, $index);
        else throw new GUIException("Cannot fill option objects inside this dropdownlist");
        }

        /**
    * The fillList method, fill in this dropdownlist with elements from a LinkedList.
        * @param LinkedList  $list
        * @param String  $identity
    * @param Int  $index       
    * @access protected
    * @return Void
    */
    protected function fillList(LinkedList $list, $identity = "", $index = -1){
        $iterator = $list->iterator();
        while($iterator->hasNext()){
            $field = (string)$iterator->next();
                    $option = new Option($field, $field);
                        if($option->getValue() == $identity) $option->setSelected(TRUE);
                    $this->add($option, $index);
                        if($index != -1) $index++;         
        }       
    }

        /**
    * The fillList method, fill in this dropdownlist with entries from a LinkedHashMap.
        * @param LinkedHashMap  $map
        * @param String  $identity
    * @param Int  $index       
    * @access protected
    * @return Void
    */
    protected function fillMap(LinkedHashMap $map, $identity = "", $index = -1){
        $iterator = $map->iterator();
        while($iterator->hasNext()){
            $field = $iterator->next();
                    $option = new Option((string)$field->getKey(), (string)$field->getValue());
                        if($option->getValue() == $identity) $option->setSelected(TRUE);
                    $this->add($option, $index);
                        if($index != -1) $index++;         
        }       
    }

        /**
    * Magic method __toString for DropdownList class, it reveals that the object is a dropdown list.
    * @access public
    * @return String
    */
    public function __toString(){
            return new String("This is an instance of Mysidia DropDownList class.");
        }   
}   
?>


Kyttias 01-29-2015 08:54 PM

Yes, again, you haven't replaced
PHP Code:

    public function add($option$index = -1){
        if(!(
$option instanceof Option) and !($option instanceof OptGroup)) throw new GUIException("Cannot add a non-option type component to dropdown list.");
        
parent::add($option$index);            
    } 

with

PHP Code:

    public function add(GUIComponent $option$index = -1){
        if(!(
$option instanceof Option) and !($option instanceof OptGroup)) throw new GUIException("Cannot add a non-option type component to dropdown list.");
        
parent::add($option$index);            
    } 

Or, here's the full file:
PHP Code:

<?php
use Resource\Native\String;
use 
Resource\Collection\Collective;
use 
Resource\Collection\LinkedList;
use 
Resource\Collection\LinkedHashMap;

/**
 * The DropdownList Class, extends from abstract GUIContainer class.
 * It specifies a standard single-item dropdown list.
 * @category Resource
 * @package GUI
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.3
 * @todo Not much at this point.
 *
 */

class DropdownList extends GUIContainer{
    
    
/**
     * The autofocus property, checks if the input component is autofocused.
     * @access protected
     * @var Boolean
    */
    
protected $autofocus FALSE;
    
    
/**
     * The disabled property, checks if the input component is disabled.
     * @access protected
     * @var Boolean
    */
    
protected $disabled FALSE;
    
    
/**
     * Constructor of SelectList Class, which assigns basic property to this list
     * @param String  $name
     * @param ArrayList  $components
     * @param String  $identity
     * @param Event  $event
     * @access public
     * @return Void
     */
    
public function __construct($name ""$components ""$identity ""$event ""){
        if(!empty(
$name)){
            
$this->setName($name);
            
$this->setID($name);
        }
        if(!empty(
$identity)) $this->select($identity);
        if(!empty(
$event)) $this->setEvent($event);
        
        
parent::__construct($components);
        
$this->renderer = new ListRenderer($this);        
    }
    
    
/**
     * The isAutofocus method, getter method for property $autofocus.    
     * @access public
     * @return Boolean
     */
    
public function isAutofocus(){
        return 
$this->autofocus;    
    }

    
/**
     * The setAutofocus method, setter method for property $autofocus.
     * @param Boolean  $autofocus      
     * @access public
     * @return Void
     */
    
public function setAutofocus($autofocus TRUE){
        
$this->autofocus $autofocus;
        
$this->setAttributes("Autofocus");
    }    
    
    
/**
     * The isDisabled method, getter method for property $disabled.    
     * @access public
     * @return Boolean
     */
    
public function isDisabled(){
        return 
$this->disabled
    }

    
/**
     * The setDisabled method, setter method for property $disabled.
     * @param Boolean  $disabled       
     * @access public
     * @return Void
     */
    
public function setDisabled($disabled TRUE){
        
$this->disabled $disabled;
        
$this->setAttributes("Disabled");
    }

    
/**
     * The add method, sets an Option Object to a specific index.
     * @param Option|OptGroup  $option
     * @param int  $index     
     * @access public
     * @return Void
     */    
    
public function add(GUIComponent $option$index = -1){
        if(!(
$option instanceof Option) and !($option instanceof OptGroup)) throw new GUIException("Cannot add a non-option type component to dropdown list.");
        
parent::add($option$index);            
    }
    
    
/**
     * The select method, determines which option in this list should be set selected.
     * @param String  $identity   
     * @access public
     * @return Void
     */
    
public function select($identity){
        foreach(
$this->components as $components){
            if(
$components->getValue() == $identity$components->setSelected(TRUE);
        }        
    }
    
    
/**
     * The fill method, fill in this dropdownlist with options from database starting at a given index.
     * To use it, you need PDO or MySQLi to fetch all rows with one or two properties to serve as collection list or map.
     * @param Collective $collection
     * @param String  $identity
     * @param Int  $index     
     * @access public
     * @return Void
     */
    
public function fill(Collective $collection$identity ""$index = -1){
        if(
$index != -1$this->currentIndex $index;        
        if(
$collection instanceof LinkedList$this->fillList($collection$identity$index);
        elseif(
$collection instanceof LinkedHashMap$this->fillMap($collection$identity$index);
        else throw new 
GUIException("Cannot fill option objects inside this dropdownlist");
    }

    
/**
     * The fillList method, fill in this dropdownlist with elements from a LinkedList.
     * @param LinkedList  $list
     * @param String  $identity
     * @param Int  $index     
     * @access protected
     * @return Void
     */
    
protected function fillList(LinkedList $list$identity ""$index = -1){
        
$iterator $list->iterator();
        while(
$iterator->hasNext()){
            
$field = (string)$iterator->next();
             
$option = new Option($field$field);
            if(
$option->getValue() == $identity$option->setSelected(TRUE);
            
$this->add($option$index);
            if(
$index != -1$index++;           
        }        
    }

    
/**
     * The fillList method, fill in this dropdownlist with entries from a LinkedHashMap.
     * @param LinkedHashMap  $map
     * @param String  $identity
     * @param Int  $index     
     * @access protected
     * @return Void
     */
    
protected function fillMap(LinkedHashMap $map$identity ""$index = -1){
        
$iterator $map->iterator();
        while(
$iterator->hasNext()){
            
$field $iterator->next();
             
$option = new Option((string)$field->getKey(), (string)$field->getValue()); 
            if(
$option->getValue() == $identity$option->setSelected(TRUE);
            
$this->add($option$index);
            if(
$index != -1$index++;           
        }        
    }

    
/**
     * Magic method __toString for DropdownList class, it reveals that the object is a dropdown list.
     * @access public
     * @return String
     */
    
public function __toString(){
        return new 
String("This is an instance of Mysidia DropDownList class.");
    }    
}    
?>


Missy Master 01-29-2015 08:57 PM

Ah let me try that now, now that the basics are working! Glad you caught that!

Missy Master 01-29-2015 08:59 PM

BINGO!! Solved!! Thank you so much!!!!


Now hopefully your ACP will give you access !!

Hall of Famer 01-30-2015 08:04 AM

It seems that your site will work now. ^^ Got any other issues, please let me or other users on the forum know. Also you can message me on Skype directly, since you have my contact.


All times are GMT -5. The time now is 01:39 AM.

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