Yes, please issue a pull request so I can check this out and make sure it passes the tests.Take care, Bruno
On Fri, Jun 12, 2009 at 3:29 PM, moritz <[email protected]> wrote: > > I had the need to run CE with a prefixed URL, so instead of > http://localhost/ > using http://localhost/ce/ by specifying > ActionController::Base.relative_url_root. > > There were a few locations in the CE code base that needed changing. > > For example (for a more complete set of changes see the GitHub > repository mentioned below): > > ./app/views/base/_about_nav.html.haml > %a{:href=>"/faq"}= :frequently_asked_questions.l > %a{:href=>"/about"}=:about_site.l(:site => > AppConfig.community_name) > %a{:href=>"/advertise"} > ... > > ./app/views/admin/users.html.haml > - form_tag '/admin/users', :class => 'MainForm' do > ./app/views/users/forgot_password.html.haml > - form_tag '/forgot_password', :class => 'MainForm' do > ./app/views/users/forgot_username.html.haml > - form_tag '/forgot_username', :class => 'MainForm' do > ./app/views/users/resend_activation.html.haml > - form_tag '/resend_activation', :class => 'MainForm' do > ... > > ... and APP_URL references. > > I have created a fork at GitHub and made changes to the edge branch > (see http://github.com/a5sk4s/communityengine/tree/edge). > > Generally, I replaced APP_URL with home_url, removing some '/'s as > well, except for > > ./app/models/user_notifier.rb > ActionMailer::Base.default_url_options[:host] = APP_URL.sub > ('http://', '') > ./community_engine_setup_template.rb > environment "\nAPP_URL = \"http://localhost:3000\"", :env => env > environment "\nAPP_URL = \"http://#{app_url}\"", :env => > 'production' > > which I left as they were. I'm not sure where > ActionMailer::Base.default_url_options[:host] is used or what the > changes in community_engine_setup_template.rb need to be. I would > like to aim at eliminating APP_URL all together. > > All link references where replaced by the corresponding route urls, so > for example '/' with home_url, '/faq' with faq_url, and '/ > forgot_password' with forgot_password_url. > > I ran rake community_engine:test, but can't really test it right now > as for the necessary setup. > > The other thing that I noticed, but haven't changed yet is that the > google site search cof value contains > > S:http://#{APP_URL} > > which expands to > > S:http://http://localhost/ > > I believe that this needs to be S:#{APP_URL} (or better: S:# > {home_url}). > > Please review and let me know if you are interested in moving this > back into the edge code base. Do I send you a pull_request? - never > done it. > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
