You can also view the tutorial. Or you can check out the demo.
We are continuously adding to and changing the Simple CMS Plugin so here is a little rundown of what has been changed so far:
Major Changes:
- I have updated to rails 2.0.2 so if you are using an older version you will need to change a line in each of the controllers.
1
2
3
4
5
6
|
# Where it has:
self.view_paths << File.join(File.dirname(__FILE__), '..', 'views')
# Must be Changed to:
self.template_root = File.join(File.dirname(__FILE__), '..', 'views')
|
- The acts_as_versioned plugin is now required for the revisions. I added this quite some time ago. I did change the rake task to install this plugin as well as the rest.
- You now have to pass a :prefix if you have one. This is to ensure that all content such as images, media, smiles, etc. work correctly. If your base path is a standard path then you do not need to worry about this.
For example: I was running 3 rails applications under one domain so it looked like this:
| my.domain.com |
/blog |
| |
/forum |
| |
/demo |
So I would call my Simple CMS content like this for blog:
1
2
3
|
<%= render :simpleCMS => "MyBlog", :admin => true, :prefix => "/blog" %>
|
- Now you can make content viewable and editable from multiple pages by passing :reusable => true. This defaults to false. Your label must be the same in each place you use it. This is very useful for layouts, such as header and footer.
*NOTE* If you already have content here and you change this variable you will lose all that content as it gives the content a new id and changes the params and how the content is called. For example if I have :reusable set to false and I have content there and I set :reusable to true then it creates content with a different id so I will not be able to use the old content until I change it back to false.
Minor Changes:
- When you click on a revision you are taken back up to the top of the page instead of having to scroll all the way down a list of 100 revisions, clicking on one, and then manually scrolling all the way back up to the top to see if you even picked the right revision
- I have added code highlighting and this requires the coderay plugin, which has been added to the rake simple_cms:install_dependencies, and a coderay stylesheet so you need to add that to your application layout. I have included it in the rake simple_cms:install
1
2
3
|
<%= stylesheet_link_tag "coderay" %>
|
- I have also changed many things in the javascripts inside the tiny_mce editor so it would be safest just to use the rake tasks that are built in:
1
2
3
4
|
rake simple_cms:uninstall
rake simple_cms:install
|
I have updated the tutorial with all the changes as well.
There is also a demo that you can use to play around with it and ask questions.
March 3rd, 2008 at 06:32 AM I tried to comment in http://www.pullmonkey.com/2008/2/5/open-flash-chart-plugin-for-ruby-on-rails-1-9-7-release, but the browser wouldn't render the page.
I was wondering if there is a way to obtain the chart id (from obj_id += "_#{$open_flash_chart_seqno}").
I finally decided changing this line:
return out.join("\n")
to:
return out.join("\n"), obj_id
in def _ofc(width, height, url, use_swfobject, base="/")
March 3rd, 2008 at 11:39 AM @fh, thanks. I did not realize that I had the wrong link. http://www.pullmonkey.com/2008/2/4/open-flash-chart-plugin-for-ruby-on-rails-1-9-7-release
Ok, I will look into this solution and let you know (in the other post, now that it works:) )
August 7th, 2008 at 09:45 PM Good job. That would have flied over most people's heads.