Images again

Hi again

I’ve followed the discussion about using page attachments for images
with great interest, and finally we got it working too. However, because
you can’t reference attachments from snippets or layouts, this doesn’t
really seem like a good solution for images that reoccur throughout a
website design (such as a logo or whatever). Surely there must be some
way to reference static images somehow? I can’t find any documentation
on this. Eg, is there some directory in a radiant project that will act
as web root, or can one be created?

Thanks for any help,

Il giorno 05/giu/07, alle ore 09:46, Johan Rönnblom ha scritto:

Hi again

I’ve followed the discussion about using page attachments for
images with great interest, and finally we got it working too.
However, because you can’t reference attachments from snippets or
layouts, this doesn’t really seem like a good solution for images
that reoccur throughout a website design (such as a logo or whatever).

I use Gallery extension to do that…I usually create a gallery
called Layout and I set it as hidden, so it doesn’t appear in the
galleries list page. Then I use images with this tag:

<r:gallery:item:path id=“GALLERY_ID” position=“ITEM_POSITION”/>

…or…

<r:gallery:item:thumb id=“GALLERY_ID” position=“last” height=“200”/>

if you want to read more check the README file here:

http://darcs.bigchieflabs.com/radiant/extensions/gallery/rdoc/

Ciao!


Andrea F.

[email protected]
http://bigchieflabs.com/blog/
http://think.bigchief.it

Andrea F. wrote:

I use Gallery extension to do that…I usually create a gallery
called Layout and I set it as hidden, so it doesn’t appear in the
galleries list page.

Ok. It seems the Gallery extension relies on having a lot of stuff
installed though. Presumably the web root is in public/ and that just
linking statically to some files there will work. Of course this
requires access to put new files there, but that should not be a problem
for ‘site-global’ content… so I guess we’ll use that and then get the
attachments plugin when that works with a stable release.

Johan Rönnblom wrote:

Hi again

I’ve followed the discussion about using page attachments for images with great interest, and finally we got it working too. However, because you can’t reference attachments from snippets or layouts, this doesn’t really seem like a good solution for images that reoccur throughout a website design (such as a logo or whatever). Surely there must be some way to reference static images somehow? I can’t find any documentation on this. Eg, is there some directory in a radiant project that will act as web root, or can one be created?

Thanks for any help,

Your only option with page attachments for site-wide images is to attach
them to the root page. The current method for finding attachments is to
search the current page and then the parent pages recursively.

Sean

On Jun 5, 2007, at 9:05 AM, Sean C. wrote:

Your only option with page attachments for site-wide images is to
attach
them to the root page. The current method for finding attachments
is to
search the current page and then the parent pages recursively.

Sean

that’s a cool trick, but are the images available using the tag from
within a layout with that method?

Yes, they are. A layout is never rendered without an associated page,
so all the tags within a layout refer to that page when applicable.

Sean

The scope of 0.7 has not changed, but we have a lot of enhancements yet
to do to 0.6, IMO. One major thing is the discovery and installation of
extensions, half of which I wrote at RailsConf.

Asset management is an issue that I think everyone wants a different
solution for. I primarily wanted to be able to put images in my blog
posts and I liked the interface John had mocked up, so I emulated it
with page_attachments. Gallery takes a more asset-focused approach and
makes it easy to display lots of images. It’s also pretty easy to
roll-your-own. There’s power and flexibility in the diversity of
approaches here, and I don’t think we’ve reached the ‘standardization’
stage. In fact, in some ways I hope we never reach that – it could
mean a hugely bloated piece of software. And there are better software
out there for asset management than any extension in Radiant could
achieve.

My $0.02.

Sean

What are the core plans for a new image manager? I have one I wrote,
there is Sean’s and then the Gallery extension, but it seems like
there should be some sort of official plugin. None these (mine for
sure!) are really “ready for prime time” or all they all that they
could be. This seems to be something that people need, the list has
been flooded with questions in the last few weeks.

What is the “killer feature” of 0.7 in any case. 0.6 was extensions,
which have worked out very well and opened things up a lot, but where
do we go from here? Are “blogging” features still the main focus?

Keith B.
Tel: +49-7731-79838380
[email protected]
http://keithbingman.com

On 05/06/07 01:23 PM, Keith B. was heard to say:

What are the core plans for a new image manager? I have one I wrote,
there is Sean’s and then the Gallery extension, but it seems like
there should be some sort of official plugin.

