Re: [Radiant] Language Redirect Extension

2007-01-23 Thread Giovanni Intini
Now you're forcing me to write tests :D

2007/1/22, Sean Cribbs [EMAIL PROTECTED]:
 Looks good, Giovanni!  A functional test would probably be all that is
 necessary -- something that tests if the redirection works correctly, in as
 many different cases as possible or reasonable.

 Sean


  On 1/22/07, Giovanni Intini [EMAIL PROTECTED] wrote:
 
  I ported the Language Redirect Behavior to mental. You can get it from
 
 
 https://svn1.hosted-projects.com/medlar/language_redirect_extension
 
  The port was straightforward so I assumed no tests were necessary
  (wrong assumption, I know). You can do whatever you want with it.
 
  --Giovanni
  ___
  Radiant mailing list
  Post:   Radiant@lists.radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:
 http://lists.radiantcms.org/mailman/listinfo/radiant
 


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


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


Re: [Radiant] Ideas for reimplementation of radiant caching

2007-01-23 Thread Jacob Burkhart
Before changing how the caching works, I would ask, what are the reasons 
for modifying caching.  I can think of a few.

- It's annoying to have to clear page cache after every edit in order to 
view your change.

The solution Dan suggests would make it possible to know exactly which 
pages need their cache cleared.  However, having a versioning system 
like BJ suggests would also help to accomplish this goal. And even 
currently, you can have a dev URL to your site where none of the pages 
are cached.

Also, I see no reason why we can't attach a Preview button directly to 
each page edit screen.


- Apache is faster than Radiant's cache.

Well then can we make Apache serve everything?  Why not have the options 
to make Radiant generate a full directory of HTML files.  A possible way 
to support having select pieces of the site be dynamic is to use Apache 
server side includes to make calls back to Radiant for specific pieces.


Are there any other reasons for changing Radiant's caching?

-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] How to convert a Behavior to a Page Type in a Radiant Extension package (Mental)

2007-01-23 Thread Loren Johnson


ROUGH STEPS TO CONVERTING A BEHAVIOR TO A PAGE TYPE PACKAGED AS A  
RADIANT EXTENSION


I've ported all my own behaviors to Page Types packaged in Extensions  
within the last day so my mind is fresh on the topic, however this is  
by no means a comprehensive or even wholly accurate guide.


Use at your own risk (SEE ALSO NOTE AT BOTTOM).:


1. Rename the folder of your Behavior and DON'T name it end with  
Extension then move the folder from plugins to extensions so:


# move
/vendor/plugins/comments_behavior
# to
/vendor/extensions/comments

2. Delete the init.rb file and create a new file called  
your_extension_name_extension.rb and fill it with this general:


class CommentableExtension  Radiant::Extension
  version 0.1
  description Blah blah blah which will appear as the description  
of this Extension under the Extensions list in the Mental / new  
Radiant.

  url http://www.fn-group.com/;

  # Happens when the enabled checkbox is check and saved in the  
admin Extensions list

  def activate
# These are Page type classes which were converted from  
behaviors as detailed below

 CommentBucket
 Commentable
  end

  # The opposite
  def deactivate
  end
end


3. Classes already in the lib directory are auto-loaded and no longer  
need to be explicitly required. In fact the explicit requiring of the  
classes in the lib directory seems to break things, but no need to  
worry they're already available.


4.  Rename your class appropriately, at least taking off Behavior  
from the end of name if it's there, then inherit from Page not  
Behavior::Base, so:


class CommentableBehavior  Behavior::Base   # becomes
class Commentable  Page # Isn't that neat. We're just adding right  
onto the page.


5.   Comment out or delete the register line, this is no longer  
needed in a Page type and will in fact break things if it's not removed:


register Commentable # becomes
# register Commentable

6.   Remove the  define_tags do ... end enclosure. It's no longer  
needed. Nifty Page types will know what to do with all those tag   
do |tag|s


7. If you have disabled the page caching in your behavior change:

