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
  #51  
Old 03-22-2016, 08:59 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,703
Ittermat is on a distinguished road
Default

I even changed it to yours to see if it was my file- and its not the file- its something with my laptop I think- thats blocking it? but I cant figure out what??
Im using mozilla firefox? but it also wont show up with text or speech bubbles on chrome either..

Last edited by Ittermat; 03-22-2016 at 09:24 PM.
Reply With Quote
  #52  
Old 03-22-2016, 10:17 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,497
Kyttias is on a distinguished road
Default

That's really ridiculous? PHP renders text from server side, it has nothing to do with what browser you're using.

I even have adblock. You could always remove the class from the div, I guess. =/ The line right after:
PHP Code:
/**** BEGIN: CREATE RANDOM MESSAGES ****/ 
Just change the class name to something else, like pancakes or something. If something browser related was blocking it, that'd be the only difference.

But go ahead and share the file one more time just in case?
__________________
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
  #53  
Old 03-22-2016, 10:19 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,703
Ittermat is on a distinguished road
Default

Im not sure what else it would be to be honest? but yea I'll hand it over again-

Code:
<?php

/**
 * The Sidebar Class, defines a standard HTML Sidebar component.
 * It extends from the Widget class, while adding its own implementation.
 * @category Resource
 * @package Widget
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.3
 * @todo Not much at this point.
 *
 */

class Sidebar extends Widget{

    /**
     * The moneyBar property, specifies the money/donation bar for members.
     * @access protected
     * @var Paragraph
    */
    protected $moneyBar;
    
    /**
     * The linksBar property, stores all useful links for members.
     * @access protected
     * @var Paragraph
    */
    protected $linksBar;
    
    /**
     * The wolBar property, determines the who's online url in the sidebar.
     * @access protected
     * @var Link
    */
    protected $wolBar;
    
    /**
     * The loginBar property, specifies the loginBar for guests.
     * @access protected
     * @var FormBuilder
    */
    protected $loginBar;

    /**
     * Constructor of Sidebar Class, it initializes basic sidebar properties     
     * @access public
     * @return Void
     */
    public function __construct(){
        parent::__construct(4, "sidebar");
    }
    
    /**
     * The setDivision method, setter method for property $division.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @param GUIComponent  $module
     * @access protected
     * @return Void
     */
    protected function setDivision(GUIComponent $module){
        if(!$this->division){
            $this->division = new Division;
            $this->division->setClass("sidebar");
        }    
        $this->division->add($module);
    }



    #
    #
    #
    /**** BEGIN: FOR THE FAVPET WIDGET ****/
    public function getFavPetSB(){
        return $this->FavPetSB;
    }

