how to use Smart Image Resizer in codeigniter |
[eluser]Unknown[/eluser]
Does anyone have any idea how to use Smart Image Resizer in CI? That script uses $_GET and I can't find anyway to make it work..
[eluser]slowgary[/eluser]
The user guide talks about enabling query strings. You could also just run it from outside of the CI folder.
[eluser]Unknown[/eluser]
I activated the query strings and it works $config['enable_query_strings'] = TRUE; Thanks for the idea. I didn't know the default URL system works even if the query strings are activated.
[eluser]Unknown[/eluser]
I have a simpler solution for the case. We need create a controller that will interpret following type of URL Code: http://<your_base_url>/imager/index/<image_width>-<image_height>-<crop_ratio>/<image_path> To generate this type of URL, we will be using a function that will generate the above URL shown below. Code: if (!function_exists('imager')) { The controller which I discussed earlier for the purpose of resizing image is, Code: <?php We can see that Smart Resizer has not appeared yet. The trick is that we will be putting the code of it in a view file. In my case, I've kept it on 'common/imager.php'. Finally the usage is (of course on views): Code: <?php $this->load->helper('yurl'); // the helper that contains the imager function.?> I have added all the files on an attachment. Please help yourself. Since the forum does not allow the submission of zip file; I have renamed the extension of the zip attachment as doc so please rename extension to zip after you have downloaded. In windows you can do it like this way in command shell. Code: > ren application.doc application.zip |
Welcome Guest, Not a member yet? Register Sign In |