David E. Wheeler wrote:
> On May 23, 2011, at 10:49 PM, Zdravko Balorda wrote:
>
>> Still, template will need to create media of a type for which a user will not
>> have even a READ privilege?!
>
> Templates don't check permissions, so you're fine there.
>
>> There is a great thing about Bricolage being static: thumbnails can be created
>> by templates, and need not to be created in advance, typically before one even
>> knows the size of the thumbnail. Drupal can eat itself. :)
>
> Yep.
>
Excellent! This solves it. It feels like there exists a generic thumbnail handling
approach. Something like:
$burner->get_thumbnail($img, {'width' => xx, 'height' => yy, 'crop' => 0/1, ... } )
which (re)creates (check file mtime) a thumbnail media document of type Thumbnail
(hidden from users), makes it related to $img, considers other configuration options,
etc. etc. and returns thumbnail media document, that being related, will be published
along with the original image. A user don't need to care about anything. There can
be as many thumbnail images as are needed. Even too many, actually ... ?!
Regards, Zdravko.
> On May 23, 2011, at 10:49 PM, Zdravko Balorda wrote:
>
>> Still, template will need to create media of a type for which a user will not
>> have even a READ privilege?!
>
> Templates don't check permissions, so you're fine there.
>
>> There is a great thing about Bricolage being static: thumbnails can be created
>> by templates, and need not to be created in advance, typically before one even
>> knows the size of the thumbnail. Drupal can eat itself. :)
>
> Yep.
>
Excellent! This solves it. It feels like there exists a generic thumbnail handling
approach. Something like:
$burner->get_thumbnail($img, {'width' => xx, 'height' => yy, 'crop' => 0/1, ... } )
which (re)creates (check file mtime) a thumbnail media document of type Thumbnail
(hidden from users), makes it related to $img, considers other configuration options,
etc. etc. and returns thumbnail media document, that being related, will be published
along with the original image. A user don't need to care about anything. There can
be as many thumbnail images as are needed. Even too many, actually ... ?!
Regards, Zdravko.