def cache_page?
   false
end

#to

def cache?
   false
end

8. Search and replace @page with self ...

9. Encapsulate existing comments in desc %{ what your tag does  
here ... } headers on the line above a tag definition to get a  
description to show-up in the new Available Tags link in the Admin  
interface.


10. Restart the web server for your Radiant app, look for errors in  
log/mongrel.log (or later in log/production.log) -- repeat.



NOTE
If you were creating an Extension from scratch you get this framework  
by using script/generate extension YourExtensionName ...)


This guide in no way demonstrates the power or architecture of the  
new Radiant Extensions which go beyond the scope of behavior and can  
include, among other things an admin interface, custom models, views  
and routes




Loren Johnson
www.fn-group.com


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

Re: [Radiant] Comments Behavior port to an Page Type / Extension

2007-01-23 Thread Loren Johnson

Oops...

A zip of the ported commentable extension code can be found here:

http://www.fn-group.com/assets/code/commentable.zip

Sorry about the attachment for those of you who received it  that way.

Loren Johnson
www.fn-group.com


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


Re: [Radiant] Comments Behavior port to an Page Type / Extension

2007-01-23 Thread Erik van Oosten
Hi Loren,

Could you add this (and your previous mail) to the Wiki?

Thanks!
Erik.


Loren Johnson schreef:
 Oops...

 A zip of the ported commentable extension code can be found here:

 http://www.fn-group.com/assets/code/commentable.zip

 Sorry about the attachment for those of you who received it  that way.

 Loren Johnson
 www.fn-group.com


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

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/

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


Re: [Radiant] Comments Behavior port to an Page Type / Extension

2007-01-23 Thread Sean Cribbs


Sean Cribbs expressed no desire to convert his Comments behavior.



Not exactly -- I just didn't want to do a direct port.  Because you can have
models of your own in Mental, I saw no reason to keep storing comments as
grandchildren pages or having the double-loopback page redirect.

That said, more power to you, if it works for you!

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

Re: [Radiant] Comments Behavior port to an Page Type / Extension

2007-01-23 Thread Loren Johnson

Well color me corrected. So perhaps this is worth revisiting later  
but still before the official Radiant Blog functionality gets worked- 
out (which could be quiet a while I'd guess).

I think the pages as grand children is helpful for now as keeping it  
in the page tree has a certain poetry to it and keeps the management  
of the comments inherently simple. An admin tab would have to start  
from scratch, but by all means I can imagine a better way . . . Have  
you ever done a rough mocked-up of how it might work ?

If 0.7 comes-out with more a more full set of blogging features do  
you imagine commenting would in fact be integrated or as an  
Extension? Mostly curious in terms of future architecture plans...
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] JS-free view ? (newcomer)

2007-01-23 Thread Boris
Hi,

I was looking for rails cms and finally, radiant is the one I want.
However I ride w3m in text mode (a11y background) and because of
javascript, I can't pass the demo test...

Is it possible to turn off javascript in the view layer ?

if yes? then users += 1 end

Thanks !
-- 
Boris Daix
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] JS-free view ? (newcomer)

2007-01-23 Thread Sean Cribbs

Boris,

In order to get unobtrusive Javascript and full plain-text compatibility,
we would have to change a lot of the code -- maybe this can be a 1.0 goal.
Luckily JS is only required in the admin interface, so you might be able to
enable JS just for that domain/url in your browser.

Sean

On 1/23/07, Boris [EMAIL PROTECTED] wrote:


Hi,

I was looking for rails cms and finally, radiant is the one I want.
However I ride w3m in text mode (a11y background) and because of
javascript, I can't pass the demo test...

Is it possible to turn off javascript in the view layer?

if yes? then users += 1 end

Thanks!
--
Boris Daix
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

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

[Radiant] New Blog post about mental

2007-01-23 Thread Sean Cribbs

There's been so much discussion about mental, I thought it deserved a 'How
To', so here you go:

http://radiantcms.org/blog/2007/01/23/how-to-getting-mental/

I hope this answers a lot of questions!

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

Re: [Radiant] New Blog post about mental

2007-01-23 Thread Kevin Ansfield

Hi Sean,

Just noticed on the blog post that it states Radiant is dependant on edge
rails under the cons section. Is this still the case, or are the core team
looking to stabilise it on Rails 1.2 now that it's been released?

Kev


On 1/23/07, Sean Cribbs [EMAIL PROTECTED] wrote:


There's been so much discussion about mental, I thought it deserved a
'How To', so here you go:

http://radiantcms.org/blog/2007/01/23/how-to-getting-mental/

I hope this answers a lot of questions!

Sean

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


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

Re: [Radiant] New Blog post about mental

2007-01-23 Thread Sean Cribbs

We had a discussion about this.  The current plan is to keep on the latest
until Radiant is ready to release, then either freeze/external to the latest
stable version or specify the gem version in environment.rb.  And by Edge
Rails, I mean that we are currently using the 1-2-prerelease branch.

Sean

On 1/23/07, Kevin Ansfield [EMAIL PROTECTED] wrote:


Hi Sean,

Just noticed on the blog post that it states Radiant is dependant on edge
rails under the cons section. Is this still the case, or are the core team
looking to stabilise it on Rails 1.2 now that it's been released?

Kev


On 1/23/07, Sean Cribbs [EMAIL PROTECTED] wrote:

 There's been so much discussion about mental, I thought it deserved a
 'How To', so here you go:

 http://radiantcms.org/blog/2007/01/23/how-to-getting-mental/

 I hope this answers a lot of questions!

 Sean

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



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


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

Re: [Radiant] JS-free view ? (newcomer)

2007-01-23 Thread Mislav Marohnić

On 1/23/07, Sean Cribbs [EMAIL PROTECTED] wrote:


Luckily JS is only required in the admin interface, so you might be able
to enable JS just for that domain/url in your browser.



He cannot. It is a text browser not supporting JS
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: [Radiant] JS-free view ? (newcomer)

2007-01-23 Thread John W. Long
Boris wrote:
 I was looking for rails cms and finally, radiant is the one I want.
 However I ride w3m in text mode (a11y background) and because of
 javascript, I can't pass the demo test...

The Radiant admin will probably always require Javascript.

--
John Long
http://wiseheartdesign.com
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Ideas for reimplementation of radiant caching

2007-01-23 Thread Daniel Sheppard
I don't see any.  It's good enough for most cases, I believe.

The unmentioned alternative, of course, is memcached.  It would
take minimal changes to the code, probably a single line in
environment.rb , since ResponseCache piggy-backs on the Rails caching
mechanism.  However, not everyone could run memcached.

 

Actually, ResponseCache doesn't piggy-back on the rails caching
mechanism - at least not in the sense where it would be simple to swap
in one of the other rails caching backends. However, I think this might
actually be the reason why ResponseCache manages to perform so well -
all the abstraction in the rails caching creates a big performance hit.
Writing an extension that uses memcache rather than the filesystem would
require replacing the entire ResponseCache class.
 
Dan. 
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: [Radiant] Ideas for reimplementation of radiant caching

2007-01-23 Thread Alexander Horn
  Well then can we make Apache serve everything?  Why not have the options
  to make Radiant generate a full directory of HTML files.  A possible way
  to support having select pieces of the site be dynamic is to use Apache
  server side includes to make calls back to Radiant for specific pieces.

 This would be an ideal case, but I think the path Radiant takes is a good
 compromise.  The advantage of Radiant's caching system over static files is
 that you can include headers.

Sometimes this kind of information gets lost so here is a reminder:

The Corex branch (an experimental transition from Trunk to Mental) has
had a working implementation of a new caching mechanism that writes
files to public/ once they are requested (GET). Since public/ has
precedence over the application controller you can get extremely good
performance results. Unfortunately, this type of static caching turned
to out to be inflexible because headers cannot be cached. Otherwise it
would have been a powerful alternative to the current caching
mechanism. Too bad headers can't be reliably modified with META
tags.

