I’m setting up a e-commerce site using expression engine and mals-ecommerce. The site will need to show photographs of the products and include enlarged photos as well. I know that ee can resize images on import but I am afraid my client will get confused in the process and I would like to simplify it a bit for them.
I found a script that will resize images on the fly called phpthumb
It works by adding a bit of code to your img tag. For example, this:
<img src="{filedir_1}golf.jpg" border="0" alt="image" name="image" width="150" align="left" height="113"/>
would need to be displayed as this:
<img src="http://www.server.com/phpThumb.php?src={filedir_1}golf.jpg&w=50" border="0" alt="image" name="image" width="50" align="left" />
I was thinking that if I could make a custom field to place the uploaded photo in I could hard code different photo sizes directly into my templates to produce dynamic photo sizes. The problem that I would need to overcome would be to strip down the image code that ee places into the entry to just the path of the file. This…
<img src="{filedir_1}golf.jpg" border="0" alt="image" name="image" width="150" align="left" height="113"/>
would need to be changed to this:
{filedir_1}golf.jpg
I have looked at the different filters and character limiters but I need something to limit characters from the beginning as well as the end. This would enable me to put code in my template like this…
<img src="http://www.server.com/phpThumb.php?src=[b]{photo}[/b]&w=50" border="0" alt="image" name="image" width="50" align="left" />
Does that make sense? If someone can help write a plug in or point me in the write direction that would be amazing.
