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-20-2014, 11:25 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 137,062
Kyttias is on a distinguished road
Default

My site's similar -- and basically? I take the largest image and save everything it's size with a lot of extra space around it. That's my easiest solution, though it requires resaving everything. I planned ahead in this.

However, theoretically it should be possible to get the adoptable's level and resize accordingly:
PHP Code:
 $lvl $adopt->getCurrentLevel();
 
# if level 0 (egg) resize to 50px
 
if ($lvl == 0) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '50px'></a>")); }
 
# if level 1 (baby) resize to 100px
 
if ($lvl == 1) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '100px'></a>")); }
 
# if level is 2 or greater (adult) resize to 200px
 
if ($lvl >= 2) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '200px'></a>")); } 
Although if the egg images do not need resizing, just remove the width attribute from theirs entirely. ovo

(I think most browsers only take issue if you resize with percents, rather than exact pixel widths? There's also "sort of" a difference between style="width: 200px", width="200", and width="200px" but mostly just not.)
__________________
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; 12-20-2014 at 11:36 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cool little pager thingy? LilPixie Questions and Supports 4 02-09-2009 05:47 PM


All times are GMT -5. The time now is 09:10 PM.

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