Re: [Radiant] Page Attachments
Mohit Sindhwani wrote: Next on my list is PageAttachments - so, I installed attachment_fu and then, I cloned the recent page_attachments from git. I applied the migration and did the update and restarted the server. I was able to add an attachment and then another. But the third one failed. After trying for a bit, it seems that it loads small files (tried up to 14KB) but larger files (more than 30KB) seem to be not loading. Any suggestion on what may be wrong? I found this in page_attachments\app\models\page_attachment.rb: has_attachment :storage = :file_system, :thumbnails = defined?(PAGE_ATTACHMENT_SIZES) PAGE_ATTACHMENT_SIZES || {:icon = '50x50'}, :max_size = 10.megabytes This tends to suggest that files up to 10MB should be fine? Any idea what I should look for? (I'm on Windows, running Radiant 0.7.1 on ruby 1.8.6) *bump* I suggest you drop page_attachments in favor of Paperclipped. It's easier to manage image sizes and mime-types (you can do both with the settings extension) and page_attachments will prevent you from using the change_author extension (I got bitten by this one) if you decide to use it. It's also much easier to use in day-to-day operations with its bucket that will allow you to upload and attach images from the same place. ~Nate ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Page Attachments
On 24.05.2009, at 16:26, Mohit Sindhwani wrote: N. Turnage wrote: Mohit Sindhwani wrote: Next on my list is PageAttachments - so, I installed attachment_fu and then, I cloned the recent page_attachments from git. I applied the migration and did the update and restarted the server. I was able to add an attachment and then another. But the third one failed. After trying for a bit, it seems that it loads small files (tried up to 14KB) but larger files (more than 30KB) seem to be not loading. Any suggestion on what may be wrong? I found this in page_attachments\app\models\page_attachment.rb: has_attachment :storage = :file_system, :thumbnails = defined?(PAGE_ATTACHMENT_SIZES) PAGE_ATTACHMENT_SIZES || {:icon = '50x50'}, :max_size = 10.megabytes This tends to suggest that files up to 10MB should be fine? Any idea what I should look for? (I'm on Windows, running Radiant 0.7.1 on ruby 1.8.6) *bump* I suggest you drop page_attachments in favor of Paperclipped. It's easier to manage image sizes and mime-types (you can do both with the settings extension) and page_attachments will prevent you from using the change_author extension (I got bitten by this one) if you decide to use it. It's also much easier to use in day-to-day operations with its bucket that will allow you to upload and attach images from the same place. Hi Nate, Thanks for the advice. I'm tempted to use PageAttachments firstly because I was using it earlier :) and the site I'm trying to do is a technical articles site, so it makes a lot of sense to attach images to the pages on which the articles appear. Admittedly, I've not used PaperClipped so Im not sure if that's how it works - but the talk of buckets (that I've heard elsewhere also) tends to suggest common pools rather than page-wise attachments. However, I have need for Paperclipped also for certain types of site-wide needs, but I'm scared to even start putting Paperclipped and PageAttachments together :P Cheers, Mohit. 5/24/2009 | 10:26 PM. Hello Mohit, paperclipped comes with a fine installation routine that even imports your old attachments (and images) and moves them to it's default location. Look at the github page, there should be a rake task for mirgration form page_attachments. At least that's how i remember it - i mirgrated only one image, but it shoudl still work with more than one ;) And paperclipped does use a central media pool BUT you still are able to attach items to pages, so you can, as you woudl do with page_attachments before, access attachments on pages and get only the ones attached to this page (but you also cold use som arbitratry ones by direktly including them) The radiant tags are a bit different, but cycling throuhg attachments and testing for them (with mime type filters) is an easy task. So the attachments thing is still in there. The bucket is for attaching items to different pages. You add them to the bucket to carry them around, and then you can attach items form the bucket to pages you're editing. So all in all (and that's the reason i switched) paperclipped is more flexible and offers a superset of functionality over page_attachments. Greetings michael ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___m i c h a e l s t a r k e co-founder of HicknHack Software GbR www.hicknhack.com Graphics ___c o n t a c t +49 (170) 3686136 +49 (351) 4045428 cont...@hicknhack.com ___H i c k n H a c k S o f t w a r e G b R maik lathan - andreas reischuck - michael starke hübnerstraße 8 01069 dresden - germany ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Page Attachments
michael starke wrote: Hello Mohit, paperclipped comes with a fine installation routine that even imports your old attachments (and images) and moves them to it's default location. Look at the github page, there should be a rake task for mirgration form page_attachments. At least that's how i remember it - i mirgrated only one image, but it shoudl still work with more than one ;) And paperclipped does use a central media pool BUT you still are able to attach items to pages, so you can, as you woudl do with page_attachments before, access attachments on pages and get only the ones attached to this page (but you also cold use som arbitratry ones by direktly including them) The radiant tags are a bit different, but cycling throuhg attachments and testing for them (with mime type filters) is an easy task. So the attachments thing is still in there. The bucket is for attaching items to different pages. You add them to the bucket to carry them around, and then you can attach items form the bucket to pages you're editing. So all in all (and that's the reason i switched) paperclipped is more flexible and offers a superset of functionality over page_attachments. Hi Michael That's a very convincing case - I'm going to try PaperClipped. For one of my sites, I'll leave it at PageAttachments for the time being, but for the one I'm working on, I'm going to try Paperclipped. Cheers, Mohit. 5/24/2009 | 10:45 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] page attachments
Great suggestion! I've added it as an issue on GitHub. I don't have time to implement it right now, but I'd welcome patches/forks. http://github.com/jgarber/radiant-textile_editor-extension/issues#issue/ 1 Jason On Apr 17, 2009, at 12:53 AM, Steven Southard wrote: inherited from parent pages Yeah that makes perfect sense and I'm glad I understand it now. That's useful information. Anyone using textile editor? It's pretty cool but I was thinking the add image could use a little souping up. It'd be nice if when you selected attachments it'd show all the attachments that it inherits. Does that sound useful to anyone else? I keep going back and forth in which is better attachments or paperclipped they both are very useable and surprisingly different. Steven On Apr 16, 2009, at 5:40 PM, Andrew Neil wrote: Steven, Attachments can be inherited from parent pages. So if you attach an image to your Home page, then it will be available to all pages, layouts and snippets. Page attachments is a bit fussy: when you ask for a file that doesn't belong to the current page (or its ancestors) it raises an exception. It could be dangerous if you were to call r:attachment name=image.jpg/ in a snippet or layout. If that snippet/layout was called from a page which didn't have image.jpg attached, and nor did any of its ancestors, then an exception would be raised, and the page would not render. However, if you attached a image.jpg file to the home page, then it would be available to every page in the site, and the problem above would be avoided. Of course, you could attach an image.jpg file to any section. Then that section, and all its ancestors would use that file instead of the one attached to the home page. Does that make sense? The inheritance mechanism means that you can treat page attachments in a similar fashion to page parts. When you look at it that way, it should no longer seem necessary to be able to attach files to snippets and layouts. Cheers, Drew On 16 Apr 2009, at 21:50, Steven Southard wrote: You mean because the name is page attachments? I think it'd be convenient to locate attachments in snippets too. Snippets need images just as much at pages. If a snippet had images maybe pages wouldn't need quite as many. I guess, next your going to tell me layouts don't need attachments either. Sure would be convenient. Steven On Apr 16, 2009, at 1:45 PM, Mohit Sindhwani wrote: Steven Southard wrote: Why doesn't page attachments show up in snippets? Because it attaches to a Page? Cheers, Mohit. 4/17/2009 | 2:45 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] page attachments
Why doesn't page attachments show up in snippets? Steven ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] page attachments
Steven Southard wrote: Why doesn't page attachments show up in snippets? Because it attaches to a Page? Cheers, Mohit. 4/17/2009 | 2:45 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] page attachments
Steven, Attachments can be inherited from parent pages. So if you attach an image to your Home page, then it will be available to all pages, layouts and snippets. Page attachments is a bit fussy: when you ask for a file that doesn't belong to the current page (or its ancestors) it raises an exception. It could be dangerous if you were to call r:attachment name=image.jpg/ in a snippet or layout. If that snippet/layout was called from a page which didn't have image.jpg attached, and nor did any of its ancestors, then an exception would be raised, and the page would not render. However, if you attached a image.jpg file to the home page, then it would be available to every page in the site, and the problem above would be avoided. Of course, you could attach an image.jpg file to any section. Then that section, and all its ancestors would use that file instead of the one attached to the home page. Does that make sense? The inheritance mechanism means that you can treat page attachments in a similar fashion to page parts. When you look at it that way, it should no longer seem necessary to be able to attach files to snippets and layouts. Cheers, Drew On 16 Apr 2009, at 21:50, Steven Southard wrote: You mean because the name is page attachments? I think it'd be convenient to locate attachments in snippets too. Snippets need images just as much at pages. If a snippet had images maybe pages wouldn't need quite as many. I guess, next your going to tell me layouts don't need attachments either. Sure would be convenient. Steven On Apr 16, 2009, at 1:45 PM, Mohit Sindhwani wrote: Steven Southard wrote: Why doesn't page attachments show up in snippets? Because it attaches to a Page? Cheers, Mohit. 4/17/2009 | 2:45 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] page attachments
inherited from parent pages Yeah that makes perfect sense and I'm glad I understand it now. That's useful information. Anyone using textile editor? It's pretty cool but I was thinking the add image could use a little souping up. It'd be nice if when you selected attachments it'd show all the attachments that it inherits. Does that sound useful to anyone else? I keep going back and forth in which is better attachments or paperclipped they both are very useable and surprisingly different. Steven On Apr 16, 2009, at 5:40 PM, Andrew Neil wrote: Steven, Attachments can be inherited from parent pages. So if you attach an image to your Home page, then it will be available to all pages, layouts and snippets. Page attachments is a bit fussy: when you ask for a file that doesn't belong to the current page (or its ancestors) it raises an exception. It could be dangerous if you were to call r:attachment name=image.jpg/ in a snippet or layout. If that snippet/layout was called from a page which didn't have image.jpg attached, and nor did any of its ancestors, then an exception would be raised, and the page would not render. However, if you attached a image.jpg file to the home page, then it would be available to every page in the site, and the problem above would be avoided. Of course, you could attach an image.jpg file to any section. Then that section, and all its ancestors would use that file instead of the one attached to the home page. Does that make sense? The inheritance mechanism means that you can treat page attachments in a similar fashion to page parts. When you look at it that way, it should no longer seem necessary to be able to attach files to snippets and layouts. Cheers, Drew On 16 Apr 2009, at 21:50, Steven Southard wrote: You mean because the name is page attachments? I think it'd be convenient to locate attachments in snippets too. Snippets need images just as much at pages. If a snippet had images maybe pages wouldn't need quite as many. I guess, next your going to tell me layouts don't need attachments either. Sure would be convenient. Steven On Apr 16, 2009, at 1:45 PM, Mohit Sindhwani wrote: Steven Southard wrote: Why doesn't page attachments show up in snippets? Because it attaches to a Page? Cheers, Mohit. 4/17/2009 | 2:45 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] page attachments
HI Steven Steven Southard wrote: You mean because the name is page attachments? I think it'd be convenient to locate attachments in snippets too. Snippets need images just as much at pages. If a snippet had images maybe pages wouldn't need quite as many. I guess, next your going to tell me layouts don't need attachments either. Sure would be convenient. I'm sorry if my answer came across as rude/ mean (cut me some slack - it was sent at 2:45AM) - I didn't mean just the name. I meant to imply that it attaches to pages and is designed for that, while snippets often are included in multiple pages and may have different contexts. (I have some times used a single known page as the base referred from snippets). But definitely the explanation that followed my email was better! Cheers, Mohit. 4/17/2009 | 1:03 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Page Attachments not creating thumbnails ...
I've been trying to use Page Attachments and it doesn't seem to be creating thumbnails. I'm going to try and install the latest radiant tagged version. See what happens. -- Posted via http://www.ruby-forum.com/. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant