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)
-   -   adding images to pages? (http://www.mysidiaadoptables.com/forum/showthread.php?t=5075)

Ittermat 03-15-2016 01:07 AM

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?

tahbikat 03-15-2016 05:30 AM

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

Ittermat 03-15-2016 09:51 AM

Thanks but I also meant images instead ogf the links that are there too...lol so id have image links instead of links

Abronsyth 03-15-2016 12:55 PM

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>")); 


Hall of Famer 03-15-2016 01:10 PM

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.


All times are GMT -5. The time now is 02:08 AM.

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