[Radiant] URL format for archive extension
Is it possible to modify the URL format for child pages of an Archive section? I would prefer just year+month: //mm/:slug rather than the full year+month+day /yyy/mm/dd/:slug I'm hoping that this can be configured through Radiant::Config settings, but if I have to hack on the code that's cool. I just wanted to check if anyone has already tried this, before I dive in. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
[Radiant] Images in extension registry
Hi folks, I've just got round to posting images for each of my entries in the extension registry. You should do the same! http://ext.radiantcms.org/authors/18-drew-neil That's all. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] Blog extension usage
The README is a bit sparse for the blog extension. As it says: The Blog ... is a conglomeration of multiple extensions and new features. It includes my 'sibling_tags' extension, which provides tags for linking to next/previous articles. Documentation for the sibling tags extension can be found on it's own project page: http://github.com/nelstrom/radiant-sibling-tags-extension I'm not sure about the other extensions which are bundled in to the blog extension. Hope this helps, Drew 2009/11/16 María Paula Mariani paulamari...@gmail.com Hello! Does anybody knows if there's a document which explains the blog extension usage? I didn´t found it at the documentation stored at git. Thanks very much, -- Paula ___ 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] Is the RedCloth extensions known not to work with 0.8.1?
Nate, Sorry I can't answer your question directly, but as an alternative you might consider applying the alternating classes to list elements using javascript. Some of the appeal in offering Textile or markdown for content editors is that they have a simple syntax to learn, e.g. asterisks create bullet lists. As soon as you say to your editors You have to add a class name in brackets after the asterisk (but make sure there is no space between the asterisk and the opening bracket!), you've lost the simplicity of textile. It would be preferable to keep the textile code simple, and apply the classes unobtrusively with javascript. The following snippet of jQuery would do the trick: $(document).ready(function() { $(#content ul li:nth-child(3n+1)).addClass(one); $(#content ul li:nth-child(3n+2)).addClass(two); $(#content ul li:nth-child(3n)).addClass(three); }); This assumes that the user-editable content is inside a div id=content/div block, so you may have to tweak it to fit your needs. I used this technique to apply alternate bullet point styles to the li on this site: http://westportbookfestival.org/media [See the list at the bottom of the page] Hope this helps! Cheers, Drew On Thu, Oct 15, 2009 at 10:53 PM, Nate Turnage pixeln...@gmail.com wrote: I am trying to style a list item in a footer snippet and it is not working, so I decided to try loading the redcloth extension. And now I am getting an error about an unitialized constant in the redcloth_extension. Is the redcloth extension still useful for 0.8.1? This is what I am trying to do: *(class1) List Item One *(class2) List Item Two *(class3) List Item Three But instead of rendering this: ul li class=class1List Item One/li li class=class2List Item Two/li li class=class3List Item Three/li /ul It renders this: p *(class1) List Item Onebr *(class2) List Item Twobr *(class3) List Item Three /p Styling list items this way works on the Redcloth website: http://redcloth.org/try-redcloth/ Should I report this as a bug somewhere? ~Nate ___ 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] How can I create a fork of an extension at Github?
If you are logged in to github, you should see a button labelled fork when you visit the home page for a repository. Just hit that button, and github will create your own fork of the project in question. Once that's done, you can clone your fork of the repository onto your local machine: click the link labelled Your clone URL, and it will show you the code that you should run on your development machine. Do your work in your local git repository, and then run `git push` to publish your commits on github. Cheers, Drew On Tue, Sep 15, 2009 at 4:15 AM, Nate pixeln...@gmail.com wrote: It appears as if the subscriber_lists on github is incompatible with Radiant 0.8.x and I would like to take a shot at fixing it. However, I have never forked a project on github before. What is the process for creating my own branch of the extension? Do I create a local branch first, then push it to the repo on github? Or do I need to do the setup through github, then just clone (or add as a submodule) the repo in my main site? Any tips/hits/tricks that y'all could share would be greatly appreciated. Thanks, ~Nate ___ 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] Routes and Custom Pages Types
On Tue, Aug 25, 2009 at 2:13 PM, Sean Cribbs seancri...@gmail.com wrote: Johannes, Your TripPage should override Page#find_by_url and return itself or an appropriate child page for URLs that match your scheme. Way back in the day we did that for KCKCC's syllabus pages - wish I still had that example around. Here is an example of overriding Page#find_by_url: http://github.com/nelstrom/radiant-audio_player-extension/blob/11e2b3398e4831c3d047ac30276215dd3af15678/app/models/audio_page.rb#L5-17 This should match URLs of the form: /podcasts [index page] /podcasts/1-first-episode /podcasts/2-second-episode [show pages] I hope this helps. Cheers, Drew Sean Johannes Fahrenkrug wrote: Hi, I have a custom page type called TripPage. I want to be able to do create a new page with the /trips slug and then do this: /trips/2640024 to display the trip with the id 2630024. I know I could easily do /trips?id=2630024 and access that via @request.params[:id], but I want to make the site SEO friendly and avoid get parameters. Would the best practice be to set this up through the routes in the _extension.rb file? Thanks! - Johannes Fahrenkrug ___ 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] Radiant Extension
Hi, You might like to have a look at these extensions: http://github.com/pilu/radiant-newsletter/tree/master http://github.com/nelstrom/radiant-subscriber-lists-extension/tree/master I wrote the subscriber_lists extension to gather email addresses through a form on the website. It is basically a simplified version of the newsletter extension (which is much more ambitious). The newsletter extension also allows you to send emails to all of the email addresses that you gather through the form. At the time I tried it out, I was unable to make rails send email using a googlemail address, but I think that might have been fixed since. Both of these extensions are quite out of date, so they might need a bit of work to get them working with the current version of Radiant. I think they worked fine on Radiant 0.6.9. I don't intend to update the subscriber list extension. If anyone would like to take over it's maintenance, that's grand. For myself, I would always choose to let a 3rd party deal with subscriber lists in the future. The likes of MailBuild (http://www.mailbuild.com/) offers code snippets that you can include in your templates. I recommend that you try them out. Cheers, Drew On 4 Jul 2009, at 09:54, Victor Pereira wrote: Hi, i'm trying to write a simple extension to store emails, that users can entry thru the newsletter form in one of the default templates. So i changed the snippet newsletter to something like that: div class=box h3Our Newsletter/h3 form action=/newsletter/ send method=get input class=email value=Enter your email address... type=text id=email name=name / input class=subscribe type=submit value=Subscribe / /form /div my route at my extension.rb is something like: define_routes do |map| map.connect '/newsletter/send', :controller='newsletter',:action='send' end As a test i tried to call my controller/action like that: http://localhost:3000/newsletter/send?email=vpere...@web.de It didnt work, my controller is like that: class NewsletterController ApplicationController no_login_required #skip_before_filter :verify_authenticity_token def send #...@news = Newsletter.find_or_create_by_email(params[:email]) @news = Newsletter.new(params[:email]) @news.save flash[:notice] = Your e- mail was added to our newsletter redirect_back_or_default(/) end end Questions: 1) I cannot use a normal form syntax in my html? 2) I cannot access the params at my controller? Thanks! ___ 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] Re: Possible to disable cache for a single page?
This is an old thread that I have been meaning to follow up. Sean suggested: that one should focus on the _why_ you need an uncached page in the first place, and address that need first Indeed! I created a route: map.with_options(:controller = 'site') do |site| site.connect 'store-directory/:name', :action = 'show_page', :url = '/store-directory/store' end This captures URL's like these: /store-directory/mcdonoughs-your-independent-grocery /store-directory/carlton-cards A better solution would be to create a new model called StorePage, inheriting from Radiant's Page model. You can override the find_by_url method, so that the StorePage would behave as an 'index' page, or a 'show' page. For example: /store-directory Would be an index page, listing all your stores /store-directory/mcdonoughs-your-independent-grocery /store-directory/carlton-cards These would be 'show' pages, for individual stores. You would only need to create a single StorePage in your Radiant sitemap. In the above example, this would have the slug 'store- directory'. Each of the sub-pages, corresponding to individual Store models, would exist as 'virtual pages'. You won't see them in the sitemap of the Radiant admin, but they exist on the public facing site. If you use this approach, you don't need to create any custom routes. The index/show pages would both be rendered using the SiteController#show_page action. This should mean that caching works just as you would expect. So the /store-directory page and /store- directory/carlton-cards pages would be cached without interfering with each other. Here is an example of a model that overrides the page model: http://github.com/nelstrom/radiant-movies-extension/blob/97b149f84f75e887dd37261acdee3ebd6570b26c/app/models/movie_page.rb#L5-17 Note the tags: movies:if_index/ and movies:unless_index/. The content for the index page should go inside the if_index tag, and the content for the 'show' pages should go inside the unless_index block. I hope this helps clear things up. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] rspec 1.2.2 | radiant 0.7.1 anybody?
On 28 May 2009, at 05:20, Mohit Sindhwani wrote: Mohit Sindhwani wrote: Andrew Neil wrote: I've just ran into this problem too, whilst trying to upgrade a site from Radiant 0.6.9 to 0.7.1. I found that I could not run `rake radiant:update`. I kept getting a message like: can't activate rspec (= 1.1.12, runtime), already activated rspec-1.2.6 I found that uninstalling all rspec versions greater than 1.1.12 made the problem go away. Actually, is there any way to solve this problem other than uninstalling all versions other than 1.1.12? I would like to play with the current developments of rspec (since I just bought the rspec book) but my reliance on Radiant is more... I agree that un-installing more recent versions of rspec seems like a drastic measure, but it was the only thing I tried that would work. Prior to that, I tried each of the following without success: * Adding the line: config.gem rspec, :version = 1.1.12 to the environment * Unpacking rspec-1.1.12 into vendor/gems/ It was only necessary to uninstall rspec so that I could run the task `rake radiant:update`. Once this task had run, I found that I could re- install the most recent version of rspec (currently 1.2.6), and it didn't seem to cause any further conflict. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] How do you turn page caching off in 0.7.1?
Hi, I have a line in my config/environments/development.rb file as follows: ResponseCache.defaults[:perform_caching] = false In version 0.6.9 of Radiant, this turned caching off in development mode. I've just upgraded a site to run on 0.7.1, and I now find that page caching is turned on in development mode. How do I turn off page caching in development mode in Radiant 0.7.1? This is my entire config/environments/development.rb file: config.cache_classes = false config.whiny_nils= true config.action_controller.consider_all_requests_local = true config.action_view.debug_rjs = true config.action_controller.perform_caching = false ResponseCache.defaults[:perform_caching] = false config.action_mailer.raise_delivery_errors = false require 'ruby-debug' Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] rspec 1.2.2 | radiant 0.7.1 anybody?
On 28 May 2009, at 15:10, Sean Cribbs wrote: The solution I came up with was to go into the gem and unpack rspec and rspec rails into vendor/plugins. So you actually unpacked rspec and rspec_rails into the vendor/plugins directory of the radiant-0.7.1 gem? The required version of rspec is 1.1.12, but what is the required version of rspec_rails? You could likely do the same in your project (and not the gem). I already tried that, but I think I see now where my mistake was: I tried unpacking the rspec gem into vendor/gems (seeing as it's a gem), when I should have unpacked it to vendor/plugins. I'm sorry this is causing so much pain - it was my fault for not locking the gem version properly. I realise that Radiant edge is now up at version 0.8.0, but I wonder whether it might be worth releasing a version 0.7.2 which could address this issue? Thanks, Drew Mohit Sindhwani wrote: Andrew Neil wrote: On 28 May 2009, at 05:20, Mohit Sindhwani wrote: Mohit Sindhwani wrote: Andrew Neil wrote: I've just ran into this problem too, whilst trying to upgrade a site from Radiant 0.6.9 to 0.7.1. I found that I could not run `rake radiant:update`. I kept getting a message like: can't activate rspec (= 1.1.12, runtime), already activated rspec-1.2.6 I found that uninstalling all rspec versions greater than 1.1.12 made the problem go away. Actually, is there any way to solve this problem other than uninstalling all versions other than 1.1.12? I would like to play with the current developments of rspec (since I just bought the rspec book) but my reliance on Radiant is more... I agree that un-installing more recent versions of rspec seems like a drastic measure, but it was the only thing I tried that would work. Prior to that, I tried each of the following without success: * Adding the line: config.gem rspec, :version = 1.1.12 to the environment * Unpacking rspec-1.1.12 into vendor/gems/ It was only necessary to uninstall rspec so that I could run the task `rake radiant:update`. Once this task had run, I found that I could re-install the most recent version of rspec (currently 1.2.6), and it didn't seem to cause any further conflict. That's interesting - I got the already activated... error when I did script/server -e production -p 3700 Hmm... Cheers, Mohit. 5/28/2009 | 4:57 PM. ___ 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] rspec 1.2.2 | radiant 0.7.1 anybody?
I've just ran into this problem too, whilst trying to upgrade a site from Radiant 0.6.9 to 0.7.1. I found that I could not run `rake radiant:update`. I kept getting a message like: can't activate rspec (= 1.1.12, runtime), already activated rspec-1.2.6 I found that uninstalling all rspec versions greater than 1.1.12 made the problem go away. Once I had uninstalled more recent versions of rspec, I could run `rake radiant:update` fine. After running the rake task, I found that I could reinstall the most recent version of rspec (currently 1.2.6), and it no longer conflicted with Radiant. So it seems like there was just some catch-22 requirement going on within the `rake radiant:update` task. I ran into a couple of other problems in trying to upgrade from 0.6.9 to 0.7.1, so I wrote them up and put a new page on the wiki. Check it out: http://wiki.github.com/radiant/radiant/updating-a-site-from-radiant-069-to-071 I hope this will save others some time when they come to do the same. Cheers, Drew On 22 Apr 2009, at 10:17, Jeffrey Jones wrote: Yes, Radiant 0.7.1 Rspec only works with 1.1.12 and, from my experience, merely having Rspec 1.2.x installed totally FUBARs Rspec 1.1.12. There is a bug on the rspec tracker mentioning this but no movement on it yet. https://rhomobile.lighthouseapp.com/projects/16701/tickets/144-cant-activate-rspec-1112-runtime-already-activated-rspec-120 I have no solution or workaround for this issue. Jeff Enrico Teotti wrote: Hi, I was happily running my test suite (rspec+cucumber) in my radiant extension. I've frozen the rspec gems inside /vendor/gems rspec-1.1.12rspec-rails-1.1.12 I've deployed that project, and started to work on some other rails project and installed rspec 1.2.2 and 1.2.4. Today I had to change something in the radiant project, and rake spec returns: http://pastie.org/454312 Only after removing rspec (and rspec-rails) 1.2.2 1.2.4 my test are running fine again. Any clue why? RubyGem version error: rspec(1.1.11 not = 1.2.4) (Gem::LoadError) doesn't look good to me :-\ Is anybody running the same versions or radiant and rspec? Cheers, Enrico ___ 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
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] Index at top of page ??`
You could try this: * Create each bio page separately as you suggested I agree. This is a good way to go. * Create a special page part called 'anchor' in the bio page You could then write a special tag that creates a link to that anchor using r:children:each and a special tag similar to r:content called r:content_anchor that spits out the anchor in the HTML before doing the r:content for the child page? No need for an extra page part, you can just use the slug. For a page to pass as HTML valid, one of the requirements is that no two elements share the same id. Likewise, Radiant enforces that no two sibling pages have the same slug. Output the content like this: r:children:each div id=r:slug/ r:content/ /div /r:children:each And the index like this: r:children:each a href=#r:slug/r:title//a /r:children:each Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Announcing the Shortcut Extension
On Wed, Feb 18, 2009 at 5:06 PM, Jim Gay j...@saturnflyer.com wrote: Announcing the Shortcut Extension Looks good Jim! http://ext.radiantcms.org/extensions/104-shortcut It provides a way to take a page found at /a-very/long/url-for/this-page and access it at /this-page and it will cache the response. You might find this useful for search engine optimization. Could you clarify? So if I point my browser to /this-page, do I get redirected to a-very/long/url-for/this-page, or do I simple see the exact same content at both of these URLs? I'm generally wary of duplicate content, but Google posted this just the other week: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html So I can see this being useful! Cheers, Drew With it you can also use the tags r:shortcut_url / and r:shortcut_link / which will return URLs for the shortcut (if the page is one) or the actual URL (if the page is not a shortcut) -Jim Jim Gay http://www.saturnflyer.com ___ 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] Using Design Templates (CSS and Images)
On 10 Feb 2009, at 20:51, Tony Davis wrote: I would like to use a design template that consists of a number of image files and a few css files in my radiant project. I am used to regular rails programming and I would add them to the publc/css directory (and similar for images). How do I add them to radiant ? You can put stylesheets in public/stylesheets, and images in public/ images, and they will be available to your Radiant site. If you want to be able to upload new images through the web interface (rather than using ftp, or capistrano deployment), then you would probably want to use an asset management extension. You have a choice: http://github.com/kbingman/paperclipped/tree/master http://github.com/radiant/radiant-page-attachments-extension/tree/master Try them both out, and see which you prefer. If you want to be able to edit your CSS files through the web interface, the simplest way is to create a Page in the sitemap, and use the Stylesheet layout. Take a look at the styled blog template for an example of how this is done. An alternative is to install the styles'n'scripts extension: http://github.com/SwankInnovations/radiant-sns-extension/tree/master I hope that doesn't leave you paralysed by the choices! Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Radiant 0.7.0 gem dependencies
Great to see Radiant 0.7.0 out the door, after all that hard work. Thanks guys! I've installed the radiant-0.7.0 gem, and just tried creating a project with it. It bailed out with the following error: $ radiant seven /Library/Ruby/Site/1.8/rubygems.rb:578:in `report_activate_error': Could not find RubyGem cucumber (= 0.1.13) (Gem::LoadError) I then ran `sudo gem install cucumber`, and everything works fine again. Normally, when you install a gem, it automatically fetches all of the dependant gems. e.g, when I installed cucumber, I got the following: sudo gem install cucumber Password: Successfully installed term-ansicolor-1.0.3 Successfully installed polyglot-0.2.4 Successfully installed treetop-1.2.4 Successfully installed diff-lcs-1.1.2 Successfully installed cucumber-0.1.16 I'm just wondering if there is a reason why cucumber (and its own dependencies) weren't fetched when I installed the new radiant gem? Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Counting Articles
On Wed, Feb 4, 2009 at 5:07 AM, Sean Cribbs seancri...@gmail.com wrote: r:children:count / should use the default find options for page children, which is to exclude virtual pages. Just to be sure, add virtual=false and see if you get a different result. Are you sure? Looking at the code for the r:children:count tag[1], it doesn't appear that its behaviour is modified by passing any attributes. In my fork of Radiant[2], I have modified the r:children tag so that it accepts the same options as r:children:each/first/last. I overlooked the r:children:count tag, so it still has this bug. However, by breaking up the r:children:count tag as follows: r:children virtual=falser:count//r:children using my version of the r:children tag, this should exclude virtual pages, whereas (I think) the current Radiant would include virtual pages. Cheers, Drew [1]: http://github.com/radiant/radiant/blob/a9f7925f1ecec9e797db191b3f903b153400ba2c/app/models/standard_tags.rb#L51-53 [2]: http://github.com/nelstrom/radiant/blob/b096e6f7b054d212725013b41b7c22663e84b843/app/models/standard_tags.rb#L69-75 Sean Steven Southard wrote: It seems like that should work but it doesn't. First, best I can tell, the archive month index doesn't have a url. Second even if I try to exclude another article's url it doesn't change the count. On Feb 3, 2009, at 4:34 PM, john muhl wrote: might try excluding it by url r:find url=/articlesr:unless_url matches=/articles/archive r:children:count / /r:unless_url /r:find On Tue, Feb 3, 2009 at 3:03 PM, Steven Southard ste...@stevensouthard.comwrote: I was using r:find url=/articlesr:children:count //r:find to keep track of the number of articles published. Now I've added an archive month index so my count is off by one. How do I subtract one or exclude the month index? Steven ___ 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
Re: [Radiant] Counting Articles
Steven, Replacing children with Drew's tag 'children' do |tag| tag.locals.filter_attributes = tag.attr tag.locals.options = children_find_options(tag) tag.locals.children = tag.locals.page.children tag.locals.children_filtered = tag.locals.page.children.find(:all, tag.locals.options.clone) tag.expand end Sorry, I should have explained that that was not the only modification to the standard_tags file. The method filter_attributes is a private method, defined near the bottom of the file. (And some of the other children tags have been altered too). I've just updated my branch[1] to fix the bug in the r:children:count tag[2]. Specs are there too, and it seems to work fine. If you want to use this, I suggest you just copy the whole standard_tags.rb from my branch into your copy of Radiant. Cheers, Drew [1]: http://github.com/nelstrom/radiant/commit/037afe6c162a38a547ff49655e73e4a61c0a8fc2 [2]: http://github.com/nelstrom/radiant/blob/037afe6c162a38a547ff49655e73e4a61c0a8fc2/app/models/standard_tags.rb#L80-85 and r:children virtual=falser:count//r:children I end up with undefined local variable or method `tag' for # For my use it would be best if count had the option to exclude virtual pages and only include published pages. I think Drew's method would do that. But there must be more to it then just changing out that code and restarting Mongrel. Steven On Feb 4, 2009, at 3:21 AM, Andrew Neil wrote: On Wed, Feb 4, 2009 at 5:07 AM, Sean Cribbs seancri...@gmail.com wrote: r:children:count / should use the default find options for page children, which is to exclude virtual pages. Just to be sure, add virtual=false and see if you get a different result. Are you sure? Looking at the code for the r:children:count tag[1], it doesn't appear that its behaviour is modified by passing any attributes. In my fork of Radiant[2], I have modified the r:children tag so that it accepts the same options as r:children:each/first/last. I overlooked the r:children:count tag, so it still has this bug. However, by breaking up the r:children:count tag as follows: r:children virtual=falser:count//r:children using my version of the r:children tag, this should exclude virtual pages, whereas (I think) the current Radiant would include virtual pages. Cheers, Drew [1]: http://github.com/radiant/radiant/blob/a9f7925f1ecec9e797db191b3f903b153400ba2c/app/models/standard_tags.rb#L51-53 [2]: http://github.com/nelstrom/radiant/blob/b096e6f7b054d212725013b41b7c22663e84b843/app/models/standard_tags.rb#L69-75 Sean Steven Southard wrote: It seems like that should work but it doesn't. First, best I can tell, the archive month index doesn't have a url. Second even if I try to exclude another article's url it doesn't change the count. On Feb 3, 2009, at 4:34 PM, john muhl wrote: might try excluding it by url r:find url=/articlesr:unless_url matches=/articles/archive r:children:count / /r:unless_url /r:find On Tue, Feb 3, 2009 at 3:03 PM, Steven Southard ste...@stevensouthard.comwrote: I was using r:find url=/articlesr:children:count // r:find to keep track of the number of articles published. Now I've added an archive month index so my count is off by one. How do I subtract one or exclude the month index? Steven ___ 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 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] Rake census:layouts
On 12 Oct 2008, at 16:32, Andrew Neil wrote: I just wrote a rake task for showing stats about how many pages are using each Layout. I'm spring cleaning a site which uses unique layouts for quite a few pages. There are a few old drafts which are no longer in use, so I wanted to know which layouts I could discard. I thought it might be useful for others, so I'll share it here. http://pastie.org/290611 Just paste that code into a file called: /lib/tasks/census.rake then run: rake (production) census:layouts Anyone fancy having a go at doing the same for snippets? (hint: it's non-trivial ;) I had a go at this. It outputs: Snippet Pages Layouts Snippets Total --- - --- - footer 010 0 10 crumbs 010 0 10 right_column 010 0 10 left_column 010 0 10 head 0 9 0 9 google-analytics 0 9 0 9 sitemapper 1 0 1 2 event-listing2 0 0 2 Here is the code: http://pastie.org/375967 To use this, just paste the whole lot into a file RADIANT_ROOT/lib/ tasks/census.rake You get the following commands: rake census:layouts rake census:snippets rake usage:layouts rake usage:snippets These tasks could be especially helpful if you are merging two separate Radiant sites into one, using the multi_site extension. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Customizing Radiant's command line behaviour
I wonder if rails templates could be used for setting up a fresh Radiant site to taste: http://m.onkey.org/2008/12/4/rails-templates That would be very nice. Drew On 31 Jan 2009, at 06:03, Mohit Sindhwani wrote: Adam van den Hoven wrote: Absolutely. I'm talking about tailoring it for MY needs and then documenting how I did it so that others can, if they like, do the same. I don't want to change Radiant, I wan't to change how I use it. Its like taking a suit off the rack and asking a tailor to adjust the fit (only I'm the tailor too). Are you talking about something like this: http://snippets.dzone.com/posts/show/5036 Cheers, Mohit. 1/31/2009 | 2: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 mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Customizing Radiant's command line behaviour
On 31 Jan 2009, at 06:48, Adam van den Hoven wrote: I was talking about editing radiant directly and bending to my will but writing a script to handle it is probably smarter. Sigh I do hate it when lofty ideas are shot down. :) Now if I could only bypass the interactive portions of the bootstrap. Capistrano allows you to provide answers to interactive command line prompts. The following code snippet demonstrates how: yaml = load_yaml(#{current_path}/config/database.yml)['production'] sql = mysql -u #{yaml['username']} -p #{yaml['database']} db/ setup.sql run sql do |ch, stream, out| if out =~ /^Enter password:/ ch.send_data #{yaml['password']}\n puts sql puts #{yaml['password']}\n end end You might be able to do the same in a rake task, but I'm not too sure. Anyway, you can use capistrano to run commands locally, not just on remote machines. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Abstract and Resource controllers
Thanks Jeroen, for taking the time to do this. I'm pleased that you have a working link_roll extension, at the end of it. That was my main concern. If you could update the errors you've pointed out too, that would be a great help. the first thing I've noticed is that the text uses I and my in several places in the first paragraph. I think it is written from the 'radiant author' perspective? Maybe a couple of we instead of I will make it a little 'easier' to read (but opinions may differ). It's hard to keep a consistent tone of voice on a wiki. Please feel free to edit the style of prose however you see fit. What I can see from the generated output is that so far only the 'route' section is out of date (in the generator). I'll make a small patch to the generator template to use the rest routing by default (commented out ofcourse). I think that when the default (commented out) routes are generated, it is not possible to know how the controllers in your extension will be named. All that is known is the name of the extension itself. It could be useful, though, to make the default route resourceful, as a pointer for extension developers. Another point about the generated output, is that the deactivate action could probably be left out, now that it does nothing (I think). Cheers, Drew Jeroen ___ 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] Re: Stuck on Creating Radiant Extensions tutorial
Roman, Sorry, my bad. I updated the tutorial a few months back, replacing the scaffolding (which was deprecated in Rails) with Radiant's own AbstractModelController. I made alterations to the tutorial after modifying my local copy of the LinkRoll controller, but I didn't try running through the tutorial from start to finish. Having now followed through the tutorial, I found that the /admin/ links index page worked ok, but the /admin/links/new /edit and /remove pages threw a template not found exception. To fix this, I did the following: * Rename links_controller to link_controller * Update class Admin::LinksController to Admin::LinkController * rename the directory /app/views/admin/links to /link * finally, in the link_roll_extension.rb file, change the line: map.with_options(:controller = 'admin/links') do |link| to map.with_options(:controller = 'admin/link') do |link| I've updated the tutorial with these corrections. If anyone has the time to follow the steps from start to finish, I would be glad to hear whether or not it works for you. Note that these modifications are only suitable if your extension is running on Radiant 0.6.9 or earlier. If you are running on 0.7 (which has not been released, at time of writing), then the modifications above are useless. The confusion stems from Radiant having defied a Rails convention: using plural names for controllers. (e.g. in 0.6.9, we have a snippet_controller). This has been fixed as part of the RESTful refactoring of Radiant for version 0.7. (in 0.7, we have a snippets_controller). Hopefully that will lead to less confusion in the future. Cheers, Drew On 20 Jan 2009, at 08:43, Roman Marszalek wrote: Hi All, I've also tried this 1) from scratch on another machine. i.e. gem install radiant all the way through to running the extension. 2) on my hosting account with Joyent on Radiant 0.6.8 and same error. Can someone confirm that it works for them at least? Thanks, Roman On Mon, Jan 19, 2009 at 5:20 PM, Roman Marszalek ro...@drlogic.co.uk wrote: Just to make sure I wasn't making any typos, I found the tutorial extension on github http://github.com/radiant/radiant-link-roll-extension/tree/master I donwloaded this and ran everything again and I get exactly the same issue, i.e. Missing template admin/link/edit.html.erb in view path If anyone has any ideas that 'd be wonderful. Thanks, Roman On Mon, Jan 19, 2009 at 3:59 PM, Roman Marszalek ro...@drlogic.co.uk wrote: Hi, I'd like to write my own custom tags. As a start I've been following the following tutorial http://wiki.radiantcms.org/Creating_Radiant_Extensions When I enter the admin interface, go to the Links tab and the click the New link I get the following message Template is missing Missing template admin/link/edit.html.erb in view path /Users/roman/work/custom_tags/vendor/extensions/link_roll/app/ views:/usr/local/lib/ruby/gems/1.8/gems/radiant-0.6.9/app/views I don't know why it's trying to go to admin/link/edit.html.erb rather than admin/links/edit.html.erb I've double-checked everything including the define_routes do |map| bit in the main rb file. Any ideas - I'm doing the tut with radiant 0.6.9 Thanks, -- Roman Marszalek Managing Director mobile: +44 7786 262 002 email: supp...@drlogic.co.uk telephone: 0800 345 7844 (+44 20 7014 3634) Our lines are open from 9am to 6pm Monday to Friday Doctor Logic Limited Mac Support for London http://drlogic.co.uk * Dr Logic Backup * Backup for Britain http://drlogicbackup.co.uk * Dr Logic Training * In partnership with Academy Class http://training.drlogic.co.uk Registered in England and Wales. Company No. 04947299. Registered Office: 2nd Floor 145-157 St John Street, London EC1V 4PY VAT Reg. No. GB848448189 ___ 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] Abstract and Resource controllers
On 27 Jan 2009, at 22:15, Andrew Neil wrote: I am planning on updating the Creating Radiant Extensions tutorial[1] to reflect these changes. I hesitate, because I think the current tutorial should continue to exist, as long as Radiant 0.6.9 and below are still in usage. Would it be acceptable to place a paragraph at the top of the tutorial, linking to a previous revision? e.g.: http://wiki.radiantcms.org/Creating_Radiant_Extensions/38 An alternative would be to create a new page for the tutorial. My preference would be to update the current article for 0.7, then create a new page called Creating Radiant Extensions (pre-0.7), and copy the current state of the tutorial into that one. The existing tutorial has quite a lot of links pointing at it, and I think it would be better to keep the article at that URL the most current. I've gone ahead and 'forked' the wiki pages. The original tutorial now exists here: A: http://wiki.radiantcms.org/Creating_Radiant_Extensions_A_0-6 B: http://wiki.radiantcms.org/Creating_Radiant_Extensions_B_0-6 And the updated for 0.7 version lives on at the original URLs: A: http://wiki.radiantcms.org/Creating_Radiant_Extensions B: http://wiki.radiantcms.org/Creating_Radiant_Extensions_B I would appreciate if anyone can take the time to step through the latest version of the tutorial, using Radiant 0.7 (edge, not rc2), and let me know if everything works as it should. Cheers, Drew p.s. On another note, I was developing this with 0.7.0-rc2 to begin with, but was hindered by a bug which Sean has now fixed[2]. I switched to edge, and was able to continue. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] SnS Extension - 500 Error
From your log: ActiveRecord::StatementInvalid (Mysql::Error: Table 'reliveministry.text_assets' doesn't exist: SHOW FIELDS FROM `text_assets`) it appears that the text_assets table is missing. Perhaps you need to run the migrations for sns? Make sure you do it in both dev and production environments. Drew On 29 Jan 2009, at 05:51, coffeepostal wrote: I've attached the log file. Adam http://www.nabble.com/file/p21721318/production.log production.log Joe Van Dyk-2 wrote: Errm, what does log/production.log say? -- View this message in context: http://www.nabble.com/SnS-Extension---500-Error-tp21486070p21721318.html Sent from the Radiant - User (New) mailing list archive at Nabble.com. ___ 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] Radiant Tags, Etc
On 22 Jan 2009, at 00:53, Susan Chouinard wrote: I'm nearly completely lost when trying to build something using Radiant because I don't understand the tags like r:content /, what they are for and why we have to use them. Can anyone point me to another source of information, because the documentation is so sparse. There is a series of articles about Radius on the wiki. It is incomplete, but quite thorough on the material that it covers: http://wiki.radiantcms.org/Introduction_to_Radius http://wiki.radiantcms.org/Tags_that_insert_content http://wiki.radiantcms.org/Tags_that_change_the_scope http://wiki.radiantcms.org/Conditional_tags This being a wiki, feel free to correct any errors if you find them. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Building a yearly archive index whose pages are the children of children
Your current sitemap implies that the 'Reports' and 'Dissertations' pages are publications themselves. They probably have paths such as: /publications/2009/01/20/reports With sub-pages like this: /publications/2009/01/20/reports/report-1 I think that you intend for the 'Reports' and 'Dissertations' pages to behave instead as index pages. The following structure might better fit your needs: Publications Reports (Archive) %Y Archive (Archive Year Index) Report 1 Report 2 ... Dissertations (Archive) %Y Archive (Archive Year Index) Diss 1 Diss 2 ... Then your paths will be more like this: /publications/reports/2009/01/20/report-1 Hope that helps. Cheers, Drew On Tue, Jan 20, 2009 at 3:44 PM, Jose Hales-Garcia j...@stat.ucla.eduwrote: I have an archive of 'Publications'. Its structure looks likes this... Publications (Archive) %Y Archive (Archive Year Index) Reports Report 1 Report 2 ... Dissertations Diss 1 Diss 2 ... The yearly archive index I want to build is for the child pages under 'Reports' and 'Dissertations'. At the moment I'm muddling around trying to build this index page, but I'm looking for the simplest way to do it. Does anyone have suggestions? Jose ... Jose Hales-Garcia UCLA Department of Statistics j...@stat.ucla.edu ___ 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] file system extension and reorder
On 16 Jan 2009, at 14:47, Keith Bingman wrote: Has anyone gotten the reoder extension to work with the file_system extension? It seems to be dumping the position column of the pages, but on reimport they are no longer there. A quick look (very quick...) didn't reveal anything to me. It works OK for me. I've just set up a test, using the latest versions of reorder and file_system. I ran `rake file_system:to_files`, which created the sitemap on my filesystem, then ran `rake file_system:to_db` and everything made its way back into the database. The position column was intact. I also tried editing the position values as captured in yaml files on the file system. Loading the files back into the db, the position values were updated to those I had edited in the files. Perhaps you are not running the latest version of the file_system extension? Try updating it. If the problem persists, let us know. Cheers, Drew p.s. Just for the record: the latest reorder extension has been upgraded to work with Radiant 0.7. To make it work with Radiant 0.6.9, I had to change the file reorder_extension.rb as follows: def activate ... Admin::PagesController.send :include, Reorder::PagesControllerExtensions Admin::PagesController.send :helper, Reorder::PageHelper ... end to def activate ... Admin::PageController.send :include, Reorder::PagesControllerExtensions Admin::PageController.send :helper, Reorder::PageHelper ... end ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Editing Styles in Radiant CMS
On 9 Jan 2009, at 03:26, Mark Muskardin wrote: Hello, I'm a newb to Radiant CMS :) I'd like to edit the HTML structure of my Radiant CMS entries. Inside of the Articles parent page, I've added a div around r:content. But after I click save, this new markup does not display in source. I'm not sure why that would be. Are you editing the same layout that your pages are using? Can you use a text editor to directly edit the files instead of using the browser interface? This would be a boon to productivity. Where are these files located in the file-system? Radiant stores all of your 'files' in the database, so you won't find them on your file-system. However, if you install the file_system extension[1] it adds features for dumping all pages, snippets and layouts on your file-system. You can edit these with your usual text editor, then run a rake task which copies everything from the file system back into your database. Cheers, Drew [1]: http://github.com/nelstrom/radiant-file-system-extension/tree ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Conditions in r:children
On Tue, Jan 6, 2009 at 9:21 AM, Simon Josi j...@puzzle.ch wrote: Any chance this gets merged into core? Should I pack it into an extension? Or maybe integrate it into an existing extension with similar aim like blog_tags or sibling_tags? I would suggest to merge it into core because it's only a small addition to an already existing tag (r:children). I would also love to see this merged into core. I sent a pull request after implementing it, but nothing has come of it. I think the core team have bigger things on their mind, so I haven't bothered nagging them about it. I'm glad someone else is now though! If my patch doesn't pass the quality controls for inclusion in core, let me know why not, and I'll try and improve it. Cheers, Drew greetings, /simon On Sat, 25 Oct 2008 21:23:43 +0100 Andrew Neil andrew.jr.n...@googlemail.com wrote: Today is the Radiant sprint day. I made a proposal for an enhancement to the standard Radius tags: http://pastie.org/300372 I've implemented this now in my own fork of Radiant. Check it out here: http://github.com/nelstrom/radiant/tree/master I'd be interested to hear of any thoughts on this. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant -- Simon Josi Linux System-Ingenieur Puzzle ITC GmbH www.puzzle.ch Telefon +41 31 370 22 00 Direkt +41 31 370 22 43 Mobile +41 79 732 98 35 Fax +41 31 370 22 01 Puzzle ist Mitglied der Eclipse Foundation: http://www.puzzle.ch/eclipse/ ___ 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] About Radiant Podcast podcast tags and site structure
Luigi, I've written an audio player extension[1] for radiant, which you might find useful. It allows you to upload mp3 files, without requiring any other asset management extensions (e.g. page_attachments or paperclipped). It also provides radius tags for embedding a flash mp3 player. There is a good reference on the wiki about creating an RSS feed from Radiant content: http://wiki.radiantcms.org/Simple_RSS_Feeds It would be quite straightforward to adapt this to use the appropriate xml tags for a podcast.xml. Instead of iterating through children of a page, you would iterate through a collection of mp3s. Cheers, Drew [1]: http://github.com/nelstrom/radiant-audio_player-extension/tree/master#readme On 5 Jan 2009, at 20:50, Luigi Rizzo wrote: Hello Sean. Searching the mailing list I understand that the Radiant Podcast has been generated by radius tags and served by radiant itself. Wouldn't you mind to share some details about the tags used, the page/sub-page architecture, etc.? For example how has been generated the podcast.xml page? I'd like to setup a podcast web site based on radiant ... Many thanks in advance. Luigi ___ 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] Copy_move extension and 0.6.9
On 29 Dec 2008, at 01:15, Nate Turnage wrote: Can anybody tell me how I can git clone and older version of the copy_move extension for use with Radiant 0.6.9? I am not up with all the ins and outs of git enough to figure out how to use previous revisions. I would suggest checking out an older revision of the extension into a new git branch. That way you can keep the up-to-date version (for 0.7) in its own branch, so that if you upgrade your site to 0.7 in the future, it is still there for you. Here are the steps (note that 'co' is short for 'checkout', and 'br' for 'branch'. I have these set as aliases[1]): # from the home directory of your radiant site: $ git clone git://github.com/pilu/radiant-copy-move.git vendor/ extensions/copy_move $ cd vendor/extensions/copy_move $ git log This gives you a list of all commits, with their commit messages and 'sha' values. Find the commit that you want to revert back to (i.e. the commit prior to the one that breaks in 0.6.7). e.g.: commit b7d93af32fc8fbaa97611d0697ab33f606d2eef1 Author: Andrea Franz and...@gravityblast.com Date: Tue Dec 16 18:37:56 2008 +0100 the new radiant searches for regions under app/views/admin/pages instead of the old app/views/admin/page commit 79ee39addf4adabcf28fe77a8cb9cbf2338feda8 Merge: a904fd3... 9f3dd2a... Author: Andrea Franz and...@gravityblast.com Date: Tue Dec 16 18:33:43 2008 +0100 Merge branch 'master' of git://github.com/avonderluft/radiant- copy-move into avonderluft/master If commit 'b7d93a' introduces changes that break in 0.6.7, you want to use the commit before it: '79ee39'. So check it out: $ git co 79ee39 Note: moving to 79ee39 which isn't a local branch If you want to create a new branch from this checkout, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 79ee39a... Merge branch 'master' of git://github.com/ avonderluft/radiant-copy-move into avonderluft/master Now when you list the branches, you should see: $ git br * (no branch) master When you checked out the old revision, you were prompted with instructions on how to turn it into a branch of its own. Something like: $ git co -b pre-0.7 Now, when you list branches: $ git br master * pre-0.7 You can switch between your branches using `git co branch-name`. e.g. $ git co master $ git br * master pre-0.7 $ git co pre-0.7 $ git br master * pre-0.7 I hope that helps. Cheers, Drew [1]: http://git.or.cz/gitwiki/Aliases ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Phantom code when Radiant is deployed
Sounds like it could be caused by a filter. Are you using Markdown or Textile for any of the snippets or page parts? Be aware that whitespace is significant to both (?) of these filters. e.g. in Markdown[1], if you end a line with 2 or more spaces, it is interpreted as a line-break (i.e. br). Drew [1]: http://www.wishingline.com/downloads/documentation/markdown_cheatsheet.pdf On 29 Dec 2008, at 16:01, Jon Hope wrote: I've just prepared a whole site using the Radiant CMS and I'm happy with how it looks etc but when I deploy it to my server there are little bits of code appearing that shouldn't be there! For example there are br / tags appearing in a list of images that are left floated, so they stagger downwards instead of being displayed in a line... And on one page the styled comments look great and on another the 'clearing' tags have been left out so they're mushed up into each other... yet both pages use the same snippet to render the comments and it CONTAINS the clearing tags!!! I tried emptying the cache but it's done nothing. The only thing I can think of is that these are throwbacks to earlier code, like when the images were text links with br / tags after them, that have somehow got resurrected when I deployed... I just can't figure it out though, anyone got ANY suggestions?! Thanks, Jon -- 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 ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Multi site wiki entry
Hi, I've just written up a piece for the wiki on the multi-site extension. Here it is: http://wiki.radiantcms.org/Multi-site_Extension The Summer reboot[1] suggested the title Multi-site Extension (why and how). I've gone into some depth on the 'how', but only dashed out a paragraph on the 'why'. If anyone would like to contribute thoughts on this, please feel free. I've also covered how to access multiple sites through a single app in development mode. I've gone into detail on how to make it work with Mongrel. I'm not so familiar with Passenger, but I've left a placeholder in the article. If anyone would like to flesh it out, it would be appreciated. Cheers, Drew [1]: http://wiki.radiantcms.org/Summer_Reboot ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Re: Automating navigation?
On Mon, Nov 17, 2008 at 4:53 PM, Little Known [EMAIL PROTECTED] wrote: Little Known wrote: Mohit Sindhwani wrote: Little Known wrote: Is there a way to automate the nav such that it shows a list of every page, or must you make a snippet and manually code all of the links? Like a site map? http://wiki.radiantcms.org/How_to_Make_a_Site_Map Cheers, Mohit. 11/17/2008 | 11:17 PM. Wow I can't believe I missed that on the wiki. This works great although I am having one problem with it. The links that come out of sitemapper are formatted like http://localhost/link/ with a trailing / If its /link/ my stylesheet isn't showing up for some reason, but /link with no trailing slash works fine? Also is it possible to order the generated links? A weight attribute perhaps? If you install the Reorder extension[1] then you can specify the order in which pages appear. If you took this approach, you would also have to change: r:children:each by=title order=asc to r:children:each by=position order=asc In the sitemap example[2]. [1]: http://github.com/radiant/radiant-reorder-extension/tree/master [2]: http://wiki.radiantcms.org/How_to_Make_a_Site_Map -- 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 ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Importing Exporting
Adam ...the super_export (which is the only one of the two that will work for this) will put its files there too. The import_export extension can provide a custom path to a yaml file, so could also be used for this. e.g.: rake db:export TEMPLATE=db/path/to/export.yml rake db:import TEMPLATE=db/path/to/export.yml Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Importing Exporting
Chris, The import_export extension[1] captures every model in the database within one big yaml file. By default this is saved as db/export.yml. Pros: * very portable Cons: * if you want to edit the records captured in the yaml, they can be quite difficult to find The super_export extension[2] captures every model in the database in its own file. The file format is like this: /db/export/:model_name/:id.yml Pros: * it is easier to locate individual records, should you want to edit them Cons: * less portable export format than a single yaml file There is no harm in installing both extensions, playing around with them and deciding which you prefer. They can both co-exist happily. Of course, things could get confusing if you keep a stale db copy in one format... If your assets are stored on the filesystem, then neither of these extensions will be able to assist in backing them up. I don't know how they would fare if you were storing your assets in the db... I hope that helps. Cheers, Drew [1]: http://github.com/radiant/radiant-import-export-extension/tree/master [2]: http://github.com/Aissac/radiant-super-export-extension/tree/master On 13 Nov 2008, at 22:00, Chris Parrish wrote: One of the problems with Radiant being so extensible is that it attracts a lot of software geek-types. ;-) It's no issue for me to do a db dump/restore but I couldn't give that job to my assistant. Plus I'm not sure that that's a friendly format for, say, version controlling a site's content. Anyway, sorry for not being more clear. My goals here are: * It's simple (read: non-technical users love it) * It's db-independent so if my local development environment is Sqlite3 but my server is MySQL or PostgreSQL (or I want to change databases/servers some day) it's no sweat to move content around. * It's collects all of the content (this means styles and scripts ala SnS, and whatever fun extensions I choose to add in the future). * My site's content can be fully restored via import. * Ideally it's in a human readable format so if it's kept in an scm, diff tools can identify changes. * Bonus points for packaging all the files up nicely (like a zip or tarball for download). * Bonus points for managing asset files such as images images (though I'm not holding my breath here). And I'd really *love* it if someone could tell me the difference between import_export and super_export (which I think does import too). -Chris Mohit Sindhwani wrote: Chris Parrish wrote: I'm looking for a good way to backup/restore all of my content for a Radiant App. I'm want something that collects all the data (including extension models). I'm aware of Import-Export and Super Import-Export but I can't seem to find anything that clearly spells out the differences. Is anyone familiar with both solutions (or any other ones you'd recommend)? I could use some tips. Would a database dump not help? So far, I'm using SQLite, so I just move the database between my PC and the demo site. But, I would have thought that a database dump would manage 'almost' everything. The only thing that gets left behind, unfortunately, is the stuff in public... and I don't know how Page Attachments / Gallery would work across database dumps and restores. I need to think about this not too far in the future... in a way, it's good that you're ahead! Cheers, Mohit. 11/14/2008 | 2:58 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] SnS Requests Anyone?
I'm getting ready to roll out a new SnS version this weekend with some bug fixes and a column name change (requested and implemented by Andrew Neil to help it work with his file_system extension). As Chris says, I have been working on integrating file_system functionality into SnS. The column name change was simply to avoid a naming conflict between the two extensions, but it shouldn't cause any perceptible change in the behaviour of SnS. My file_system/SnS integration is not ready for release yet, but I shall announce it here when it is. Since I'm doing that, are there any other issues/feature requests out there? Now would be a good time to entertain those. I was going to suggest asset packaging... but then I had another look at the README and saw that it was already there! Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Wrap will_paginate helper in a radius tag for public view
On 7 Nov 2008, at 16:14, Roberto Basso wrote: Hi, I would wrap the follow helper %= will_paginate @posts % in a radius tag like this r:books:paginate / on my extension. How can render will_paginate helper in my public view ? There is a paginate extension for Radiant: http://github.com/Aissac/radiant-paginate-extension/tree/master Which makes the will_paginate functionality available through radius tags. I think this should solve your problem. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] file_system extension (and other import/export tools)
1. There are a couple of other extensions that appear similar (Sean's Import/Export and and Istvan Hoka's Super Import Export come to mind). How is yours different? The file_system extension does not attempt to back up the entire database representation of your Radiant website, whereas the other two that you mentioned do. The main goal of the file_system extension is to make pages, snippets and layouts easily editable as files on your file system. This allows you to use your usual text editor, rather than having to do everything through the Radiant admin. It is most useful when you are designing (or redesigning/refactoring) a site. 2. If I use the file_system extension with other extensions (like, say, SnS) is it aware of these new models? Will it export them too? No, not out of the box. However, the file_system extension has been designed so that other extensions can ride along with the import/export process. For example, Sean Cribbs template_extension[1] adds his custom Template and PartType models, so that these are also saved to the file system. Naturally, this code belongs in the templates extension, rather than in the file_system extension, because you only want to back up Templates and PartTypes if you have that extension installed. I would be happy to work with you, Chris, in making SnS play along with the file_system extension. If you are looking to backup your website to the filesystem, I would say that the (super)import_export solutions are a better fit. These should capture all tables in your database as yaml files. (There is one possible exception, which I will detail below.)* I hope that this helps to clear up any confusion. Cheers, Drew * The import_export extension can back up all database tables whose name translates using the normal Rails conventions. e.g. pages (table) with Page (model), page_parts (table) with PagePart (model). In the Radiant core, there is just one model which breaks this convention: the config table corresponds to a Radiant::Config model. This is given special treatement in the import_export extension, to make sure that it is captured in the yaml file. If any other extensions include models whose name cannot be discerned from the corresponding table name, then they will not be backed up to the yaml file. [1]: http://github.com/seancribbs/radiant-templates-extension/tree/master ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] file_system extension (was Wacky version control idea for content)
Jim's experience has revealed a fairly serious bug in the current implementation of the extension though: if you run file_system:load, it will delete all models which have not been saved to the FS. So if you ran file_system:save:layouts, you would have no pages or snippets on the FS, and they would all be deleted from the DB if you later ran file_system:load. (They would be safe, however, if you ran file_system:load:layouts). This is not by design! It is an oversight on my part, and I intend to fix it. Just reviving this thread to say that I have fixed this issue now. With that sorted, I've added the file_system to the Radiant extensions registry: http://ext.radiantcms.org/extensions/67-file-system Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Using textile inside of snippets
Joe, Interesting... I think that could be a bug in the implementation of the r:snippet and r:yield tags. I'm not sure how this should be addressed. A snippet could be called from a page part, layout, or from another snippet, each of which could be using a different filter. I suppose that the most natural thing would be to use the same filter for the content inside the snippet tags as is being used in the context from which the snippet is called. The idea for yielding snippets started life in my Wrappits extension[1], and was rolled into the Radiant core in version 0.6.8. You could try installing the wrappits extension. The behaviour of r:snippet and r:yield defined in the extension should override the behaviour defined in Radiant core. So you could experiment with modifying those tags, without having to meddle with the code of Radiant. I'll add this to my list, and try to address it when I get a chance. In the meantime, I suggest that you resort to plain HTML for the content between r:snippet/r:snippet tags, e.g.: r:snippet name=subsection title=More about PSRC ol lifirst/li lisecond/li /ol /r:snippet Cheers, Drew [1]: http://github.com/nelstrom/radiant-wrappits-extension/tree On 30 Oct 2008, at 22:09, Joe Van Dyk wrote: Given the following snippet (using the textile filter): div class='section' div class='section-content' r:yield / /div /div When I try to use the snippet like so (inside a page part that uses textile): r:snippet name=subsection title=More about PSRC # first # second /r:snippet The list doesn't get formatted as textile -- I see # first # second on the page instead of the expected html numbered list. Any ideas? Joe ___ 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] Conditions in r:children
On Mon, Oct 27, 2008 at 9:44 AM, Simon Josi [EMAIL PROTECTED] wrote: Absolutel great! That's what I was looking for since quite some time. Glad to hear I wasn't the only one! Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [SOLVED] Re: [Radiant] Paperclipped + flash video files.
I'm very interested to hear of your experience with MIME types and browsers. I've just written an audio_player extension[1], which uses paperclip to deal with attaching audio files. The flash player that I'm using can only play mp3s, so I want to limit the MIME type to that format. I've set up some validation in the model, as follows: http://github.com/nelstrom/radiant-audio_player-extension/tree/master/app/models/audio.rb#L12-14 I was quite puzzled when I tested the attachment of an mp3 file to an Audio model. Using the exact same mp3 file, I tried creating the model through the Radiant admin (in the browser), and I tried doing it through script/console (at the command line). I was able to attach the MP3 file by both methods, but found that the MIME type was saved as audio/mpeg when I uploaded through the browser, and as application/x- mp3 when created at the console. So it does look as though the browser is... opinionated, when it comes to mime types. Luckily, paperclip seems to be happy with both of these formats, but I did have to broaden the conditions for my model validation to let both of these through. Cheers, Drew [1]: http://github.com/nelstrom/radiant-audio_player-extension/tree On 21 Oct 2008, at 22:05, justin blecher wrote: jeff, it's been my experience that the browser cannot be trusted for sending the correct mime type upon upload. firefox (all platforms) has been a particularly bad offender, and i know that IE does some funny stuff, too. (i can't believe it's 2008 and this basic functionality is still broken! on second thought, i can. mime types and file extensions have always been like the wild-west.) in our recent projects that involve uploading files, we've used mimetype-fu http://github.com/mattetti/mimetype-fu/ for determining the correct/canonical (as far as mimetype-fu is concerned) mime type to avoid two situations: 1) new/unexpected file types that users upload and 2) consistent mapping of common file types (application/msword vs. application/vnd.ms-word vs. ???) maybe paperclip should be patched to use mimetype-fu. it's pretty inadequate for anything other than basic file types at the moment: # Infer the MIME-type of the file from the extension. def content_type type = (self.path.match(/\.(\w+)$/)[1] rescue octet- stream).downcase case type when %rjpe?g then image/jpeg when %rtiff? then image/tiff when %rpng, gif, bmp then image/#{type} when txt then text/plain when %rhtml? then text/html when csv, xml, css, js then text/#{type} else application/x-#{type} end end probably not the answer you're looking for, but hth, -justin On Tue, Oct 21, 2008 at 1:32 PM, Jeffrey Jones [EMAIL PROTECTED] wrote: Finally figured out what it was. My version of Firefox (Firefox on Kubuntu linux) didn't know the video/x-flv mime-type so when it uploaded the file it was setting the content type as application/octet-stream. It appears paperclipped uses the browser mime-type to determine if the file is allowed to be uploaded or not (I assumed it checked the file). Adding the mime-type to Firefox solved the issue. On Kubuntu create a ~/.mime.types file with video/x-flvflv (The master mime-type file is /etc/mime.types) I do not know if this affects windows Firefox or how you would add the mime-type in windows. Cheers Jeff Jeffrey Jones wrote: Hoi all. Has anyone managed to upload flash video files using the paperclipped extension? I added video/x-flv to the allowed mime types but the FLVs are still getting rejected as not allowed. ___ 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] Audio extension
Hi folks, I'm thinking of writing a Radiant extension to add a flash audio player to your site. My plan is to use the Audio Player Wordpress plugin: http://www.1pixelout.net/code/audio-player-wordpress-plugin/ in a similar fashion to the plugin for Textpattern: http://www.textpatternmania.com/2006/04/29/plugin-jnmaudio Before I get started, I just want to check if anyone else has already done this? Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Rake census:layouts
I just wrote a rake task for showing stats about how many pages are using each Layout. I'm spring cleaning a site which uses unique layouts for quite a few pages. There are a few old drafts which are no longer in use, so I wanted to know which layouts I could discard. I thought it might be useful for others, so I'll share it here. http://pastie.org/290611 Just paste that code into a file called: /lib/tasks/census.rake then run: rake (production) census:layouts Anyone fancy having a go at doing the same for snippets? (hint: it's non-trivial ;) Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] file_system extension (was Wacky version control idea for content)
Sorry I couldn't respond to this sooner. It has been a busy time for me lately. I've been meaning to write to the list about file_system for a while now. I wrote to Drew and praised him for it and he let me know that it was Sean's invention. Cheers to both of you, nice work. I played around with it in development to discover that if I created a single file for a snippet and then had it load to the DB, it would delete all others. I didn't read the documentation closely, so it was a simple mistake, but I expected it to be non-destructive unless I told it to be. I'm curious about what others think of this. I would expect that when I tell it to load my files to the database, it would just load them, not destroy everything and then load them. I'd prefer that that be a rake argument. I've pasted excerpts from my discussion with Jim at the bottom of this email. It goes into some detail as to why the database is destroyed when you run file_system:load (now file_system:to_db, see below...). In brief: if you run file_system:save, you get a copy of every layout, snippet and page on your file system. If you delete one of these files, then run file_system:load, the corresponding record in the database will also be deleted. You can also create new snippet, layout or page_part files, and these too will be created in the database when you run file_system:load. Essentially, my aim was to make all CRUD functionality available through the file_system. When I took the extension from Sean's hands, it didn't delete database records when you deleted their corresponding files. I found this to be quite a frustrating limitation. If I wanted to delete a file (most commonly a page part), I would have to do so through the Radiant admin. If I had made alterations to the file_system (FS) copy of the site, it was imperative that I loaded them back in to the database (DB) before I deleted the unnecessary page_part. Otherwise I would have changes made to the DB and FS versions, both of which I wanted to keep. This is a situation which can be avoided now that you can just delete a file, and know that it won't be resurrected on the DB next time you run file_system:load. Jim's experience has revealed a fairly serious bug in the current implementation of the extension though: if you run file_system:load, it will delete all models which have not been saved to the FS. So if you ran file_system:save:layouts, you would have no pages or snippets on the FS, and they would all be deleted from the DB if you later ran file_system:load. (They would be safe, however, if you ran file_system:load:layouts). This is not by design! It is an oversight on my part, and I intend to fix it. Also, as I worked with it, I found it made more sense to be file_system:to_db and file_system:to_files because 'load' and 'save' just doesn't seem clear enough to me and I kept forgetting which was which. I've just pulled in brianjlandau's changes, which were in turn forked from Jim Gay's branch. So the changes suggested above have now been incorporated: file_system:save is now file_system:to_files; file_system:load is now file_system:to_db. And while I'm thinking of it, I would also just make it radiant:to_files and radiant:to_db, but that matters less to me. I see what you mean. In fact, the current file_system:to_files doesn't quite make sense. OK, it is in the name space of the file_system extension, but it reads as file-system-to-files which sounds like nonsense. Since you mentioned it, I've been thinking a neater convention for task names would be: rake db:to_files(reads: database-to-files) rake fs:to_db (reads: file-system-to-database) I don't think it is critical to keep the file_system tasks within that namespace, because the extension just adds functionality to Radiant. It doesn't add any new tables to the db, or introduce new page types. Any thoughts? = The following is an excerpt from an earlier discussion between myself and Jim Gay: I forked your radiant-file-system-extension. That is great. You should add it to ext.radiantcms.org. I tested it out by saving my layouts (only) and then running file_system:load My assumption was that it would only load that which existed in the file system, but instead it wiped out my pages. Ouch. Sorry about that. As you can see, the extension is not entirely predictable. I do intend to add it to ext.radiantcms.org, but not until it is more thoroughly tested. Having run: file_system:save:layouts you should have used: file_system:load:layouts to load from the FS back in to the DB. I have always run file_system:save and file_system:load, i.e. captured all layouts, pages and snippets at once, so I have not encountered the bug which you have just exposed. It won’t be obvious why
Re: [Radiant] Email/subscriber validation issues with subscriber_lists extension
On 9 Oct 2008, at 18:24, Nate Turnage wrote: Hey guys, I am using the subscriber lists extension (thanks nelstrom, I love the CSV export) for creating a contact us type of form. I'm not sure if I understand you correctly, but Contact us is not the use case I had in mind when I made the subscriber lists extension. It is more appropriate for a Sign up to our mailing list type of scenario. (Such as demonstrated here: http://westportbookfestival.org/) If you want a Contact us form, I think the Mailer extension could be a better fit. http://github.com/radiant/radiant-mailer-extension/tree/master I'll answer the rest of your mail assuming that a Sign up to our mailing list scenario is what you actually want... The subscriber_list extension does not handle sending mail from the server, so there is no verification step. (e.g. sending an email to the submitted address, with an activation link.) If you need that functionality, try out Andrea's newsletter extension: http://github.com/pilu/radiant-newsletter/tree/master The subscriber list extension is basically a plagiarized newsletter extension, with the mailing functionality removed. I couldn't get the newsletter extension to send mail through a gmail account. Although I would be willing to try again since I discovered this: http://github.com/caritos/action_mailer_tls/tree/master The problem is that when somebody signs up with an email address that is already in the db, the information gets overwritten with the newly submitted data. If an email is submitted to the form, it is added to the list immediately. Without verifying that the email address submitted belongs to the person who submitted it, Without a verification step, the case of one email being submitted more than once is difficult. You could either: * Add all details to the db each time they are submitted, regardless of whether they have been submitted before or not (potentially leading to duplicates) * Check if an email has been added already, and ignore any form submissions if the email address supplied is already in the db * Check if an email is already in the db, and if it is, use the details supplied in the form to update the details of the entry already existing I settled for the last of these, although none of them are really satisfactory, because you don't know (without a verification step) whether the person submitting the form is the true owner of the email address. Verification is clearly the best-practice, but as an extra step in the procedure, it can be seen as a deterent. And so clients often prefer to have a simple one-step signup, despite the problems it can cause. I am not exactly sure how to add a check against the db to find out if an email address is already there, It already does this (line 9 in your pastie): @subscriber = Subscriber.find_by_email_and_subscriber_list_id(parameters[:email], self.id) Here is the relevant section of code, annotated with comments: http://pastie.org/289009 That should help you out, if you want to modify the behaviour. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Wacky version control idea for content
On 5 Oct 2008, at 00:30, Jay Levitt wrote: Just a thought I had in the shower: Most attempts at CMS version control end up reinventing large parts of subversion/git/etc. inside the database. Instead... Why not use something like FuseFS to implement a filesystem that maps the Radiant asset tree to paths like /dev/radiant/pages/ home_page? Then use the version control system of your choice. That's not wacky, it's a great idea! The file_system extension was designed for this purpose. Check it out here: http://github.com/nelstrom/radiant-file-system-extension/tree/master It was originally designed by Sean Cribbs, but I am responsible for maintaining it now. If you choose to try it out, I would recommend taking a backup of your database first, as the behaviour is not entirely predictable. In particular, I would recommend save/load all models at all times. e.g. rake file_system:save rake file_system:load DON'T do this: rake file_system:save:layouts rake file_system:load Which would wipe pages and snippets from your database, preserving only layouts. This is a bug that I plan on fixing asap. At the moment, the extension doesn't play very well with subversion, so be aware of this if you choose to add the design directory to a svn repository. The reason has to do with subversion placing a hidden .svn directory inside every directory that is under version control. Any scm system that doesn't do this (such as git) should play fine with the file_system extension. I plan on addressing this issue, but haven't decided on the best strategy yet. Cheers, Drew [1]: http://ext.radiantcms.org/extensions/ ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Wacky version control idea for content
On 5 Oct 2008, at 12:32, Jay Levitt wrote: The file_system extension was designed for this purpose. Check it out here: http://github.com/nelstrom/radiant-file-system-extension/tree/master Ah hah! I saw that yesterday, but (so far, at least) it looks like it's targeted at explicit save/loads. Are you thinking of taking it in the live filesystem direction? I don't plan on taking it in that direction, but if it is a useful starting point, then you could always fork the file_system extension. Sorry I mistook the meaning of your original email. I was not familiar with FuseFS, or what it aims to achieve. It looks interesting. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Wacky version control idea for content
On 5 Oct 2008, at 14:59, Sean Cribbs wrote: At the moment, the extension doesn't play very well with subversion, so be aware of this if you choose to add the design directory to a svn repository. The reason has to do with subversion placing a hidden .svn directory inside every directory that is under version control. Any scm system that doesn't do this (such as git) should play fine with the file_system extension. I plan on addressing this issue, but haven't decided on the best strategy yet. Drew, Andrew vonderLuft and I are using this with SVN and haven't run into that problem. Is this a problem only with pages? Yes, pages only. I also have a site which uses the file_system extension with svn, and most of the time it works just fine. But there is one particular use-case which can cause problems. It is a little difficult to describe, but I shall try and do so briefly here. Assuming we start with a Radiant site which is stored in the database, but not yet on the filesystem, and the project is under svn control. First, we run: rake file_system:save which saves all layouts, snippets and pages to the file system, within a /design directory. Now suppose we run: svn add design svn commit -m Captured site on file_system Now the contents of the /design directory is under version control. A side effect of this, is that every subdirectory beneath design contains a hidden .svn directory. Suppose you make further changes to the site through the Radiant admin, then, to keep things in sync, you run `rake file_system:save` again. [Here is where it gets messy:] If your changes included the deletion of a page, then the file_system:save action should delete the directory on your file system corresponding to the page that was deleted. In doing so, it will delete the hidden .svn directory which subversion was using to track the contents of that directory. Subversion complains when a directory goes missing which it thinks should be there. When I found myself in this position, I was unable to commit my latest revision. I think I got around the problem in the end, by doing `svn up` to restore the directory that had been deleted by running `rake file_system:save`, and then I deleted that directory by hand, using the `svn rm /design/pages/page-to-be-deleted` command. (I am no expert with svn, so perhaps I'm doing it wrong?) To make the file_system:save action play well with subversion, I am thinking it would probably be necessary to use `svn rm` within the rake task, rather than calling ruby's `FileUtils.rm()` method, but only if the directory contains a .svn/ directory. I've been scratching my head over this for a while, and would really appreciate any thoughts on the matter. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] New wiki article: removing scaffolding from the Link Roll
On 3 Oct 2008, at 00:17, John W. Long wrote: On Oct 2, 2008, at 6:52 PM, Andrew Neil wrote: I've written a new article for the wiki, which follows on from the original Creating Radiant Extensions[1] tutorial. It demonstrates how to remove the scaffolding from your extension, and style it so that it looks more like it belongs in Radiant. Find it here: http://wiki.radiantcms.org/Radiant_extensions_without_a_scaffold I would be very pleased if anyone could follow it though, and let me know if everything makes sense. It is a wiki, so do please fix any typos or factual errors. I was originally planning to merge this directly into the Creating Radiant Extensions article. When I first read that article, it recommended using scaffold :link in the LinksController, but since Radiant moved onto Rails 2 this method hasn't worked. There is a section now in the article called Hacking a Scaffolded Controller and Views, which I hadn't seen before. I considered deleting that section, and replacing it with the article above, but I wondered if it made the article just too long. Great stuff here Andrew. Why don't you merge this with the original tutorial (delete the Hacking section), but make your article a Part 2 on a separate page. That way it will complete the original tutorial. Thanks John. I've split the original article in two, as you suggested: http://wiki.radiantcms.org/Creating_Radiant_Extensions http://wiki.radiantcms.org/Creating_Radiant_Extensions_B I put the controller, view and route stuff into the first part of the article, pushed the Creating custom tags stuff into the second part, and finished off with the CSS and images to make the admin area look more like part of Radiant. I've removed Bill's section on hacking a scaffold. I still need to update the screenshots, but I'll get round to that later. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] New wiki article: removing scaffolding from the Link Roll
I've written a new article for the wiki, which follows on from the original Creating Radiant Extensions[1] tutorial. It demonstrates how to remove the scaffolding from your extension, and style it so that it looks more like it belongs in Radiant. Find it here: http://wiki.radiantcms.org/Radiant_extensions_without_a_scaffold I would be very pleased if anyone could follow it though, and let me know if everything makes sense. It is a wiki, so do please fix any typos or factual errors. I was originally planning to merge this directly into the Creating Radiant Extensions article. When I first read that article, it recommended using scaffold :link in the LinksController, but since Radiant moved onto Rails 2 this method hasn't worked. There is a section now in the article called Hacking a Scaffolded Controller and Views, which I hadn't seen before. I considered deleting that section, and replacing it with the article above, but I wondered if it made the article just too long. Any thoughts? Drew [1]: http://wiki.radiantcms.org/Creating_Radiant_Extensions ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] How does one keep track of GitHub?
On Tue, Sep 30, 2008 at 8:05 AM, Pacifists [EMAIL PROTECTED] wrote: Hello, It's really nice idea, I've subscribed to it and I can see a bunch of not radiant related posts in there (all 2 days old). Maybe this was before filtering rules were applied ? Yeah, I got that as well, and I guess that would be why. It seems to have straightened out since though. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Summer Reboot
On Fri, Sep 19, 2008 at 10:59 AM, Casper Fabricius [EMAIL PROTECTED]wrote: Well, I'm not. Feel free to write it, just make sure it doesn't overlap too much with other Creating an extension articles. Perhaps you could restructure things a bit, I'm not sure the current division and order is optimal. Me too. I think it would be better to give descriptive titles, rather than Creating and extension 1/2/3.etc. E.g. Creating an extension 1 has the url: http://wiki.radiantcms.org/Creating_an_extension_I Baking the number into the URL makes it non-trivial to reorder them. I think that to change the URL, you have to create a new document, and then you loose the editing history from the old document. Anyway, that sort of rearrangement can probably wait until the Summer Reboot documentation is nearer completion. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] new extension: Sibling Tags
Announcing a new extension for Radiant: Sibling tags. This provides tags allowing you to refer to the neighbouring siblings of a page. An example usage: r:siblings r:previousPrevious article: r:link//r:previous r:nextNext article: r:link//r:next /r:siblings I've added it to the extension registry[1], so it can be installed (with Radiant 0.6.9+) by executing: script/extension install sibling_tags You can also get it from github here: http://github.com/nelstrom/radiant-sibling-tags-extension/tree/master Let me know how you get on with it. Cheers, Drew [1]: http://ext.radiantcms.org/extensions/29-sibling-tags ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] File-based Snippets/Layouts with Support for Radiant Tags?
The file_system extension exists for this purpose. Check it out: http://github.com/nelstrom/radiant-file-system-extension/tree/master I should warn you that it is still under development, so if you do use it, take care! I would appreciate feedback on any problems you encounter. Drew On 25 Aug 2008, at 05:20, Arik Jones wrote: Will we ever see the light of day for this feature. I personally despise editing code/indent-heavy layouts/snippets in Radiant. What are the limitations that prevent this feature from being implemented? -- 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 ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Re: File-based Snippets/Layouts with Support for Radiant Tags?
On 25 Aug 2008, at 14:13, Arik Jones wrote: Andrew Neil wrote: The file_system extension exists for this purpose. Check it out: http://github.com/nelstrom/radiant-file-system-extension/tree/master I should warn you that it is still under development, so if you do use it, take care! I would appreciate feedback on any problems you encounter. Drew Does this jive with the Styles N' Scripts extension? If so, I think you've solved a really large problem for me. Not yet. That was the first question to be asked when I announced this extension: http://www.ruby-forum.com/topic/152887#709163 so I can probably say it tops the list of desired features. Sean answered the Q in the same thread. Sean designed the extension for the Redken site, which included a couple of additional models. I have basically taken Sean's extension and stripped out all of the Redken specific functionality. If you look at the extension as it was when I first checked it in to github: http://github.com/nelstrom/radiant-file-system-extension/commit/cf20284c13f3a43d00408086e628c2c13337380c you can get an idea for what Sean means when he says you can just create an appropriately named module. In particular, I draw your attention to the files: /lib/file_system/model/part_type_extensions.rb /lib/file_system/model/template_extensions.rb These files describe the save and load functionality for PartType and Template models. I have discarded them, because the corresponding models were custom built for Redken. On the other hand, I have maintained the page_extensions.rb file, because the Page model is part of Radiant core. I think it would be quite straightforward to add the functionality in a similar fashion for 'text-assets' such as stylesheets and javascript files. If I understand Sean's design correctly, I think his intention was that extension authors could make their custom models play with the FileSystem extension by adding modules such as (using SnS as an example): /lib/file_system/model/stylesheet_extensions.rb /lib/file_system/model/javascript_extensions.rb These modules would be added to the SnS extension itself, rather than in the FileSystem extension. If you had SnS installed without FileSystem extension these modules would do nothing, but if you had both extensions installed, then FS would pick up the extra functionality provided by those modules in the SnS extension. (It might be necessary to specify the load order of file_system extension before the others) I'm offering these pointers to help anyone get started on this who wants it. I have my plate full just now (and a vacation as of next week) so I won't be able to have a go at this myself for at least a month. Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Summer reboot article
Hey folks, This is far from finished, but I hope that by shouting about it, I can provide some impetus for others to get their docs rolling: http://wiki.radiantcms.org/Using_the_built-in_tags Pitched at beginner level. Regards, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] 500 Error on page update.
On 9 Aug 2008, at 19:04, Alan Peabody wrote: I seem to be getting a 500 error no matter how I deploy my radiant site. That is an internal server error. You might get an idea of what is going on if you can look at the log files on your server. I had a similar problem recently, and when I read the error log it became clear that I was missing a gem on the server. One of my extensions required a gem, which was installed on my local machine, but not on the server. Only when I ran an action within that extension did this become an issue (and I saw a 500 error). When I installed the gem on the server, everything was fixed. Perhaps you have a similar issue. Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] new concurrent_draft extension
This looks excellent. I'm eager to try it out. But pray tell, what did Haydn have to do with it? On 8 Aug 2008, at 18:22, Sean Cribbs wrote: Just to do a little shameless promotion, we're very happy with the results of this extension -- it cleanly and simply deals with the 'working copy' issue without adding a ton of ugly extra records or tables. It was also fun for me to design and code the UI. Check it out when you have a chance! Sean On Thu, Aug 7, 2008 at 3:22 PM, Andrew vonderLuft [EMAIL PROTECTED] wrote: Thanks to Sean Cribbs for helping Andrew vonderLuft realize his idea for an extension which enables default draft versions of pages, snippets and layouts, which can be scheduled for promotion to Production. As of now (rel. 0.6.9), it does require edge Radiant. Also be advised that scheduled times are dependent on the ActiveRecord time setting. You can find it on github here: http://github.com/avonderluft/radiant-concurrent_draft-extension/tree/master Please feel free to fork and submit patches. It has been posted in the Radiant Extension registry ( http://ext.radiantcms.org/extensions/19-concurrent-draft ) and so if you have git you can install this extension with a simple: $ script/extension install concurrent_draft ___ 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] New Site: West Port Book Festival
Announcing a new site built on Radiant: http://westportbookfestival.org/ Designed by Will Brady, built by myself. I was determined to keep it simple, so kept the number of extensions to a minimum: * Reorder[1] * Sass[2] * Subscriber lists[3] * Wrappits[4] * Markdown I considered creating a new model to introduce Event and Venue models, but I decided that it was unnecessary. All the information I needed to store about a venue could easily fit within the page-with-parts paradigm. I just needed to add the reorder extension so I could order on the events chronologically. I wrote the Subscriber lists extension for this project. I would have liked to use the Newsletter extension, but I wasn't sure how to configure the server to send mail from our GMail. Shameless plug: If you are planning to be in Edinburgh this August, be sure to check out the West Port Book Festival. Events are all free! Cheers, Drew [1]: http://github.com/radiant/radiant-reorder-extension/tree/master [2]: http://github.com/radiant/radiant-sass-filter-extension/tree [3]: http://github.com/nelstrom/radiant-subscriber-lists-extension/tree [4]: http://github.com/nelstrom/radiant-wrappits-extension/tree ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] New Site: West Port Book Festival
having just heard about wrappits from this post, I am moved to wonder why this isn't part of core radiant behaviour I thought so too, and submitted a patch[1] for it a while ago. I don't think I managed to convince the gatekeepers to let it in, so I finally got round to releasing it as an extension. Drew [1]: http://dev.radiantcms.org/ticket/611 On Tue, Jul 22, 2008 at 1:27 AM, Andrew Neil [EMAIL PROTECTED] wrote: Announcing a new site built on Radiant: http://westportbookfestival.org/ Designed by Will Brady, built by myself. I was determined to keep it simple, so kept the number of extensions to a minimum: * Reorder[1] * Sass[2] * Subscriber lists[3] * Wrappits[4] * Markdown I considered creating a new model to introduce Event and Venue models, but I decided that it was unnecessary. All the information I needed to store about a venue could easily fit within the page-with-parts paradigm. I just needed to add the reorder extension so I could order on the events chronologically. I wrote the Subscriber lists extension for this project. I would have liked to use the Newsletter extension, but I wasn't sure how to configure the server to send mail from our GMail. Shameless plug: If you are planning to be in Edinburgh this August, be sure to check out the West Port Book Festival. Events are all free! Cheers, Drew [1]: http://github.com/radiant/radiant-reorder-extension/tree/master [2]: http://github.com/radiant/radiant-sass-filter-extension/tree [3]: http://github.com/nelstrom/radiant-subscriber-lists-extension/tree [4]: http://github.com/nelstrom/radiant-wrappits-extension/tree ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant -- Aleks Clark 941-961-9713 http://built-it.net ___ 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] New Site: West Port Book Festival
Nice site! Well done. Thanks. Couldn't you use the published date to order the events instead of reorder? Although, I personally haven't tried much with dates in the future. I was under the impression that if a page has a publishing date set in the future, it would only become visible on the site from that date onwards. Now that you mention it, I'm not sure if this is true in Radiant, although it is the case with another CMS that I have used. I did wonder about adding a field, called occurs_on, and using it in the way you described above, but in the end I thought it simpler to just use the Reorder extension. I think people would find Wrappits useful. To get it in the core, you should fork Radiant and integrate it into your branch so that it is even easier than applying a patch. This would allow a core member to create a branch, pull your changes, and run your tests to see if it does what it is supposed to do. I'm fairly certain that it would not be added until you write your specs for it. Radiant is well tested and any new features should be well tested too. But I'd certainly vote for it to be part of the core. Thanks for the advice (and the vote!). My original patch included tests, but now that Radiant has moved on to specs I guess it has gone stale. I will try forking Radiant, and translating my tests into specs. Does anyone know a rough schedule for the next release? Cheers, Drew On Jul 22, 2008, at 5:11 AM, Andrew Neil wrote: having just heard about wrappits from this post, I am moved to wonder why this isn't part of core radiant behaviour I thought so too, and submitted a patch[1] for it a while ago. I don't think I managed to convince the gatekeepers to let it in, so I finally got round to releasing it as an extension. Drew [1]: http://dev.radiantcms.org/ticket/611 On Tue, Jul 22, 2008 at 1:27 AM, Andrew Neil [EMAIL PROTECTED] wrote: Announcing a new site built on Radiant: http://westportbookfestival.org/ Designed by Will Brady, built by myself. I was determined to keep it simple, so kept the number of extensions to a minimum: * Reorder[1] * Sass[2] * Subscriber lists[3] * Wrappits[4] * Markdown I considered creating a new model to introduce Event and Venue models, but I decided that it was unnecessary. All the information I needed to store about a venue could easily fit within the page-with-parts paradigm. I just needed to add the reorder extension so I could order on the events chronologically. I wrote the Subscriber lists extension for this project. I would have liked to use the Newsletter extension, but I wasn't sure how to configure the server to send mail from our GMail. Shameless plug: If you are planning to be in Edinburgh this August, be sure to check out the West Port Book Festival. Events are all free! Cheers, Drew Jim Gay http://www.saturnflyer.com ___ 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] Which extension to use?
On Mon, Jun 16, 2008 at 12:58 PM, Andrea Franz [EMAIL PROTECTED] wrote: Thank you for contributing to the extension. Did you fork it from github? I'd like to fetch you changes. Send me a pull request! I actually generated the Subscriber Lists extension from scratch, and plagiarized the bits from the Newsletter extension that I needed, piecemeal. I did make a couple of customisations which could enhance the Newsletter extension, so I'll have a go at forking it and send you a pull request. I'm taking this git revolution one step at a time... Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Which extension to use?
Nate, Did you make any headway on this? Try running this in script/console: s = Page.find_by_class_name(SubscriberListPage) = #SubscriberListPage id: 11, title: Newsletter, slug: newsletter, breadcrumb: Newsletter, class_name: SubscriberListPage, status_id: 100, parent_id: 1, layout_id: nil, created_at: 2008-06-15 14:38:39, updated_at: 2008-06-15 14:38:39, published_at: 2008-06-15 15:38:39, created_by_id: nil, updated_by_id: nil, virtual: false, lock_version: 0, description: nil, keywords: nil Subscriber.count_active_subscribers(s) = 0 I'm afraid I can't reproduce the error, and I am also using Radiant 0.6.7, Rails 2.0.2. What database are you using? I've only tested on MySQL. Looking at the definition of the method count_active_subscribers, I'm wondering if it is MySQL specific: def count_active_subscribers(subscriber_list) count(:conditions = [unsubscribed_at IS ? AND subscriber_list_id = ?, nil, subscriber_list.id]) end I'm not certain whether this would work with, say SqlLite. Even so, the error message says undefined method, which is surprising since the method is defined in the Subscriber model. Drew vendor/extensions/subscriber_lists/app/views/subscribers/ index.html.erb where line #15 raised: undefined method `count_active_subscribers' for #Class: 0x7fcb342a30d0 Extracted source (around line #15): 12: % @lists.each do |list| % 13: tr 14: tda href=%= url_for :action = 'list', :id = list.id %span class=title%= list.title %/span/a/td 15: td%= Subscriber.count_active_subscribers(list) %/td 16: td%= link_to Edit page, page_edit_path(:id = list.id) %/td 17: td%= link_to Export, :action = export, :id = list.id %/td 18: /tr ### I have huffed and I have puffed, but I cannot figure out how why it isn't working. Do you have any thoughts? Radiant 0.6.7, Rails 2.0.2 ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Which extension to use?
Sean, Rails 2.0.x allows you to use hashes in conditions, even for nil attributes, so you could refactor that like so: count(:conditions = {:unsubscribed_at = nil, :subscriber_list_id = subscriber_list.id }) Is there a way to say NOT NULL?, e.g. :condition = [unsubscribed_at IS NOT ? AND subscriber_list_id = ?, nil, subscriber_list.id] I tried this: :conditions = {:unsubscribed_at = !nil, :subscriber_list_id = subscriber_list.id } I also tried replacing !nil with true and 0, but without success. Thanks, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Which extension to use?
Nate, Glad you like it. You are my frickin' hero! :-) Andrea is the hero. I just took a hatchet to his code! can I add additional columns in extension migrations or will it somehow break the extension? Give it a go. I don't think it should break anything. If you want the extra fields to be added to the CSV export, then you should modify the export action in the SubscribersController as follows: def export @list = Page.find(params[:id]) subscribers = Subscriber.find_active_subscribers_by_subscriber_list(@list) stream_csv do |csv| csv [email,name,your additional column name] subscribers.each do |subscriber| csv [subscriber.email,subscriber.name,subscriber.additional_column] end end end Cheers, Drew ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] any way to dynamically populate r:random?
On 6 Jun 2008, at 01:01, john muhl wrote: I'd like to insert part of a random subpage into the sidebar and figured it'd be a good fit for the r:random tag but so far am having very little luck. I've tried: r:random r:children:each r:optionr:title//r:option /r:children:each /r:random I had a go at this too, but couldn't get it to work either. I had a look at the code and the specs (both pasted below), but couldn't figure out why this wouldn't work. It seems to me like this is a perfect example of where the r:random tag would be useful, but the spec doesn't currently test such a scenario. I thought of an alternative approach which might be easier to implement. Here is an example: r:find url=/quotations r:children:each limit=1 order=rand r:content part=body/ /r:children:each /r:find This doesn't work at the moment, because the order attribute can only be asc or desc. I think it would be pretty easy to add the option for random order though. Cheers, Drew --- app//models/standard_tags.rb desc %{ Randomly renders one of the options specified by the @option@ tags. *Usage:* precoder:random r:option.../r:option r:option.../r:option ... r:random /code/pre } tag 'random' do |tag| tag.locals.random = [] tag.expand options = tag.locals.random option = options[rand(options.size)] option.call if option end tag 'random:option' do |tag| items = tag.locals.random items tag.block end --- spec/models/standard_tags_spec.rb it 'r:random should render a randomly selected contained r:option' do page.should render(r:random r:option1/r:option r:option2/r:option r:option3/r:option /r:random).matching(/ ^(1|2|3)$/) end ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant