Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 01-29-2015, 04:28 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,397
Kyttias is on a distinguished road
Default

Yes, it can be, if you have access to your php.ini file. Most hosts don't allow that, they control the entire server's php.ini file. I think you can also put error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE); at the top of each page the error reports, but I haven't fully tried it yet -- because doing that on the adminCP gave me an error, too. Maybe if I'd done that to begin with everywhere, things would be fine, so I might go and try that. =|

(And err, your file just gave me:

Code:
Parse error: syntax error, unexpected '$component' (T_VARIABLE) in /srv/disk3/1793798/www/novul/classes/class_adminsidebar.php on line 37
)
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 01-29-2015 at 04:33 PM.
Reply With Quote
  #12  
Old 01-29-2015, 04:42 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,188
Missy Master is an unknown quantity at this point
Default

Yep, that was with the addition that HOF had suggested I am guessing .. the site itself will come up, ACP wont .... the change had gotten rid of most of the SS errors, but breeding still had it come up ---and then I checked ACP and -- no go !


http://pet-sim.com/Canidae/


if you want to see what's happening there ? Thanks for trying to help guys!
Reply With Quote
  #13  
Old 01-29-2015, 04:53 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,397
Kyttias is on a distinguished road
Default

Well, another one to fix would be around line 43 in classes/class_radiolist.php, changing this:
PHP Code:
    public function add(RadioButton $radio$index = -1){
        if(
$radio->getName() != $this->name) throw new GUIException("Cannot add unrelated radiobuttons to a RadioList.");
        
parent::add($radio$index);            
    } 
to:
PHP Code:
public function add(GUIComponent $radio$index = -1){
        if(
$radio->getName() != $this->name) throw new GUIException("Cannot add unrelated radiobuttons to a RadioList.");
        
parent::add($radio$index);            
    } 
And that would fix stuff in the profile settings.

But I digress - I could fix all the errors on the front end, but never the AdminCP one. Not without getting a new error to take its place. And I really feel this comes down on the hosting provider, because I couldn't get inline modifications of the error_reporting to work either. Not in the file, not in the htaccess, and I don't have control over my php.ini. *sigh*
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #14  
Old 01-29-2015, 04:57 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,188
Missy Master is an unknown quantity at this point
Default

well rats .. so to get rid of all the SS errors showing, we sacrifice our ACP? :(



I cant get into mine at all now ...
Reply With Quote
  #15  
Old 01-29-2015, 05:01 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,397
Kyttias is on a distinguished road
Default

Yes, and I never could -- but! We got a different error after making changes there, so many HOF can still help!

I made this change in the AdminCP -
PHP Code:
    protected function setDivision(GUIComponent $component){
        
$this->division = new Division($component);
        
$this->division->setClass("sidebar");
    } 
and now have:
Code:
Catchable fatal error: Argument 1 passed to AdminSidebar::setDivision() must be an instance of GUIComponent, instance of Resource\Collection\ArrayList given, called in /srv/disk3/1793798/www/novul/classes/class_adminsidebar.php on line 187 and defined in /srv/disk3/1793798/www/novul/classes/class_adminsidebar.php on line 36
So if we can just get that figured out, we should be good, right?
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #16  
Old 01-29-2015, 05:03 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,188
Missy Master is an unknown quantity at this point
Default

I think we desperately need help! :)


I really cant launch and have members see all those errors pop up, and I need access to the ACP, that's too important ..
Reply With Quote
  #17  
Old 01-29-2015, 05:09 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,188
Missy Master is an unknown quantity at this point
Default

Parse error: syntax error, unexpected '$component' (T_VARIABLE) in /home/petsim/public_html/Canidae/classes/class_adminsidebar.php on line 37


This is my current error, for trying to access ACP .. I'm using the fix from HOF for the coding.




Also, getting this for Breeding:


Strict Standards : Declaration of DropdownList::add() should be compatible with GUIContainer::add(GUIComponent $component /home/petsim/public_html/Canidae/classes/class_dropdownlist.php</b> $index = -1) in on line 189
Reply With Quote
  #18  
Old 01-29-2015, 05:21 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,397
Kyttias is on a distinguished road
Default

Try what I did, not what you did (in the AdminCP).
This:
Code:
$this->division = new Division($component);
Not:
Code:
$this->division = new Division(GUIComponent $component);
It doesn't need to be declared there. Above that it does, but not in the function itself.

And here is my entire class_dropdownlist.php:
  Spoiler: class_dropdownlist.php 
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.");
    }    
}    
?>


Let me know how that goes.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #19  
Old 01-29-2015, 05:25 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,188
Missy Master is an unknown quantity at this point
Default

Okay I now have this:


protected function setDivision(GUIComponent $component){
$this->division = new Division($component);
$this->division->setClass("sidebar");
}


and I get this in ACP:


Catchable fatal error: Argument 1 passed to AdminSidebar::setDivision() must be an instance of GUIComponent, instance of Resource\Collection\ArrayList given, called in /home/petsim/public_html/Canidae/classes/class_adminsidebar.php on line 195 and defined in /home/petsim/public_html/Canidae/classes/class_adminsidebar.php on line 36
Reply With Quote
  #20  
Old 01-29-2015, 05:30 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,397
Kyttias is on a distinguished road
Default

Yup, this is what I have, too. From what I can tell it's not sure what to do with the ArrayList and the addClass function at the bottom of that file - I already pinged HoF over aim, so hopefully he'll return to the thread tonight. ovo
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
Reply


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
Standards for PHP programmers, which category are you in? Hall of Famer Webmasters Area 4 10-05-2014 12:40 AM
Strict Standards on Friend Privacy Page? parayna Questions and Supports 2 09-27-2014 09:59 AM
Strict Standards Error? LucasA33 Questions and Supports 4 01-09-2014 11:26 AM


All times are GMT -5. The time now is 10:06 AM.

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