thumb gererating problem |
[eluser]Bigil Michael[/eluser]
hi friends. I have configured codeigniter 2.1.0 and uploaded image using upload library. my problem is in thumb generation in ci 1.7.1 thumb marker is Code: $config1['thumb_marker'] = 'thumb_'; in ci 2.1.0 thumb marker is Code: $config1['thumb_marker'] = 'thumb_'; it will make too difficult to display thumb image, because in my db image name is like this imagename.jpg. so i want to use this code $config1['thumb_marker'] = 'thumb_'; can anyone help me???? where i have to change the code to generate thumb like 'thumb_imagename.jpg'. thanks in advance....
[eluser]marcogmonteiro[/eluser]
What I do is: I store the image name without the extension, then in another db field I store the extension. Then I can easily call the thumb since you have the image name and the image extension separated.
[eluser]Bigil Michael[/eluser]
thanks for your help. now i am searching the code how to change _thumb to thumb_
[eluser]Mauricio de Abreu Antunes[/eluser]
I'm curious: why do you need this format? Its not secure save your images with their raw names. Encrypt your names like md5(time().$imagename) or anything else. When you upload your image (physic), save the image with the same name. If the upload is ok, save this image in your database. Other tip: use rezise for crate your thumbnail or use any helper to generate a dynamic output. If you need some code, i can code it. Lemme know!
[eluser]Bigil Michael[/eluser]
thanks for your help... can u post the code??
[eluser]Mauricio de Abreu Antunes[/eluser]
First, read the guide: http://ellislab.com/codeigniter/user-gui...e_lib.html After this, try out this (check syntax errors, please): Code: $config['image_library'] = gd2;
[eluser]marcogmonteiro[/eluser]
I made a thumb helper a while ago. You can check it out if you want. https://github.com/mpmont/thumb_helper
[eluser]marcogmonteiro[/eluser]
Thanks mate! dunno if you're familiar with the spark system. I also have it has a spark. http://getsparks.org/packages/thumb_help.../HEAD/show (I also have a video helper but that is offtopic atm: http://getsparks.org/packages/video_help.../HEAD/show ) |
Welcome Guest, Not a member yet? Register Sign In |