Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel

Re: thumbnails on the fly

 

 

Bricolage devel RSS feed   Index | Next | Previous | View Threaded


zdravko.balorda at siix

May 27, 2011, 12:45 AM

Post #1 of 6 (2029 views)
Permalink
Re: thumbnails on the fly

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.


david at kineticode

May 27, 2011, 9:09 AM

Post #2 of 6 (1936 views)
Permalink
Re: thumbnails on the fly [In reply to]

On May 27, 2011, at 12:45 AM, Zdravko Balorda wrote:

> 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 ... ?!

You mean find_or_create_alternate()?

http://bricolagecms.org/docs/current/api/Bric::Biz::Asset::Business::Media::Image#Public-Instance-Methods

Best,

David


david at kineticode

May 27, 2011, 9:09 AM

Post #3 of 6 (1934 views)
Permalink
Re: thumbnails on the fly [In reply to]

On May 27, 2011, at 12:45 AM, Zdravko Balorda wrote:

> 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 ... ?!

You mean find_or_create_alternate()?

http://bricolagecms.org/docs/current/api/Bric::Biz::Asset::Business::Media::Image#Public-Instance-Methods

Best,

David


zdravko.balorda at siix

May 29, 2011, 11:03 PM

Post #4 of 6 (1925 views)
Permalink
Re: thumbnails on the fly [In reply to]

David E. Wheeler wrote:
> On May 27, 2011, at 12:45 AM, Zdravko Balorda wrote:
>
>> 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 ... ?!
>
> You mean find_or_create_alternate()?
>
> http://bricolagecms.org/docs/current/api/Bric::Biz::Asset::Business::Media::Image#Public-Instance-Methods
>

Yes, in part. The rest is a maintenance and a CMS issue.
There is another, even better approach, I just don't know if it works.

A thumbnail could (should) be related to a burning story, a story that displays it,
instead to the original media document. This way there would be only as many thumbnails
as needed, not like here, where every media has a bunch of thumbnails regardless. But this
may require a story to check out itself, create images, and then save and check in again while
being published... or just save if being previewed while checked out...

Regards, Zdravko


zdravko.balorda at siix

May 30, 2011, 11:50 PM

Post #5 of 6 (1934 views)
Permalink
Re: thumbnails on the fly [In reply to]

David E. Wheeler wrote:
> On May 27, 2011, at 12:45 AM, Zdravko Balorda wrote:
>
>> 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 ... ?!
>
> You mean find_or_create_alternate()?
>
> http://bricolagecms.org/docs/current/api/Bric::Biz::Asset::Business::Media::Image#Public-Instance-Methods
>

YES, actually! It comes out, that anything I can think of is already there! :)
That's Bricolage!

Thanks,
Zdravko


david at kineticode

May 31, 2011, 9:29 AM

Post #6 of 6 (1921 views)
Permalink
Re: thumbnails on the fly [In reply to]

On May 30, 2011, at 11:50 PM, Zdravko Balorda wrote:

>> You mean find_or_create_alternate()?
>> http://bricolagecms.org/docs/current/api/Bric::Biz::Asset::Business::Media::Image#Public-Instance-Methods
>
> YES, actually! It comes out, that anything I can think of is already there! :)
> That's Bricolage!

Excellent!

Best,

David

Bricolage devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.