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 03-15-2016, 01:07 AM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 34,585
Ittermat is on a distinguished road
Question adding images to pages?

Okay I know this is probably a really really stupid question- but for example if I wanna add image links to my inventory or pet page... how would I go about doing that?

Which file would I edit? And what coding would I use?

Also, How would I just add a picture to a page?
Reply With Quote
  #2  
Old 03-15-2016, 05:30 AM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 50,931
tahbikat is on a distinguished road
Default

For the inventory page, if you'd like an image there, add this in view/inventoryview.php:

PHP Code:
$document->add(new Comment("<center><img src='' /></center>")); 
right under this, which is lines 7-10:
PHP Code:

    
public function index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
        
$document->setTitle($mysidia->lang->inventory); 
Then just place your image url in the quotes. Definitely don't use double quotes in the img tag, only singles.

Other pages should be similar, just add that same image line right under the document->setTitle lines. Just find all the -name-view.php files
Reply With Quote
  #3  
Old 03-15-2016, 09:51 AM
Ittermat's Avatar
Ittermat Ittermat is offline
The awesomesauce
 
Join Date: Feb 2016
Location: in front of my laptop
Posts: 272
Gender: Female
Credits: 34,585
Ittermat is on a distinguished road
Default

Thanks but I also meant images instead ogf the links that are there too...lol so id have image links instead of links
Reply With Quote
  #4  
Old 03-15-2016, 12:55 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 117,330
Abronsyth is on a distinguished road
Default

Doing the same thing as what tahbikat said, just use HTML to add-in a link tag around the image:
PHP Code:
$document->add(new Comment("<center><a href='URLHERE'><img src='IMAGEURLHERE' /></a></center>")); 
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #5  
Old 03-15-2016, 01:10 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: 393,227
Hall of Famer is on a distinguished road
Default

Well there is a better way, use the code below:

PHP Code:
$document->add(new Image($src$alt$dimension)); 
Here you can change src to the url you want to use, and $alt is the alt property of image tag, and dimension is for both width and height.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
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 06:13 PM.

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