There is also the approach of abstracting the content and suddenly get
a whole bunch of possible features:

http://init.ca/blog/2007/04/02/abstract-content-model-for-radiant/

Cheers,
Oliver

What are the core plans for a new image manager? I have one I wrote,
there is Sean’s and then the Gallery extension, but it seems like
there should be some sort of official plugin. None these (mine for
sure!) are really “ready for prime time” or all they all that they
could be. This seems to be something that people need, the list has
been flooded with questions in the last few weeks.

I’m currently quietly (and very very slowly) building
an asset management plugin hoping to encompass the
features in both my original asset manager and sean’s
manager. I’ve downloaded your extension and the gallery
extension, but have yet to look through those to figure
out if there’s any more features that are missing.

I’m hoping that I can come up with something that
provides a core that everybody is happy with that.
I’m not too worried about how it’s going to look
in the view (I’ll probably make it look the same
as my original extension), but if I can get the
core of it right, changing how the view works
can be up to debate and extensions.

Features that I’m planning are:

  • Tests
    Loads and loads and loads of tests. I’m currently
    developing in in TDD style. This is the main reason
    why none of the other extensions can even be
    considered at the time being.

  • Primary Storage is in the db as blobs:
    For ease of backup and replication and making
    sure we can scale horizontally. This was a
    debated issue when we first started discussing
    asset management, but I’m 100% convinced that
    this is the right answer, mainly because all
    the real arguments against are handled by:

  • Serving through secondary storage:
    When pages are published or the assets of a
    published page are modified, the assets can
    be dumped either to the public dir, or
    possibly exported to s3 or another external
    location. The performance of radiant’s cache
    is good enough that this isn’t needed in the
    basic case, but for people who need a lot of
    performance from the assets, it needs to be
    there as an option.

  • Degraded installation.
    It will work out of the box with no dependencies,
    but some features might require dependencies.

  • Image manipulation
    My original extension allowed image manipulation
    using fleximage templates (to resize, add shadows,
    etc). I plan to have the same manipulations
    performed in a similar way to the way that tags
    are defined using a syntax similar to fleximage
    and degrading based on whether imagescience,
    rmagick or nothing is installed.

The work is going slowly. Very very slowly, as I just
haven’t had the time to dedicate to it, and because
the features that I’m putting in aren’t handled by
the usual suspects (attachment_fu and
acts_as_attachments) - I believe that CMS asset
management needs a bit more than what they provide.

Dan.

Dan,

I’m thrilled to see “image manipulation” as one of your planned
features. Can I put in a specific request – acknowledging that, as
you said, this is moving slowly?

I’ve been hunting for a way to control thumbnail generation from
within a gallery or asset management tool, and so far I haven’t found
anything that quite fits my needs. What I’d like is to be able to
upload an image for inclusion in a gallery, and either as part of the
upload process, or afterwards, have the ability to crop the image to
specify what portion to use for the thumbnail. I’ve found a number of
Javascript cropping implementations, but I’m pretty new to Rails, and
I’ve not been able to work out how I might put this to use in the
context of Radiant.

Here’s one:

http://www.defusion.org.uk/demos/060519/cropper.php

…and an inkling of how it might be implemented in something like
the Gallery Extension:

http://garbageburrito.com/blog/entry/135/javascript-image-cropping-
with-jscropperui-and-rails

Thanks!

*DN

My biggest gripe with most online photo management apps is that even
if you have access to the server via FTP, you must individually
select each file to upload. I can see Radiant excelling in this
capacity with well designed rake tasks for whatever image extension
takes the lead in this capacity.

Has anyone written a rake task to do a bulk import from the local
server filesystem into the Gallery Extension? I’m planning on
developing one myself (and then making it public, of course) if no
such task already exists. But as a novice Ruby/Rake user, I’d like
to make sure I’m not repeating anyone else’s work. :slight_smile:

-Matt

On 6/5/07, Oliver B. [email protected] wrote:

Cheers,
Oliver

I just glanced over this, and I think it looks awesome. I don’t think
I understand all the design decisions, but it definitely add lots of
flexibility to the system, so I +1 this.

Just to add: in the context of the broader discussion, I’d agree that
Radiant needs a stable plugin for basic image handling.

For my own needs, the Gallery Extension, with the cropping feature in
my previous message, would cover most situations.

*DN

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs