Re: [Radiant] Console question on Radiant
banane said the following on 02/09/2010 12:34 PM: In pure SQL it would be: [snip] BTDT. Deperately want to avoid going back! I'm not well versed enough in Rails to know how to do this, ha! Isn't there a sql option in ActiveRecord where you can just push in db-sql and not worry about Rails doing the joins? The whole point was to use the rails _console_ and use the object-relational mapping. If I wanted a SQL solution I wouldn't have asked in a Ruby/Rails/Radiant forum :-) I like the idea of constructs such as Page.find(:all. :conditions .).name as an extrapolation of Page.name This is Object stuff, which is a lot more natural to an natural language user than the half-RPN nature of SQL. SQL is really the assembly code of database programming. The Rails object relational mapping is the HLL. If you love programming in assembly code I'm not going to stop you. But most of the programmers I know use at least C or C++, if not Perl or PHP or Python, and Ruby is one of the more H of the HLLs. ___ 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] need a to tweak a page based on server name
I had to do this same sort of thing recently. I didn't find anything out there that just took care of it, so I rolled my own solution. It wasn't a very simple and straightforward thing. In my case, the pieces on the given pages that needed to change were going to vary based on country, and we have different domains for different countries. I used the multilingual_pages extension to create different slugs for the same page but showing different content based on the slug. Then I created a database table and model class that contained mappings between domains (I actually did it with hostnames for more flexibility) and languages. Then I monkey-patched the rendering process in the Page class to look up the domain the user comes in on in that database table. If there's a match, it gets the relevant language and looks for a slug for the requested page that is associated with that language. If so, it redirects to that slug. What you wind up with is a default slug that you can point everyone to in your links and such, and then a different slug for each variation of that page. Your program redirects the user to the alternate slug based on the requested domain name. The separate slugs make the whole thing cache safe. If it's helpful for you, the methods in Page that I had to monkey-patch were process, find_by_url, cache?, headers, render, and response_code. Some of those had already been monkey-patched by multilingual_pages, so they got double-monkey-patched by me, and I also had to monkey-patch needs_language_detection? from multilingual_pages. All of this stuff would make for a really good radiant extension to add to the extension registry, or even just a patch for multilingual_pages, but I'm short on time. Hope this helps you. - Brett On Mon, Feb 8, 2010 at 2:13 PM, Laurent Julliard laur...@moldus.org wrote: Hello, We have a single radiant site that is being accessed from two distinct domain name (e.g www.domain1.com and www.domain2.com). In a few places we need to customize the content of the page depending on the server name that is invoked to access the site. I have looked into various filters, plugins, etc... and could not find a way to do this. Any idea on how we could achieve this ? Thanks for your help ___ 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 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] Console question on Radiant
Relax, Anton. I simply wrote that b/c Sean said others on the list might know the SQL method. On Tue, Feb 9, 2010 at 10:38 AM, Anton Aylward anton.aylw...@rogers.com wrote: banane said the following on 02/09/2010 12:34 PM: In pure SQL it would be: [snip] BTDT. Deperately want to avoid going back! I'm not well versed enough in Rails to know how to do this, ha! Isn't there a sql option in ActiveRecord where you can just push in db-sql and not worry about Rails doing the joins? The whole point was to use the rails _console_ and use the object-relational mapping. If I wanted a SQL solution I wouldn't have asked in a Ruby/Rails/Radiant forum :-) I like the idea of constructs such as Page.find(:all. :conditions .).name as an extrapolation of Page.name This is Object stuff, which is a lot more natural to an natural language user than the half-RPN nature of SQL. SQL is really the assembly code of database programming. The Rails object relational mapping is the HLL. If you love programming in assembly code I'm not going to stop you. But most of the programmers I know use at least C or C++, if not Perl or PHP or Python, and Ruby is one of the more H of the HLLs. ___ 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 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] Has Anyone Fixed Twitter/Mailer Extensions Conflict?
Hello All :-) I am working on some sites that require BOTH the Twitter and the Mailer extensions. I ran into an error, and in searching the list for that error, leaned that these two extensions didn't work together as of May 2009. Has anyone managed to get these working together or am I sunk??? ~ Alexis = Alexis Masters, author http://www.alexismasters.com 510 234-0027 On Feb 9, 2010, at 12:57 PM, banane wrote: Relax, Anton. I simply wrote that b/c Sean said others on the list might know the SQL method. On Tue, Feb 9, 2010 at 10:38 AM, Anton Aylward anton.aylw...@rogers.com wrote: banane said the following on 02/09/2010 12:34 PM: In pure SQL it would be: [snip] BTDT. Deperately want to avoid going back! I'm not well versed enough in Rails to know how to do this, ha! Isn't there a sql option in ActiveRecord where you can just push in db- sql and not worry about Rails doing the joins? The whole point was to use the rails _console_ and use the object-relational mapping. If I wanted a SQL solution I wouldn't have asked in a Ruby/Rails/Radiant forum :-) I like the idea of constructs such as Page.find(:all. :conditions .).name as an extrapolation of Page.name This is Object stuff, which is a lot more natural to an natural language user than the half-RPN nature of SQL. SQL is really the assembly code of database programming. The Rails object relational mapping is the HLL. If you love programming in assembly code I'm not going to stop you. But most of the programmers I know use at least C or C++, if not Perl or PHP or Python, and Ruby is one of the more H of the HLLs. ___ 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 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 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