Re: [Radiant] (no subject)
For the first scenario you would could be a bit sneaky by hiding the filter select via JS (or perhaps overriding the _page_part.html.haml partial in your extension), and automatically setting it via JS or hardcoding it via a before_save hook on PagePart. For the second scenario (data cleanup), using a before_save hook on PagePart is the simplest way to get rid of dirty MS Word markup, as well as dealing with some of FCK's quirky markup. If you add a before_save hook, you can modify the content on its way back in the database to remove all troublesome markup, Office tags, etc. You might also find using Hpricot or Nokogiri useful for fixing/standardizing the markup. -Alex On Tue, Nov 24, 2009 at 12:17 AM, Cliff cgali...@gmail.com wrote: Is there a setting or an existing extension that locks down which filters are available to users? In one scenario, I've installed the FckEditor extension is installed and FckEditor is customized to meet the team's needs. I'd like to make this the required filter for standard users when creating new pages. This would allow some lockdown on what can and cannot be pubished, which would also help in my second scenario below. In another scenario, I have one of our blog authors who has some old habits I just can't break. Most notably they still like to use MS Word to write up their text. Since MS Word generates *horrendous* HTML, I'd like to prevent HTML from being used. I'd use r:escape_html for this and nest the content, but because of the order that nested tags are done, this causes proper HTML generated by the textile or markdown filters to get escaped as well. I'd like to find a way to all users to continue using textile or even raw HTML, but prresent some form of whitelist for what can be used. No embedded styles, for example, and only certain tags. Thoughts? -Cliff ___ 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] (no subject)
Is there a setting or an existing extension that locks down which filters are available to users? In one scenario, I've installed the FckEditor extension is installed and FckEditor is customized to meet the team's needs. I'd like to make this the required filter for standard users when creating new pages. This would allow some lockdown on what can and cannot be pubished, which would also help in my second scenario below. In another scenario, I have one of our blog authors who has some old habits I just can't break. Most notably they still like to use MS Word to write up their text. Since MS Word generates *horrendous* HTML, I'd like to prevent HTML from being used. I'd use r:escape_html for this and nest the content, but because of the order that nested tags are done, this causes proper HTML generated by the textile or markdown filters to get escaped as well. I'd like to find a way to all users to continue using textile or even raw HTML, but prresent some form of whitelist for what can be used. No embedded styles, for example, and only certain tags. Thoughts? -Cliff ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] (no subject)
You could send the escape html tag to the textarea object, or wrap it before updating and inserting into the model. I do remember a setting for determining what filters are available- perhaps in settings (9) or in the environment variable? Do a search on the directory for textile and you'll probably find it. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] (no subject)
Hello. I have a dumb one. Here it is. I'm trying to install Radinat on Heroku by following this: http://blog.heroku.com/archives/2009/3/26/radiant_cms_in_5_minutes_or_less/ and of course this http://wiki.github.com/radiant/radiant/installing-on-heroku I've also installed the file_system extension. So after I did everything in those post the installation seemed to work perfect but that wasn't the case. I did this locally : rake file_system:to_files made some changes here and there did this afterwards : rake file_system: to_db. Sent everything to Heroku but even if in the admin part on Radiant the changes were made on the website nothing changed. It changed only after I added something in admin part and then hit save. And after this all the changes could be seen on the frontend of the website. After seeing this I thought there must be something with the cache so I go here http://wiki.github.com/radiant/radiant/installing-on-heroku were there is this Also if you want the page cache to be cleared on page save (or ever really) youll also need to hack on RADIANT_ROOT/lib/radiant/cache.rb search for the lines: def initialize(root=#{Rails.root}/cache/entity) def initialize(root=#{Rails.root}/cache/meta) and change them to: def initialize(root=#{Rails.root}/tmp/cache/entity) def initialize(root=#{Rails.root}/tmp/cache/meta) Can this solve my dumb problem? And If yes? Where is RADIANT_ROOT/lib/radiant/cache.rb ? I figure that RADIANT_ROOT is the installation dir? And If that is true where is the lib dir? Please help. I appologize for the dumb question but i'm stuck here. Thank you Radu ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] (no subject)
What version of Radiant are you using? The latest gem (0.8.1) moved the cache to the temp folder. I just tried it out on a site of Heroku and it works great. The cache is immediately cleared on page save. Keith On Oct 23, 2009, at 1:48 PM, Radu Curteanu wrote: Hello. I have a dumb one. Here it is. I'm trying to install Radinat on Heroku by following this: http://blog.heroku.com/archives/2009/3/26/radiant_cms_in_5_minutes_or_less/ and of course this http://wiki.github.com/radiant/radiant/installing-on-heroku I've also installed the file_system extension. So after I did everything in those post the installation seemed to work perfect but that wasn't the case. I did this locally : rake file_system:to_files made some changes here and there did this afterwards : rake file_system: to_db. Sent everything to Heroku but even if in the admin part on Radiant the changes were made on the website nothing changed. It changed only after I added something in admin part and then hit save. And after this all the changes could be seen on the frontend of the website. After seeing this I thought there must be something with the cache so I go here http://wiki.github.com/radiant/radiant/installing-on-heroku were there is this Also if you want the page cache to be cleared on page save (or ever really) you’ll also need to hack on RADIANT_ROOT/lib/radiant/cache.rb search for the lines: def initialize(root=#{Rails.root}/cache/entity) def initialize(root=#{Rails.root}/cache/meta) and change them to: def initialize(root=#{Rails.root}/tmp/cache/entity) def initialize(root=#{Rails.root}/tmp/cache/meta) Can this solve my dumb problem? And If yes? Where is RADIANT_ROOT/lib/radiant/cache.rb ? I figure that RADIANT_ROOT is the installation dir? And If that is true where is the lib dir? Please help. I appologize for the dumb question but i'm stuck here. Thank you Radu ___ 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] (no subject)
Radu, You're questions are not dumb. This is why this list exists. I'm not certain I understand your problem, but let me restate it and you can tell me if I'm wrong. You're using the file_system extension to edit content locally in a text editor. Then you load that content back into your local database. Then you do heroku db:push and expect to see the changes on the site. Is this correct? If that's the scenario, there's nothing in the push to the database on heroku that would clear the cache. So your cache would only be cleared when you save something in the admin interface on the running application. Do I understand your problem correctly? Keith is correct in that the latest version of Radiant no longer needs that change to the cache location. The file_system extension also provides a task to clear the cache. So you'd need to do heroku rake cache:clear. That, however, needs to be updated for the new location for the cache so it won't currently work. To fix it you'd need to change the cache:clear rake task in vendor/extensions/file_system/lib/tasks/file_system_extension_tasks.rake to `rm -Rf tmp/cache/*` -Jim On Fri, Oct 23, 2009 at 10:25 AM, Keith Bingman ke...@keithbingman.com wrote: What version of Radiant are you using? The latest gem (0.8.1) moved the cache to the temp folder. I just tried it out on a site of Heroku and it works great. The cache is immediately cleared on page save. Keith On Oct 23, 2009, at 1:48 PM, Radu Curteanu wrote: Hello. I have a dumb one. Here it is. I'm trying to install Radinat on Heroku by following this: http://blog.heroku.com/archives/2009/3/26/radiant_cms_in_5_minutes_or_less/ and of course this http://wiki.github.com/radiant/radiant/installing-on-heroku I've also installed the file_system extension. So after I did everything in those post the installation seemed to work perfect but that wasn't the case. I did this locally : rake file_system:to_files made some changes here and there did this afterwards : rake file_system: to_db. Sent everything to Heroku but even if in the admin part on Radiant the changes were made on the website nothing changed. It changed only after I added something in admin part and then hit save. And after this all the changes could be seen on the frontend of the website. After seeing this I thought there must be something with the cache so I go here http://wiki.github.com/radiant/radiant/installing-on-heroku were there is this Also if you want the page cache to be cleared on page save (or ever really) you’ll also need to hack on RADIANT_ROOT/lib/radiant/cache.rb search for the lines: def initialize(root=#{Rails.root}/cache/entity) def initialize(root=#{Rails.root}/cache/meta) and change them to: def initialize(root=#{Rails.root}/tmp/cache/entity) def initialize(root=#{Rails.root}/tmp/cache/meta) Can this solve my dumb problem? And If yes? Where is RADIANT_ROOT/lib/radiant/cache.rb ? I figure that RADIANT_ROOT is the installation dir? And If that is true where is the lib dir? Please help. I appologize for the dumb question but i'm stuck here. Thank you Radu -- 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
Re: [Radiant] (no subject)
Thank you Jim and Keith. That helped me a lot. Radu Radu, You're questions are not dumb. This is why this list exists. I'm not certain I understand your problem, but let me restate it and you can tell me if I'm wrong. You're using the file_system extension to edit content locally in a text editor. Then you load that content back into your local database. Then you do heroku db:push and expect to see the changes on the site. Is this correct? If that's the scenario, there's nothing in the push to the database on heroku that would clear the cache. So your cache would only be cleared when you save something in the admin interface on the running application. Do I understand your problem correctly? Keith is correct in that the latest version of Radiant no longer needs that change to the cache location. The file_system extension also provides a task to clear the cache. So you'd need to do heroku rake cache:clear. That, however, needs to be updated for the new location for the cache so it won't currently work. To fix it you'd need to change the cache:clear rake task in vendor/extensions/file_system/lib/tasks/file_system_extension_tasks.rake to `rm -Rf tmp/cache/*` -Jim On Fri, Oct 23, 2009 at 10:25 AM, Keith Bingman ke...@keithbingman.com wrote: What version of Radiant are you using? The latest gem (0.8.1) moved the cache to the temp folder. I just tried it out on a site of Heroku and it works great. The cache is immediately cleared on page save. Keith On Oct 23, 2009, at 1:48 PM, Radu Curteanu wrote: Hello. I have a dumb one. Here it is. I'm trying to install Radinat on Heroku by following this: http://blog.heroku.com/archives/2009/3/26/radiant_cms_in_5_minutes_or_less/ and of course this http://wiki.github.com/radiant/radiant/installing-on-heroku I've also installed the file_system extension. So after I did everything in those post the installation seemed to work perfect but that wasn't the case. I did this locally : rake file_system:to_files made some changes here and there did this afterwards : rake file_system: to_db. Sent everything to Heroku but even if in the admin part on Radiant the changes were made on the website nothing changed. It changed only after I added something in admin part and then hit save. And after this all the changes could be seen on the frontend of the website. After seeing this I thought there must be something with the cache so I go here http://wiki.github.com/radiant/radiant/installing-on-heroku were there is this Also if you want the page cache to be cleared on page save (or ever really) youll also need to hack on RADIANT_ROOT/lib/radiant/cache.rb search for the lines: def initialize(root=#{Rails.root}/cache/entity) def initialize(root=#{Rails.root}/cache/meta) and change them to: def initialize(root=#{Rails.root}/tmp/cache/entity) def initialize(root=#{Rails.root}/tmp/cache/meta) Can this solve my dumb problem? And If yes? Where is RADIANT_ROOT/lib/radiant/cache.rb ? I figure that RADIANT_ROOT is the installation dir? And If that is true where is the lib dir? Please help. I appologize for the dumb question but i'm stuck here. Thank you Radu -- 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
[Radiant] (no subject)
Hi, I'm setting up Radiant 0.8.0 for the first time on a new server, using the mailer extension on Rails 2.3.2. I'm getting: Mailer config is not valid (see Mailer.valid_config?) when I try to load a page with the tags: r:mailer:form r:mailer:hidden name=subject value=Email from my Radiant site! / br/ Name:br/ r:mailer:text name=name / br/ Message:br/ r:mailer:textarea name=message / br/ input type=submit value=Send / /r:mailer:form Any suggestions for how to troubleshoot? No errors in production.log or system mail logs. Thanks! allan ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant