[Radiant] [ANN] Tags and Search for MultiSite extensions

2008-12-07 Thread Casper Fabricius
I have built two small extensions for Josh Hart which he has been so  
kind to let me release to open source.


The extensions tags_multi_site and search_multi_site will make the  
multi_site extension compatible with the tags and search extensions.  
That is; tags will be site-specific, and search will only return  
results for the current site.


http://github.com/RSpace/radiant-tags_multi_site-extension/tree/master
http://github.com/RSpace/radiant-search_multi_site-extension/tree/master

Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.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] Can Radiant be really easy to use for non-technical content editors?

2008-11-19 Thread Casper Fabricius
I am happy my frustrations resulted in some discussion and good ideas.  
The ideas for extensions for a scratch pad, filter toolbars and som  
WymEditor + paperclipped would all be highly usable to me, but I don't  
have the time to build any of them right now.


I have used TinyMCE filter for some projects, but it has - amongst  
other things - resulted in me having to say to the customer: No, you  
have to let me edit the frontpage, if you edit it, it will get messed  
up (Because TinyMCE has a habit of messing HTML up). But WymEditor  
might be more clean at that, so I think I'll try and use it.


The template extension can do many of the things you mention, such as  
providing custom forms for different templates, and allowing the user  
to select the appropriate template when clicking Add Child.


I'll let you know if I make any interesting discoveries along the way.

Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 19/11/2008, at 10.19, Simon Rönnqvist wrote:


 Hi!

Yes some WymEditor + paperclipped combination could be really cool.  
I've never really used WymEditor for any of my clients.. but I've  
tried both Markdown and a tightly configured TinyMCE (which would be  
pretty close to WymEditor). With Markdown I've seen that the content  
remains largely unstyled, the client eg. just used UPPERCASE-letters  
for headings and so on... maybe a Markdown-toolbar would help  
stimulate the usage of Markdown-code? With the TinyMCE solution  
again stuff got marked up a bit inconsistently, and often using  
strong for some headings, even though it didn't cause quite the  
mess that a normal 'liberal' WYSIWYG would have.


My guess is that using WymEditor would be a good way to give your  
customer a way to try and express what she's looking for, but  
chances are that you'll have to go in and clean up after her a few  
times... but along with that you could also try to agree with her on  
certain practices in the future, to retain consistency. I've been  
searching for the perfect solution for quite some time, but I've  
begun thinking that this last step of cleaning up and educating  
can't really be avoided if you want perfect results... we can just  
try to minimize this last task. Markdown+toolbar could also be  
something to try out, but I fear it might still be considered a bit  
too intimidating (and Textile I find even more intimidating).


Another thing that I've been thinking that could be suitable for  
some cases (but I haven't tried out) is in-place editing... but I  
don't know how well that'd fit into Radiant. And yes forms (using  
your own plug-in) or splitting content into many page parts could  
definitely also in some cases be the right solution... but in cases  
where we want to allow more flexibility, to allow the customer to  
structure their content more freely... we're probably better off  
going with some WymEditor-like solution + cleaning up and education.


Apart from the actual editing of content, it'd be really cool to  
find and easy way to hide some stuff in Radiant from the customer.  
Eg. some things such as the CSS and RSS things, and sometimes some  
page-parts. And maybe in some cases even the popup menus: layout,  
page type, status and filter.


 cheers, Simon
PS. I begun the search for the perfect solution to this in my  
thesis, if anyone's interested: http://simon.fi/en/thesis



On Nov 18, 2008, at 20:46 , Mohit Sindhwani wrote:


Casper Fabricius wrote:
However, I have a client whose content editor is very frustrated  
with the system. She can only just tolerate using Markup, and she  
refuses to write any kind of HTML - Radius tags falls into this  
category from her point of view. According to her, a proper CMS  
would hide all this technical stuff and provide custom forms for  
all types of content.


Casper, my solution would be to find a slightly more technical  
client :P

No, I'm joking (of course!)

Here's what I would recommend:
1. First, factor out as far as possible so that whatever is not  
page specific is in snippets.
2. If all she needs is a few styles of pages, I would create  
different page types or layouts.
3. Then tell her that the different parts that she wants need to go  
into different page parts.  It would be cool if you could modify  
the Add Child behavior to allow you to select the kind of child  
page you want and then give you a blank page with all the different  
tabs created (page parts)... or it could be done with a bit of  
Javascript that detects when you change the Layout/ page and  
automatically adds in the different page parts?  It could even be a  
special drop down box next to the Page Type that triggers the  
actions?
4. The problem: she still needs to use textile for some of the  
things, such as images.  I'm not sure if the Textile Helper will  
help?  It's been a while since I looked at it, but there's a hello  
world guide on my blog:

http://notepad.onghu.com/2007/3/28/using

[Radiant] Can Radiant be really easy to use for non-technical content editors?

2008-11-18 Thread Casper Fabricius

Hi everyone,

I've used Radiant for more than 10 web sites during the past 1,5  
years, and I really like it. Definitely the best CMS for Rails.


However, I have a client whose content editor is very frustrated with  
the system. She can only just tolerate using Markup, and she refuses  
to write any kind of HTML - Radius tags falls into this category from  
her point of view. According to her, a proper CMS would hide all this  
technical stuff and provide custom forms for all types of content.


I know what the core team might answer: Radiant CMS was not built for  
this woman. It was built for small sites and content editors with a  
bit of technical insight. But Radiant is still the most user-friendly  
CMS that exists for Rails, and I don't really feel like coding PHP  
just get a more advanced UI, which will suck anyway.


So my question is: How do the rest of you handle this? How do you hide  
away technical stuff such as snippets, tags and css classes? Do you:
- Use any of the WYSIWYG filters? (I've done this a few times, it has  
its own problems)

- Build very specific custom layouts for all variants for pages?
- Use a generic templating interface such as radiant-templates- 
extension to wrap everything up?
- Write custom extensions to wrap all kinds of elements nicely in  
forms? (such as newsletters, spots, list of various items, etc.)


Can Radiant be palatable for content editors such as my client, or is  
it simply the wrong choice in this case?


Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.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] The Forum Hunt continues...

2008-10-31 Thread Casper Fabricius
That's interesting. I am going to have to integrate a forum into a  
Radiant site in the near future. I don't think beastly's solution -  
running Altered Beast as a seperate application - is right for me,  
though. I am hoping to build an extension based on Altered Beast  
(unless RForum or El Dorado is a better fit) which will have a  
pluggable user model (I have a separate table for site users) and  
where one or more Forum pages can be created, so the forum runs in  
context and control of Radiant.


Perhaps we can help each other out, Mohit. What are your next step  
going to be, and do you think our requirements are compatible?


Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 30/10/2008, at 21.46, Mohit Sindhwani wrote:


Nate Turnage wrote:



On Thu, Oct 30, 2008 at 1:39 PM, Mohit Sindhwani [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 wrote:


   I'm still looking around for a good forum to integrate with a
   Radiant site that I'm working on, and I have narrowed it down to
   three options in the Rails world:
   (a) RForum - that seems to be updated less frequently, but seems
   quite good!
   (b) Altered Beast - quoted as an exemplary Rails 2 application
   (c) El Dorado - Seems quite nice and has nice extra features

   As such, my main requirements are quite simple:
   (a) Multiple forums, discussions and messages
   (b) Good spam controls and support for moderating messages, users,
   etc.
   (c) User control and registration
   (d) Some integration with e-mail (like watching threads) -  
optional.

   (e) Support for multi-lingual messages (UI doesn't need to be)
   (f) Some support for Integration: modify style sheets, simple
   recent messages page, a simple user model, etc.

   Looking around in the non-Rails world, I find that PhpBB is
   popular but has a bad name when it comes to security and some
   people say that it is quite hard to integrate with/ change.
Another one I stumbled across is called Vanilla and it seems to
   have a good reputation for a clean UI and ease of integration and
   support for add-ons.  URL: http://getvanilla.com/

   Does anyone have any suggestions/ experience to share?  It is
   acceptable for the BBS to run on a separate sub-domain from the
   Radiant site.  There is no need for there to be very tight
   integration between the two.



The last time I had the forum connundrum, I just used phpbb, but I  
did notice an extension in the registry last night call Beastly (http://ext.radiantcms.org/extensions/22-beastly 
) for bringing Altered Beast into a Radiant app. You could try that.




That is sweet!  I don't yet know if the solution for me will be  
Altered Beast, but if it works with Radiant, it sure does make me  
feel better :)


Cheers,
Mohit.
10/31/2008 | 4:46 AM.

___
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] Newsletter extension

2008-10-18 Thread Casper Fabricius

Marc,

It sounds like you are doing the right thing. Since your test email  
goes through, your SMTP settings must be correct. That would have been  
my first guess otherwise.


You must run rake radiant:extensions:newsletter:email:send to send  
the emails. I prefer to setup a cron job (crontab -e) to do this every  
10 minutes or so. If you don't get any errors when you run this task,  
but don't get any mails either, you should check development.log, and  
possibly your local mail-dir, where cron likes to post it's output to.


Hope this helps.

Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 16/10/2008, at 12.24, Marc Abouchacra wrote:


Hi there!

I was looking for a newsletter extension and I found the one made by
Andrea Franz, which seems to be the only one or at least the most  
used.


It's pretty good and everything work except the send newsletter part.
When I send a newsletter as a test email it works but when I send it  
to

all the subscribers it only store the newsletter in the database and
queue it.

I saw that there is a send rake task, but when I launch the task  
nothing
more happen. It just adds a new line in the log table telling that  
there

is one email to send.

So does anybody have a clue about that or did I miss something?

Cheers
Marc.
--
Posted via http://www.ruby-forum.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


Re: [Radiant] [ANN] Updated fork of radiant-mail-to-extension

2008-10-18 Thread Casper Fabricius
Looks like something I could use. How does it work? Could add some  
examples and explain about any limitations in the readme-file?


Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 18/10/2008, at 00.55, Manuel Meurer wrote:


Yep, I use r:var / in my parameterized snippets extension:
http://github.com/manuelmeurer/radiant-parameterized-snippets-extension/
The idea originates from here, though:
http://www.nabble.com/Snippets-with-Parameter(s)-td19772449.html

BTW, anyone heard anything about a r:var / Radius tag? Or  
anything about

setting arbitrary page variables?

___
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] [ANN] Updated fork of radiant-mail-to-extension

2008-10-18 Thread Casper Fabricius

Great - thanks!

What would it take to also make it possible to provide inner  
templates as parameters for snippets?


For example:

r:snippet name=animal_info animal=lion
  r:var: name=description
pLions are great cats/p
r:find url=/lionsr:linkRead more/r:link/r:find
  /r:var
/r:snippet

Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 18/10/2008, at 13.23, Manuel Meurer wrote:


Done.

Manuel

On Sat, Oct 18, 2008 at 12:49 PM, Manuel Meurer [EMAIL PROTECTED] 
 wrote:

Will do.

Manuel

On Sat, Oct 18, 2008 at 12:00 PM, Casper Fabricius
[EMAIL PROTECTED] wrote:
Looks like something I could use. How does it work? Could add some  
examples

and explain about any limitations in the readme-file?

Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 18/10/2008, at 00.55, Manuel Meurer wrote:


Yep, I use r:var / in my parameterized snippets extension:
http://github.com/manuelmeurer/radiant-parameterized-snippets-extension/
The idea originates from here, though:
http://www.nabble.com/Snippets-with-Parameter(s)-td19772449.html

BTW, anyone heard anything about a r:var / Radius tag? Or  
anything

about
setting arbitrary page variables?


___
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 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] multiple domains under Phusion Passenger

2008-10-08 Thread Casper Fabricius
I'm sorry there is a bit a SSH meddling in my tutorial, but Radiant's  
bootstrap task requires human input. Btw, I wrote the wiki entry on  
deploying Radiant to Dreamhost based on my article - feel free make a  
third section that presents the bare minimums. It could also use some  
updating like getting radiant from github rather than svn.


That said, I do have two sites running from the same Radiant instance  
using multisite on Dreamhost without any meddling with mod_rewrite or  
such. I just created a site called radiant.casperfabricius.com, and  
then I setup of the two domains I wanted run in Radiant as MIRRORS of  
that domain. That does the trick. I do believe I mention this in the  
tutorial.


Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 08/10/2008, at 0:08, Simon Rönnqvist wrote:



On Oct 8, 2008, at 24:56 , Adam van den Hoven wrote:

I have never really grokked Capistrano. Casper's tutorial had too  
many Log into your shell account and run this rake task for my  
liking too, which seems to negate the value of Capistrano. In  
addition, most installations are fundamentally just creating the  
radiant app, configuring the database connections and installing  
extensions. It seems to me that you can just install that directly  
into your DH account.


 Yeah... but I think Casper's tutorial is pretty much based on (or  
the other way around) http://wiki.radiantcms.org/How_To_Deploy_on_Dreamhost 
 (to which he has linked at the bottom of his blog post). There they  
say: You can either deploy using Capistrano, which is highly  
recommended if you plan to add extensions and make changes to the  
default Radiant code, or you can deploy using SFTP, if you just want  
to upload and use Radiant without touching any Ruby code.


From that I kind of got the picture that you were recommended to use  
Capistrano if you wanted to add extensions... but maybe I should pay  
more attention to the AND make changes to the default Radiant  
code. :) However, I'm pretty likely to write my own extensions once  
I get more into using Radiant.


Another thing that struck me while trying to get capistrano work was:
Basically what cap deploy does for me is
ssh [EMAIL PROTECTED]
cd path/to/app
svn up
rake something
touch tmp/restart.txt

And for that alone, with a single server to do it on, Capistrano  
seems like a bit of an overkill. Sometimes we Rails folks seem to  
try and be just too clever and find ourselves getting all caught up  
with nifty tools. :)


 cheers, Simon




I am thinking of putting together a the bare minimum installation  
for DreamHost using Phusion for the wiki but real work always  
seems to take precedence.


Adam
On 7-Oct-08, at 2:47 PM, Simon Rönnqvist wrote:



On Oct 8, 2008, at 24:34 , Bill Barnard wrote:


On Wed, Oct 08, 2008 at 12:29:04AM +0300, Simon Rönnqvist wrote:

Hi!

I'm actually looking the very same thing. I found this howto
http://casperfabricius.com/site/2008/05/24/radiant-cms-on-dreamhost-with-phusion-passenger/
, but I got stuck trying to get Capistrano at different stages  
of the

process (didn't succeed nor give in yet). Anyhow, Capistrano isn't
needed at all... so I might as well try doing without it... it's  
just

that the howto involved it, and I was curious about trying it. :)

cheers, Simon


I've used the same howto. It looks as though Capistrano is not  
available
on Dreamhost any longer, though you can install it as a local  
gem. I
think it's probably a good tool and want to learn about it but I  
try not

to learn *too* many new things on any one project...

Bill


Aha... so does Capistrano need to be installed on the server? I  
thought it just had to run on my computer. Even though I've had  
several issues with it, it has indeed done at least some stuff on  
the server for me.


cheers, Simon___
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 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] Summer Reboot

2008-09-19 Thread Casper Fabricius
Well, I'm not. Feel free to write it, just make sure it doesn't  
overlap too much with other Creating an extension articles. Perhaps  
you could restructure things a bit, I'm not sure the current division  
and order is optimal.


Med venlig hilsen / Best regards,
Casper Fabricius
http://casperfabricius.com

On 18/09/2008, at 21:55, Andrew Gehring wrote:


Is anyone doing any work on Creating an extension II

I'll happily beta your work :-)

Thanks,
Andrew
___
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] Re: TinyMCE ? FCKeditor ? .... what's UP ???

2008-09-04 Thread Casper Fabricius

Hi Bartee,

Glad to hear it is working out for you. If you have the time, you  
would do a great service to the community if you put this information  
on the documentation wiki:


http://wiki.radiantcms.org/Summer_Reboot (WYSIWIG Editors –  
TinyMCEEditor)


Thanks,
Casper



On 04/09/2008, at 4:33, Bartee Lamar wrote:


Casper,

Again thanks for the excellent post.

It worked.. except there is an error in the 1st svn request.  It is
noted on the issues page.

It should be this

Correct svn  command tu put the javascript/extensions/tinymce folder  
is:


svn checkout http://radiant-tinymce-
extension.googlecode.com/svn/trunk/javascript/extensions/tiny_mce
public/javascripts/extensions/tiny_mce



But, I now have TinyMCE on my pages.

I will create another thread for some other questions.

Now that I have seen this, I really prefer it to FCKeditor which I am
using on some old sites I did in ColdFusion.



--
Posted via http://www.ruby-forum.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


Re: [Radiant] Rradiant gem 0.6.9: undefined local variable or method `salt' for #User:0x25542e8

2008-09-02 Thread Casper Fabricius

Hi Rainer,

Sounds like you haven't upgraded the database? Try with a:

rake db:migrate RAILS_ENV=production

Cheers,
Casper Fabricius


On 02/09/2008, at 11:08, rainer griess wrote:


Hello,

after upgrading to a newer gem (to 0.6.9 w/ rails 2.1.0 from 0.6.4  
w/ rails  2.x), I get the following error, during login:


--%--
undefined local variable or method `salt' for #User:0x25542e8
/Library/Ruby/Gems/1.8/gems/radiant-0.6.9/vendor/rails/activerecord/ 
lib/active_record/attribute_methods.rb:205:in `method_missing'
/Library/Ruby/Gems/1.8/gems/radiant-0.6.9/app/models/user.rb:32:in  
`sha1'
/Library/Ruby/Gems/1.8/gems/radiant-0.6.9/app/models/user.rb:37:in  
`authenticate' /Library/Ruby/Gems/1.8/gems/radiant-0.6.9/app/ 
controllers/admin/welcome_controller.rb:13:in `login'

--%--
I tried to disable any extensions and commented out the followine  
line in environment.rb:

config.extensions = [ :shards, :page_attachments, :mailer, :all ]
But the error was still there.
BTW: I only got problems during login into /admin so far. The  
frontend is working.

Any ideas and help?
Thank you!
rainer
___
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] Performing Radius tag evaluation as HTML attribute value?

2008-08-29 Thread Casper Fabricius

Hi Tony,

I run into this issue all the time, and I asked the question on the  
list myself a while ago.


The answer is that Radius cannot parse tags-within-tags. Not even  
when the outer tag is a standard HTML tag, and not a Radius tag. I  
usually end up writing custom tags in cases like this, but perhaps  
someone has a more efficient solution?


Cheers,
Casper


On 29/08/2008, at 10:44, Tony Spataro wrote:


Hello all,

Sorry if this is a newbie-ish question; I've checked the FAQ and  
skimmed the

source a bit, and haven't found any obvious solution.

I'm in a position where I want to evaluate a Radius tag and insert the
resulting text into the value of an HTML attribute. My use case  
involves the

page_attachments extension, and I'm trying to do something like this:

r:attachment:link title=r:attachment:author / Click here
/r:attachment:link

Which is to say, I want the title of the link to be the attachment  
author's
name. However, this is not well-formed XML, and anyhow the Radius  
parser

doesn't seem to parse into attribute values.

Is there a canonical way to do what I want? I'm aware that I could  
simply

tweak page_attachments_tags to do things my way, but that feels like
cheating to me...

Cheers,
  -Tony
___
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] How to use session in tags?

2008-08-26 Thread Casper Fabricius

Hi Vincent,

I've done with Javascript reading login information from a cookie like  
this:

http://pastie.org/260306

Cheers,
Casper

(Cookie is a util object, btw, it's not built into javascript)


On 26/08/2008, at 18:46, Christopher Dwan wrote:


Hi Vincent,

I ran into this just the other day myself and I've done some  
digging.  In theory you could override a method in SiteController  
and use it to pass the current user to @page after find_page()  
happens..  You would have to disable the cache in that case and make  
sure the page is rendered for each user.


Or, you can use javascript to grab the user info from the  
controller.  As for tags, you can create a tag that can output the  
necessary javascript. Then the problem is how to make it degrade  
gracefully...


Personally, I don't want to disable the cache... but that will mean  
that I won't be able to display the logged-in status for people  
without javascript.


-C


On 26-Aug-08, at 5:06 AM, Vincent Pérès wrote:


Hello,

I would like to create something like that :
http://lists.radiantcms.org/pipermail/radiant/2006-September/001695.html
The goal is to display a 'login box' if the current user is not
connected, else an 'account box'.

But I can't access to the 'session'. I tried to enable the session  
like

that :

module CoreExtension::SiteControllerExtensions
def self.included(base)
  base.class_eval do
session :disabled = false
  end
end
end

(and include this file to SiteController)

It doesn't work. I found an other discution about :
http://lists.radiantcms.org/pipermail/radiant/2007-November/007146.html

But ir doesn't work too... can you explain me, what is the best way  
to

do my feature?

Thank you !
Vincent
--
Posted via http://www.ruby-forum.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 mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How to use session in tags?

2008-08-26 Thread Casper Fabricius
I just store it in plain text. The pages that need the user to be  
logged in is of a special page type, checking the session. Also, the  
controllers in my custom extension checks for login. That way, there  
is no reason to encrypt the cookie data in any way, it is just a  
display thing, not for access control.


Cheers,
Casper


On 26/08/2008, at 22:15, Christopher Dwan wrote:


Hey Casper,

Do you just store the name and association_name in the cookie in  
plain text or is there some facility that you use to encrypt the  
data..?


-Chris

On 26-Aug-08, at 10:06 AM, Casper Fabricius wrote:


Hi Vincent,

I've done with Javascript reading login information from a cookie  
like this:

http://pastie.org/260306

Cheers,
Casper

(Cookie is a util object, btw, it's not built into javascript)


On 26/08/2008, at 18:46, Christopher Dwan wrote:


Hi Vincent,

I ran into this just the other day myself and I've done some  
digging.  In theory you could override a method in SiteController  
and use it to pass the current user to @page after find_page()  
happens..  You would have to disable the cache in that case and  
make sure the page is rendered for each user.


Or, you can use javascript to grab the user info from the  
controller.  As for tags, you can create a tag that can output the  
necessary javascript. Then the problem is how to make it degrade  
gracefully...


Personally, I don't want to disable the cache... but that will  
mean that I won't be able to display the logged-in status for  
people without javascript.


-C


On 26-Aug-08, at 5:06 AM, Vincent Pérès wrote:


Hello,

I would like to create something like that :
http://lists.radiantcms.org/pipermail/radiant/2006-September/001695.html
The goal is to display a 'login box' if the current user is not
connected, else an 'account box'.

But I can't access to the 'session'. I tried to enable the  
session like

that :

module CoreExtension::SiteControllerExtensions
def self.included(base)
base.class_eval do
  session :disabled = false
end
end
end

(and include this file to SiteController)

It doesn't work. I found an other discution about :
http://lists.radiantcms.org/pipermail/radiant/2007-November/007146.html

But ir doesn't work too... can you explain me, what is the best  
way to

do my feature?

Thank you !
Vincent
--
Posted via http://www.ruby-forum.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 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 mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Consensus on mailer extension forks?

2008-08-21 Thread Casper Fabricius
I'm using Talbott's version, and it works great for me. I had no  
problem getting a patch applied to it either. Do note, however, that  
it has a bug with regards to international characters. I have not  
found the time to submit a pull request with the fix yet, but the  
problem basically centers around that the extension uses to_yaml,  
which converts international characters into escaped octal sequences  
(or something like that).


Cheers,
Casper


On 21/08/2008, at 3:08, Sean Santry wrote:


Can anyone recommend which fork of radiant-mailer-extension would be a
good basis on which I could develop a version with both file
attachments and form validation?

I've used tricycle's fork for its file attachments. Since it's a
real fork of the official tree, it should be easy to push changes
back up the tree later. I haven't used ntalbott's fork, which has form
validation and purports to be a significant refactoring. I'd guess
that since ntalbott's port is an independent project (ie, not forked
from the actual radiant-mailer-extension repo), pushing changes back
up will be more of a manual process.

I'll do the work, just looking for some advice to ensure my changes
(which I imagine will be useful to others) will be ready for easy
integration back into the official tree.

Thanks!

- Sean

--
Sean Santry
http://seansantry.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


Re: [Radiant] Summer reboot article

2008-08-14 Thread Casper Fabricius
I wouldn't mind having the articles I've contributed so far reviewed  
by someone either:


http://wiki.radiantcms.org/Creating_an_extension_IV
http://wiki.radiantcms.org/Creating_an_extension_V

Cheers,
Casper

On 14/08/2008, at 9:36, Mohit Sindhwani wrote:


Andrew Neil wrote:

Hey folks,

This is far from finished, but I hope that by shouting about it, I  
can provide some impetus for others to get their docs rolling:


   http://wiki.radiantcms.org/Using_the_built-in_tags

Pitched at beginner level.

Regards,
Drew


Thanks for getting involved, Drew.  I'll try to review it tonight if  
I get the chance.


Cheers,
Mohit.
8/14/2008 | 3:36 PM.

___
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] Summer reboot article

2008-08-14 Thread Casper Fabricius
Thanks, Mohit. Screenshots are a good idea. If more people contributes  
documentation, we might be able to reach the goal of completing Summer  
Reboot by the end of August! :)


Cheers,
Casper


On 14/08/2008, at 17:48, Mohit Sindhwani wrote:


Casper Fabricius wrote:
I wouldn't mind having the articles I've contributed so far  
reviewed by someone either:


http://wiki.radiantcms.org/Creating_an_extension_IV
http://wiki.radiantcms.org/Creating_an_extension_V



Thanks for your articles, Casper!  So far, I've read #5 (haven't yet  
got to read #4) yet, but I will definitely do so.
#5 is really a beauty - I need to try it out to be sure it's  
perfectly right.  Will do that for #4 also.


I feel that we are now moving quite close to having good  
documentation for creating extensions.  I notice that you've claimed  
#3 of the extensions also!  You're quite the prolific writer on that  
subject.


Both your articles are on my list for reading/ proofreading this  
weekend.  I do hope that I get the chance to do so.  I will also  
actually try out your articles this weekend if I can - if possible,  
I shall try to create screenshots to add to them.  In some cases,  
screenshots are a distraction but I think it's useful in most cases!


Thanks again!

Cheers,
Mohit.
8/14/2008 | 11:48 PM.


___
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] Japanese and i18n in Radiant

2008-08-06 Thread Casper Fabricius

Hi Jim,

Definitely a great initiative to get Radiant on 2.1. If you could add  
some kind of status and list of bugs and stuff to do perhaps on the  
Github wiki, I'd like to contribute.


However, I don't think the i18n stuff in edge will be of much help  
when it comes to translating Radiant pages. There will still need to  
be an extension that allow users of Radiant to translate inside the  
Radiant admin one way or another. That extension could, and should,  
use the standardized i18n interface, but the approach and an  
appropriate backend will still be up to the extension developer to  
select.


Cheers,
Casper


On 02/08/2008, at 21:27, Jim Gay wrote:


Oli and Casper,

I would love some assistance getting Radiant on Rails 2.1
Rails edge has some localization and translation features built in,  
so moving to 2.1 would get us there faster (I hope).


If you'd like to help, please fork my rails_2_1_0 branch and  
contribute:

http://github.com/saturnflyer/radiant/tree/rails_2_1_0

I've only had the time to get so far with it, so assistance would be  
greatly appreciated.
So this isn't a fast solution for the problems you're trying to  
solve, but I hope it'll be good for the long term of Radiant  
development.


-Jim

On Aug 2, 2008, at 2:19 PM, Casper Fabricius wrote:


Hi Oli,

I'm also faced with a Radiant that needs to run two multiple  
languages, however, non of them Japanese, so can't help you there.


But I'm eager to hear if you have found a fitting extension for  
handling multiple languages. I'm considering using Loren Johnson's  
language switch (http://github.com/lorenjohnson/radiant-language-switch/tree/master 
), but maybe there is something better or different or more  
advanced out there?


Cheers,
Casper Fabricius


On 02/08/2008, at 3:46, Oli Studholme wrote:


Hi All,

[sorry if this ends up being a double-post]
I’ve been having lots of fun with making a bilingual site in  
Radiant. Here are some current problems that I hope someone can  
suggest fixes for:


# Pages in Shift-JIS charset

Most Japanese cellphones require Shift-JIS for mobile sites, but  
the content-type field in Layout ignores charsets. Can anyone  
suggest how I’d add support for charsets to this, or another way  
to work around it?


# Mailer extension and sending ISO-2022-JP emails

Despite ActiveMailer docs[1] containing this:
“default_charset - The default charset used for the body and to  
encode the subject. Defaults to UTF-8. You can also pick a  
different charset from inside a method with charset.”


Setting this in environment.rb:

config.action_mailer.default_charset = iso-2022-jp

still results in my email header and body being UTF-8 encoded,  
with body settings of:

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: Quoted-printable

If I add this to environment.rb:

  config.action_mailer.default_content_type = text/ 
plain;charset=iso-2022-jp


I get the bizarre combo of utf-8 encoded subject and body settings  
of:

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: Iso-2022-jp

which is even worse. A Japanese article[2] suggests wrapping  
ActionMailer in TMail then iso-2022-jp and base64 the email, but I  
guess that requires a hack or an extension, right? here’s their  
code:


module ActionMailer #:nodoc:
class Base
 require 'nkf'
 class  self
   def base64(text, charset=iso-2022-jp, convert=true)
 if convert
   if charset == iso-2022-jp
 text = NKF.nkf('-j -m0', text)
   end
 end
 text = [text].pack('m').delete(¥r¥n)
 =?#{charset}?B?#{text}?=
   end
 end
end
end

class Notifications  ActionMailer::Base
@@default_charset = iso-2022-jp
@@encode_subject = false
#...
end
Then in test:

class NotificationsTest  Test::Unit::TestCase
CHARSET = iso-2022-jp
#...
private
 def encode(subject)
   ActionMailer::Base.base64(subject, CHARSET)
 end
end

Anyone ever managed to get emails in non-UTF8 working

Finally, what’s up with i18n and how can I help? I can’t even get  
the Jargon branch (with the partially baked gibberish support) to  
run anymore…


peace - oli

[1] http://api.rubyonrails.org/classes/ActionMailer/Base.html
[2] http://wiki.fdiary.net/rails/?ActionMailer

___
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] Multi_site restrict access to radiant

2008-08-06 Thread Casper Fabricius

Hi Marc,

The multi_site extension has those limitations you mention. I  
especially think #2 is a show stopper in many cases - all users sees  
all sites. It would take some work to tie logins to a specific site,  
but it would greatly enhance the value of the extension.


Cheers,
Casper


On 04/08/2008, at 23:56, Marc Abouchacra wrote:


Hello everybody!

I've recently discover the multi_site extension which appears to be
really interesting.
But there is some things that I still don't know if it is possible and
how to do them.

1-Imagine I have a radiant site called marc.com. I install the
multi-site and then I create site1.marc.com and site2.marc.com. Now I
can manage the pages for the two child site1 and site2, but I can't
manage anymore the page from marc.com.

2-Is it possible to create administrator for each site? For example  
if I

log in to radiant as an admin, I'll see all my site. However I want to
create site-administrator for each site so that they can log in to
radiant and manage the pages of their own site without seeing all the
other site.

Cheers
Marc.
--
Posted via http://www.ruby-forum.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


Re: [Radiant] Re: Layouts, snippets and site assets on the file system?

2008-07-31 Thread Casper Fabricius
Nice work, Andrew. I wonder how hard it would to get this extension to  
also dump and load SnS text assets. Not that any of the extensions  
should have a dependency on the other, but the file-system-extension  
could perhaps check for the presence of SnS and dump that too, if  
present?


Cheers,
Casper


On 31/07/2008, at 8:28, Andrew Neil wrote:



On 14 Jun 2008, at 18:51, Sean Cribbs wrote:


Jonathan McCoy wrote:


Highly unlikely. FUSE is a modular file system API - basically a  
simple means to build your own file system without actually having  
to do anything majorly complex. Although yes, what you linked to  
would be a cool solution - it still lacks version control. You'd  
also have to make it uber-bespoke to Radiant, and to each model in  
the Radiant schema, otherwise you'll be working with YAML etc. If  
somebody did build a FUSE interface for Radiant, it would be nice  
if each page is represented by a folder, with files corresponding  
to each page part, with the extension being the filter used. A  
meta file could contain the overall page settings.


You just described the file_system extension written for Redken to  
a T.  I would like to release it but I'm not ready to support it  
yet or to detox the code.


I asked Sean if I could have a go at detoxing his code myself. I've  
stripped out all of the Redken specific functionality, and got the  
extension working on a vanilla Radiant site (i.e. with no other  
extensions). Here it is:


http://github.com/nelstrom/radiant-file-system-extension/tree/master

I'd be happy to hear any feedback.

Cheers,
Drew
___
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] Re: Layouts, snippets and site assets on the file system?

2008-07-31 Thread Casper Fabricius

Nice - thanks, Sean


On 31/07/2008, at 15:00, Sean Cribbs wrote:

When I designed the extension, I toyed with the idea of providing a  
way for extensions to specify how to dump/load their own models.   
IIRC, you can just create an appropriately named module and then add  
the model to the constant array in the FileSystem module.  You  
should probably do all of that in your extension file.


Sean

Casper Fabricius wrote:
Nice work, Andrew. I wonder how hard it would to get this extension  
to also dump and load SnS text assets. Not that any of the  
extensions should have a dependency on the other, but the file- 
system-extension could perhaps check for the presence of SnS and  
dump that too, if present?


Cheers,
Casper


On 31/07/2008, at 8:28, Andrew Neil wrote:



On 14 Jun 2008, at 18:51, Sean Cribbs wrote:


Jonathan McCoy wrote:


Highly unlikely. FUSE is a modular file system API - basically a  
simple means to build your own file system without actually  
having to do anything majorly complex. Although yes, what you  
linked to would be a cool solution - it still lacks version  
control. You'd also have to make it uber-bespoke to Radiant, and  
to each model in the Radiant schema, otherwise you'll be working  
with YAML etc. If somebody did build a FUSE interface for  
Radiant, it would be nice if each page is represented by a  
folder, with files corresponding to each page part, with the  
extension being the filter used. A meta file could contain the  
overall page settings.


You just described the file_system extension written for Redken  
to a T.  I would like to release it but I'm not ready to support  
it yet or to detox the code.


I asked Sean if I could have a go at detoxing his code myself.  
I've stripped out all of the Redken specific functionality, and  
got the extension working on a vanilla Radiant site (i.e. with no  
other extensions). Here it is:


   http://github.com/nelstrom/radiant-file-system-extension/tree/master

I'd be happy to hear any feedback.

Cheers,
Drew
___
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 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] rake rails:update:javascript and ActionController::InvalidAuthenticityToken

2008-07-28 Thread Casper Fabricius
The new 0.6.8 release seems to have fixed this problem for me.  
Something good has happened during the weekend, since I was running  
off trunk from Friday :)


/Casper


On 25/07/2008, at 17:24, aslak hellesoy wrote:


On Fri, Jul 25, 2008 at 1:16 PM, Casper Fabricius
[EMAIL PROTECTED] wrote:

Aslak,

Did you ever find a solution to this problem? I'm running a new  
Radiant
based project on Edge Radiant (to avoid other bugs in 0.6.7), but I  
am
getting the ActionController::InvalidAuthenticityToken exception  
approx.
every other time a save a Page or a Layout. I'm running off a fresh  
git

clone from GitHub.



I haven't found a solution to it yet, and I'm seeing the same as you.

Aslak

Has anyone else encountered this error? I'm pretty sure it is not  
related to

the out-of-date javascript issue, is these are standard form submits,
nothing ajaxy.

Cheers,
Casper

On 10/07/2008, at 4:46, aslak hellesoy wrote:

On Thu, Jul 10, 2008 at 4:32 AM, Sean Cribbs  
[EMAIL PROTECTED] wrote:


rake radiant:update will only make a difference when you're  
running in
project mode (in vendor or gem), not if you're running Radiant  
directly

from
source.  And yes, we probably need to update our JS libs to the  
latest.


As far as the authenticity token problem, make sure that you  
don't have
something overwriting the entire page edit view, which was common  
in

extensions before 'shards'.



Thanks for the quick answer, Sean. I'm running off a fresh clone,  
and

the only extension I have is a small one of my own which doesn't do
anything with the edit view. Any other ideas?

Cheers,
Aslak


Sean

aslak hellesoy wrote:


I have a clone of the most recent [EMAIL PROTECTED] I just ran rake
rails:update:javascripts.

This upgraded 4 of the standard rails js files. Shoudn't this be
committed to Git?

The reason I did it was that I keep getting
ActionController::InvalidAuthenticityToken when I save pages. I
googled for solutions and saw a mention of a radiant:update task  
that
is supposed to fix this (but that task seems to be gone). So I  
tried
rails:update:javascripts instead. Unfortunately I still get the  
same

error (and only occasionally). I've reset all my cookies and saved
sessions in FF too.

Anyone knows what's up with this?

Cheers,
Aslak
___
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 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 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] rake rails:update:javascript and ActionController::InvalidAuthenticityToken

2008-07-25 Thread Casper Fabricius

Aslak,

Did you ever find a solution to this problem? I'm running a new  
Radiant based project on Edge Radiant (to avoid other bugs in 0.6.7),  
but I am getting the ActionController::InvalidAuthenticityToken  
exception approx. every other time a save a Page or a Layout. I'm  
running off a fresh git clone from GitHub.


Has anyone else encountered this error? I'm pretty sure it is not  
related to the out-of-date javascript issue, is these are standard  
form submits, nothing ajaxy.


Cheers,
Casper

On 10/07/2008, at 4:46, aslak hellesoy wrote:

On Thu, Jul 10, 2008 at 4:32 AM, Sean Cribbs [EMAIL PROTECTED]  
wrote:
rake radiant:update will only make a difference when you're running  
in
project mode (in vendor or gem), not if you're running Radiant  
directly from
source.  And yes, we probably need to update our JS libs to the  
latest.


As far as the authenticity token problem, make sure that you don't  
have

something overwriting the entire page edit view, which was common in
extensions before 'shards'.



Thanks for the quick answer, Sean. I'm running off a fresh clone, and
the only extension I have is a small one of my own which doesn't do
anything with the edit view. Any other ideas?

Cheers,
Aslak


Sean

aslak hellesoy wrote:


I have a clone of the most recent [EMAIL PROTECTED] I just ran rake
rails:update:javascripts.

This upgraded 4 of the standard rails js files. Shoudn't this be
committed to Git?

The reason I did it was that I keep getting
ActionController::InvalidAuthenticityToken when I save pages. I
googled for solutions and saw a mention of a radiant:update task  
that

is supposed to fix this (but that task seems to be gone). So I tried
rails:update:javascripts instead. Unfortunately I still get the same
error (and only occasionally). I've reset all my cookies and saved
sessions in FF too.

Anyone knows what's up with this?

Cheers,
Aslak
___
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 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] Forum extension?

2008-07-12 Thread Casper Fabricius

Hi Tim,

I managed to port Beast to a Radiant extension without too much  
trouble, including merging the user models. I never released the  
extension because a lot of work still remains with the view files (I  
just did a bunch of view files in another extension for my specific  
project), but I'd be willing to mail you this unfinished extension as  
a starting point, if you are planning to release an extension  
providing a port of Beast.


Cheers,
Casper Fabricius


On 10/07/2008, at 20:29, Tim Gossett wrote:

I need to add a forum to a Radiant project. I've sifted through  
plenty of
pages of search results for Radiant forum extension, but, frankly,  
there's

just too much noise coming from results for forums about Radiant.

If I can't find one by tonight, I'm going to build my own. Anyone  
have any

ideas/requests/observations?

--
Tim
___
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] Page_attachment extension with Flash files?

2008-07-12 Thread Casper Fabricius

Hi Nate,

I use SWFObject (http://code.google.com/p/swfobject/) and have a  
custom tag to insert flash elements:

http://pastie.org/232639

Cheers,
Casper Fabricius


On 12/07/2008, at 17:47, Nate Turnage wrote:

Has anybody ever used the page attachment extension with Flash  
files? If so,

how do you place them on the page? I was able to upload the files no
problem, but when trying to use SWFobject the quotation marks used  
for the

r:attachment tag throw things out of whack. Anybody have any ideas?

Code calling Flash file:
notextile
object classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354  
width=360

height=240
 param name=movie value=r:attachment name=gem_01.swf / /
 !--[if !IE]--
 object type=application/x-shockwave-flash data=r:attachment
name=gem_01.swf / width=360 height=240
 !--![endif]--
 pAlternative content/p
 !--[if !IE]--
 /object
 !--![endif]--
 /object
/notextile


~Nate
___
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] Page_attachment extension with Flash files?

2008-07-12 Thread Casper Fabricius
I have it in the lib dir of a custom extension, in a file called  
extra_tags.rb inside a module called ExtraTags. Then, in the init file  
of the extension, I have this line:


Page.send :include, ExtraTags

You can also just add the module to the standard Radiant lib dir and  
put the line above in environment.rb.


And yes, I use it with the page_attachments extension. Just supply the  
name of the attachment to the src attribute of the tag.


/Casper



On 12/07/2008, at 18:27, Nate Turnage wrote:

On Sat, Jul 12, 2008 at 10:59 AM, Casper Fabricius [EMAIL PROTECTED] 


wrote:


Hi Nate,

I use SWFObject (http://code.google.com/p/swfobject/) and have a  
custom

tag to insert flash elements:
http://pastie.org/232639



Which model do you add this to? And do you use it with the  
page_attachment

extension? Thanks for the method though. It's bril.



~Nate
___
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] radiant + exception_notification plugin

2008-06-28 Thread Casper Fabricius

Hi Michael,

I've run into the same problem, and solved it by adding a small mixin  
that overrides a method in ExceptionNotifier:


http://pastie.org/223988

Put this code in a file in lib and make sure to include it and mix it  
in in environment.rb or in an extension class:


::ExceptionNotifier.send :include, ExceptionNotifierExt

Cheers,
Casper



On 27/06/2008, at 22:26, Michael Hale wrote:


Hi all,

I'm having trouble using the exception_notification with radiant.

The problem seems to be that the plugin's views dir is not in
ActionMailer::Base.view_paths. I was able to hack around the problem
and send an email by adding a line like this:
 view_paths  'radiant_app/vendor/plugins/exception_notification/ 
views'

to radiant's Radiant::MailerViewPathsExtension#full_template_path
(mailer_view_paths_extension.rb:18)

My question is how do I properly tell ActionMailer::Base (which is
what Radiant::MailerViewPathsExtension is extending) about the
exception_notification's views dir? Or is there a better way to have
exception_notifications in radiant?

Thanks, Michael

BTW here is the relevant portion of my stack trace for reference:

Rendering radiant_app/public/500.html (500 Error)
/!\ FAILSAFE /!\  Fri Jun 27 16:08:35 -0400 2008
 Status: 500 Internal Server Error
 can't convert nil into String
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/lib/plugins/ 
extension_patches/lib/mailer_view_paths_extension.rb:87:in

`dirname'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/lib/plugins/ 
extension_patches/lib/mailer_view_paths_extension.rb:87:in

`initialize_template_class'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/ 
actionmailer/lib/action_mailer/base.rb:502:in

`render'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/ 
actionmailer/lib/action_mailer/base.rb:494:in

`render_message'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/lib/plugins/ 
extension_patches/lib/mailer_view_paths_extension.rb:65:in

`create!'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/ 
actionmailer/lib/action_mailer/base.rb:403:in

`initialize'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/ 
actionmailer/lib/action_mailer/base.rb:352:in

`new'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/rails/ 
actionmailer/lib/action_mailer/base.rb:352:in

`method_missing'
   radiant_app/vendor/plugins/exception_notification/lib/ 
exception_notifiable.rb:95:in

`rescue_action_in_public'
   /opt/local/lib/ruby/gems/1.8/gems/radiant-0.6.7/app/controllers/ 
application.rb:36:in

`rescue_action_in_public'
___
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] [ANN] Summer Reboot Documentation

2008-06-22 Thread Casper Fabricius
Well done, Mohit. I've signed up for a few articles. What's the time  
horizon on this project - should we aim at having all articles ready  
by the end August?


/Casper

On 22/06/2008, at 10:17, Mohit Sindhwani wrote:


Hi Guys

We have been in discussion about starting up another effort to write  
up Radiant documentation.  I had earlier posted out something like a  
Table of Contents that we could use as a preliminary outline.  I've  
created this on the wiki as 'Summer Reboot' (in honour of the thread  
that started this push again!) and it's online at:

http://wiki.radiantcms.org/Summer_Reboot

I've also created a section on the page called 'Author  
Abbreviations' - just put your name there with an abbreviation.   
Then, you can use the abbreviation to claim certain articles as your  
own :)


If you already have material that could be used, please claim the  
article.  If someone has claimed the article already but you have  
the same thing written up, please add it in also.  One of us can  
later combine the best parts of both to make it completely useful.


Cheers,
Mohit.
6/22/2008 | 4:14 PM.

___
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] Re: Re: Radiant documentation - summer reboot

2008-06-17 Thread Casper Fabricius

Hi David,

I've always found building the navigation system in Radiant quite a  
hassle, so I have recently added an r:menu / to my fork of radiant (http://github.com/RSpace/radiant/tree/master 
) and submitted a pull request to Sean. I have no idea if it will make  
it into Radiant 0.6.8 or even into core at all, but if is does, it  
should deprecate most of the r:if_self r:if_ancestor business. It is  
very similar to r:navigation /, but it generates the menu using the  
existing page hierarchy in the database, rather than requiring the  
developer to hard code it in the tag attributes.


By the way, Mohit, did you create a page in the wiki with your  
outline? I can't seem to find it.


Cheers,
Casper


On 16/06/2008, at 16:47, David Piehler wrote:


Mohit Sindhwani wrote:

Sorry for the delay in pushing this out.  This is roughly the first
draft of the plan that I had.  This is not split up into the sections
that I had mentioned.  I think some of these can be mixed and matched
into the different sections.  In general, this targets a person who  
is

starting with Radiant but is actually a developer.  I'm sure there's
plenty more that can/ should go in, but I'm just passing this as a
starting point.


This looks great. The only thing I noticed was missing is a topic on
navigation systems. I say we start with your outline in the wiki and
move ahead from there. We can always adjust the outline as we progress
if we need to.

In the wiki outline, should we mark what topics we would like to  
work on
so we don't duplicate effort? I think having multiple people work on  
the

same topic is fine, but they should probably coordinate their effort.

Silly question -- when working with the wiki, how do you create new
pages? Do you just make a link to them and it recognizes a new page  
has

been made... or something?

I have Friday off from work, and will begin working on wiki content. I
think I'll start with these topics:
* navigation systems (simple using r:navigation; complex using  
r:if_self

and r:if_ancestor_or_self and part=no-map)
* using some of the common extensions

- Dave


--
Posted via http://www.ruby-forum.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


Re: [Radiant] Re: Radiant documentation - summer reboot

2008-06-13 Thread Casper Fabricius
Very nice, Mohit. If everyone can approve of this as starting outline  
for Radiant documentation, I suggest you put into a page in the wiki.  
Then we can add our names to the sections we would to like write, and  
add further sections we think is needed.


Cheers,
Casper

On 13/06/2008, at 20:18, Mohit Sindhwani wrote:


Jim Gay wrote:
So, here's what I'm going to try to do.  I made a list of topics  
that I would like to see as part of the documentation, roughly  
organized by topic.  When I get back home from work tonight, I'll  
try to type that in and email it out just to share my ideas with  
you.  I know that there will be many things that could be debated  
in that list but it may serve as a reference (even if it is  
trashed).


That would be awesome. It'll at least help me write the docs for  
radiant-help to see how others want it organized.


Hi Guys

Sorry for the delay in pushing this out.  This is roughly the first  
draft of the plan that I had.  This is not split up into the  
sections that I had mentioned.  I think some of these can be mixed  
and matched into the different sections.  In general, this targets a  
person who is starting with Radiant but is actually a developer.   
I'm sure there's plenty more that can/ should go in, but I'm just  
passing this as a starting point.


Cheers,
Mohit.
6/14/2008 | 2:17 AM.

=== RADIANT DOCUMENTATION ===
1. Installation  First Steps
 * Downloading  Installing Radiant - gem, svn, git, edge
 * Getting Started I - Hello world with Radiant
 * Planning your site (what are layouts, snippets, pages, page parts)
 * Getting Started II
   - Improved Stylesheets
   - Using Layouts  Snippets
   - Filters  Using Textile
 * Themes
   - Why are there no themes for Radiant?
   - Using the 'Hemingway' Radiant them?
   - Who does themes?   (Radiant pros)
 * Introduction to the Admin UI and Users
 * Installing your first extension (PageAttachments?)
 * Improved Stylesheet/ Script management (SnS)
 * Deploying your first site (general tips with guidance to specific  
host articles)


2. Common Tasks  Extensions
 * Migrating from other sites - Wordpress, Mephisto, etc.
 * Understanding tags  Radius
 * Getting Started III - Meta tags  Date of publishing
 * PageAttachments - Installations, providing downloads and linking  
to images/ thumbnails

 * Beyond HTML - providing a simple RSS feed for your site
 * Customizations - Time zone
 * Gallery - Image galleries
 * WYSIWIG Editors - WymEditor, FckEditor
 * Sitemap
 * Import/ Export
 * Using Radiant as a blog
 * Search Extension

3. Writing your Own Extension
 * Creating an extension I - Adding tags (and some useful tags)
 * Creating an extension II - Adding a tab in Admin UI (and what is  
shards?)

 * Creating an extension III - Modifying the Page UI from an extension

4. Additional Configurations  Advanced Admin
 * Previewing Radiant Pages (developer viewing)
 * Multi-site Extension (why and how)
 * Customizations II - Admin title, etc.
 * Skinning the Admin UI
 * Installing to a sub-domain
 * Installing to a sub-directory
 * Dealing with Caching

5. Commonly Used Extensions
 * Copy and Move
 * Reorder
 * Featured Pages
 * Mailer
 * Syntax Highlighter
 * Calendar/ Events
 * RSS Aggregator
 * Comments
 * Multiple RSS feeds from the content
 * Scheduler Extension
 * Newsletter

6. Advanced Topics (few solutions yet)
 * Versioning the content
 * Tagging  Rating Content
 * Multiple Languages
 * Migrating from SQLite to MySQL/ other database
 * Staging Extension (and ideas on how to do it)
 * Protecting the data
 * Setting up user access/ passwords
 * Integrating with Rails
 * Providing end-user help (radiant_help)
===

___
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] And what happened to the clear page cache button?

2008-06-08 Thread Casper Fabricius
Yes, well that's because you are running radiant in sub-directory; at http://allenlux.dyndns.org/radiant3/ 
 rather than  http://allenlux.dyndns.org/. Rails applications are  
generally expected to run in their own subdomain, and radiant is no  
exception. It is definitely possible to run it in a sub-directory, but  
then you have to aware at things like that.


I'd recommend using the absolute path for the css file in your layout,  
though:
link rel=stylesheet type=text/css href=/radiant3/mystyles/ 
new.css /


Cheers,
Casper


On 08/06/2008, at 0:49, John and Catherine Allen wrote:


Casper Fabricius wrote:
Yes, that's right, John. Clearing of the page cache is done  
automatically upon changes.


With regards to your stylesheet question, I tend to just write a  
standard link tag, referring to the slug of the stylesheet. For  
instance:


link rel=stylesheet href=/css/standard.css type=text/css  
media=screen /


Here I have a hidden page with the slug of css, and below that, I  
have a stylesheet page with the slug set to standard.css.



Casper,

Thanks, that pointed me in the right direction at last. I was  
getting confused between the Radiant path, made up of slugs, and  
the filesystem path.


However, on my test site it did not work at first. After looking at  
the Apache error logs, I tried omitting the leading slash, and now  
it works fine.


To be concrete:

Test page: http://allenlux.dyndns.org/radiant3/hello_world

Working version: the layout contains this reference:
link rel=stylesheet type=text/css href=mystyles/new.css /
where mystyles is the hidden page as you suggest in your message.

Non-working version:
link rel=stylesheet type=text/css href=/mystyles/new.css /
doesn't work (it seems to be looking for a non-existent filesystem  
folder

DocumentRoot/mystyles/

John




On 07/06/2008, at 15:35, John Allen wrote:


Another beginner question:

The older (?) Radiant documentation refers to a clear page cache  
button on the admin page.


My Radiant 0.6.7 sites don't have this button - I am right in  
thinking this is because Radiant now automatically clears the page  
cache when something is changed in the database?


John



--
John Allen
Bofferdange, Luxembourg
[EMAIL PROTECTED]
http://allenlux.dyndns.org

___
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] And what happened to the clear page cache button?

2008-06-07 Thread Casper Fabricius
Yes, that's right, John. Clearing of the page cache is done  
automatically upon changes.


With regards to your stylesheet question, I tend to just write a  
standard link tag, referring to the slug of the stylesheet. For  
instance:


link rel=stylesheet href=/css/standard.css type=text/css  
media=screen /


Here I have a hidden page with the slug of css, and below that, I  
have a stylesheet page with the slug set to standard.css.


Cheers,
Casper Fabricius
http://casperfabricius.com


On 07/06/2008, at 15:35, John and Catherine Allen wrote:


Another beginner question:

The older (?) Radiant documentation refers to a clear page cache  
button on the admin page.


My Radiant 0.6.7 sites don't have this button - I am right in  
thinking this is because Radiant now automatically clears the page  
cache when something is changed in the database?


John

--
John Allen
Bofferdange, Luxembourg
[EMAIL PROTECTED]
http://allenlux.dyndns.org

___
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] Radiant 0.6.7 + MultiSite

2008-06-04 Thread Casper Fabricius
Multisite has the haml plugin bundled with it, and it conflicts with  
the haml plugin now bundled with Radiant as of 0.6.7.


Try doing a deleting the haml plugin from multisite:
rm -rf vendor/extensions/multi_site/vendor/plugins/haml/

Cheers,
Casper Fabricius
http://casperfabricius.com


On 04/06/2008, at 2:27, Josh Schairbaum wrote:

I've got a completely new Radiant application using 0.6.7... it's  
completely fresh.  I bootstrapped, running the migrations and  
started it.  It worked.  Then I installed the MultiSite extensions  
from: http://svn.radiantcms.org/radiant/tags/rel_0-6-7/extensions/multi_site/


I ran the migration, after commenting out the clear_cache method in  
line 7 of page_controller_extensions.rb.  Started up the the server  
and received the following error:


ArgumentError in Admin/page#index

Showing Library/Ruby/Gems/1.8/gems/radiant-0.6.7/app/views/admin/ 
page/index.html.haml where line # raised:


wrong number of arguments (1 for 0)

Any ideas?

Regards,
Josh
___
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] Questions about deployment

2008-06-03 Thread Casper Fabricius

Hi Nate,

I recently updated the guide for deploying Radiant to Dreamhost,  
another shared host:

http://wiki.radiantcms.org/How_To_Deploy_on_Dreamhost

I don't know Railsplayground, but assuming you have SSH access you  
should be able to follow this guide, substituting the steps for  
creating the website and a database with whatever you do at  
Railsplayground. Also, my blog entry has examples of rolling two  
popular extensions into the deployment package:

http://casperfabricius.com/blog/2008/05/24/radiant-cms-on-dreamhost-with-phusion-passenger/

Cheers,
Casper Fabricius


On 02/06/2008, at 18:55, [EMAIL PROTECTED] wrote:


Hey all,

I am new to Radiant and even newer to deploying Radiant sites, and the
documentation I can find helps little. I have two apps running well on
my laptop but it's time to get them up on my shared hosting account at
Railsplayground and I am unsure about the best way to do that.
Railsplayground's stellar [cough] documentation has, once again, not
failed to disappoint.

On the Rails apps that I have built from scratch, I have always used
subversion for version control and Capistrano for deployment. Is it
possible to use Radiant the same way? Can a Radiant app be capified? I
am using the default sqlite3 db. I just wanted to ask before I went
through the whole process and screwed something up.

How are people deploying their Radiant apps? What is the ideal  
scenario

for development and deployment? Any thoughts would be greatly
appreciated.


~Nate

___
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] Questions about deployment

2008-06-03 Thread Casper Fabricius

Hi Anton,

I feel your pain, as I also follow the pattern of filling content into  
the database locally, and then deploy with that data later.


I use MySQL locally and on Dreamhost, and if you can live with that  
(MySQL is quite easy to install and manage), you can do as I do, which  
is not optimal or beautiful, but quite effective: Use mysqldump.


To export your local database, run this command from the root of your  
application:

mysqldump -u root radiant_development  ./db/dump.sql

Then upload the file to Dreamhost, and import it (make sure the  
database is created and empty):

mysql -u dh_mysql_user -pdh_mysql_pw radiant_production  ./db/dump.sql

If you have uploaded files using gallery, page_attachments or  
something else locally, you must also upload these manually from  
public to public.


/Casper


On 03/06/2008, at 13:45, Anton Aylward wrote:


Thank you for this, Casper.
I'm a Dreamhost customer and and this has cleaned up some 'failed to
start' problems I've been having.
Its also made deploying some examples I have on my laptop easier since
now I can just have Apache deal with them on an as-needed basis  
instead
of having to do a cd ~/Ruby/application; ./script/server  each  
time.


However there is one aspect of deploying on Dreamhost that I'd like to
ask the group here about, and that is getting the content of the
database out there.

My first deployment of Radiant on Dreamhost last year I had  
developed on
my laptop using SQlite3.  The laptop runs Linux, not Windows.  I  
used a
CSS file in the file system (lacking sophistication and  
understanding of

Radiant at that time).  I SFTP'd the files, including the database, to
the Dreamhost machine but the application wouldn't start.  It couldn't
open the database.  I don't know if this was a word-length, library or
version problem.  The application content was small enough that I  
could

create a new database on Dreamhost and paste the pages in.

Radiant is more sophisticated now.  The sites I'm developing use
extensions such as attachments, galleries, and of course the brilliant
styles_n_scripts.  Even before the site content is added there is a  
lot

of the site structure in the database now.  And before adding 'real'
content I find that I lay out the hierarchy/structure and few pieces  
of
boilerplate like a 'site map', 'About', and content and feedback  
pages.


So I have a very simple problem of how do I get this database that  
I've

developed as a the template or basic site content out to Dreamhost?

Reality is that by the time I've worked a bit it is more than just a
template, not least of all because the actual CSS and actual logos and
and snippets that deal with names etc are in the database too, as well
as many place-holders.  You know how it goes.

I've just spent a very futile week prior to deploying my new web  
site on
Dreamhost trying to convert a Sqlite3 database to a MySQL database  
on my
laptop.  I tried this so that I could debug any problems ahead of  
time.


There have been nothing but problems.  I have had no success.

I started with the import/export extension.  It doesn't work.  At the
very least it only knows about some of the tables.  I corresponded  
with

Sean about the problem and tried his suggestions.  Zilch.

I also searched the web.  There are many articles about converting
Sqlite3 to MySQL.  The ones on the MySQL site are plain wrong!  Others
admit to things like differencing SQL syntax but their 'fixes' are
incomplete.  Even after much hand editing of the Sqlite3 .dump file
MySQL kept erroring. Some problems I could not find any reason for  
even
though the revised syntax was A-OK according to the MySQL  
documentation.


Chris Dwan posted a tool that allowed copy from one DB to another.
http://blog.radixhound.com/2008/4/28/backing-up-radiant-cms-using-sqlite3
I'm going to try this today on my laptop.  I'll report on how it goes.

However there is still the problem of getting the database running on
Dreamhost and getting content into it there.

The reason I'm writing about this at length is that I am very  
surprised

that Rails doesn't have tools for all this as part of its baseline.
Rails2 has moved to Sqlite3 as its default, and that's fine for
development.  But I get to wonder if there are going to be more  
projects
that are like Radiant in that the database has a template and  
structure

that is part of the application and needs to be 'portable' as well.

Rails really needs something that can do database export/import in a
comprehensive and complete manner.


Casper Fabricius said the following on 03/06/08 03:17 AM:

Hi Nate,

I recently updated the guide for deploying Radiant to Dreamhost,
another shared host:
http://wiki.radiantcms.org/How_To_Deploy_on_Dreamhost

I don't know Railsplayground, but assuming you have SSH access you
should be able to follow this guide, substituting the steps for
creating the website and a database with whatever you do at
Railsplayground. Also, my blog

Re: [Radiant] Container tag with default values for nested tags

2008-06-03 Thread Casper Fabricius

Nice one, Sean. Seems obvious now that you've shown the way ;)

Thanks,
Casper

On 03/06/2008, at 20:41, Sean Cribbs wrote:


Well, the natural answer to deferment in Ruby is a closure, of course!

hash[:normal] ||= lambda { parse('lir:link //li') }

Sean

Casper Fabricius wrote:

Sean,

Thanks for your answer. However, parse doesn't work quite as I  
hoped. Calling parse will parse the given string immediately in the  
current context and return a string. I need to postpone the actual  
parsing until the context is changed to each item in the  
collection. I was hoping to be able to construct some kind of proxy- 
object that would respond to #call just like when nested templates  
has been given.


I can easily solve this by just inserting the default value  
unparsed, and then have a helper method that checks if the value is  
a string to parsed or a method to be invoked, but I find that  
solution quite ugly. I'm obsessing about it, because I'd like to  
contribute the tag to the Radiant core, so I want it to coded right.


Thanks,
Casper


On 01/06/2008, at 16:51, Sean Cribbs wrote:


Casper,

Call parse, passing the text you want to parse:

hash[:normal] ||= parse('lir:link //li')

Sean

Casper Fabricius wrote:
I'm developing a tag inspired by the way r:navigation / works;  
by using nested tags to let the user specify how he wants to  
render a given collection.


The user could write:
r:collection_tag
  r:normalbr:link/b/r:normal
/r:collection_tag

- and the tag uses this nested tag by doing:
  hash = tag.locals.collection_tag = {}
  tag.expand

- and then later:
  hash[:normal].call

- to render the contents of the nested tag.

However, I want the user to also be able to write just:
r:collection_tag /

- and the tag will populate hash[:normal] with a default value  
of, say, r:link /.


However, I don't know how to create a default value for a nested  
tag, least not when it contains other Radius tags that need to be  
parsed in the context of each iteration of the collection.


I have tried assigning default values with code such as:
  hash[:normal]   ||= 'lir:link //li'

- or:
  hash[:normal]   ||= Proc.new {'lir:link //li'}

- but the first is just a string, and does not respond to the  
#call method, and the second is just a proc, and do not in fact  
render r:link / in the context, it just returns the string  
unparsed.


I know of several examples on using default values for tag  
attributes, but not for nested tags. Any hints, ideas, examples?


Cheers,
Casper Fabricius
http://casperfabricius.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 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 mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] gallery extension

2008-05-27 Thread Casper Fabricius
Keith, just curious: How does Paperclip differ from attachment_fu? It  
seems to have almost the exact same interface - is the only difference  
that paperclip does not require rmagick, mini-magick or imagescience?


Casper Fabricius
http://casperfabricius.com

On 27/05/2008, at 18:19, Keith Bingman wrote:


Are you sure Joyent doesn't have RMagick?

I have a couple of Radiant sites there using both my own extensions  
and Sean's page_attachments with RMagick. Mini_magick does not work  
there, even if you freeze the gem.


I just discovered Paperclip, http://www.thoughtbot.com/projects/paperclip 
. It resizes images without RMagick or Mini_magick, just using the  
image_magick library itself. I have a prototype extension based on  
it, though it is not a full fledged gallery like Andrea's.


Keith Bingman
http://keithbingman.com




On May 27, 2008, at 6:07 PM, Steven Southard wrote:

Oh, mini_magick might be better.  I'm hosting on Joyent and they  
don't have rmagick.  They don't have mini_magick either but I might  
be able to freeze that one in.  What changes do I need to make to  
have it work with mini_magick?



On May 27, 2008, at 10:48 AM, Andrea Franz wrote:


On Tue, May 27, 2008 at 5:37 PM, Steven Southard
[EMAIL PROTECTED] wrote:
I am, great job of moving it to git.  Very easy to get and  
install.  I
thought maybe there are some requirements like imagemagick and  
rmagick.  I
don't have those gems installed so if they're needed it makes  
sense, I
guess.  If they are needed seems like it would be a good idea to  
add that to

the readme file.


Yeah you need at least rmagick or mini_magick.
You are right, I'm going to add it in the README file.
Thank you very much and let me know if it works.

--
Andrea Franz
http://gravityblast.com - http://nimboo.net
___
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 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] [ANN] File based layout extension now compatible with 0.6.7

2008-05-20 Thread Casper Fabricius
My extension for using standard Rails layout files with Radiant pages  
are now fully compatible with 0.6.7.


Get it here:
http://svn.casperfabricius.com/extensions/file_based_layout/tags/for-radiant-0.6.7/


= File Based Layout

This extension allows pages served by Radiant to share a standard file- 
based Rails layout with Rails-generated pages. Full ERb, HAML or any  
other rendering engine can be used as normal in the layout, however,  
Radiant tags cannot currently be used in the layouts.


Tested with Radiant 0.6.7

== Installation

1. Place this extension in the RAILS_ROOT/vendor/extensions/ 
file_based_layout directory

2. Run % rake db:migrate:extensions

== Usage

You must have a Rails layout file ready in the app/views/layouts/  
directory of Radiant or an extension.


=== The Rails layout (typically .html.erb) file

There are no special requirements to the layout file. It contain  
anything a normal Rails app will accept.


The body page part is always rendered where it says %= yield % in  
the layout. Other page parts are rendered where they yielded by their  
name.


For instance, the page part extended are rendered where the layout  
says %= yield :extended %.


=== The Radiant Administration interface

Create a new layout from the Layouts tab. Click the More link  
below the Name text-box, and select a layout file. Any contents in  
the Body text area will be ignored.


Any page that has this new Layout, or has inherited the layout, will  
now render using the selected Rails layout file.


== Changes made by this extension

* layout_file field added to the Layouts table
* file_based? method added to the Layout model
* SiteController's process_page method aliased to render using a file- 
based layout, or normal
* Render methods added to SiteController (eventually forwarding to  
Page's render methods), to be able to map various page parts to  
different content snippets in the layout
* LayoutController's new and edit method changed to supply list of  
layout files to the view
* Layout File drop-down list added to the Layout edit view (using  
shards)


== About the author

Casper Fabricius is a Danish Rails and Radiant developer living in  
Copenhagen.

Weblog: http://casperfabricius.com
Email: [EMAIL PROTECTED]
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Extension initialization code reloads on each request in dev mode

2008-05-20 Thread Casper Fabricius
Radiant 0.6.7 seems to call the activate method of each extension upon  
each request when in development mode. Perhaps it has always been so,  
but it gets very visible and quite annoying when extensions use the  
shards/facets feature. Here is an example of a clean 0.6.7 with the  
reorder extension for 0.6.7 installed, where a couple of pages has  
been visited in development mode:






This unwanted behaviour goes away in production mode, so it must be  
related to Rails reloading all files on each request in development  
mode. How do I avoid that the activate method is called upon each  
request in development mode - or - how do I avoid that it caches  
previously added fragments/shards?


Cheers,
Casper Fabricius
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

[Radiant] Shards in Radiant 0.6.7

2008-05-19 Thread Casper Fabricius

Hi,

Thanks for all the great work going on in the Radiant community.

I'm upgrading one of my extensions to be compatible with 0.6.7, and I  
am migrating it to use the shards feature at the same time. While the  
release of 0.6.7 indicates that shards has been folded into the  
core, I can't get it work right. I can see that the render_region  
calls are present in the views, but when I try to plugin my own  
partials in the extension activation, I get an error:



  def activate
...
page.index.add :node, 'file_based_layout_column'
  end


/Users/casper/Projects/Work/radiant-0.6.7/vendor/extensions/ 
file_based_layout/file_based_layout_extension.rb:16:in `activate':  
undefined local variable or method `page' for  
#FileBasedLayoutExtension:0x24c334c (NameError)
from /Users/casper/Projects/Work/radiant-0.6.7/lib/radiant/ 
extension.rb:34:in `activate'



Does this mean I still have to add the shards extension and put it  
first in my extension load order? Or have I misunderstood how to use  
tie in my own stuff in Radaint using shards? Does anyone have a link  
to an up-to-date tutorial on shards?


Cheers,
Casper Fabricius
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Episode 2 of podcast

2008-04-30 Thread Casper Fabricius

Hi Sean,

Yet another interesting podcast - thanks! I didn't realize that  
Shopify was using Radiant. Keep up the good work, I know you'll get  
those sound levels right ;)


Cheers,
Casper Fabricius


On 29/04/2008, at 17:14, Sean Cribbs wrote:
I've just published the second episode of the Radiant podcast.  I  
just wanted to apologize in advance for some of the low sound levels  
at places.  I still haven't figured out everything I need to know to  
make the response more flat.  Regardless, it's a great interview  
with Tobi and James from Shopify.  Enjoy!


Sean
___
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] Moving forward more quickly

2008-04-01 Thread Casper Fabricius

Hi Sean,

Great thoughts, and fantastic to hear that you will devote even more  
time to Radiant.


Evan just gave that same speech here at the Ruby Fools 2008 conference  
in Copenhagen, and you are right: It is quite inspirational. Git seems  
to be the right choice for opening up the contribution process. Now  
that Rails is also moving to git, it will gently push a lot of people  
in the community to install and learn to use git.


Cheers,
Casper Fabricius


On 31/03/2008, at 19:15, Sean Cribbs wrote:

Radiant users and developers,

Over the weekend I took the time to watch the presentation by Evan  
Phoenix about Rubinius that was given at MountainWest RubyConf 2008,  
available from confreaks.com (You should watch it, too!).  I was  
mostly interested in hearing where Rubinius was technically, but his  
talk took a very different path in that it focused on how community  
is being fostered in the project.  His primary points were about  
encouraging experimentation and lowering the bar of entry. Some of  
his comments really struck home with me, which I'll paraphrase here:


1) A team of 'core committers' tends to stifle debate and  
experimentation and marginalizes those who have differing opinions.   
This also has the effect of slowing progress on the project when the  
core team is unable to participate.  If someone is enthusiastic  
about contributing, that should be fostered, not squelched by a high  
barrier to entry.
2) If a project is open-source, it should be much more open than  
most projects actually are.  Rubinius gives 'commit bits' after the  
first accepted patch.  This promotes the feeling of a real community  
project, rather than a closed, orchestrated one.
3) Small changes often encompass some of the greatest effort.  One  
should allow small, incremental changes, no matter how tiny.
4) It's ok to make mistakes.  No one, even a 'core committer', is  
infallible.  Learn from your mistakes, document them, and move on.


The pace of Radiant over the last few months has been slower than  
snails.  I want to remedy this.  I also want to
make amends for the ways that I might have squelched dissent or  
artificially slowed the progress of the project through over- 
engineering the timeline and smashing potentially transformative  
ideas.
To this end, I want to attempt an experiment.  The first step is  
that I would like to open up the codebase for more experimentation.   
I have created a clone of the Radiant Subversion repository on  
GitHub (http://github.com/seancribbs/radiant/tree/master).  I  
encourage everyone who is interested in hacking the Radiant codebase  
to fork it, make your changes, and send me pull requests.  During  
this experiment, we will also be maintaining the traditional SVN  
repo and I will push changes to it when necessary.  For those who  
are familiar with 'git', this should be an opportunity to try out  
that cool feature you've always been wanting to build. That said,  
I'd like our basic ground-rule to apply, namely, that any patch you  
submit should have adequate specs.  Although we like to pride  
ourselves on our specs, the coverage in Radiant is still not  
exhaustive, so any patches that improve the quality and quantity of  
specs are also greatly encouraged.


The second step is that I am going to start restructuring my time to  
give Radiant the TLC that it needs.  I want to be a more nurturant  
parent.  Earlier this year, John Long asked me to take  
responsibility of the programming aspects of the project so that he  
could focus on the design.  In recent weeks I have found that I am  
not logging a full 40-hour week on my projects, and yet Radiant is  
not moving forward.  Therefore, I will block out one day a week  
(Friday) to spend tending to Radiant.  During this day each week, I  
will be developing the codebase, addressing tickets and patches, and  
possibly working on a podcast.  I also intend to have office hours  
on the #radiantcms IRC channel on FreeNode all day (8AM US Central  
to about 6PM).


My hope is that both of these steps will give Radiant the shot in  
the arm that it needs.  I'd appreciate your thoughts and feedback.


All the best,

Sean Cribbs

P.S. Incidentally, a solution to Josh French's problem with building  
a project with the Radiant source in the root could be solved with  
git-svn, allowing him to keep up to date with the source of Radiant  
while building his own project in the same tree. Git is much more  
powerful at managing multiple sources of changes.

___
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