    public function setFavPetSB(){
        $mysidia = Registry::get("mysidia");
        $profile = $mysidia->user->getprofile();  
        
        /* IF THE USER DOES *NOT* HAVE A FAVPET: */
            if ($profile->getFavpetID() == "0"){  
            $this->FavPetSB = new Paragraph; 
            $this->FavPetSB->add(new Comment("<b>No Favorite Pet Set</b>"));
        }

        /* IF THE USER *DOES* HAVE A FAVPET: */
        if ($profile->getFavpetID() != "0"){
            $favpet = new OwnedAdoptable($profile->getFavpetID());
            $this->FavPetSB = new Paragraph; 
            $this->FavPetSB->add(new Comment("<b>Favorite Pet!</b>"));
             $this->FavPetSB->add(new Comment("{$message}"));  
            $this->FavPetSB->add(new Comment("<a href='/myadopts/manage/{$profile->getFavpetID()}'><img src='{$favpet->getImage()}'></a>"));  

        #
        #
        #
        /**** BEGIN: CREATE RANDOM MESSAGES ****/
            $message = "<div class='speechbubble'>";

            $status_chance = mt_rand(1, 100);  
            if ($status_chance <= 1){ # One percent chance the pet will obtain a status effect.

                /* We would apply a status effect here...*/
                $message .= "Placeholder text: A status effect would have happened here!";
                #### We'll do this later!!!

            } else { # Ninety-nine percent chance the pet will not get a status effect. Will something else happen?
                $something_chance = mt_rand(1, 100); 
                if ($something_chance <= 25){ # Twenty-five percent chance something will happen.
                    $gift_chance = mt_rand(1, 100); 
                    if ($gift_chance <= 5){ # Five percent chance the user will receive a gift from their pet.
                        $item_chance = mt_rand(1, 100);
                        if ($item_chance <= 50){ # Fifty percent chance the gift from their pet will be an item.

                            /* The pet has found an item for you! */                            
                            $num = mt_rand(1,5); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                            switch ($num){
                                case 1: $item = "Ball of Yarn"; break;
                                case 2: $item = "Bernard plushie"; break;
                                case 3: $item = "Madeline plushie "; break;
                                case 4: $item = "Maria plushie"; break;
								case 5: $item = "Honey comb"; break;
                            }
                            $message .= "I found a {$item} for you!";
                            $newitem = new StockItem($item); 
                            $newitem->append(1, $mysidia->user->username); 

                        } else { # Fifty percent chance the gift from their pet will be money.

                            /* The pet has found some money for you! */
                            $currency = $mysidia->settings->cost;
                            $amount = mt_rand(100, 1000); # Between 100 and 1000
                            $message .= "Found {$amount} {$currency}!";
                            $mysidia->user->changecash($amount);

                        }
                    } else { # Twenty percent chance the pet will talk but have no gift.
                        /* No gift will be given but a neat species-specific phrase can still be said! */

                        $species = $favpet->type;                        

                        switch ($species){
                            case "Catari": # If the species name is "Cat" it will choose one these:
                                $num = mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                switch ($num){
                                    case 1: $message .= "Meow!"; break;
                                    case 2: $message .= "*purr*"; break;
                                    case 3: $message .= "Do you have catnip?"; break;
                                    case 4: $message .= "I saw a squirrel today!"; break;
									case 5: $message .= "I should catch that mouse!"; break;
									case 6: $message .= "I love you!"; break;
									case 7: $message .= "I feel special being owned by you!"; break;
                                }
                            break;
							                        
                            case "silver tabby Catari": # If the species name is "Cat" it will choose one these:
                                $num = mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                switch ($num){
                                    case 1: $message .= "Meow!"; break;
                                    case 2: $message .= "*purr*"; break;
                                    case 3: $message .= "Do you have catnip?"; break;
                                    case 4: $message .= "I saw a squirrel today!"; break;
									case 5: $message .= "I should catch that mouse!"; break;
									case 6: $message .= "I love you!"; break;
									case 7: $message .= "I feel special being owned by you!"; break;
                                }
                            break;
						
                            case "ginger tabby Catari": # If the species name is "Cat" it will choose one these:
                                $num = mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                switch ($num){
                                    case 1: $message .= "Meow!"; break;
                                    case 2: $message .= "*purr*"; break;
                                    case 3: $message .= "Do you have catnip?"; break;
                                    case 4: $message .= "I saw a squirrel today!"; break;
									case 5: $message .= "I should catch that mouse!"; break;
									case 6: $message .= "I love you!"; break;
									case 7: $message .= "I feel special being owned by you!"; break;
                                }
                            break;
														
                            case "tuxedo tabby Catari": # If the species name is "Cat" it will choose one these:
                                $num = mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                switch ($num){
                                    case 1: $message .= "Meow!"; break;
                                    case 2: $message .= "*purr*"; break;
                                    case 3: $message .= "Do you have catnip?"; break;
                                    case 4: $message .= "I saw a squirrel today!"; break;
									case 5: $message .= "I should catch that mouse!"; break;
									case 6: $message .= "I love you!"; break;
									case 7: $message .= "I feel special being owned by you!"; break;
                                }
                            break;
							
                            case "Hounda":
                                $num = mt_rand(1,7);
                                switch ($num){
                                    case 1: $message .= "Woof!"; break;
                                    case 2: $message .= "Bark bark!!"; break;
                                    case 3: $message .= "Let's play fetch!"; break;
                                    case 4: $message .= "I will protect you!"; break;
									case 5: $message .= "what adventure are we going on today??!"; break;
									case 6: $message .= "Lets be best friends forever!!"; break;
									case 7: $message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;
							
							case "Black and white Hounda":
                                $num = mt_rand(1,7);
                                switch ($num){
                                    case 1: $message .= "Woof!"; break;
                                    case 2: $message .= "Bark bark!!"; break;
                                    case 3: $message .= "Let's play fetch!"; break;
                                    case 4: $message .= "I will protect you!"; break;
									case 5: $message .= "what adventure are we going on today??!"; break;
									case 6: $message .= "Lets be best friends forever!!"; break;
									case 7: $message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;
							 
						 case "brown and black Hounda":
                                $num = mt_rand(1,7);
                                switch ($num){
                                    case 1: $message .= "Woof!"; break;
                                    case 2: $message .= "Bark bark!!"; break;
                                    case 3: $message .= "Let's play fetch!"; break;
                                    case 4: $message .= "I will protect you!"; break;
									case 5: $message .= "what adventure are we going on today??!"; break;
									case 6: $message .= "Lets be best friends forever!!"; break;
									case 7: $message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;
							
							case "Black and white floopy eared Hounda":
                                $num = mt_rand(1,7);
                                switch ($num){
                                    case 1: $message .= "Woof!"; break;
                                    case 2: $message .= "Bark bark!!"; break;
                                    case 3: $message .= "Let's play fetch!"; break;
                                    case 4: $message .= "I will protect you!"; break;
									case 5: $message .= "what adventure are we going on today??!"; break;
									case 6: $message .= "Lets be best friends forever!!"; break;
									case 7: $message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;

                            default: # If the species isn't defined above, it'll choose one of these default phrases instead.
                                $num = mt_rand(1,6);                
                                switch ($num){
                                    case 1: $message .= "What an awesome day!"; break;
                                    case 2: $message .= "Hey, did you know you're amazing?!"; break;
                                    case 3: $message .= "Inner beauty is important!"; break;
                                    case 4: $message .= "You look fantastic today!"; break;
									case 5: $message .= "You're the best!!"; break;
									case 6: $message .= "I love adventure!!"; break;
                                }
                            break;
                        }

                    }
                } else { # Seventy-five percent chance nothing will happen whatsoever.
                    /* Nothing will happen with the pet at all. */
                    $message = "";
                }
            }

                  if ($message == "") { $message = ""; } else { $message .= "</div>"; }
                
        /**** END: CREATE RANDOM MESSAGES ****/  
        #
        #
        #

        }        
        $this->setDivision($this->FavPetSB);
    } 
    /**** END: FOR THE FAVPET WIDGET ****/
    #
    #
    #









    /**
     * The getMoneyBar method, getter method for property $moneyBar.
     * @access public
     * @return Paragraph
     */
    public function getMoneyBar(){
        return $this->moneyBar;
    }
    
    /**
     * The setMoneyBar method, setter method for property $moneyBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    protected function setMoneyBar(){
        $mysidia = Registry::get("mysidia");
        $this->moneyBar = new Paragraph;
    $this->moneyBar->add(new Comment("You have <span id='cashonhand'>{$mysidia->user->money}</span> {$mysidia->settings->cost}."));  
        
        $donate = new Link("donate");
        $donate->setText("Donate Money to Friends");
        $this->moneyBar->add($donate);
        $this->setDivision($this->moneyBar);        
    }

    /**
     * The getLinksBar method, getter method for property $linksBar.
     * @access public
     * @return Paragraph
     */
    public function getLinksBar(){
        return $this->linksBar;
    }
    
    /**
     * The setLinksBar method, setter method for property $linksBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    protected function setLinksBar(){
        $mysidia = Registry::get("mysidia");
        $this->linksBar = new Paragraph;
        $linkTitle = new Comment("{$mysidia->user->username}'s Links:");
        $linkTitle->setBold();
        $this->linksBar->add($linkTitle);
        
        $linksList = new LinksList("ul");
        $this->setLinks($linksList);
        
        $this->linksBar->add($linksList);
        $this->setDivision($this->linksBar);    
    }

    /**
     * The setLinks method, append all links to the LinksBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    protected function setLinks(LinksList $linksList){
        $mysidia = Registry::get("mysidia");
        $stmt = $mysidia->db->select("links", array("id", "linktext", "linkurl"), "linktype = 'sidelink' ORDER BY linkorder");
        if($stmt->rowCount() == 0) Throw new Exception("There is an error with sidebar links, please contact the admin immediately for help.");
        
        while($sideLink = $stmt->fetchObject()){
            $link = new Link($sideLink->linkurl);
            $link->setText($sideLink->linktext);
            if($sideLink->linkurl == "messages"){
                $num = $mysidia->db->select("messages", array("touser"), "touser='{$mysidia->user->username}' and status='unread'")->rowCount();
                if($num > 0) $link->setText("<b>{$link->getText()} ({$num})</b>");
            }
            $link->setListed(TRUE);
            $linksList->add($link);   
        }
        
        if($mysidia->user instanceof Admin){
            $adminCP = new Link("admincp/", FALSE, FALSE);
            $adminCP->setText("Admin Control Panel");
            $adminCP->setListed(TRUE);  
            $linksList->add($adminCP);            
        }
    }
    
    /**
     * The getWolBar method, getter method for property $wolBar.
     * @access public
     * @return LinksList
     */
    public function getWolBar(){
        return $this->wolBar;
    }
    
    /**
     * The setWolBar method, setter method for property $wolBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    protected function setWolBar(){
        $mysidia = Registry::get("mysidia");
        $this->wolBar = new Link("online");
        $online = $mysidia->db->select("online", array(), "username != 'Visitor'")->rowCount();
        $offline = $mysidia->db->select("online", array(), "username = 'Visitor'")->rowCount();
        $this->wolBar->setText("This site has {$online} members and {$offline} guests online.");
        $this->setDivision($this->wolBar);         
    }
    
    /**
     * The getLoginBar method, getter method for property $loginBar.
     * @access public
     * @return FormBuilder
     */
    public function getLoginBar(){
        return $this->loginBar;
    }
    
    /**
     * The setLoginBar method, setter method for property $loginBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    protected function setLoginBar(){
        $this->loginBar = new FormBuilder("login", "login", "post");
        $loginTitle = new Comment("Member Login:");
        $loginTitle->setBold();
        $loginTitle->setUnderlined();
        $this->loginBar->add($loginTitle);

        $this->loginBar->buildComment("username: ", FALSE)
                       ->buildTextField("username")
                       ->buildComment("password: ", FALSE)
                       ->buildPasswordField("password", "password", "", TRUE)    
                       ->buildButton("Log In", "submit", "submit")
                       ->buildComment("Don't have an account?"); 
                       
        $register = new Link("register");
        $register->setText("Register New Account");
        $register->setLineBreak(TRUE);
        $forgot = new Link("forgotpass");
        $forgot->setText("Forgot Password?");
        
        $this->loginBar->add($register);
        $this->loginBar->add($forgot);
        $this->setDivision($this->loginBar);     
    }
}
?>
It works fine other than the stuff not appearing for me...
Reply With Quote
  #54  
Old 03-24-2016, 05:01 PM
RestlessThoughts's Avatar
RestlessThoughts RestlessThoughts is offline
Member
 
Join Date: Mar 2016
Posts: 10
Gender: Female
Credits: 1,133
RestlessThoughts is on a distinguished road
Default

I moved the message assignment below the message creation. That seems to fix the blank message display.

PHP Code:
<?php

/**
 * The Sidebar Class, defines a standard HTML Sidebar component.
 * It extends from the Widget class, while adding its own implementation.
 * @category Resource
 * @package Widget
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.3
 * @todo Not much at this point.
 *
 */

class Sidebar extends Widget{

    
/**
     * The moneyBar property, specifies the money/donation bar for members.
     * @access protected
     * @var Paragraph
    */
    
protected $moneyBar;
    
    
/**
     * The linksBar property, stores all useful links for members.
     * @access protected
     * @var Paragraph
    */
    
protected $linksBar;
    
    
/**
     * The wolBar property, determines the who's online url in the sidebar.
     * @access protected
     * @var Link
    */
    
protected $wolBar;
    
    
/**
     * The loginBar property, specifies the loginBar for guests.
     * @access protected
     * @var FormBuilder
    */
    
protected $loginBar;

    
/**
     * Constructor of Sidebar Class, it initializes basic sidebar properties     
     * @access public
     * @return Void
     */
    
public function __construct(){
        
parent::__construct(4"sidebar");
    }
    
    
/**
     * The setDivision method, setter method for property $division.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @param GUIComponent  $module
     * @access protected
     * @return Void
     */
    
protected function setDivision(GUIComponent $module){
        if(!
$this->division){
            
$this->division = new Division;
            
$this->division->setClass("sidebar");
        }    
        
$this->division->add($module);
    }



    
#
    #
    #
    /**** BEGIN: FOR THE FAVPET WIDGET ****/
    
public function getFavPetSB(){
        return 
$this->FavPetSB;
    }

    public function 
setFavPetSB(){
        
$mysidia Registry::get("mysidia");
        
$profile $mysidia->user->getprofile();  
        
        
/* IF THE USER DOES *NOT* HAVE A FAVPET: */
            
if ($profile->getFavpetID() == "0"){  
            
$this->FavPetSB = new Paragraph
            
$this->FavPetSB->add(new Comment("<b>No Favorite Pet Set</b>"));
        }

        
/* IF THE USER *DOES* HAVE A FAVPET: */
        
if ($profile->getFavpetID() != "0"){

            
$favpet = new OwnedAdoptable($profile->getFavpetID());
        
#
        #
        #
        /**** BEGIN: CREATE RANDOM MESSAGES ****/
            
$message "<div class='speechbubble'>";

            
$status_chance mt_rand(1100);  
            if (
$status_chance <= 1){ # One percent chance the pet will obtain a status effect.

                /* We would apply a status effect here...*/
                
$message .= "Placeholder text: A status effect would have happened here!";
                
#### We'll do this later!!!

            
} else { # Ninety-nine percent chance the pet will not get a status effect. Will something else happen?
                
$something_chance mt_rand(1100); 
                if (
$something_chance <= 25){ # Twenty-five percent chance something will happen.
                    
$gift_chance mt_rand(1100); 
                    if (
$gift_chance <= 5){ # Five percent chance the user will receive a gift from their pet.
                        
$item_chance mt_rand(1100);
                        if (
$item_chance <= 50){ # Fifty percent chance the gift from their pet will be an item.

                            /* The pet has found an item for you! */                            
                            
$num mt_rand(1,5); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                            
switch ($num){
                                case 
1$item "Ball of Yarn"; break;
                                case 
2$item "Bernard plushie"; break;
                                case 
3$item "Madeline plushie "; break;
                                case 
4$item "Maria plushie"; break;
                                case 
5$item "Honey comb"; break;
                            }
                            
$message .= "I found a {$item} for you!";
                            
$newitem = new StockItem($item); 
                            
$newitem->append(1$mysidia->user->username); 

                        } else { 
# Fifty percent chance the gift from their pet will be money.

                            /* The pet has found some money for you! */
                            
$currency $mysidia->settings->cost;
                            
$amount mt_rand(1001000); # Between 100 and 1000
                            
$message .= "Found {$amount} {$currency}!";
                            
$mysidia->user->changecash($amount);

                        }
                    } else { 
# Twenty percent chance the pet will talk but have no gift.
                        /* No gift will be given but a neat species-specific phrase can still be said! */

                        
$species trim($favpet->type);    

                        switch (
$species){
                            case 
"Catari"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Meow!"; break;
                                    case 
2$message .= "*purr*"; break;
                                    case 
3$message .= "Do you have catnip?"; break;
                                    case 
4$message .= "I saw a squirrel today!"; break;
                                    case 
5$message .= "I should catch that mouse!"; break;
                                    case 
6$message .= "I love you!"; break;
                                    case 
7$message .= "I feel special being owned by you!"; break;
                                }
                            break;
                                                    
                            case 
"silver tabby Catari"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Meow!"; break;
                                    case 
2$message .= "*purr*"; break;
                                    case 
3$message .= "Do you have catnip?"; break;
                                    case 
4$message .= "I saw a squirrel today!"; break;
                                    case 
5$message .= "I should catch that mouse!"; break;
                                    case 
6$message .= "I love you!"; break;
                                    case 
7$message .= "I feel special being owned by you!"; break;
                                }
                            break;
                        
                            case 
"ginger tabby Catari"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Meow!"; break;
                                    case 
2$message .= "*purr*"; break;
                                    case 
3$message .= "Do you have catnip?"; break;
                                    case 
4$message .= "I saw a squirrel today!"; break;
                                    case 
5$message .= "I should catch that mouse!"; break;
                                    case 
6$message .= "I love you!"; break;
                                    case 
7$message .= "I feel special being owned by you!"; break;
                                }
                            break;
                                                        
                            case 
"tuxedo tabby Catari"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Meow!"; break;
                                    case 
2$message .= "*purr*"; break;
                                    case 
3$message .= "Do you have catnip?"; break;
                                    case 
4$message .= "I saw a squirrel today!"; break;
                                    case 
5$message .= "I should catch that mouse!"; break;
                                    case 
6$message .= "I love you!"; break;
                                    case 
7$message .= "I feel special being owned by you!"; break;
                                }
                            break;
                            
                            case 
"Hounda":
                                
$num mt_rand(1,7);
                                switch (
$num){
                                    case 
1$message .= "Woof!"; break;
                                    case 
2$message .= "Bark bark!!"; break;
                                    case 
3$message .= "Let's play fetch!"; break;
                                    case 
4$message .= "I will protect you!"; break;
                                    case 
5$message .= "what adventure are we going on today??!"; break;
                                    case 
6$message .= "Lets be best friends forever!!"; break;
                                    case 
7$message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;
                            
                            case 
"Black and white Hounda":
                                
$num mt_rand(1,7);
                                switch (
$num){
                                    case 
1$message .= "Woof!"; break;
                                    case 
2$message .= "Bark bark!!"; break;
                                    case 
3$message .= "Let's play fetch!"; break;
                                    case 
4$message .= "I will protect you!"; break;
                                    case 
5$message .= "what adventure are we going on today??!"; break;
                                    case 
6$message .= "Lets be best friends forever!!"; break;
                                    case 
7$message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;
                             
                         case 
"brown and black Hounda":
                                
$num mt_rand(1,7);
                                switch (
$num){
                                    case 
1$message .= "Woof!"; break;
                                    case 
2$message .= "Bark bark!!"; break;
                                    case 
3$message .= "Let's play fetch!"; break;
                                    case 
4$message .= "I will protect you!"; break;
                                    case 
5$message .= "what adventure are we going on today??!"; break;
                                    case 
6$message .= "Lets be best friends forever!!"; break;
                                    case 
7$message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;
                            
                            case 
"Black and white floopy eared Hounda":
                                
$num mt_rand(1,7);
                                switch (
$num){
                                    case 
1$message .= "Woof!"; break;
                                    case 
2$message .= "Bark bark!!"; break;
                                    case 
3$message .= "Let's play fetch!"; break;
                                    case 
4$message .= "I will protect you!"; break;
                                    case 
5$message .= "what adventure are we going on today??!"; break;
                                    case 
6$message .= "Lets be best friends forever!!"; break;
                                    case 
7$message .= "Im the luckiest hounda ever!!"; break;
                                }
                            break;

                            default: 
# If the species isn't defined above, it'll choose one of these default phrases instead.
                                
$num mt_rand(1,6);                
                                switch (
$num){
                                    case 
1$message .= "What an awesome day!"; break;
                                    case 
2$message .= "Hey, did you know you're amazing?!"; break;
                                    case 
3$message .= "Inner beauty is important!"; break;
                                    case 
4$message .= "You look fantastic today!"; break;
                                    case 
5$message .= "You're the best!!"; break;
                                    case 
6$message .= "I love adventure!!"; break;
                                }
                            break;
                        }

                    }
                } else { 
# Seventy-five percent chance nothing will happen whatsoever.
                    /* Nothing will happen with the pet at all. */
                    
$message "";
                }
            }

                  if (
$message == "") { $message ""; } else { $message .= "</div>"; }
                
        
/**** END: CREATE RANDOM MESSAGES ****/  
        #
        #
        #

            
$this->FavPetSB = new Paragraph;
            
$this->FavPetSB->add(new Comment("<b>Favorite Pet!</b>"));
            
$this->FavPetSB->add(new Comment("{$message}"));
            
$this->FavPetSB->add(new Comment("<a href='/myadopts/manage/{$profile->getFavpetID()}'><img src='{$favpet->getImage()}'></a>"));

        }        
        
$this->setDivision($this->FavPetSB);
    } 
    
/**** END: FOR THE FAVPET WIDGET ****/
    #
    #
    #









    /**
     * The getMoneyBar method, getter method for property $moneyBar.
     * @access public
     * @return Paragraph
     */
    
public function getMoneyBar(){
        return 
$this->moneyBar;
    }
    
    
/**
     * The setMoneyBar method, setter method for property $moneyBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setMoneyBar(){
        
$mysidia Registry::get("mysidia");
        
$this->moneyBar = new Paragraph;
    
$this->moneyBar->add(new Comment("You have <span id='cashonhand'>{$mysidia->user->money}</span> {$mysidia->settings->cost}."));  
        
        
$donate = new Link("donate");
        
$donate->setText("Donate Money to Friends");
        
$this->moneyBar->add($donate);
        
$this->setDivision($this->moneyBar);        
    }

    
/**
     * The getLinksBar method, getter method for property $linksBar.
     * @access public
     * @return Paragraph
     */
    
public function getLinksBar(){
        return 
$this->linksBar;
    }
    
    
/**
     * The setLinksBar method, setter method for property $linksBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setLinksBar(){
        
$mysidia Registry::get("mysidia");
        
$this->linksBar = new Paragraph;
        
$linkTitle = new Comment("{$mysidia->user->username}'s Links:");
        
$linkTitle->setBold();
        
$this->linksBar->add($linkTitle);
        
        
$linksList = new LinksList("ul");
        
$this->setLinks($linksList);
        
        
$this->linksBar->add($linksList);
        
$this->setDivision($this->linksBar);    
    }

    
/**
     * The setLinks method, append all links to the LinksBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setLinks(LinksList $linksList){
        
$mysidia Registry::get("mysidia");
        
$stmt $mysidia->db->select("links", array("id""linktext""linkurl"), "linktype = 'sidelink' ORDER BY linkorder");
        if(
$stmt->rowCount() == 0) Throw new Exception("There is an error with sidebar links, please contact the admin immediately for help.");
        
        while(
$sideLink $stmt->fetchObject()){
            
$link = new Link($sideLink->linkurl);
            
$link->setText($sideLink->linktext);
            if(
$sideLink->linkurl == "messages"){
                
$num $mysidia->db->select("messages", array("touser"), "touser='{$mysidia->user->username}' and status='unread'")->rowCount();
                if(
$num 0$link->setText("<b>{$link->getText()} ({$num})</b>");
            }
            
$link->setListed(TRUE);
            
$linksList->add($link);   
        }
        
        if(
$mysidia->user instanceof Admin){
            
$adminCP = new Link("admincp/"FALSEFALSE);
            
$adminCP->setText("Admin Control Panel");
            
$adminCP->setListed(TRUE);  
            
$linksList->add($adminCP);            
        }
    }
    
    
/**
     * The getWolBar method, getter method for property $wolBar.
     * @access public
     * @return LinksList
     */
    
public function getWolBar(){
        return 
$this->wolBar;
    }
    
    
/**
     * The setWolBar method, setter method for property $wolBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setWolBar(){
        
$mysidia Registry::get("mysidia");
        
$this->wolBar = new Link("online");
        
$online $mysidia->db->select("online", array(), "username != 'Visitor'")->rowCount();
        
$offline $mysidia->db->select("online", array(), "username = 'Visitor'")->rowCount();
        
$this->wolBar->setText("This site has {$online} members and {$offline} guests online.");
        
$this->setDivision($this->wolBar);         
    }
    
    
/**
     * The getLoginBar method, getter method for property $loginBar.
     * @access public
     * @return FormBuilder
     */
    
public function getLoginBar(){
        return 
$this->loginBar;
    }
    
    
/**
     * The setLoginBar method, setter method for property $loginBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setLoginBar(){
        
$this->loginBar = new FormBuilder("login""login""post");
        
$loginTitle = new Comment("Member Login:");
        
$loginTitle->setBold();
        
$loginTitle->setUnderlined();
        
$this->loginBar->add($loginTitle);

        
$this->loginBar->buildComment("username: "FALSE)
                       ->
buildTextField("username")
                       ->
buildComment("password: "FALSE)
                       ->
buildPasswordField("password""password"""TRUE)    
                       ->
buildButton("Log In""submit""submit")
                       ->
buildComment("Don't have an account?"); 
                       
        
$register = new Link("register");
        
$register->setText("Register New Account");
        
$register->setLineBreak(TRUE);
        
$forgot = new Link("forgotpass");
        
$forgot->setText("Forgot Password?");
        
        
$this->loginBar->add($register);
        
$this->loginBar->add($forgot);
        
$this->setDivision($this->loginBar);     
    }
}
Reply With Quote
  #55  
Old 04-01-2016, 04:52 PM
LUC1G07CH1's Avatar
LUC1G07CH1 LUC1G07CH1 is offline
Member
 
Join Date: Mar 2016
Location: Too distant for telling, but it's HUEBR
Posts: 150
Gender: Unknown/Other
Credits: 19,839
LUC1G07CH1 is on a distinguished road
Send a message via AIM to LUC1G07CH1 Send a message via Yahoo to LUC1G07CH1
Default

Obviously using this when my site is installed!
Reply With Quote
  #56  
Old 04-03-2016, 11:50 AM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 18,745
NobodysHero is on a distinguished road
Default

Quote:
The mystfell.com page isn’t working

mystfell.com is currently unable to handle this request.

500
Without changing anything. It seems to only happen when it's trying to send a message, if it's not posting anything but the pet it's fine.

Edit: "not changing anything" isn't accurate. I changed the messages and the items to items that were for my site. I double checked it and tried it several times, always throws up the quoted message when it gets to the adopt saying something or giving an item.

Last edited by NobodysHero; 04-03-2016 at 12:03 PM.
Reply With Quote
  #57  
Old 04-03-2016, 04:22 PM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 33,703
Ittermat is on a distinguished road
Default

Did you see the post from Restless about switching the messages around? its right above yours ^^
Reply With Quote
  #58  
Old 04-03-2016, 07:20 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 18,745
NobodysHero is on a distinguished road
Default

Yeah, I tried that one too. x.x It'll show just the pet, but even clearing cache and cookies made it worse.
Reply With Quote
  #59  
Old 04-05-2016, 09:08 AM
RestlessThoughts's Avatar
RestlessThoughts RestlessThoughts is offline
Member
 
Join Date: Mar 2016
Posts: 10
Gender: Female
Credits: 1,133
RestlessThoughts is on a distinguished road
Default

If this is still a problem, could you please turn on error reporting or check your error log?

You should be able to turn on error reporting by going to classes/class_initializer.php and putting this bit of code at the top, right under the opening php tag:
PHP Code:
<?php
error_reporting
(E_ALL);
ini_set('display_errors''1');
Or post your sidebar page after making the breaking changes. If you don't want to post it, you can message me it instead and I'll see if I can spot the problem.
__________________
Reply With Quote
  #60  
Old 04-05-2016, 04:37 PM
NobodysHero's Avatar
NobodysHero NobodysHero is offline
Co-Owner of MystFell
 
Join Date: Nov 2013
Posts: 144
Gender: Female
Credits: 18,745
NobodysHero is on a distinguished road
Default

Okay, lemme put it all back together and post it here again. >.> I was going to give up, but I really like this and want to use it. x.x

Hope you're up for a slight challenge. T_T I starting testing some things out on my own and it didn't go well.


PHP Code:
<?php

/**
 * The Sidebar Class, defines a standard HTML Sidebar component.
 * It extends from the Widget class, while adding its own implementation.
 * @category Resource
 * @package Widget
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.3
 * @todo Not much at this point.
 *
 */

class Sidebar extends Widget{

    
/**
     * The moneyBar property, specifies the money/donation bar for members.
     * @access protected
     * @var Paragraph
    */
    
protected $moneyBar;
    
    
/**
     * The linksBar property, stores all useful links for members.
     * @access protected
     * @var Paragraph
    */
    
protected $linksBar;
    
    
/**
     * The wolBar property, determines the who's online url in the sidebar.
     * @access protected
     * @var Link
    */
    
protected $wolBar;
    
    
/**
     * The loginBar property, specifies the loginBar for guests.
     * @access protected
     * @var FormBuilder
    */
    
protected $loginBar;

    
/**
     * Constructor of Sidebar Class, it initializes basic sidebar properties     
     * @access public
     * @return Void
     */
    
public function __construct(){
        
parent::__construct(4"sidebar");
    }
    
    
/**
     * The setDivision method, setter method for property $division.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @param GUIComponent  $module
     * @access protected
     * @return Void
     */
    
protected function setDivision(GUIComponent $module){
        if(!
$this->division){
            
$this->division = new Division;
            
$this->division->setClass("sidebar");
        }    
        
$this->division->add($module);
    }



    
#
    #
    #
    /**** BEGIN: FOR THE FAVPET WIDGET ****/
    
public function getFavPetSB(){
        return 
$this->FavPetSB;
    }

    public function 
setFavPetSB(){
        
$mysidia Registry::get("mysidia");
        
$profile $mysidia->user->getprofile();  
        
        
/* IF THE USER DOES *NOT* HAVE A FAVPET: */
            
if ($profile->getFavpetID() == "0"){  
            
$this->FavPetSB = new Paragraph
            
$this->FavPetSB->add(new Comment("<b>No Favorite Pet Set</b>"));
        }

        
/* IF THE USER *DOES* HAVE A FAVPET: */
        
if ($profile->getFavpetID() != "0"){

            
$favpet = new OwnedAdoptable($profile->getFavpetID());
        
#
        #
        #
        /**** BEGIN: CREATE RANDOM MESSAGES ****/
            
$message "<div class='speechbubble'>";

            
$status_chance mt_rand(1100);  
            if (
$status_chance <= 1){ # One percent chance the pet will obtain a status effect.

                /* We would apply a status effect here...*/
                
$message .= "<center>WHOOHOO! {$favpet->getImage()} is having a great day!</center>";
                
#### We'll do this later!!!

            
} else { # Ninety-nine percent chance the pet will not get a status effect. Will something else happen?
                
$something_chance mt_rand(1100); 
                if (
$something_chance <= 25){ # Twenty-five percent chance something will happen.
                    
$gift_chance mt_rand(1100); 
                    if (
$gift_chance <= 5){ # Five percent chance the user will receive a gift from their pet.
                        
$item_chance mt_rand(1100);
                        if (
$item_chance <= 50){ # Fifty percent chance the gift from their pet will be an item.

                            /* The pet has found an item for you! */                            
                            
$num mt_rand(1,5); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                            
switch ($num){
                                case 
1$item "Juicy Carrot"; break;
                                case 
2$item "Spice Spoon"; break;
                                case 
3$item "Red Rose"; break;
                                case 
4$item "Obsidian Arrowhead"; break;
                                case 
5$item "Misshapen Zulk Plushie"; break;
                            }
                            
$message .= "I found a {$item} for you!";
                            
$newitem = new StockItem($item); 
                            
$newitem->append(1$mysidia->user->username); 

                        } else { 
# Fifty percent chance the gift from their pet will be money.

                            /* The pet has found some money for you! */
                            
$currency $mysidia->settings->cost;
                            
$amount mt_rand(1001000); # Between 100 and 1000
                            
$message .= "Found {$amount} {$tyleans}!";
                            
$mysidia->user->changecash($amount);

                        }
                    } else { 
# Twenty percent chance the pet will talk but have no gift.
                        /* No gift will be given but a neat species-specific phrase can still be said! */

                        
$species trim($favpet->type);    

                        switch (
$species){
                            case 
"Wind Raptor"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Who, who!"; break;
                                    case 
2$message .= "I like to soar through the sky."; break;
                                    case 
3$message .= "Wanna share a berry?"; break;
                                    case 
4$message .= "Don't worry! Anything shiny and I'll get it!"; break;
                                    case 
5$message .= "Do you feel that breeze?"; break;
                                    case 
6$message .= "Nocturnal? Nah, I'm awake when you're awake!"; break;
                                    case 
7$message .= "Look what I can do!"; break;
                                }
                            break;
                                                    
                            case 
"Terrahound"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Woof!"; break;
                                    case 
2$message .= "Bark bark!!!"; break;
                                    case 
3$message .= "Let's play fetch!"; break;
                                    case 
4$message .= "I will protect you!"; break;
                                    case 
5$message .= "Where do ya wanna to explore today?"; break;
                                    case 
6$message .= "Terrahounds are the best totem pet!"; break;
                                    case 
7$message .= "Today is a great day to be a Terrahound"; break;
                                }
                            break;
                        
                            case 
"Water Selkie"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Ort, ort, ort!"; break;
                                    case 
2$message .= "Let's go swimming!"; break;
                                    case 
3$message .= "My favorite place is the Ice Flows."; break;
                                    case 
4$message .= "OH! Something shiny! Awww, it melted."; break;
                                    case 
5$message .= "Know what my favorite food is? Fish!"; break;
                                    case 
6$message .= "The water is my natural element, but I'll go anywhere you go."; break;
                                    case 
7$message .= "Cool as a cucumber, slick as a ice patch!"; break;
                                }
                            break;
                                                        
                            case 
"Flame Bison"# If the species name is "Cat" it will choose one these:
                                
$num mt_rand(1,7); # Chooses a number between 1 and 4. See how there are four cases below? Increase this number if you add more!!
                                
switch ($num){
                                    case 
1$message .= "Chaaaaaaaarrrrrge!"; break;
                                    case 
2$message .= "Don't mind me, I'm just grazing."; break;
                                    case 
3$message .= "I'm blazing fast!"; break;
                                    case 
4$message .= "Do you have any carrots?"; break;
                                    case 
5$message .= "My favorite place is the Hills."; break;
                                    case 
6$message .= "No need to fear when I'm around!"; break;
                                    case 
7$message .= "Yeah, I'm pretty hot stuff."; break;
                                }
                            break;

                            default: 
# If the species isn't defined above, it'll choose one of these default phrases instead.
                                
$num mt_rand(1,6);                
                                switch (
$num){
                                    case 
1$message .= "It's a beautiful day! I love to explore!"; break;
                                    case 
2$message .= "I always knew I was favorite material!"; break;
                                    case 
3$message .= "I'm a little hungry. Think we could get a bite to eat?"; break;
                                    case 
4$message .= "You're the only friend I'll ever need."; break;
                                    case 
5$message .= "I found something! I foun- Oh, no. False alarm."; break;
                                    case 
6$message .= "Don't worry! I'm on the look out for anything shine"; break;
                                }
                            break;
                        }

                    }
                } else { 
# Seventy-five percent chance nothing will happen whatsoever.
                    /* Nothing will happen with the pet at all. */
                    
$message "";
                }
            }

                  if (
$message == "") { $message ""; } else { $message .= "</div>"; }
                
        
/**** END: CREATE RANDOM MESSAGES ****/  
        #
        #
        #

            
$this->FavPetSB = new Paragraph;
            
$this->FavPetSB->add(new Comment("<b><center>{$favpet->getName()}</center></b>"));
            
$this->FavPetSB->add(new Comment("{$message}"));
            
$this->FavPetSB->add(new Comment("<a href='/myadopts/manage/{$profile->getFavpetID()}'><img src='{$favpet->getImage()}'></a>"));

        }        
        
$this->setDivision($this->FavPetSB);
    } 
    
/**** END: FOR THE FAVPET WIDGET ****/
    #
    #
    #









    /**
     * The getMoneyBar method, getter method for property $moneyBar.
     * @access public
     * @return Paragraph
     */
    
public function getMoneyBar(){
        return 
$this->moneyBar;
    }
    
    
/**
     * The setMoneyBar method, setter method for property $moneyBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setMoneyBar(){
        
$mysidia Registry::get("mysidia");
        
$this->moneyBar = new Paragraph;
    
$this->moneyBar->add(new Comment("You have <span id='cashonhand'>{$mysidia->user->money}</span> {$mysidia->settings->cost}."));  
        
        
$donate = new Link("donate");
        
$donate->setText("Donate Money to Friends");
        
$this->moneyBar->add($donate);
        
$this->setDivision($this->moneyBar);        
    }

    
/**
     * The getLinksBar method, getter method for property $linksBar.
     * @access public
     * @return Paragraph
     */
    
public function getLinksBar(){
        return 
$this->linksBar;
    }
    
    
/**
     * The setLinksBar method, setter method for property $linksBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setLinksBar(){
        
$mysidia Registry::get("mysidia");
        
$this->linksBar = new Paragraph;
        
$linkTitle = new Comment("{$mysidia->user->username}'s Links:");
        
$linkTitle->setBold();
        
$this->linksBar->add($linkTitle);
        
        
$linksList = new LinksList("ul");
        
$this->setLinks($linksList);
        
        
$this->linksBar->add($linksList);
        
$this->setDivision($this->linksBar);    
    }

    
/**
     * The setLinks method, append all links to the LinksBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setLinks(LinksList $linksList){
        
$mysidia Registry::get("mysidia");
        
$stmt $mysidia->db->select("links", array("id""linktext""linkurl"), "linktype = 'sidelink' ORDER BY linkorder");
        if(
$stmt->rowCount() == 0) Throw new Exception("There is an error with sidebar links, please contact the admin immediately for help.");
        
        while(
$sideLink $stmt->fetchObject()){
            
$link = new Link($sideLink->linkurl);
            
$link->setText($sideLink->linktext);
            if(
$sideLink->linkurl == "messages"){
                
$num $mysidia->db->select("messages", array("touser"), "touser='{$mysidia->user->username}' and status='unread'")->rowCount();
                if(
$num 0$link->setText("<b>{$link->getText()} ({$num})</b>");
            }
            
$link->setListed(TRUE);
            
$linksList->add($link);   
        }
        
        if(
$mysidia->user instanceof Admin){
            
$adminCP = new Link("admincp/"FALSEFALSE);
            
$adminCP->setText("Admin Control Panel");
            
$adminCP->setListed(TRUE);  
            
$linksList->add($adminCP);            
        }
    }
    
    
/**
     * The getWolBar method, getter method for property $wolBar.
     * @access public
     * @return LinksList
     */
    
public function getWolBar(){
        return 
$this->wolBar;
    }
    
    
/**
     * The setWolBar method, setter method for property $wolBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setWolBar(){
        
$mysidia Registry::get("mysidia");
        
$this->wolBar = new Link("online");
        
$online $mysidia->db->select("online", array(), "username != 'Visitor'")->rowCount();
        
$offline $mysidia->db->select("online", array(), "username = 'Visitor'")->rowCount();
        
$this->wolBar->setText("This site has {$online} members and {$offline} guests online.");
        
$this->setDivision($this->wolBar);         
    }
    
    
/**
     * The getLoginBar method, getter method for property $loginBar.
     * @access public
     * @return FormBuilder
     */
    
public function getLoginBar(){
        return 
$this->loginBar;
    }
    
    
/**
     * The setLoginBar method, setter method for property $loginBar.
     * It is set internally upon object instantiation, cannot be accessed in client code.
     * @access protected
     * @return Void
     */
    
protected function setLoginBar(){
        
$this->loginBar = new FormBuilder("login""login""post");
        
$loginTitle = new Comment("Member Login:");
        
$loginTitle->setBold();
        
$loginTitle->setUnderlined();
        
$this->loginBar->add($loginTitle);

        
$this->loginBar->buildComment("username: "FALSE)
                       ->
buildTextField("username")
                       ->
buildComment("password: "FALSE)
                       ->
buildPasswordField("password""password"""TRUE)    
                       ->
buildButton("Log In""submit""submit")
                       ->
buildComment("Don't have an account?"); 
                       
        
$register = new Link("register");
        
$register->setText("Register New Account");
        
$register->setLineBreak(TRUE);
        
$forgot = new Link("forgotpass");
        
$forgot->setText("Forgot Password?");
        
        
$this->loginBar->add($register);
        
$this->loginBar->add($forgot);
        
$this->setDivision($this->loginBar);     
    }
}
?>
Thanks for all the help! I'm excited to be able to offer this to my members!

I left it up on my site, in case you want to see it.


Last edited by NobodysHero; 04-05-2016 at 04:43 PM.
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


All times are GMT -5. The time now is 03:06 PM.

Currently Active Users: 9747 (0 members and 9747 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