thumb gererating problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: thumb gererating problem (/showthread.php?tid=49292) |
thumb gererating problem - El Forum - 02-14-2012 [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.... thumb gererating problem - El Forum - 02-14-2012 [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. thumb gererating problem - El Forum - 02-14-2012 [eluser]Bigil Michael[/eluser] thanks for your help. now i am searching the code how to change _thumb to thumb_ thumb gererating problem - El Forum - 02-14-2012 [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! thumb gererating problem - El Forum - 02-14-2012 [eluser]Bigil Michael[/eluser] thanks for your help... can u post the code?? thumb gererating problem - El Forum - 02-14-2012 [eluser]Mauricio de Abreu Antunes[/eluser] First, read the guide: http://ellislab.com/codeigniter/user-guide/libraries/image_lib.html After this, try out this (check syntax errors, please): Code: $config['image_library'] = gd2; thumb gererating problem - El Forum - 02-14-2012 [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 thumb gererating problem - El Forum - 02-14-2012 [eluser]Mauricio de Abreu Antunes[/eluser] Nice helper, dude. thumb gererating problem - El Forum - 02-14-2012 [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_helper/versions/HEAD/show (I also have a video helper but that is offtopic atm: http://getsparks.org/packages/video_helper/versions/HEAD/show ) |