Page_attachments experience

I’m curious how well page_attachments has worked for others. I’m going
to give it a try in my test environment, but wondering how it’s worked
for end users who may or may not be computer savvy (from a programmer’s
perspective).

Are there any other options, aside from writing my own extension,
currently available to make it easy for end users to add images to the
pages they create?

Thank you for any comments!

Bill

I’m pretty happy with page_attachments. The biggest headache for me
was installing RMagick or image_science on my Mac dev machine (I don’t
know why this is still such a pain in the a$$!). It’s running great
on my Ubuntu Server though.

Usability-wise, the thumbnails it adds to the page admin interface are
really good. As are the <r:attachment:*> tags. My only complaint is
that styles seem just a little bit off from the rest of the UI, but
all things considered, that’s not too bad.

I recommend you use it. For what it sounds like you want to do, it’s
perfect.

-Andrew

Andrew O’Brien wrote:

I recommend you use it. For what it sounds like you want to do, it’s perfect.

-Andrew

It also works fine for me. No problems yet!

Cheers,
Mohit.
1/4/2008 | 12:18 AM.

I think this is a top notch extension. However I will try to patch it so
the
admin view can display the ‘public’ url for easy copy pasting with
wysiwyg
editors.

P.

On Jan 3, 2008 5:18 PM, Mohit S. [email protected] wrote:

Mohit.
1/4/2008 | 12:18 AM.


Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


met vriendelijke groet,

Peter B.

Saji N. Hameed wrote:

saji

That may be true - I’m managing my site by myself and I’m not a lay
person in that sense. But, in a technical sense, it works fine.

Cheers,
Mohit.
1/4/2008 | 11:25 AM.

Sorry, but not very easy to use for the lay person client who may have no
idea
about radius tags.

saji

True, that’s why I will try to patch it with some easy copy/paste URL
thingy. (like photobucket and the like)

Andrew O’Brien wrote:

I’m pretty happy with page_attachments. The biggest headache for me
was installing RMagick or image_science on my Mac dev machine (I don’t
know why this is still such a pain in the a$$!). It’s running great
---------snip

It also works fine for me. No problems yet!

Cheers,
Mohit.
1/4/2008 | 12:18 AM.

Sorry, but not very easy to use for the lay person client who may have
no idea
about radius tags.

saji


Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


Saji N. Hameed

APEC Climate Center +82 51 668 7470
National Pension Corporation Busan Building 12F
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 [email protected]
KOREA

On Jan 7, 2008 4:16 PM, J Aaron F. [email protected] wrote:

One way I use the page_attachements extension is to create a single
page under Root called Assets and then attach “global” files to this
page. I can then reference them directly by URL, but it would be nice
to have a tag that allowed for referencing of attachments of other
pages.

I did a quick hack patch to do something like this. BUt I discovered
page_attachment would also pick up images from parent pages. So adding
all
the images to the home page is also an option.

$ diff -u page_attachment_tags.rb.orig page_attachment_tags.rb
— page_attachment_tags.rb.orig 2007-12-26 21:49:41.234538413
+1300
+++ page_attachment_tags.rb 2007-12-26 22:20:39.262566335 +1300
@@ -86,6 +86,23 @@
attributes = tag.attr.inject([]){ |a,(k,v)| a << %{#{k}="#{v}"}
}.join(" “).strip
%{<img src=”#{filename}" #{attributes + " " unless attributes.empty
?}/>}
end
+

  • desc %{
  • Test
  • Usage:
  • <r:attachment:global name="file.jpg"
    

[size=“icon”]/>

  • }

  • tag “attachment:global” do |tag|

  • page = tag.locals.page

  • attachment = PageAttachment.find_by_filename(tag.attr[‘name’])

  • size = tag.attr[‘size’] || nil

  • raise TagError, “attachment is not an image.” unless
    attachment.content_type.strip =~ /^image//

  • filename = attachment.public_filename(size) rescue “”

  • attributes = tag.attr.inject([]){ |a,(k,v)| a << %{#{k}="#{v}"}
    }.join(" ").strip

  • %{<img src="#{filename}" #{attributes + " " unless attributes.empty
    ?}/>}

  • end

    desc %{
    Renders a hyperlink to the attachment. The ‘name’ attribute is
    required
    on this tag or the parent tag.

“Peter B.” [email protected] writes:

Sorry, but not very easy to use for the lay person client who may have no
idea
about radius tags.

saji

True, that’s why I will try to patch it with some easy copy/paste URL
thingy. (like photobucket and the like)

One way I use the page_attachements extension is to create a single
page under Root called Assets and then attach “global” files to this
page. I can then reference them directly by URL, but it would be nice
to have a tag that allowed for referencing of attachments of other
pages.


J Aaron F. jadetower.com [US] +1 724-964-4515
馮傑仁 cubiclemuses.com [HK] +852 8123-7905

J Aaron F. wrote:

thingy. (like photobucket and the like)

One way I use the page_attachements extension is to create a single
page under Root called Assets and then attach “global” files to this
page. I can then reference them directly by URL, but it would be nice
to have a tag that allowed for referencing of attachments of other
pages.

Umm…

[1] I can’t try it out right now, but I remember reading that
page_attachments searches up the tree (of parents) to find if something
matches the name.

[2] I can’t try it right now, but Radiant/ Radius allow you to do a
find_by_url for a page and that switches the Radius context to the page
that you just found. After that, using page_attachments tags should
mean that they search local to the page you just found. That would
allow you to reference the attachment of the other page.

Like I said, I can’t try these out right now, so I’m not sure if they
work. Sean, of course, could confirm :smiley:

Cheers,
Mohit.
1/13/2008 | 3:23 AM.

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