On 1/23/07, Sean Cribbs [EMAIL PROTECTED] wrote:

 
  - It's annoying to have to clear page cache after every edit in order to
  view your change.

 The cache is automatically cleared for the page you edited, but only that
 page.  If you edit a layout or snippet, the whole cache is cleared.

  Also, I see no reason why we can't attach a Preview button directly to
  each page edit screen.

 I think this would be a nice feature too.  PDI?

  Well then can we make Apache serve everything?  Why not have the options
  to make Radiant generate a full directory of HTML files.  A possible way
  to support having select pieces of the site be dynamic is to use Apache
  server side includes to make calls back to Radiant for specific pieces.

 This would be an ideal case, but I think the path Radiant takes is a good
 compromise.  The advantage of Radiant's caching system over static files is
 that you can include headers.

 I know you're probably using Apache in a figurative sense, but not everyone
 uses Apache. kckcc.edu runs quite speedily and effortlessly (excepting the
 site map) on Litespeed.  We use the built-in LSAPI Rails bridge, which is
 purported to have a 30% boost over FastCGI.  There are other ways to eek out
 performance too, not all of which have to do with the caching.

  Are there any other reasons for changing Radiant's caching?

 I don't see any.  It's good enough for most cases, I believe.

 The unmentioned alternative, of course, is memcached.  It would take minimal
 changes to the code, probably a single line in environment.rb , since
 ResponseCache piggy-backs on the Rails caching mechanism.  However, not
 everyone could run memcached.

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




-- 
Alexander Horn
http://www2.truman.edu/~ah428





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


[Radiant] Wiki

2007-01-23 Thread BJ Clark
John + Core,
Is there a better Wiki we can move to? I can't even figure out how to
create a new page. Does one need privileges and how does one get them?
I'd really like to post some stuff on there (like the RSS Reader
extesion).

Thanks,
BJ Clark
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Wiki

2007-01-23 Thread Daniel Sheppard
There's a register link just under the search button. You need to
register before you can modify the wiki or post tickets. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of BJ Clark
 Sent: Wednesday, 24 January 2007 4:52 PM
 To: Radiant@lists.radiantcms.org
 Subject: [Radiant] Wiki
 
 John + Core,
 Is there a better Wiki we can move to? I can't even figure out how to
 create a new page. Does one need privileges and how does one get them?
 I'd really like to post some stuff on there (like the RSS Reader
 extesion).
 
 Thanks,
 BJ Clark
 ___
 Radiant mailing list
 Post:   Radiant@lists.radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] JS-free view ? (newcomer)

2007-01-23 Thread Boris
John W. Long [EMAIL PROTECTED] writes:

[...]

 The Radiant admin will probably always require Javascript.

So I will probably never be able to use radiant :-(

Requiring JS breaks overall radiant accessibility.  Isn't JS mostly
used to shrink the content tree ?  This would be great to relax this,
by providing simple fallbacks for people without JS support in their
browser, see quotes below.

Requiring JS would also break no-fluff and minimalistic claims,
IMO.

So how could I bypass the admin view requiring JS ?  Is there a way to
manage content offline ?

I'm looking forward to see radiant as the first accessible Rails CMS !

Thanks for your attention,

Quotes:

   developers need to provide fallback options for users on other
   platforms or browsers, as most methods of Ajax implementation rely
   on features only present in desktop graphical browsers.
 --Wikipedia, http://en.wikipedia.org/wiki/Ajax_(programming)#Accessibility

   AJAX and JavaScript are supposed to be used to enhance the user
   experience when run on a platform that supports it, they are not
   there to replace the job of the server in the first place
 --Brett Parker, http://www.sommitrealweird.co.uk/blog/2006/08/29
-- 
Boris Daix
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant