Re: [Radiant] if_url matches
Hi Edmund, You´re right, it´s a Gallery Page. When you visit /blog I want to display images from the children of the gallery named Fotoblog. E.g. 3 images from each children and a link to child gallery. -> blog/summer When you visit blog/summer, then I would like to display the images that gallery contains. :) How can I define which gallery to act as base when you visit /blog and still be able to use access it´s children by /blog/children? If I define fotoblog as the base gallery for the /blog page, then /blog renders what I want it to, but I´m no longer able to access it´s children through /blog/child. The layout follows: " width="990" height="660" alt="Foto - Christian Bielke"> " width="990" height="660" alt="Foto - Christian Bielke"> Cheers, Martin 2010/9/13 Haselwanter Edmund > Hi, > > This depends on the page type. The Problem is that the match is done > against the url the > page "sees". This is where the page paradigm fails. As I read you have a > Gallery Page here? > I kknow for sure that this does not work on "galleries". You could use some > gallery specific tags. > > btw. > > a super-duper ruby regexp checker is at http://rubular.com/ > > On 13.09.2010, at 09:56, Martin Stabenfeldt wrote: > > Thanks for the tips, but it does not work I´m afraid. > > > #1 Should only match /blog # MATCHES /blog AND /blog/dssp > > > > #2 Should only match /blog/dssp # NEVER MATCHES /blog/dssp NOR /blog > > > > > 2010/9/13 Steven Southard > >> >> On Sep 13, 2010, at 12:15 AM, Martin Stabenfeldt wrote: >> >> Hi, >> >> I´m having some difficulties to get the if_url to work with Radiant 0.9.1. >> >> The ROOT match works, but as soon as I try to match deeper it fails. >> When I visit the url site.com/blog/dssp I would expect either the CHILD >> GALLERY match or the DSSP match to work, but non of them does. >> The template only contains one if_url. >> >> >> ROOT GALLERY # Matches site.com/blog AND site.com/blog/dssp >> >> >> >> CHILD GALLERY # Does not match site.com/blog nor site.com/blog/dssp >> >> >> >> DSSP # Does not match site.com/blog nor site.com/blog/dssp >> >> >> >> What am I missing out? >> >> >> -- >> Martin Stabenfeldt >> Tlf: +47 93441707 >> >> >> >> Try ^/blog/. >> > > > > -- > Martin Stabenfeldt > Tlf: +47 93441707 > > > -- > DI Edmund Haselwanter, edm...@haselwanter.com, > http://edmund.haselwanter.com/ > http://www.iteh.at | http://facebook.com/iTeh.solutions | > http://at.linkedin.com/in/haselwanteredmund > > > > > > -- Martin Stabenfeldt Tlf: +47 93441707
Re: [Radiant] if_url matches
Thanks for the tips, but it does not work I´m afraid. #1 Should only match /blog # MATCHES /blog AND /blog/dssp #2 Should only match /blog/dssp # NEVER MATCHES /blog/dssp NOR /blog 2010/9/13 Steven Southard > > On Sep 13, 2010, at 12:15 AM, Martin Stabenfeldt wrote: > > Hi, > > I´m having some difficulties to get the if_url to work with Radiant 0.9.1. > > The ROOT match works, but as soon as I try to match deeper it fails. > When I visit the url site.com/blog/dssp I would expect either the CHILD > GALLERY match or the DSSP match to work, but non of them does. > The template only contains one if_url. > > > ROOT GALLERY # Matches site.com/blog AND site.com/blog/dssp > > > > CHILD GALLERY # Does not match site.com/blog nor site.com/blog/dssp > > > > DSSP # Does not match site.com/blog nor site.com/blog/dssp > > > > What am I missing out? > > > -- > Martin Stabenfeldt > Tlf: +47 93441707 > > > > Try ^/blog/. > -- Martin Stabenfeldt Tlf: +47 93441707
[Radiant] if_url matches
Hi, I´m having some difficulties to get the if_url to work with Radiant 0.9.1. The ROOT match works, but as soon as I try to match deeper it fails. When I visit the url site.com/blog/dssp I would expect either the CHILD GALLERY match or the DSSP match to work, but non of them does. The template only contains one if_url. ROOT GALLERY # Matches site.com/blog AND site.com/blog/dssp CHILD GALLERY # Does not match site.com/blog nor site.com/blog/dssp DSSP # Does not match site.com/blog nor site.com/blog/dssp What am I missing out? -- Martin Stabenfeldt Tlf: +47 93441707
[Radiant] Howto create custom helpers
Hi, I´m planning on creating a helper that can base64 encode images. i.e. <%= base64_encode(path_to_image) %> I started by running script/generate extension base64_encoder Then I created app/vendor/extension/base64_encoder/app/helpersbase64_encoder_helper.rb: module Base64EncoderHelper def base64_encode # . end end My base64_encoder_extension.rb looks like this: class Base64EncoderExtension < Radiant::Extension def activate helper :base64_encoder end end I am however doing something wrong. This is what happens when I reload the server: radiant/vendor/extensions/base64_encoder/base64_encoder_extension.rb:19:in `activate': undefined method `helper' for # (NoMethodError) from /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/lib/radiant/extension.rb:86:in `activate' How do I get the base64_encode helper available in my views? Cheers, Martin Stabenfeldt
Re: [Radiant] rake radiant:extensions:gallery:install fails with radiant-0.9.1
Hi Chris, 2010/7/31 Chris Boone > On Sat, Jul 31, 2010 at 2:14 AM, Martin Stabenfeldt > wrote: > > > > Have any other experienced problems installing the gallery extension > > with Radiant 0.9.1 ? > > [snipp..] > Looks like you're checking out the wrong tag. Should be 0.9.1, to > match up with the Radiant version - not 0.8.1. > > Try that, and see how it goes. Thanks, that was it! :) Cheers, Martin
[Radiant] rake radiant:extensions:gallery:install fails with radiant-0.9.1
Hi, Have any other experienced problems installing the gallery extension with Radiant 0.9.1 ? Any tips on how to fix it or which Radiant/extension version that is compatible? $ git clone git://github.com/technoweenie/attachment_fu.git vendor/plugins/attachment_fu $ git clone git://github.com/hairballopolis/radiant-gallery.git vendor/extensions/gallery $ cd vendor/extensions/gallery $ git checkout 0.8.1 $ cd ../../../ # Attachement_fu installed $ rake radiant:extensions:gallery:install --trace (in /Users/martin/Work/christianbielke.no) ** Invoke radiant:extensions:gallery:install (first_time) ** Invoke radiant:extensions:gallery:create_config_file (first_time) ** Execute radiant:extensions:gallery:create_config_file mkdir -p /Users/martin/Work/christianbielke.no/config/extensions/gallery ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `to_sym' for nil:NilClass /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/whiny_nil.rb:52:in `method_missing' /Users/martin/Work/christianbielke.no/vendor/extensions/gallery/app/models/gallery_item.rb:17 /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_file' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:in `load_file' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in `require_or_load' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:98:in `send' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:98:in `const_missing' /Users/martin/Work/christianbielke.no/vendor/extensions/gallery/gallery_extension.rb:55:in `init' /Users/martin/Work/christianbielke.no/vendor/extensions/gallery/gallery_extension.rb:54:in `class_eval' /Users/martin/Work/christianbielke.no/vendor/extensions/gallery/gallery_extension.rb:54:in `init' /Users/martin/Work/christianbielke.no/vendor/extensions/gallery/gallery_extension.rb:38:in `activate' /opt/local/lib/ruby/gems/1.8/gems/radiant-0.9.1/lib/radiant/extension.rb:86:in `activate' -- Martin Stabenfeldt Tlf: +47 93441707
Re: [Radiant] radiant-settings broken with Radiant 0.9.1 and trunk
Hi, 2010/7/30 Martin Stabenfeldt > Looks like I better get them migrations running. :-) > Do you know how I run the migrations manually? I guess I could copy them to [RADIANT_ROOT]/db/migrate, but I guess this isn´t the best way? Never mind, I found directions in vendor/extensions/settings/README.markdown. Didn´t think about looking for any more detailed installation instructions, as I thought the install script took care of all that for me. -- Martin Stabenfeldt Tlf: +47 93441707
Re: [Radiant] radiant-settings broken with Radiant 0.9.1 and trunk
Hi Edmund, > > 2010/7/30 Haselwanter Edmund > > > On 30.07.2010, at 10:27, Martin Stabenfeldt wrote: > > > I´m running the Radiant 0.9.1 gem without any modifications. > > > > > > When clicking the Settings-tab in the admin interface this happen: > > > > > > ActionView::TemplateError (You have a nil object when you didn't > > > expect it! > > > > Yes, because the migration did not run. > > > > Workaround: > > > > [snipp..] > > open ./script/console and enter > > Radiant::Config['roles.settings']='admin' > > > > this should fix it :-) Right you are, it doesn´t crash at that point any more! But, when I click Admin, Subtitle it stumbles again: > NoMethodError in Admin/settings#edit > > Showing vendor/extensions/settings/app/views/admin/settings/edit.html.haml where line #29 raised: > > undefined method `description' for # > Extracted source (around line #29): > > 26: = f.password_field :value, :class => 'textbox' > 27: - else > 28: = f.text_field :value, :class => 'textbox' > 29: .description= textilize @setting.description > 30: > 31: %p.buttons > 32: = save_model_button(@setting) > RAILS_ROOT: /Users/martin/Work/radiant-0.9.1 Looks like I better get them migrations running. :-) Do you know how I run the migrations manually? I guess I could copy them to [RADIANT_ROOT]/db/migrate, but I guess this isn´t the best way? -- Martin Stabenfeldt Tlf: +47 93441707
[Radiant] radiant-settings broken with Radiant 0.9.1 and trunk
Hi, I´m running the Radiant 0.9.1 gem without any modifications. rake db:bootstrap, that´s all. The same happens when running Radiant edge. Installed with: ./script/extension install settings When clicking the Settings-tab in the admin interface this happen: ActionView::TemplateError (You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.split) on line #35 of /opt/ local/lib/ruby/gems/1.8/gems/radiant-0.9.1/app/views/layouts/ application.html.haml: 32: - if current_tab?(tab) 33: %ul#nav_sub 34: - tab.each do |sub_item| 35: - if sub_item.visible?(current_user) 36: %li 37: %a{:href => sub_item.relative_url, :class => current_item? (sub_item) ? 'current' : ''}> 38: %span vendor/extensions/settings/app/controllers/admin/ settings_controller.rb:4 radiant (0.9.1) lib/radiant/admin_ui.rb:98:in `visible_by_controller?' radiant (0.9.1) lib/radiant/admin_ui.rb:87:in `visible?' radiant (0.9.1) app/views/layouts/application.html.haml:35:in `_run_haml_47opt47local47lib47ruby47gems47146847gems47radiant45046946147app47views47layouts47application46html46haml' radiant (0.9.1) app/views/layouts/application.html.haml:34:in `each' radiant (0.9.1) app/views/layouts/application.html.haml:34:in `_run_haml_47opt47local47lib47ruby47gems47146847gems47radiant45046946147app47views47layouts47application46html46haml' radiant (0.9.1) app/views/layouts/application.html.haml:27:in `each' radiant (0.9.1) app/views/layouts/application.html.haml:27:in `_run_haml_47opt47local47lib47ruby47gems47146847gems47radiant45046946147app47views47layouts47application46html46haml' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/ action_view_mods.rb:13:in `render' radiant (0.9.1) vendor/plugins/haml/rails/./lib/haml/helpers/ action_view_mods.rb:13:in `render' radiant (0.9.1) app/controllers/admin/preferences_controller.rb:11:in `show' radiant (0.9.1) vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb: 20:in `process' /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each' /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start' About my application's environment Ruby version 1.8.7 (i686-darwin10) RubyGems version 1.3.7 Rack version 1.1 Rails version 2.3.8 Active_record version 2.3.8 Active_resource version 2.3.8 Active_support version 2.3.8 Environment development Database adapter mysql Database schema version 20091003095744 Issue created at Github: http://github.com/Squeegy/radiant-settings/issues#issue/5 Cheers, Martin