Guild Wars Forums - GW Guru
 
 
 

Go Back   Guild Wars Forums - GW Guru > The Outer Circle > Site Feedback

Reply
 
Thread Tools Display Modes
Old Nov 04, 2006, 11:51 AM   #1
Djinn Effer
Frost Gate Guardian
 
Djinn Effer's Avatar
 
Join Date: Jun 2005
Guild: ex-nO, ex-MS, ex-YAY, ex-EnS
Profession: W/
Advertisement

Disable Ads
Default Suggestion: Image resizing

Here's a suggestion I've been thinking of... When a picture is too wide for the forum to properly display, the forum should automatically remove the picture and create a thumbnail of it, with the bbcode then linking the thumbnail to the actual picture.

An example thread of pictures too wide, no offense to the author, can be seen here

Here's an example of what I'm talking about:

Djinn Effer is offline   Reply With Quote
Old Nov 04, 2006, 12:29 PM   #2
Inde
Administrator
 
Join Date: Dec 2004
Default

Yeah, something that's been mentioned before. I'll look around Djinn and see what's out there. I know there are some vb hacks for that but I believe I've found something that may work better.
Inde is offline   Reply With Quote
Old Nov 04, 2006, 01:17 PM   #3
Savio
Teenager with attitude
 
Savio's Avatar
 
Join Date: Jul 2005
Guild: Fifteen Over Fifty [Rare]
Default

Good, cause I'm tired of resizing everything myself.
__________________
People are stupid.

Q&A Supermoderator | Forum rules | The cool people group
Savio is offline   Reply With Quote
Old Nov 04, 2006, 06:07 PM   #4
Djinn Effer
Frost Gate Guardian
 
Djinn Effer's Avatar
 
Join Date: Jun 2005
Guild: ex-nO, ex-MS, ex-YAY, ex-EnS
Profession: W/
Default

You could try something like this, though it hasn't been updated in ages, it seems. ^^
Djinn Effer is offline   Reply With Quote
Old Nov 05, 2006, 04:34 AM   #5
Amity and Truth
Jungle Guide
 
Amity and Truth's Avatar
 
Join Date: Jun 2006
Profession: W/N
Default

I wouldn't use a Javascript to do that. It's easier and faster to just use the HTML inherit resize abilities (that's not the finest solution out there but it saves Guru the Bandwith of having to rehost a resized version of the image like it would be with GD/Imagemagick Resizing and the user the hassle to activate javascript).

Maybe try something along these lines here, it's a bit rushed as i'm short on time currently but it should do the job.

Code:
<?
/* Configure your maxsize here. The $image variable SHOULD be in the
sourcecode somewhere but i dont know how 
vBulletin named it. Just rename it in my function.*/

$img_maxwidth = 635;

// array[0] = width, array[1] = height

$img_size = getimagesize ($image);
if ($img_size[0] >= $img_maxwidth)
{
$perc = $img_maxwidth / $img_size[0];
$img_size_width = round($img_size[0] * $perc);
$img_size_height = round($img_size[1] * $perc);

echo "<img src=$image width=\"$img_size_width\" height=\"$img_size_height\">
<br><a href=$image> Image Resized, click here to view original version</a>";
}

else
{
echo "<img src=$image>";
}
?>

Last edited by Amity and Truth; Nov 05, 2006 at 06:43 AM..
Amity and Truth is offline   Reply With Quote
Reply

Bookmarks

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


All times are GMT -6. The time now is 01:53 AM.


Vote on the Guild Wars Top 200
Guild Wars Top 200 - Cheats Free Guides, Downloads, Fansites. The Gold standard

Powered by: vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
 
Guild Wars is a trademark of NCsoft Corporation. Copyright© NCsoft Corporation. All right reserved.
© 2004 ArenaNet, Inc. All content of this website is copyright ArenaNet, a wholly-owned subsidiary of NCsoft Corporation.
All rights reserved. ArenaNet, Arena.net and the ArenaNet logo, as well as Guild Wars, are trademarks or registered trademarks of NCsoft Corporation.
All other trademarks are the property of their respective owners.
GuildWarsGuru.com: Advertise | Privacy Policy | User Agreement
 
MMO Guru Network
MMO DB