[Clipart] [Cctools-cchost] function for generating png thumbnails from svg files

Roan Horning roan at horning.us
Sat Nov 10 16:17:47 PST 2007



Victor Stone wrote:
> On 11/4/07, Roan Horning <roan at horning.us> wrote:
>> Not yet being that familiar with the cchost code, I was thinking of just
>> adding a check for the existence of a thumbnail in
>> pages/places/templates that return html thumbnail code.  If it doesn't
>> exist, then it is created. Of course this could slow to a crawl a page
>> which calls a number of thumbnails that don't exist.
> 
> If it takes more than 0.5 sec to create/cache 15 thumbs then I would
> not recommend waiting until render-time to do that in the skin.
> However (!) you could do it directly in the <img src="" attribute
> which would not slow the actual page down. Personally I would look
> hard at this option. Something like:
> 
> <img src="http://cchost_blah.com/media/getthumb?file_id=99999" />

I understand the importance of not having the call to create the 
thumbnail embedded directly in the page that displays the thumbnail, but 
is it possible to have the 404 error page code modified that it will 
call for the creation of the thumbnail if it is not found? The above 
method works fine, I just prefer my url's to reflect actual name of the 
desired file.

Either method lets the display page be quickly composed, returned, and 
then displayed, while the browser waits for the thumbnails to be 
returned (whether they exist already or need to be created first).

I looked for an error or 404 template and didn't find one, and now that 
I think about it, I don't remember instructions to set up a script alias 
in apache for an 404 error page. I do see that the "file not found" 
message in cchost is different than my apache installations default 
"file not found" page. Could someone give me a quick pointer to cchosts 
file not found code?

Thanks,

Roan



More information about the clipart mailing list