something like this works, but i dont know the exact sintax for php from html, so if u can help me a bit help me whats wrong with this (however this works):
This really should be implemented in the next release of e107, with an option to change the width setting in the images control panel... really awesome fix, thanks guys
The problem is that the code has to get the image size from the remote server - so no problem if its a really fast link, but a slow response will impair render times, while a non-responding server (which could be caused by an incorrectly entered url) can really slow things up - a timeout of 10 to 30 seconds waiting for a response isn't uncommon. To avoid this you'd need to cache the image on the local server, which starts to get complicated.
go to admin > images > Validate avatar size and access this is a tool to correct wrong sized avatars (upload & off site) there's no need to check the size all the time then, saving against a possible delay issue steved pointed just above
Thanks for the reply, but I don't see an option for that in the images menu. I checked the preferences, public upload, and forum menus and didn't see it there either. I'm using 0.7.5.
These are the only options I see in the Images menu:
Enable image posting Display images, this will apply sitewide (comments, chatbox etc)
Image posting class Restrict users who can post images (if enabled above)
Disabled image method What to do with posted images if image posting is disabled Show image URLShow nothing
Resize method Method used to resize images, either GD1/2 library, or ImageMagick gd1gd2ImageMagick
Path to ImageMagick (if selected) Full path to ImageMagick Convert utility
Enable Sleight Fixes transparent PNG-24's with alpha transparency in IE 5 / 6 (Applies Sitewide) Show uploaded avatars
Makes it easier for other users to contribue as they may not know how to resize images and stuff...
I'm going to have a play with this tonight (didnt get chance to do it last night, as I lost the keys to me VR! and the breakdown dudes couldnt break into it lol!)
Would very much like to see this sort of feature implemented into future versions of the CMS... I've seen various other forum systems use something similar where it renders an image and you click to enlarge it.. just makes it easier on the admins allround as opposed to pissing about resizing people's images hehe.
that's the trouble of this hack, and surely why it stay a hack. to get the size of the image php have to find it. if this img is no longer available (deleted, remote server done, or slow, or too many img...) the script stay on this particular line.
as steved said:
steved wrote ...
The problem is that the code has to get the image size from the remote server - so no problem if its a really fast link, but a slow response will impair render times, while a non-responding server (which could be caused by an incorrectly entered url) can really slow things up - a timeout of 10 to 30 seconds waiting for a response isn't uncommon. To avoid this you'd need to cache the image on the local server, which starts to get complicated.
another trick could be to store(cache) img path, x and y somewhere if new. I'm not sure it's the aim of a bbcode anyway
Seems like this code is not working since I updated to .7.8 does there need to be any changes? I like this function because it at least keeps big off site signatures from getting carried away. THe only change to my site has been to update my .htaccess to preclude hotlinking graphics.
xed out the personal info. I'm hosted at godaddy and it was pretty hard figureing out how to get th htacess file to work but it does now. I wanted to post it here to see if you saw anything that might cause the resize code to not funtion.
Seems like this code is not working since I updated to .7.8 does there need to be any changes? I like this function because it at least keeps big off site signatures from getting carried away. THe only change to my site has been to update my .htaccess to preclude hotlinking graphics.
Upgrading to v0.7.8 will have overwritten e107_files/bbcode/img.bb which will have removed the hack
The latest version of that file with the hacked img.bb file should be:
global $pref; if (preg_match("#\.php\?.*#",$code_text)){return "";} global $IMAGES_DIRECTORY, $FILES_DIRECTORY, $e107; $search = array('"', '{E_IMAGE}', '{E_FILE}'); $replace = array(''', $e107->base_path.$IMAGES_DIRECTORY, $e107->base_path.$FILES_DIRECTORY); $code_text = str_replace($search, $replace, $code_text); unset($imgParms); $imgParms['class']="bbcode"; $imgParms['alt']=''; $imgParms['style']="vertical-align:middle; border:0";