4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: yousaf on June 15, 2009, 11:32:24 PM
-
Attention:
We recommend NOT to use PHPTHumb until they released a fixed version!
The current version 1.7.9-200805132119 (released May 28, 2008) has a big security leak.
Attackers can compromise your server.
Secunia rated this vulnerability as "highly critical".
http://secunia.com/advisories/39556/
EDIT: 4images Team
This a Tutorial about how to use PhpThumb on your 4images gallery,
so that you can show up image size of your choice on details.php
Note: { if you are running your 4images gallery on a Shared hosting and you are getting high traffic then just forget it.
because resizing is using a lot of memory if you are planning to have a lot a visitors and lot of pictures..
instead you maybe try this mod [MOD] Resize wallpaper for restrain resize template (http://www.4homepages.de/forum/index.php?topic=10720.0).}
There are lots of post about PhpThumb but none of them have clear instructions
and most the guys are getting this error message
phpthumb() v1.7.9-200805132119
"/home/xxx/public_html/xxx/phpthumb/./data/media/26/chapel beach.jpg" does not exist.
because they upload phpthumb files to wrong path
so i think i should post these steps which i followed with the help of Nicky(Thanks Nicky)
1.) Download phpthumb from this link. PhpTumb (http://phpthumb.sourceforge.net/)
then unzip it and just upload these 9 files to your gallery root
1. phpthumb.bmp.php
2. phpthumb.class.php
3. phpthumb.config.php.default {dont forget to rename it before uploading to phpthumb.config.php}
4. phpthumb.filters.php
5. phpthumb.functions.php
6. phpthumb.gif.php
7. phpthumb.ico.php
8. phpthumb.php
9. phpthumb.unsharp.php
and fonts folder to /captcha/fonts
Delete the other remaining files & folders in Phpthumb folder, as they are not required
Which are
/cache <--- Delete it
/demo <--- Delete it
/docs <--- Delete it
/fonts <--- Delete it
/images <--- Delete it
index.php <--- Delete it
2.)
open phpthumb.config.php and
find
$PHPTHUMB_CONFIG['ttf_directory'] = dirname(__FILE__).'/fonts'; // Base directory for TTF font files
change it to
$PHPTHUMB_CONFIG['ttf_directory'] = dirname(__FILE__).'/captcha/fonts'; // Base directory for TTF font files
3.)
open /templates/your template/media/jpg.html and
Find
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br />
replace it with
<img src="phpThumb.php?src={media_src}&w=800&h=600" border="0" alt="{image_name}" >
Thats it,
you can see the result on these sites as a kind of demo
WallpaperOwner.com (http://www.WallpaperOwner.com)
wallp.ape.rs (http://wallp.ape.rs)
-
@ Step 3
Delete
1)
From
1)<img src="phpthumb/phpThumb.php?src={media_src}&w=800&h=600" border="0" alt="{image_name}" >
So:
<img src="phpthumb/phpThumb.php?src={media_src}&w=800&h=600" border="0" alt="{image_name}" >
-
also, I believe in Step 3 it should be without phpthumb/ dir:
<img src="phpThumb.php?src={media_src}&w=800&h=600" border="0" alt="{image_name}" >
1. What about images in portrait ?
2. Does it work with remote images?
-
hi all,
remote:
works with remote images too, but you have to change some settings (from true to false) in phpThumb.config.php
// * Off-server Thumbnailing Configuration:
portrait:
i have another settings as Yousaf,
my example:
<img src="./phpThumb.php?src={media_src}&w=400&fltr[]=wmt|resized:+^Xx^Y+to+^xx^y|10|B|FFFFFF|arial.ttf|100|7||000000|100|" border="0">
-
@ Benny, Vano and Nicky
Thanks for the corrections
i was kinda too sleepy bythetime i was posting it (round about 2 AM, mid night my time)
that was what i wrote with a sleepy head.
-
I have added to my List
http://www.4homepages.de/forum/index.php?topic=24888.0
-
I didn't try this with remote images, but I would consider about security:
Q: Are there / have there been any security issues in phpThumb?
A: http://secunia.com/product/5199/
http://phpthumb.sourceforge.net/demo/docs/phpthumb.faq.txt
-
it works fine
sir..i have a hostgator account... so...i mi8 get slower...is thier any alternate way ?
-
What will happen if i upload a 500x500 picture ? when the default size for thumb is 800x600 !
Does the thumbnail will resize to 800x600 ??? or the original size 500x500 will be displayed ?
-
hi,
What will happen if i upload a 500x500 picture ? when the default size for thumb is 800x600 !
Does the thumbnail will resize to 800x600 ??? or the original size 500x500 will be displayed ?
original 500x500 will be displayed
huuuum... i read it rightnow again... THUMB 800x600 default size? huh?
thats a great mode..thanks nicky... :) just i more thig..can we display a message saying that this image is resized ??? !
if you use this code
<img src="./phpThumb.php?src={media_src}&w=400&fltr[]=wmt|resized:+^Xx^Y+to+^xx^y|10|B|FFFFFF|arial.ttf|100|7||000000|100|" border="0">
example here (http://wallp.ape.rs/wallpaper-pic-gallery-album-nissan-wallpaper-00014-18102.html)
note: message will be shown even picture was not resized look (http://wallp.ape.rs/wallpaper-pic-gallery-album-bmw-power-78376.html)
-
Thanks Nicky !
-
thanks to yousaf who write it down ;)
-
thanks to yousaf who write it down ;)
yeh .. thats true,,, but yousaf's php thumb link ddnt work for me..but urs worked :D thanks for both..great work.this was what i was expecting since i got the script :D
yeh... hipop Hureeeeeeeeeeeeeeeeeeeee ! ! !
-
this is what exactly I was looking for for three days I have tested all the resizers plugins, tahnks, I wasnt sure to install this becouse the message about de big load un the server, do you think it is posible to have this same plugin but with cache function to minimize de load on the server?
....
-
Yes thier is = i saw a mod on this web site ! :D ! :D ! :D !
Are you using a dedicated host ? then its fine..but im on a shared sever...even it ddnt bother Me :mrgreen: ! Works Fine !
-
hi,
great mode, i just add this to my gallery every thing works fine except there is no link to the original image on image displays on detial page, how to make the link to the original image?
-
Works fine but I got the same issue as khan, there's no link for the original image
any help guys :)
EDIT
its only shows the new size "800X600" and no pop-up with the original image !!
UPDATE
Sorry, I didn't notice the Nicky's code :) resizing note appears now but still no link for the original image :(
-
i have this in my details.html template
<a href="#" onClick="window.open('./showwall.php?src={media_src}&image_id={image_id}&title={image_name}', 'showpic', 'fullscreen=yes,resizable=yes,status=no,menubar=no,toolbar=no,scrollbars=yes,left=0,top=0'); return false;" title="{image_name}">
<img src="./media.php?src={media_src}&w=400&fltr[]=wmt|resized:+^Xx^Y+to+^xx^y|10|B|FFFFFF|arial.ttf|100|7||000000|100|" border="0" alt="{image_name}"></a>
media.php would be phpThumb.php
showwall.php is this: http://phpthumb.sourceforge.net/index.php?source=demo%2FphpThumb.demo.showpic.php
-
For those who're using PHPthumb and have gallery with many images, I would recomment using this modification:
http://mrphp.com.au/code/image-cache-using-phpthumb-and-modrewrite
Generate thumbs by visiting a URL such as your.com/thumbs/50x50/images/image.jpg. This will create a 50x50px thumbnail of your.com/images/image.jpg.
The thumb will be stored on your server at your.com/thumbs/50x50/images/image.jpg so the next request for the same image will be loaded without loading php for ultra fast image cache.
-
Attention:
We recommend NOT to use PHPTHumb until they released a fixed version!
The current version 1.7.9-200805132119 (released May 28, 2008) has a big security leak.
Attackers can compromise your server.
Secunia rated this vulnerability as "highly critical".
http://secunia.com/advisories/39556/
-
PHPthumb security fix:
http://modxcms.com/forums/index.php/topic,54874.msg316279.html#msg316279
-
Very thanks for your bug fix