Suggested approach for image generation script?
This is an open discussion with 2 replies, filed under General.
Search
I have a script that generates images based on text input.
foobar => foobar.jpg
I used the mechanics from JIT to create an extension where I integrated the image generating script.
In frontend the path to images is
src="{/data/params/root}/image_label/<list_of_parameters>"
and in .htaccess the following rule:
RewriteRule ^image_label/((red|blue).+)$ extensions/xs_labels/lib/image_label.php?param=$1 [L,NC]
In image_label.php
I'm processing the input string.
I wanted to avoid appending the data to the src in any way because it tends to be around 200 chars. or more.
I've written a text formatter that passes the contents of the textarea through the image generating script and returns the cached image's path.
Very possibly not the intended purpose of text formatters, but it's done the trick.
Create an account or sign in to comment.
Hi,
I'm using a script to generate images and would appreciate if anyone could suggest the best approach to calling it in Symphony. I'm coming from CMSs with PHP templates, where I could generate a cached version and just have src="cached.png" in the output.
The script takes a textarea's content to generate the image, and the issue is how to check if the cache exists, otherwise call the script. Would I need a custom field to allow me to process the data before the XML is generated?
I'd appreciate any suggestions from more experienced Symphony users.
Fish