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
  #1  
Old 12-21-2013, 05:56 AM
LucasA33's Avatar
LucasA33 LucasA33 is offline
Member
 
Join Date: Jul 2011
Posts: 144
Gender: Male
Credits: 12,240
LucasA33 is on a distinguished road
Default Adding coin image instead of a currency name.q

I'm new to PHP so I am at a loss of what to do here, but I want to add a small 16x16 icon image where it says MONEY:


I've tried resources like google but all it ever does is confuse me :P
Maybe one of you guys could help me put this together.

Current code:

Quote:
/**
* 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("Money: {$mysidia->user->money} {$mysidia->settings->cost} | "));

$donate = new Link("donate");
$donate->setText("Donate");
$this->moneyBar->add($donate);
$this->setDivision($this->moneyBar);
}
__________________
Reply With Quote
  #2  
Old 12-21-2013, 06:11 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,327
Hall of Famer is on a distinguished road
Default

If you wish to add an image to the money bar, use the following code:

PHP Code:
$this->moneybar->add(new Image("image.gif")); 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 12-21-2013, 06:16 AM
LucasA33's Avatar
LucasA33 LucasA33 is offline
Member
 
Join Date: Jul 2011
Posts: 144
Gender: Male
Credits: 12,240
LucasA33 is on a distinguished road
Default

Ok, thanks. I probably feel stupid for not figuring that out myself
__________________
Reply With Quote
  #4  
Old 12-21-2013, 07:58 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,255
IntoRain is on a distinguished road
Default

By the way, google doesn't help much Mysidia-wise xD
__________________


asp.net stole my soul.
Reply With Quote
  #5  
Old 12-21-2013, 09:01 AM
LucasA33's Avatar
LucasA33 LucasA33 is offline
Member
 
Join Date: Jul 2011
Posts: 144
Gender: Male
Credits: 12,240
LucasA33 is on a distinguished road
Default

Yeah but PHP is :P
Reply With Quote
  #6  
Old 12-21-2013, 11:24 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,255
IntoRain is on a distinguished road
Default

Yes, but Mysidia is a pretty complete framework, which means it has its own ways of doing things. Usually you add a picture with HTML tags not PHP, mysidia has its own way of "adding image" that simplifies this process
__________________


asp.net stole my soul.
Reply With Quote
  #7  
Old 12-22-2013, 01:32 PM
LucasA33's Avatar
LucasA33 LucasA33 is offline
Member
 
Join Date: Jul 2011
Posts: 144
Gender: Male
Credits: 12,240
LucasA33 is on a distinguished road
Default

Quote:
Originally Posted by Hall of Famer View Post
If you wish to add an image to the money bar, use the following code:

PHP Code:
$this->moneybar->add(new Image("image.gif")); 
I'm not exactly sure how to add that with out it erroring out. Mind if you post a completed line with it included? I still want a comment as well.
Reply With Quote
  #8  
Old 12-22-2013, 08:05 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,327
Hall of Famer is on a distinguished road
Default

Quote:
Originally Posted by LucasA33 View Post
I'm not exactly sure how to add that with out it erroring out. Mind if you post a completed line with it included? I still want a comment as well.
What errors do you get? The images cannot be found? If the image is hosted on your server, just use path like templates/images/myimage.png.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #9  
Old 01-19-2014, 02:42 PM
katsunya's Avatar
katsunya katsunya is offline
Adoptables Newbie
 
Join Date: Aug 2011
Posts: 8
Gender: Female
Credits: 1,613
katsunya is on a distinguished road
Default

What file would we have to edit in order to do this?
Reply With Quote
  #10  
Old 01-19-2014, 04:00 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,327
Hall of Famer is on a distinguished road
Default

the file class_sidebar.php in your /classes folder.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply

Thread Tools
Display Modes

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
Second Currency and Currency icon Rovick Suggestions and Feature Requests 14 11-11-2014 05:29 PM
Mod: Currency Magnie Addons/Mods Graveyard 12 06-05-2010 10:05 AM
New Release Currency trollis76 Suggestions and Feature Requests 19 05-27-2009 03:49 PM
Currency Mod Killgore Questions and Supports 1 04-10-2009 08:04 PM
New Release Currency trollis76 Questions and Supports 0 12-31-1969 07:00 PM


All times are GMT -5. The time now is 05:15 AM.

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