Re: [Radiant] Show the Username in the front end for logged-in user of the radiant cms

2010-01-10 Thread Chris Parrish
You mention front end so I assume you aren't referring to the Radiant 
Admin pages.  What kind of user are we talking about here?  A Radiant 
user (someone who can log into the admin part of your site) or a site 
user (presumably you are using an extension to allow end users to 
register and log into the front end of your site).

-Chris

On 1/10/2010 10:41 PM, Ninad Pol wrote:
 Hi,

 In the front end i need to show the *Username* for logged-in user of the
 radiant. So is their any *radius tag* using which i can show this on webpage
 by accessing user session ?
 If no what is the possible way to do this ?



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


[Radiant] [ANN] SnS v0.8.2

2010-01-06 Thread Chris Parrish
Technically no changes here -- except fixing my failure to update the 
extension's version number last time.  Doh!

http://github.com/SwankInnovations/radiant-sns-extension/tree/v0.8.2

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


[Radiant] [ANN] SnS v0.8.1

2010-01-03 Thread Chris Parrish
I just wanted to let people know that I've done some cleanup to SnS.  It 
should work better with Radiant 0.7 - 0.8.1 now.

Let me know if you have any questions and problems.  Especially if there 
are any Ruby 1.9.1 issues as I'm not currently running it.

Also, feel free to run the specs.  They're rather extensive and should 
all pass now.

Next step:  Repackage SnS to work with the new 0.9.

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


[Radiant] SnS Usage Questions -- I Need Feedback

2009-10-09 Thread Chris Parrish
I'm upgrading/fixing/refactoring SnS right now -- partly to resolve some 
issues with 0.8.x and partly to get it ready for 0.9 -- and I could use 
some user feedback...


1.  Does anyone use custom values for the SnS settings?  These include:

   * css_dir
   * js_dir
   * css_mime
   * js_mime

John has suggested I simplify SnS by fixing these values to defaults 
(convention over configuration).  Would this cause any problems for you 
or your users?  Would anyone even notice?



2.  Do most of you use SnS Minify along with SnS?  Would anyone be 
opposed to my incorporating it into SnS?  I don't mind leaving it as a 
separate extension but there's no need to make people install two 
extensions if we're all using both.


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


Re: [Radiant] SnS Usage Questions -- I Need Feedback

2009-10-09 Thread Chris Parrish
And what if I took away that setting an forced you to use the default?  
Could you live with that?


Anyone else?

-Chris


Mamed Mamedov wrote:

Hi!

Yes, I'am using SnS extension in my projects. And I'am changed SnS settings:
* js_dir to = 'jscripts'

And that is all!

Regards,
Mamed Mamedov

Sent from Azerbaijan
Stephen 
Leacockhttp://www.brainyquote.com/quotes/authors/s/stephen_leacock.html
- I detest life-insurance agents: they always argue that I shall some
day
die, which is not so.

On Fri, Oct 9, 2009 at 12:32 PM, Chris Parrish 
chris.parrish-forumm...@swankinnovations.com wrote:

  

I'm upgrading/fixing/refactoring SnS right now -- partly to resolve some
issues with 0.8.x and partly to get it ready for 0.9 -- and I could use some
user feedback...

1.  Does anyone use custom values for the SnS settings?  These include:

  * css_dir
  * js_dir
  * css_mime
  * js_mime

John has suggested I simplify SnS by fixing these values to defaults
(convention over configuration).  Would this cause any problems for you or
your users?  Would anyone even notice?


2.  Do most of you use SnS Minify along with SnS?  Would anyone be opposed
to my incorporating it into SnS?  I don't mind leaving it as a separate
extension but there's no need to make people install two extensions if we're
all using both.

Thanks,
Chris
___
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] SnS Usage Questions -- I Need Feedback

2009-10-09 Thread Chris Parrish
How are you setting this value?  Are you using the built-in rake tasks 
or editing the database directly.


-Chris


Mamed Mamedov wrote:

:) Hm..
I think there is no problem with that, BUT - I don't know why my
installation of radiant does not working with default value of
js_dir setting. (on all of my projects). Simply, it gives 404 error
:(
When changing this setting to anything else - it works ok :)

On 10/9/09, Chris Parrish chris.parrish-forumm...@swankinnovations.com wrote:
  

And what if I took away that setting an forced you to use the default?
Could you live with that?

Anyone else?

-Chris


Mamed Mamedov wrote:


Hi!

Yes, I'am using SnS extension in my projects. And I'am changed SnS
settings:
* js_dir to = 'jscripts'

And that is all!

Regards,
Mamed Mamedov

Sent from Azerbaijan
Stephen
Leacockhttp://www.brainyquote.com/quotes/authors/s/stephen_leacock.html
- I detest life-insurance agents: they always argue that I shall some
day
die, which is not so.

On Fri, Oct 9, 2009 at 12:32 PM, Chris Parrish 
chris.parrish-forumm...@swankinnovations.com wrote:


  

I'm upgrading/fixing/refactoring SnS right now -- partly to resolve some
issues with 0.8.x and partly to get it ready for 0.9 -- and I could use
some
user feedback...

1.  Does anyone use custom values for the SnS settings?  These include:

  * css_dir
  * js_dir
  * css_mime
  * js_mime

John has suggested I simplify SnS by fixing these values to defaults
(convention over configuration).  Would this cause any problems for you
or
your users?  Would anyone even notice?


2.  Do most of you use SnS Minify along with SnS?  Would anyone be
opposed
to my incorporating it into SnS?  I don't mind leaving it as a separate
extension but there's no need to make people install two extensions if
we're
all using both.

Thanks,
Chris
___
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] SnS Usage Questions -- I Need Feedback

2009-10-09 Thread Chris Parrish

Ah-ha.

The challenge with the Settings Extension is that it makes some very 
simple assumptions about settings.  It's not it's fault, really, it just 
can't account for the needs of extensions.


You can use it with SnS but you will run into two issues:

  1. SnS enforces validation rules on the settings (for instance you
 can't name your js_dir: \\my new, cool js directory//).  The
 rake tasks run setting changes through the SnS::Config class which
 validates them.  That way you don't accidentally input something
 that would break things.

  2. SnS loads its config values into memory at startup so that every
 time the system needs a setting value, there isn't an extra db hit
 required.  Changing the db directly, doesn't change the in-memory
 version. The rake task changes both.

So, if you use the Settings Extension with SnS, you'll need to:

  1. Be careful with your setting names (not an issue for most
 developers but I'd be careful opening that up to general users).

  2. Restart your application to force SnS to read the db values into
 memory.

If that still doesn't work, let me know (we'd have a bug on our hands, 
then).


-Chris

Mamed Mamedov wrote:

First, I'am used built-in rake tasks, but when I've installed Settings
extension I'm setting this value through admin-interface :)

On 10/10/09, Chris Parrish chris.parrish-forumm...@swankinnovations.com wrote:
  

How are you setting this value?  Are you using the built-in rake tasks
or editing the database directly.

-Chris


Mamed Mamedov wrote:


:) Hm..
I think there is no problem with that, BUT - I don't know why my
installation of radiant does not working with default value of
js_dir setting. (on all of my projects). Simply, it gives 404 error
:(
When changing this setting to anything else - it works ok :)

On 10/9/09, Chris Parrish chris.parrish-forumm...@swankinnovations.com
wrote:

  

And what if I took away that setting an forced you to use the default?
Could you live with that?

Anyone else?

-Chris


Mamed Mamedov wrote:



Hi!

Yes, I'am using SnS extension in my projects. And I'am changed SnS
settings:
* js_dir to = 'jscripts'

And that is all!

Regards,
Mamed Mamedov

Sent from Azerbaijan
Stephen
Leacockhttp://www.brainyquote.com/quotes/authors/s/stephen_leacock.html
- I detest life-insurance agents: they always argue that I shall some
day
die, which is not so.

On Fri, Oct 9, 2009 at 12:32 PM, Chris Parrish 
chris.parrish-forumm...@swankinnovations.com wrote:



  

I'm upgrading/fixing/refactoring SnS right now -- partly to resolve
some
issues with 0.8.x and partly to get it ready for 0.9 -- and I could use
some
user feedback...

1.  Does anyone use custom values for the SnS settings?  These include:

  * css_dir
  * js_dir
  * css_mime
  * js_mime

John has suggested I simplify SnS by fixing these values to defaults
(convention over configuration).  Would this cause any problems for you
or
your users?  Would anyone even notice?


2.  Do most of you use SnS Minify along with SnS?  Would anyone be
opposed
to my incorporating it into SnS?  I don't mind leaving it as a separate
extension but there's no need to make people install two extensions if
we're
all using both.

Thanks,
Chris
___
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] Re: SnS Extension Install Problem

2009-09-29 Thread Chris Parrish

Two questions:

  1. If you look at the vendor/extensions/sns/sns_extension.rb file,
 what version is listed there?  (Should be on line 13).

  2. The radiant:extensions:sns:install task basically calls the
 migrate and update tasks.  What happens if you run these
 independently:
 rake radiant:extensions:sns:migrate --trace
 rake radiant:extensions:sns:update --trace


-Chris

David Alan Hjelle wrote:

Chris,

Thanks for a response!

I went ahead and did what you said, and put the result in a pastie at 
http://pastie.org/636064. In the end, the error seems to be exactly 
the same as reported with Ray.


I looked for the version number in sns_extension.rb, and found 0.8.0. 
I'm pretty sure that I grabbed the latest version (or that ray did 
automatically). From my app root, I did a git submodule summary and 
got:



* vendor/extensions/sns 000...7fc5476 (66):
   Fixed issue with getting blank assets every second request when 
using mod_passenger.


Was that the proper way to check? (I'm still a git newbie, too.)

To use vlad, I ended up modifying the Rakefile in the app root to:


require File.join(File.dirname(__FILE__), 'config', 'boot')

import File.join(RADIANT_ROOT, 'Rakefile')

# added to use vlad deployment
begin
require vlad
Vlad.load(:app = :passenger, :scm = :git)
rescue LoadError
# do nothing
end


I don't think that should have changed things, but I'm really a newbie 
at Ruby/Rails/Rake, etc., so I don't have a good feel for what really 
is happening yet.


Oh, and, yes, I am using Radiant 0.8.1.

Ah ha!

I disabled the lines in the root Rakefile that I had added for vlad, 
and then the install worked fine.


Anyone have any insight into why that might be?

Thanks!

David Alan Hjelle
1 Corinthians 2:2
http://thehjellejar.com/

See Rita's spoons at http://jarofwood.com/.

See my brother's software at http://calftrail.com.


From: Chris Parrish chris.parrish-forumm...@swankinnovations.com
Date: September 28, 2009 22:44:20 CDT
To: radiant@radiantcms.org
Subject: Re: [Radiant] SnS Extension Install Problem
Reply-To: radiant@radiantcms.org


Hello David.  I see that you're using ray and vlad -- which are tools 
I've never used (for now I still use capistrano) so I'm not sure the 
issue isn't in there somewhere but I'll do my best in the meantime to 
help.


I see that you are installing SnS as a git submodule.  This seems to 
be downloading from github ok but I'm not sure which version of SnS 
you are using.  Currently the latest version (master) runs fine for 
me on Radiant 0.8.1 (though I have some changes I'd still like to 
make before I update the version number).  But if you are running an 
earlier version of SnS, this could be your problem as they don't play 
with pre 7.x Radiant well.


Assuming the correct version is installed, it appears that the 
following rake task seems to be failing for some other reason:

  rake -q RAILS_ENV=development radiant:extensions:sns:install

Try moving the SnS extension out of the vendor/extensions/.disabled 
directory (it should reside in vendor/extensions/sns) and then 
manually running the following rake task and posting (or pastie-ing) 
the results:

  rake RAILS_ENV=development radiant:extensions:sns:install --trace

-Chris




___
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] SnS Extension Install Problem

2009-09-28 Thread Chris Parrish
Hello David.  I see that you're using ray and vlad -- which are tools 
I've never used (for now I still use capistrano) so I'm not sure the 
issue isn't in there somewhere but I'll do my best in the meantime to help.


I see that you are installing SnS as a git submodule.  This seems to be 
downloading from github ok but I'm not sure which version of SnS you are 
using.  Currently the latest version (master) runs fine for me on 
Radiant 0.8.1 (though I have some changes I'd still like to make before 
I update the version number).  But if you are running an earlier version 
of SnS, this could be your problem as they don't play with pre 7.x 
Radiant well.


Assuming the correct version is installed, it appears that the following 
rake task seems to be failing for some other reason:

   rake -q RAILS_ENV=development radiant:extensions:sns:install

Try moving the SnS extension out of the vendor/extensions/.disabled 
directory (it should reside in vendor/extensions/sns) and then manually 
running the following rake task and posting (or pastie-ing) the results:

   rake RAILS_ENV=development radiant:extensions:sns:install --trace

-Chris


David Alan Hjelle wrote:

Hi!

I have a local Radiant 0.8.1 install on my MacBook. I'm trying to 
install the SnS extension, but I have the following problem:


hostname:mywebsite.com myusername$ rake ray:extension:install name=sns
(in /Users/myusername/Sites/mywebsite.com)
git submodule -q add 
git://github.com/SwankInnovations/radiant-sns-extension.git 
vendor/extensions/sns
Initialized empty Git repository in 
/Users/myusername/Sites/mywebsite.com/vendor/extensions/sns/.git/

remote: Counting objects: 776, done.
remote: Compressing objects: 100% (429/429), done.
remote: Total 776 (delta 382), reused 575 (delta 262)
Receiving objects: 100% (776/776), 285.16 KiB | 122 KiB/s, done.
Resolving deltas: 100% (382/382), done.
rake -q RAILS_ENV=development radiant:extensions:sns:install
(in /Users/myusername/Sites/mywebsite.com)
rake aborted!
(eval):1:in `export': compile error
(eval):1: syntax error, unexpected '/', expecting '\n' or ';'
def controlleradmin/exportactionyaml *args, block...
^
(eval):1: syntax error, unexpected kEND, expecting $end
...tactionyaml(*args, block);end
  ^

(See full trace by running task with --trace)
 


The sns extension failed to install properly.
Specifically, the failure was caused by the extension's install task:
The extension has been disabled and placed in vendor/extensions/.disabled
If you would like to troubleshoot the extension re-enable it by running:
`rake ray:extension:enable name=sns` then run the install task with:
`rake radiant:extensions:sns:install --trace` and inspect the output.
 



I tried the troubleshooting steps, but only came up with the same error.

I'm rather a Rails newbie, so I'm not sure where I should be going 
next. Is it possible that the vlad deployment that I just set up could 
be conflicting? Should I remove the extension files manually and 
install via script/extension?


Thanks for any help!

David Alan Hjelle
1 Corinthians 2:2
http://thehjellejar.com/

See Rita's spoons at http://jarofwood.com/.

See my brother's software at http://calftrail.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] How do you use Snippets?

2009-09-22 Thread Chris Parrish

Mohit Sindhwani wrote:

Nate wrote:

Mohit Sindhwani wrote:

[check!] done.


Ditto that. But I don't really see snippets fitting neatly in either 
a design or content section. I use them for both.
and that's why there's an option to select that.  I always explain 
snippets as reusable pieces that can be used elsewhere.


I use snippets both ways so I thought I'd offer some couple of 
suggestions.  I'm not sure how keen I am on these ideas yet...


  1. Have both Content Snippets and Design Snippets (visible to their
 respective users, of course).  Namespacing would have to be
 addressed (one possible solution would be layouts show preference
 for using Design Snippets and fall back to using Content Snippet
 if an appropriately named Design Snippet is not found.  Pages
 would show the reverse preference or maybe only permit the use of
 Content Snippets).

  2. Same as #1 but offer a configuration (either at the Radiant UI
 level or a Rake task for use at site creation).  This way site
 admins could turn on or off the two snippets.  You could have one
 type or both or even none (ala John Muhl)

  3. In many ways Snippets are just Page Parts without a URL.  What if
 Snippets remained content items and Layouts had their own
 reference-able page parts for reusable content.

  4. Similar to #3 What if the layout snippets were combined with
 Layouts in the index view. It strikes me that there aren't that
 many layouts in most sites nor layout snippets.  Perhaps it would
 simplify things in the users mind if they were more tightly
 grouped together.


Or maybe these are all just baloney.  I wanted to record them for 
posterity and throw them out there in case it gave anyone an idea.


BTW, the survey question #3 doesn't allow for both  And I'd probably 
answer the same for #4 too.


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


Re: [Radiant] snippet with params

2009-09-21 Thread Chris Parrish

dave4c03 wrote:

I can embed variable data into a snippet by referencing a page part.
 However, this does not work well when you call the snippet multiple times
per page and the parameters vary with each call.

I think I need a snippet with parameters.
I see several possible approaches to doing this. It appears there are a
couple of extensions available to do this and I would expect it cold be done
by creating a radius tag for the purpose instead of using a snippet.
 However, I have no idea of how to proceed.

Is there a best practice for this?
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
  

There are two extensions that I know of.

The first is Manuel Meurer's Parameterized Snippets Extension:
http://github.com/manuelmeurer/radiant-parameterized-snippets-extension

Manuel's extension was designed to do exactly what you are asking.


The other solution combination of two extensions that I created - 
Variables, and Conditional Tags:

http://github.com/SwankInnovations/radiant-conditional-tags-extension
http://github.com/SwankInnovations/radiant-variables-extension

This is a bit more generic approach.  The Variables extension lets you 
declare variables for use within a page or pass variables to page parts 
and/or snippets (parameters essentially).  The Conditional Tags 
extension, then allows you to use these variables and perform 
conditional evaluations on them.  Of course the Conditional Tags aren't 
limited to your variables -- you can also use them with page properties 
or even build your own evaluators.  So it's more of a wider net approach.


Both solutions haven't been updated in some time and may have issues 
with the new version of radius tags but probably not.  I plan on looking 
into updating my extensions here soon.


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


Re: [Radiant] Help with RAILS_ROOT and Frozen Gems

2009-09-10 Thread Chris Parrish
Actually, it looks like an IDE problem (I use RadRails).  It would seem 
that they are incorrectly inferring the application's working directory 
to be the \vendor\radiant\ directory when launching mongrel.


Sorry for the noise.

-Chris

Jim Gay wrote:

On Thu, Sep 10, 2009 at 1:09 AM, Chris
Parrishchris.parrish-forumm...@swankinnovations.com wrote:
  

I just tried installing radiant 0.8.1 and all went well until I performed a
rake radiant:freeze:gems  Now starting mongrel on my development machine
produces the following error:

** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:902:in
`read': No such file or directory -
my_project/vendor/radiant/config/database.yml (Errno::ENOENT)
  from
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:902:in
`database_configuration'
  from
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:437:in
`initialize_database'
  from
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:141:in
`process'
  from
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:113:in
`send'
  from
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:113:in
`run'
  from my_project/vendor/radiant/lib/radiant/initializer.rb:148:in `run'
  from my_project/vendor/radiant/config/environment.rb:12
  from .../ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
   ... 12 levels...
  from ...\ruby\bin\mongrel_rails:19:in `load'
  from ...\ruby\bin\mongrel_rails:19
  from -e:2:in `load'
  from -e:2

If I step through the initializer.rb, it clearly thinks the RAILS_ROOT
should be my_project/vendor/radiant I can make it happy by copying my
database.yml to where it's looking, but then the app wants my
development.sqlite3.db in the radiant directory and it creates a tmp/
directory for the cache down in vendor/radiant/ too.

What am I missing?

-Chris



Is this on an existing application?
And if so, have you run rake radiant:update?


  


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


[Radiant] Help with RAILS_ROOT and Frozen Gems

2009-09-09 Thread Chris Parrish
I just tried installing radiant 0.8.1 and all went well until I 
performed a rake radiant:freeze:gems  Now starting mongrel on my 
development machine produces the following error:


** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:902:in 
`read': No such file or directory - 
my_project/vendor/radiant/config/database.yml (Errno::ENOENT)
   from 
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:902:in 
`database_configuration'
   from 
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:437:in 
`initialize_database'
   from 
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:141:in 
`process'
   from 
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:113:in 
`send'
   from 
my_project/vendor/radiant/vendor/rails/railties/lib/initializer.rb:113:in 
`run'

   from my_project/vendor/radiant/lib/radiant/initializer.rb:148:in `run'
   from my_project/vendor/radiant/config/environment.rb:12
   from 
.../ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'

... 12 levels...
   from ...\ruby\bin\mongrel_rails:19:in `load'
   from ...\ruby\bin\mongrel_rails:19
   from -e:2:in `load'
   from -e:2

If I step through the initializer.rb, it clearly thinks the RAILS_ROOT 
should be my_project/vendor/radiant I can make it happy by copying my 
database.yml to where it's looking, but then the app wants my 
development.sqlite3.db in the radiant directory and it creates a tmp/ 
directory for the cache down in vendor/radiant/ too.


What am I missing?

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


Re: [Radiant] Use sub folder url with share_layouts

2008-12-15 Thread Chris Parrish
Hello Vincent.  I've been working with ShareLayouts a bit recently, 
maybe I can help.  Can you give more details, though?


I'd like to know:

   * Are you using the latest version of ShareLayouts from GitHub?
   * Can you provide your route(s)?
   * Can you provide any of your actions/views (enough to show what's
 using what).
   * It sounds like you're using an Application Page in Radiant with
 the URL of /project/ is this correct? Is there anything fancy
 there?  Do you have an Application Page at /project/list too?

-Chris

Vincent Pérès wrote:

Hello,

I'm using share_layouts in a page '/project' which is using a layout
'Content'.
I created an extension, with routes, controllers etc. to map the project
page.
Everything is working, the 'part' is display thanks to the layout.

Then, I created a new page '/project/list'. I maped it again etc., but
the final display is strange : I got the content of the 'project' page
(only from database not from my view), the content of my new page and
the view of my new page.
In fact the normal page + '/project' content.

Is it normal or did I forgot something?

Thanks
Vincent
  


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


Re: [Radiant] r:find question

2008-12-03 Thread Chris Parrish
Actually, I should probably clarify.  I agree that IF you are going to 
use an XML paradigm, better to leave it be.  That said as Radiant's been 
growing in popularity, I've been seeing more and more people hitting a 
wall here.


I'm starting to wonder whether using an XML paradigm is really best.  
After all, I wouldn't think that the target Radiant user is necessarily 
familiar with XML. (And a href=r:slug// title=r:title//Link 
Text/a isn't all that elegant or XML consistent either -- as Sean noted).


I realize that Radius' goal of maintaining simplicity is good -- I want 
elegance too -- but has anyone given any thought to these kinds of 
needs.  My vote was with the desire for consistency, but that does still 
leave the legitimate, requested need un-addressed here.



-Chris


Chris Parrish wrote:

+1


Sean Cribbs wrote:

Adam van den Hoven wrote:

EEEWWW NOO!

Please don't do this. If you are going to use an XML paradigm for 
your DSL then stick to it. There is nothing that makes my skin crawl 
more than seeing tags as attribute values.


Aside from pure aesthetics (which is considerable), there is the 
matter of tooling. I can find extensible WYSIWYG XML widgets 
(they're not as common or as cheap as I'd like) and none of them 
will never be able to handle this (IMHO, extending XML widgets may 
be better in the long term than wrapping textile or what have you). 
And and you'll never be able to debug it.


I hate that we do this now for HTML attribute values, lets not 
pollute the paradigm more. Otherwise rolling something into HAML 
would be better (I'm guessing)

YAY! Someone who agrees with me!

The caveat, of course, is that often you need to put Radius tags 
inside the attributes of HTML tags.  But that's because Radius is not 
strict XML, but interpolated.  When explaining Radius to a local web 
design meetup, one sorta-technical guy suggested we use an XML 
parser/XSLT and I had to tell him no.  It only looks like it could be.


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


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


Re: [Radiant] r:find question

2008-12-02 Thread Chris Parrish
Joe.  I assume that you are using Manuel Meurer's Parameterized-Snippets 
from the syntax (as opposed to my Variables extension) to do this.  
Neither of our tools (or any radius tags, for that matter) allow this 
kind of nested parsing out of the box.


I believe that Manuel modified Radius to do just what you want 
(http://github.com/manuelmeurer/radius/tree/master).  You'll have to 
install his version of Radius to somehow overwrite the built-in Radiant one.


-Chris

Joe Van Dyk wrote:

Hi,

I have a snippet that contains this code:

 r:find url=r:var name='match' /
   r:if_ancestor_or_selfcurrent/r:if_ancestor_or_self
 /r:find

r:var is an extension that lets me pass arbitrary values in to
snippets.  So, I'd be calling that snippet with something like:
  r:snippet name=snippet match=/url/of/page /

However, I think since the r:var call is in quotes, it's being passed
directly to the r:find tag method, without first being evaluated.

Is there a way to evalulate the r:var tag, and then have the result be
sent to r:find as the url argument?

Thanks,
Joe
___
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] Summarize Extension

2008-11-26 Thread Chris Parrish
I've been doing something similar using snippets and layouts.  Is there 
a fundamental difference between your version and this?


What I do now:

  1. In my layout I put the following code:

 r:if_content part=intror:content part=intro //r:if_content
 r:content /


  2. I also have a snippet named intro with the following:

 r:content part=intro / r:linkMore.../r:link


  3. When creating a page I can create an intro tab and put my
 intro/teaser paragraph.  I then continue the body of my page
 content in the body tab.

  4. When I'm on a page where I want to create the intro bit, I just do:

 r:find url=url/to/page/with/intror:snippet name=intro/r:find



-Chris


Arik Jones wrote:

This is my first (albeit simple) extension for RadiantCMS. The summarize
extension provides functionality that allows you to excerpt/summarize a
part of your page's content. It basically allows you to create a teaser.
The link tells the story a little better.

http://github.com/imakethings/radiant-summarize-extension

Check it out.
  


___
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: [ANN] Summarize Extension

2008-11-26 Thread Chris Parrish
Got it.  I just wanted to find out if there were any other hidden 
features I hadn't noticed.


There's definitely a benefit to not having to create page parts -- it's 
easier to see the whole page's content in one place.  I don't mind the 
one-time extra snippet, though.


Nice extension.

-Chris

Arik Jones wrote:
There is a very big difference. You don't have to create extra snippets 
and page parts to extract a summary. It's


You simply drop an  `r:more /` tag in your one body page part and the 
extension takes care of the rest. No extra page parts or snippets. I 
built this cause I blog a lot and got tired of hacking a way to do 
summaries/teasers.
  


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


[Radiant] Reorder Extension Question

2008-11-25 Thread Chris Parrish
I see from the Readme that Reorder breaks Import Export.  Is this still 
true?  Is there a workaround?


Or is there another extension to use to set the order of child pages?

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


[Radiant] [ANN] SnS v0.7.1

2008-11-24 Thread Chris Parrish

Very minor changes:

   * Forgot to check-in a change to the rake task: rebuild_dependencies
 (used to be named update_dependencies).
   * Added link to GitHub repo
   * Made the history marginally clearer.

-Chris
___
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] Styles 'n Scripts v0.7

2008-11-24 Thread Chris Parrish
Um, no. (Though it would be very cool).  In order to make use of the 
'install' task, you have to have the latest version of SnS (or any 
extension) copied into the extension's directory (from github, svn, or 
wherever).


Install in this sense, means:
   migrate the db, copy any needed files into your project's /public 
folder, do anything else the extension writer deems necessary to get 
things working


and not:
   go get the latest version and then install that

I think the Ray extension may do what you're looking for.


-Chris


Anton J Aylward wrote:

Chris Parrish said the following on 11/24/2008 12:29 PM:
  

Updating

updating SnS is the same as every other extension, run:

rake [your_env] radiant:extensions:sns:install




OH WOW!  All the git/svn stuff encoded in a rake file!
Why has no-one ever done that before?
Please can we have this done recursively from the root!
Please!

  


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


[Radiant] [ANN] Styles 'n Scripts v0.7

2008-11-23 Thread Chris Parrish
Time for a new release.  This is mostly bugfixes and a minor addition or 
two to work with other extension:


   * Renamed one of the TextAsset fields (internal change to let SnS
 work better with Andrew Neil's file_system extension).

   * The radiant:extensions:sns:config rake task was just plain
 broken.  I think most folks out there don't know about this tool
 or I'd have heard more complaints by now.

 Please note that this is *the* way to change the SnS settings --
 not directly in the db or with the settings extension as these
 bypass validations I have in place and, since I store these
 settings in memory, don't take effect until you restart your
 server.  The rake task, however, works properly and immediately.

   * There was an issue with one of the migrations if you had existing
 stylesheets/javascripts from an early SnS version (fringe case).

   * Changed the name of a model so that SnS now just works with the
 import-export and super-export extensions (nice tools, BTW)

   * Added the radiant:extensions:sns:update_dependencies rake task to
 recreate the dependencies table if you had a problem importing
 existing data (see above).

http://github.com/SwankInnovations/radiant-sns-extension/tree/master


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


[Radiant] Help with Radiant/Rails Implementation

2008-11-19 Thread Chris Parrish
I'm stumped and could use some help/advice -- time to show your mad 
hackr skillz...


Please forgive the length, there's some needed background involved.


Background
--
SnS TextAsset models track their dependencies (each model parses its 
content and identifies r:javascript or r:stylesheet tags within). Easy.


Then, when any model is updated, it announces this to all the other 
instances who check their dependencies and, if they depended on the 
updated model, adjust their own effectively_updated_at date.  So far, 
still easy.



The Problem
---
Saving the effectively_updated_at date -- not so easy.  TextAsset models 
have callbacks -- none of which should fire when only saving 
effectively_updated_at.


Specifically, these are:

   * Rails automatic timestamps (created_at, updated_at)
   * before_update and before_create callbacks (via Radiant's
 UserActionObserver to set created_by and updated_by)
   * My own before_save callback which parses the content to update its
 own dependencies (mentioned above)
   * My own after_save callback to announce to the other models that
 this one's been changed (mentioned above)



Current Solution

The current solution is to store effectively_updated_at in a separate 
model with a has_one relationship to its TextAsset.  That way changes to 
the date are done directly through that sub-model and so doesn't trigger 
the callbacks on the related TextAsset.


This works but it *really* bugs me having a separate table just for one 
field (a field that really belongs to another model).



Help?
-
Can anyone think of some clever solution that will let me move this 
attribute into TextAsset?


How could I update and save a TextAsset's effectively_updated_at 
attribute without waking up those callbacks?


Or am I just being too picky?


Ideas
-
I'm open to anything here, really.  My current ideas include:

   * Make the TextAsset model explicitly handle all the above callbacks
 (no more auto timestamps, no more using Radiant's built-in
 observers).  And then, in those callbacks, inspect an instance
 variable flag (say, @exit_callbacks) to end each routine.  It's a
 bit messy but it also replaces some mess in dealing with the extra
 table.  Mostly I don't like that it ignores Radiant's and Rails
 built-in tools.  I'm also not sure how to make current_user
 available to a TextAsset (but that's probably not hard).

   * Add some way to disable callbacks on a particular instance (like
 maybe:
 http://github.com/cjbottaro/without_callbacks/tree/master).  Seems
 neat but also sounds like a lot of code for one attribute.  I've
 never used it either so I'm not sure how reliable it is or if it's
 solid across different Radiant/Rails versions.

   * Save to the effectively_updated_at column directly using the
 ActiveRecord's #connection method and SQL commands.  Never done
 this before and it sounds like, well, yuck (but maybe I don't
 understand it well enough either). And could this even be done in
 a db-agnostic way?

   * Your idea here...


Thanks,
Chris
___
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-18 Thread Chris Parrish
Alright, since this post is already heading in this direction, I'll 
throw out some ideas that I've been working on.  These are getting 
pretty refined in my mind and I'm looking into creating an extension 
around them (possibly waiting for the new UI, we'll see)...


  1. I think the textareas need to come with a toolbar above them (page
 parts, snippets, layouts).  These toolbars would be filter specific.

  2. All filters (including none) would include the filter-selection
 dropdown (this makes it clear to the user what is controlling the
 toolbar content)

  3. All filters (including none) would include one or more
 insert-site-item buttons.  The goal here is to prevent the user
 from having to remember radius tag names and their syntax (that's
 coder stuff) and instead make working with radius more like any
 other gui application.  The goal here is also to focus only on the
 tags used for day-to-day editing (I'm not sure a button to walk
 you through creating your site's navigation would be wise as it
 would just be clutter most of the time and that task is more
 technical in nature).  Tag attributes could be handled graphically
 and automatically inserted into the tag.  For example:

 * A page properties button would open up a properties
   browser (and maybe showing the current page's properties as
   examples).  Items would include, title, slug, breadcrumb,
   author, etc.  Selecting one of these properties would insert
   the appropriate tag (r:title /, r:slug / etc) into the
   content at the cursor's position.

 * A content button would open up a browser for page and
   snippet content.  Here the user can look through the
   existing items and select an existing snippet or page part.
   Once selected, it would insert the appropriate tag (either
   r:find url=...r:content //r:find or r:snippet
   name=... /) at the selected position.

 * A link button would open a pages browser and allow the
   user to select one of their pages. This would insert the
   r:link tag appropriately.

 * Asset extensions should plug in here to allow users to
   browse assets and choose the one they want, select any
   options, then insert the corresponding tag.

  4. Each filter would have its own button set but they would have a
 consistent flavor across filters.  For example:

 * Markdown would come with: bold, italics, bullet list,
   numbered list, heading(s),  insert link, insert image,
   blockquote (something like
   http://livepipe.net/control/textarea).  The insert link
   button should probably work together with the one mentioned
   above to let the user select from their own pages or insert
   an external link -- both formated for markdown.

 * Textile would have something like Markdown (again, the
   buttons look the same but they insert textile specific
   elements).


I would welcome feedback or any collaborators.

-Chris


Jim Gay wrote:

On Nov 18, 2008, at 1:42 PM, Adam van den Hoven wrote:


You just hit on an interesting idea for an extension.

Frequently, people are going to reuse the same bits over and over. 
Instead of making them go find it, what if we put a scratchpad on 
the right hand side of the parts (which will consume some space from 
the parts but that should be OK the visibility is important). This 
will give them a place to retrieve commonly used bits and then copy 
and paste them back into their content. Give it an easy way to save 
new scratches without leaving the page (key to making it useful). 
Provide a separate UI to tweak the scratch (edit, give it a title 
and a description) and we can bootstrap a bunch of scratches which 
will ease their entry into the world of markup


Adam


development has stalled on it, but the start of a browser extension 
intends to add an area where things like this can be done:


http://github.com/saturnflyer/radiant-browser-extension/tree/master

there's nothing much there other than the interface, but my intent is 
to provide a list of draggable snippets and allow extensions to add 
their own stuff (such as page_attachments)



On 18-Nov-08, at 10:33 AM, Steven Southard wrote:

I think maybe you just need to take another approach with her.  
Seems sometimes web development is more psychology then 
programming.  Does she just put her hand over her ears when you say 
Markdown or Textile?  I've had a client like that!  She just wants 
to make headers, paragraphs, and upload pictures right?  Keep 
working with her, tell here to take a few breaths, and keeping 
reminding her that the filters are there to keep the technical 
stuff out of her way.


My clients don't seem to mess with the snippets, tags, or css 
classes that much.  They just use the filters and maybe one tag and 
some 

Re: [Radiant] SnS Requests Anyone?

2008-11-14 Thread Chris Parrish

Adam van den Hoven wrote:

support for external libraries
I really just want 1 tag to use for all these assets
they can be always as link
If you really want to be cool, know ahead of time all the 
important libraries and their versions (kinda like how the google 
Ajax Libraries API works -- http://code.google.com/apis/ajaxlibs/) 
so I can do r:javascript library=jquery version=2.6 
minimized='true' /

But also just r:javascript url=http://scriptsite.com/somelibrary; /


Sounds neat -- though I'm *positive* you don't want me anywhere near 
any project that requires constant maintenance to keep up-to-date 
with the latest libraries.


Couple of questions, though:

  * If you know the url, what's the benefit of using the r:javascript
/ tag?  I mean sure, it renders the link for you but that's not
so bad to type manually.
  * How would it be helpful for SnS to have it's own list of libraries
when the Google api you offered already does this?

I'm really not trying to beat the you can already do this drum, but 
why not just type:


script src=http://www.google.com/jsapi;/script
script type=text/javascript
  google.load(prototype, 1.6);
  google.load(scriptaculous, 1.8.1);
/script


Perhaps I'm over doing it. I generally like having on way to do 
things, so using r:javascript and script together violates my 
sense of aesthetics.


Ah.  Makes sense.  Actually I lean towards John and Sean's suggestions 
that tags not render markup (that way you can use them safely with 
filters or in pages that aren't html).  That's why my tags just render 
the content by default and offer an as=url to render that property.  
Whereas the as=inline and as=link are viewed more as bonus or 
convenience tools.




But maintaining a list of libraries is probably bad.

 How about importing from remote URL so we don't have to download then 
up load?




Hmm.  If you already have a URL why not point your browser there and 
copy the contents from your browser window (not download into a file). 
Then paste the body of a new javascript in the Radiant UI?


Or do you mean SnS keeping a catalog of URLs so you wouldn't have to 
know that off-hand?  But that's beginning to sound like maintaining a 
list again.


Or, if you want to keep your list of google.load's in their own 
javascript file (named, say, google.loads), you could just:


script src=http://www.google.com/jsapi;/script
r:javascript name=google.loads as=inline /


I want to make sure I'm understanding your ideas.  (Thanks for the 
tip on google, BTW.  I've never used that and think that it'd be a 
nice addition -- looks like they even minify stuff for us).


I tend to toss ideas out to see what's good or not. This was probably not.


No worries.  I'm the same actually.  Sometimes things get clearer in the 
communicating.


It's challenging on my end too because I can come across as beating down 
all your ideas which can be discouraging.  In my book if I throw out 200 
dumb ideas and come up with one really usable one, that's a win.


So keep 'em coming.



What about interacting paperclipped? Not the bucket, per se, but the 
tags for sure are useful.




Big on my list.  Same with Page Attachments.


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


Re: [Radiant] SnS Requests Anyone?

2008-11-14 Thread Chris Parrish

Adam van den Hoven wrote:

Possibly  but I find

script src=r:javascript name=foo as=url //script

not just unaesthetic, its offensive. If you're using a tag paradigm to 
encapsulate functional bits, then mixing those tags into attribute 
values are only confusing and you will not be able to leverage an 
existing tool (like an extensible XML base WYSIWIG component... not 
that there are many but I can dream). IMO, if you're following this 
paradigm you should be thinking in terms of extending HTML not doing 
something independent of HTML.


I agree.  I'm not offended per se, but I do find it really hard to 
follow visually.


In fact I find myself wondering whether radius could easily be tweaked 
to parse something different (I mean, we can easily change it to accept 
oo:title instead of using 'r' could we also do {{title}} or  ! 
content (part = 'sidebar') ! or [insert your idea here].


Of course, once I open that door, I start wondering about languages like 
liquid -- some sort of more well-rounded tool.  I created the 
conditional_tags extension to address one of these needs but you'll 
never make radius pull off stuff like if/else if/else behavior.


But I'm way off topic now.


Sorry. I jumped to a new idea. I should have signaled that better ;)

I mean that I want to use jQuery and the Metadata plugin. JQuery comes 
from a public CDN so I can use it externally (unless I'm behind HTTPS) 
but even if there is a public copy of the meta plugin, I probably 
shouldn't be stealing someone else's bandwidth. So I need to import 
that into my machine. Right now, I have to download then upload it. 
But if I can just point to the tarball or bare code, on the 
originating server ( and easily update to the latest version) I can 
save a lot of time.


But there is no maintaining lists. I give you the URL of some file or 
GIT repository which you then download, decompose and copy the 
contents into the appropriate asset


I'd love to see that -- but I'm not sure I'd build it.  From the average 
user's perspective, not much time is spent with radiant mucking around 
with css and js.  For a brief period of time during each project, we're 
really focused there, then it's off to the important stuff.  I guess 
that makes my threshold for pain is higher for those elements.


So on this one I'd probably pull out the we're accepting patches card ;-).

Actually it would probably be better as an extension -- SnS is fully 
extendable, you know.  I worked shards into it so you can override 
elements, insert partials, the whole bit.


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


[Radiant] [Fwd: [Radiant-Dev] Re: Conditional Tags Tutorial?]

2008-11-13 Thread Chris Parrish
Adam Asked this on the Radiant-Dev list but I thought it might be more 
applicable here...



Fair enough.

Anyone with any other votes?  Or questions you'd like answered in a 
tutorial?



-Chris

Adam van den Hoven wrote:
Chris, 

One of the things that is missing from your recent two extensions 
(both Conditional Tags and Variables) is a tutorial. While gawking at 
your code is not a /bad/ way to figure out how to do it, I'd like to 
have more information about the reasons why you would expose something 
through the evaluator and so on. 

So I'd like to make the following (cheeky?) suggestion. Take an 
existing, non trivial extension (my vote is for paperclipped) and 
write a tutorial showing step by step what one would do to create a 
separate extension to add conditional evaluators to it. I would 
include things like What is the best way to write  tests/specs for 
each evaluator as i suspect its not /entirely / clear. This should 
give us enough information to start using Conditional Tags in our own 
extensions. 


Adam!





--~--~-~--~~~---~--~~
Radiant CMS Dev Mailing List
Post:[EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
Group Site:  http://groups.google.com/group/radiantcms-dev/
-~--~~~~--~~--~--~---


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


Re: [Radiant] Importing Exporting

2008-11-13 Thread Chris Parrish
One of the problems with Radiant being so extensible is that it attracts 
a lot of software geek-types.  ;-)  It's no issue for me to do a db 
dump/restore but I couldn't give that job to my assistant.


Plus I'm not sure that that's a friendly format for, say, version 
controlling a site's content.


Anyway, sorry for not being more clear. My goals here are:

   * It's simple (read: non-technical users love it)
   * It's db-independent so if my local development environment is
 Sqlite3 but my server is MySQL or PostgreSQL (or I want to change
 databases/servers some day) it's no sweat to move content around.
   * It's collects all of the content (this means styles and scripts
 ala SnS, and whatever fun extensions I choose to add in the future).
   * My site's content can be fully restored via import.
   * Ideally it's in a human readable format so if it's kept in an scm,
 diff tools can identify changes.
   * Bonus points for packaging all the files up nicely (like a zip or
 tarball for download).
   * Bonus points for managing asset files such as images images
 (though I'm not holding my breath here).

And I'd really *love* it if someone could tell me the difference between 
import_export and super_export (which I think does import too).


-Chris


Mohit Sindhwani wrote:

Chris Parrish wrote:
I'm looking for a good way to backup/restore all of my content for a 
Radiant App.  I'm want something that collects all the data 
(including extension models).


I'm aware of Import-Export and Super Import-Export but I can't seem 
to find anything that clearly spells out the differences.  Is anyone 
familiar with both solutions (or any other ones you'd recommend)?  I 
could use some tips.
Would a database dump not help?  So far, I'm using SQLite, so I just 
move the database between my PC and the demo site.  But, I would have 
thought that a database dump would manage 'almost' everything.  The 
only thing that gets left behind, unfortunately, is the stuff in 
public... and I don't know how Page Attachments / Gallery would work 
across database dumps and restores.


I need to think about this not too far in the future... in a way, it's 
good that you're ahead!


Cheers,
Mohit.
11/14/2008 | 2:58 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] SnS Requests Anyone?

2008-11-13 Thread Chris Parrish

Adam van den Hoven wrote:

Things I would like:
something like a separate field for copyright notices so that you can 
minimize the JS/CSS without loosing (someone else's) copyright notice.


You can accomplish this today by bundling multiple assets.  For instance:

--- JS file #1:  prototype.js (not minified) ---

/*  Prototype JavaScript framework, version 1.6.0
*  (c) 2005-2007 Sam Stephenson
*
*  Prototype is freely distributable under the terms of an MIT-style license.
*  For details, see the Prototype web site: http://www.prototypejs.org/
*
*--*/
r:javascript name=prototype.js.content /


--- JS file #2:  prototype.js.content (this has 'minify?' checked) ---

... the rest of the prototype lib goes in here ...


That would serve up the prototype library just as you requested as 
'prototype.js'





support for external libraries
I really just want 1 tag to use for all these assets
they can be always as link
If you really want to be cool, know ahead of time all the important 
libraries and their versions (kinda like how the google Ajax Libraries 
API works -- http://code.google.com/apis/ajaxlibs/) so I can do 
r:javascript library=jquery version=2.6 minimized='true' /

But also just r:javascript url=http://scriptsite.com/somelibrary; /


Sounds neat -- though I'm *positive* you don't want me anywhere near any 
project that requires constant maintenance to keep up-to-date with the 
latest libraries.


Couple of questions, though:

   * If you know the url, what's the benefit of using the r:javascript
 / tag?  I mean sure, it renders the link for you but that's not
 so bad to type manually.
   * How would it be helpful for SnS to have it's own list of libraries
 when the Google api you offered already does this?

I'm really not trying to beat the you can already do this drum, but 
why not just type:


 script src=http://www.google.com/jsapi;/script
 script type=text/javascript
   google.load(prototype, 1.6);
   google.load(scriptaculous, 1.8.1);
 /script

Or, if you want to keep your list of google.load's in their own 
javascript file (named, say, google.loads), you could just:


 script src=http://www.google.com/jsapi;/script
 r:javascript name=google.loads as=inline /


I want to make sure I'm understanding your ideas.  (Thanks for the tip 
on google, BTW.  I've never used that and think that it'd be a nice 
addition -- looks like they even minify stuff for us).

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


[Radiant] SnS Requests Anyone?

2008-11-12 Thread Chris Parrish
I'm getting ready to roll out a new SnS version this weekend with some 
bug fixes and a column name change (requested and implemented by Andrew 
Neil to help it work with his file_system extension).


Since I'm doing that, are there any other issues/feature requests out 
there?  Now would be a good time to entertain those.


P.S.  I just released a new version of the SnS Sass Filter which has 
much-improved error reporting (as in: it no longer blows up your 
app).  So if you use that extension, I'd update it as sass can be 
finicky and prone to throwing those errors.


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


Re: [Radiant] id standard tag

2008-11-11 Thread Chris Parrish
Andreas, I don't know if this will help you or not, but I'm about to 
release an updated version of Conditional Tags that will now offer the 
r:puts tag to render values.  My goal was to allow users to inspect 
the results of their evaluators but it would be handy here too.   You 
could create your own extension with a module like:


   module MyModule
   include ConditionalTags::Evaluatable
   evaluator id, :index_not_permitted do |tag, element_info|
 tag.locals.page.id
   end
   end

Then, in your extension's my_extension.rb file you'd add the following 
code to the #activate method:


   raise My Extension requires the Conditional Tags extension to be 
loaded first unless defined?(ConditionalTags)

   ConditionalTags::CustomElement.send :include, MyModule

And suddenly you'll be able to output the value you seek using:

   r:puts value_for=id /

Better still, you would also be able to use 'id' in conditional 
statements like:


   r:if cond= id is 15 I know what contextual page I'm on!/r:if

Don't know if that part would be useful to you or not though.


-Chris


Andreas Roedl wrote:

Hey guys,

I'm not subscribed to the dev mailing list, but anyway...

Sean, could you please add :id to the standard page tags?

  [:breadcrumb, :slug, :title, :id].each do |method|
desc %{
  Renders the @#{method}@ attribute of the current page.
}
tag method.to_s do |tag|
  tag.locals.page.send(method)
end
  end

I'm aware that this is a pretty much useless tag for most users and
developers, but in some situations it comes in handy.


Thanks,


Andreas
___
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] file_system extension (and other import/export tools)

2008-11-07 Thread Chris Parrish
I'm going to check it out this weekend.  I do have a couple of quick 
questions, though:


  1. There are a couple of other extensions that appear similar (Sean's
 Import/Export and and Istvan Hoka's Super Import Export come to
 mind). How is yours different?  I've used none of them (yet) an am
 want to look at yours with some idea of the differences.
  2. If I use the file_system extension with other extensions (like,
 say, SnS) is it aware of these new models?  Will it export them too?


Thanks for your extension, Andrew -- it sounds awesome.

-Chris


Andrew Neil wrote:

Jim's experience has revealed a fairly serious bug in the current
implementation of the extension though: if you run file_system:load, it will
delete all models which have not been saved to the FS. So if you ran
file_system:save:layouts, you would have no pages or snippets on the FS, and
they would all be deleted from the DB if you later ran file_system:load.
(They would be safe, however, if you ran file_system:load:layouts).

This is not by design! It is an oversight on my part, and I intend to fix
it.




Just reviving this thread to say that I have fixed this issue now. With that
sorted, I've added the file_system to the Radiant extensions registry:

http://ext.radiantcms.org/extensions/67-file-system

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] Slash or no slash?

2008-11-03 Thread Chris Parrish
There was quite a bit of descussion in this post: 
http://www.ruby-forum.com/topic/111522


I don't think anything was done to implement the auto-redirect within 
Radiant as discussed (though I'd still like to see it).  I think most 
are configuring their servers to do the redirect.


-Chris

Mohit Sindhwani wrote:

Mohit Sindhwani wrote:
HI, I'm a bit confused about something simple... in general, Radiant 
pages are served up as:

 page/pg/123/  (with a slash)
but it also renders the same if I go to
 page/pg/123 (without a slash)

In general, it doesn't matter.  But, I've got pages that have a lot 
of relative links between them (inserted into the HTML directly).  
So, I have a relative link to ../124 but the actual position of what 
it references matters... depending on whether the current URL/ page 
is rendered is

 page/pg/123/ (with a slash)
or
 page/pg/123  (without a slash)

Any ideas on what I can do? 


Where are my manners!?  (it's 3 AM) - I meant to add thanks for your 
help and sorry for being a bother this week...


Cheers,
Mohit.
11/4/2008 | 2:54 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] [ANN] Conditional Tags Extension

2008-10-25 Thread Chris Parrish
Sorry.  I didn't want to come across so preachy.  I agree with you.  It 
bugs me too.


If, however, I ask myself whether it would bother a non-techy -- someone 
who not only doesn't know xml but who's never even heard of it -- then 
I'd bet nearly all would prefer something like:

   r:if x = 0 to r:if cond=x = 0

But the technical part of me still struggles with it anyway.

-Chris


Manuel Meurer wrote:

Ok, you're right.
For me, r:if content exists? would not feel right, though.

Manuel

On Sat, Oct 25, 2008 at 8:35 PM, Chris Parrish
[EMAIL PROTECTED] wrote:
  

Manuel Meurer wrote:


I think that there is a place for these tags and I'd love it if there
was
an easy way to use this to create both if_ and unless_ tags. Something
like:

conditional_tags my_tag do |tag|
 #return a boolean
 false
end

which would then create if_my_tag and unless_my_tag tags. For the if_
tag,
the contents of the tag is executed when block returns true, and the
reverse
happens for the unless_ tag.

  

This is interesting.  I'll have to think about this.  Essentially what
you're going for here is the removal of the attributes (something I agree
with).  I bet my extension would be more comfortable if only you could
write:

 r:if content exists?



This would not be valid XML.
Attributes must have a value.
http://www.w3.org/TR/xml/#attdecls

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

  

Radius isn't really xml -- it just eerily *looks* like xml.  For example,
Radius will allow all kinds of characters in the tag that XML doesn't
permit.

And that's fine.  We aren't really marking up the document structurally
we're just borrowing a familiar notation for a templating language.

I see no reason we couldn't create, say, a php-radius tag extension that
parsed: ? snippet name=my snippet ? as a snippet tag. Or maybe ERB's
%%


I really wasn't proposing changing radius there (though I am intrigued by
the above).  Instead I was looking at how the pattern of xml can make radius
tags less comprehensible.  Round peg, square hole in some cases.

Another example would be creating if, else if, else structures.  I don't see
how you could use an xml-like notation to pull that off.  Lucky for us,
if-then is plenty sufficient for 99.99% of all the needs for Radiant users.

-Chris
___
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] Conditional Tags Extension v0.2

2008-10-24 Thread Chris Parrish

I just released v0.2 of the extension.  Changes include:

   * Jeff's request for a status evaluator.  The term status gets
 evaluated into a string (draft, reviewed, published, or
 hidden).  Keep these requests coming.
   * And I beefed up (fixed) the mechanism for other extensions to
 register their own evaluators.  I'll be releasing another
 extension shortly that will demonstrate how to register your own
 symbolic element evaluators for use in conditional statements.


-Chris
___
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] Conditional Tags Extension

2008-10-24 Thread Chris Parrish

Adam van den Hoven wrote:
Sure that works except that it is entirely too late IMHO. It 
should be raised when you install the extension (say in the update or 
migrate tasks) since that is when you are dealing with extensions. If 
you were to do that for a live site running passenger then suddenly 
your production site is down. You could argue that there are better 
ways (I'm not convinced that capistrano is reasonable approach for 
someone who isn't a dedicated Ruby coder) but it is a reasonable way 
(especially for a savvy non-coder), which is why I wrote documentation 
for just that sort of approach.




I see.  Generally true but it works just fine for this extension as all 
its behavior is runtime (no migrations, etc.).



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


[Radiant] [ANN] Conditional Tags Extension

2008-10-23 Thread Chris Parrish
Hello all.  I'm finally releasing an extension that I've mentioned over 
the last year on the list.  I think that it has a lot of power and 
potential but I could use some input from the Radiant clan.


The Conditional Tags Extension 
(http://github.com/SwankInnovations/radiant-conditional-tags-extension/tree/master) 
creates r:if and r:unless tags that allow for flexible (and 
customizable) conditions.  Start with the README there -- it covers what 
I'm thinking and a lot of what this thing can do.


I want this extension to be very easy to use for users (read: 
non-developers) and also helpful to developers (I wrote it so that your 
extensions can plug into the conditionals framework to easily add your 
own values).  Please help me make this one as useful as possible.



Thanks,
Chris


BTW, I apologize if this ends up being a double post.  I think I goofed 
something up when I sent it last night so I wanted to make sure...

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


[Radiant] [ANN] Conditional Tags Extension

2008-10-23 Thread Chris Parrish
Hello all.  I'm finally releasing an extension that I've mentioned over 
the last year on the list.  I think that it has a lot of power and 
potential but I could use some input from the Radiant clan.


The Conditional Tags Extension 
(http://github.com/SwankInnovations/radiant-conditional-tags-extension/tree/master) 
creates r:if and r:unless tags that allow for flexible (and 
customizable) conditions.  Start with the README there -- it covers what 
I'm thinking and a lot of what this thing can do.


I want this extension to be very easy to use for users (read: 
non-developers) and also helpful to developers (I wrote it so that your 
extensions can plug into the conditionals framework to easily add your 
own values).  Please help me make this one as useful as possible.



Thanks,
Chris
___
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] Conditional Tags Extension

2008-10-23 Thread Chris Parrish

Adam,

Thank you so much for your feedback.  I like your thinking.  I do have 
some questions and comments for you and the rest of the gang.  See below...



While the proliferation of tags can be bad for users, Radiant lacks 
any mechanism for ensuring dependancies are installed making using 
this extension within my own potentially destabilizes my extension. 
This is a sufficiently fundamental thing that I'd be happier to see it 
rolled into the core than distributed as an extension.


If I can get this thing refined and enough users dig it, I'd love to see 
it or some similar concept core. But I'm not sure I understand how my 
extension could destabilize your extension.  I certainly wouldn't want 
that. Can you explain what you mean?


As an aside, I think that there is a place for purpose specific 
conditional tags. Personally I'm not convinced that


r: if cond=content['body'] exists? blah /r:if

is more readable than

r:if_content / blah /if_content

to someone who isn't already a developer of some sort who understands 
what a conditional is.


I agree... with a couple of caveats.

   * I'm sure I'd say the same about:

 r:if_content part=part name, other part name find=any

 vs,

 r:if cond=content includes_any ['part name', 'other part name']

   * if_content part=my part isn't clear -- specifically that it
 test for *existence* (as opposed to whether the part has any
 content -- whether it's blank).

 Worse still is the inconsitency of meaning across tags.  For
 instance, based on r:if_content, you'd think
 r:if_ancestor_or_self  means: if an ancestor of the page exists
 or if this page exists (which is nutty) but it means: if *this
 contextual page is* the actual page or one of the actual page's
 parents  Ok then, so r:if_parent must mean if this contextual
 page is a parent of the actual page.  Nope.  Now have your
 clients guess what r:if_url does.


I think that there is a place for these tags and I'd love it if there 
was an easy way to use this to create both if_ and unless_ tags. 
Something like:


conditional_tags my_tag do |tag|
  #return a boolean
  false
end

which would then create if_my_tag and unless_my_tag tags. For the if_ 
tag, the contents of the tag is executed when block returns true, and 
the reverse happens for the unless_ tag.


This is interesting.  I'll have to think about this.  Essentially what 
you're going for here is the removal of the attributes (something I 
agree with).  I bet my extension would be more comfortable if only you 
could write:


 r:if content exists?


I'm just concerned that the lack of descriptivity (word?) -- r:if_xxx 
is too limiting.  So instead, we end up cranking out r:if_yyy and 
r:if_zzz or tacking on attributes for special cases.





This syntax combined with your generic tags would probably provide the 
right level of excellence for all classes of user.


Now all we need is to simplify looping, another common tag type that 
could be simplified for extension authors.




True -- but I think *far* less necessary.



-Chris
___
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] Conditional Tags Extension

2008-10-23 Thread Chris Parrish

Adam van den Hoven wrote:

What I mean is:
1) I decide to use your tag instead of creating my own special purpose 
if_ and unless tags. I document it in my README
2) Like some existing extensions do, I inject a page or a snippet or a 
layout into the database that uses my extension and yours
3) A user installs my extension because my announcement was so mind 
blowingly awesome but doesn't really read the README

4) The user's site blows up because your extension is missing

The problem isn't with your extension. The problem is that there is no 
standard way, no best practice to ensure at some point that the 
requirements are met and gracefully allow the user to remedy that. Its 
a Radiant problem.




Why not test for your extension's dependencies on load?  For instance, 
my soon-to-be-announced variables extension has the following line in 
the activate method for the extension:


   raise The Variables Extension requires that the Conditional Tags 
extension be loaded first unless defined?(ConditionalTags)



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


Re: [Radiant] Using Git with Radiant Extensions

2008-10-17 Thread Chris Parrish

So, to make sure I understand...

If I have an extension of mine in a submodule of a project, I can 
develop within that extension:


   * make changes in that copy of the extension (testing its behavior
 as part of the project)
   * commit those changes to the submodule's repo
   * manage branching (gitk, etc) from within that submodule

If so, that helps me a lot.  Everything I'd read made it sound like 
submodules don't behave like a working git repo which is why I thought 
you couldn't push changes back to the original -- that submodules only 
permitted data transfer one-way (from source to your local copy).


-Chris

Sean Cribbs wrote:
Like svn:externals, you can maintain a submodule in a project, commit 
to it and push it while maintaining the parent project.  However, 
whenever you've changed something in the submodule, it's necessary to 
go back up to the parent project, commit the submodule directory, and 
possibly do `git submodule init` and `git submodule update` (I don't 
know if that's strictly necessary, but I like to do it to be 
certain).  That will make sure that the next time your parent project 
is checked out, it will get the latest submodule version.


Sean

Chris Parrish wrote:
Trying to get up to speed with a Git workflow and I have some 
questions about working with extensions.


If I have a radiant project A that uses someone else's extensions B, 
C, and D.  I understand that I can create a repo for radiant project 
A set up all the extensions as submodules (if they're all in git repos).


If, on the other hand, I'm developing extension B, I could set up a 
dummy project A (no repo), and set up B, C, and D as independent, 
parallel repos. No submodules. With B being the one I'm working on, 
managing, branching, etc. of course.


But what if I'm developing extension B along with project A?  If you 
edit code within a submodule B, there's no way to send those changes 
back to the original B repo (or use branching, or other git tools) on 
B is there?  Git isn't really tracking your changes on B is it?


Is there some way to handle this development situation or am I just 
going about this wrong?


Is piston or braid an option here and if so, is anyone using it 
successfully?


Thanks,


-Chris Parrish


___
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] slug inside url_matches

2008-10-16 Thread Chris Parrish
For sure Radiant's parser won't permit tags within tags but this sounds 
like a job for...

   an extension I built and need to re-release.

I have some pretty lofty goals for this weekend involving Radiant.  And 
getting  my conditionals extension back online is one of them.  So maybe 
I'll have something for you next week (fingers crossed).


Just FYI, using my extension you'd do something like:
   r:if cond=page.url matches page.slug your stuff here /r:if

-Chris


Jeffrey Jones wrote:

Hoi all,

Does anyone know how I could get the following working?

ul class=sidemenu id=r:slug/ r:unless_url matches=r:slug/ 
ignore_case=true style=display: none;/r:unless_url 


Basically, if the page's slug is in the url somewhere I want the css 
style display to be none. I have tried with double and single quotes 
but this doesn't appear to be working. Using a hard-coded value 
instead works. I am assuming the r:slug/ isn't being translated to 
the actual slug value before being matched in the regexp.


Thanks

Jeff


___
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] Hide stylesheets and RSS-templates from user? (+ multi_site editing for users)

2008-10-14 Thread Chris Parrish

Hi Simon,

My Styles 'n Scripts extension moves your CSS and JS out of the Pages 
view and are only accessible by admins and developers so that could work 
for you.


As to RSS feeds, if you only have a few, I would just create a Layout 
for each (you have to create at least one layout to set the Content-Type 
anyway).  But instead of creating a blank layout and putting all your 
markup in a page, do the reverse.  Put your markup in the layout and use 
a blank page to give it a url.  (You can probably even get away with not 
putting any r:content tag in your layout but you'd have to test 
that.).  Not perfect (a user could still delete the page, rename it, and 
maybe add content) but it's a good way towards the goal in my book.


-Chris

Simon Rönnqvist wrote:

  Hi!

I'd like to hide the RSS-template and stylesheets from the ordinary 
user (ie. not developer or administrator), how do I do this? For the 
stylesheets I can just put them as hard-coded files in 
public/stylesheets/site.ltd/ but the RSS-template can't really be 
placed there.


Another configuration option that I'd like to have (or figure out) is 
to enable an ordinary user to edit more than one site (or all sites if 
individual sites can't be picked), when using the multi_site extension.


  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


Re: [Radiant] git SVN, sitting in a tree... (was Regarding github's SnS extensions -- safe to use?)

2008-10-06 Thread Chris Parrish
Ok, ok  :-) .  I will be moving SnS (and all my projects) to git here 
shortly and I also have some planned improvements for it (want to 
integrate support for images and import/export).


Please keep in mind that my business and related projects have kept me 
very busy, so read shortly loosely. (But I really am getting closer by 
the day.  Really.)  Thanks for your patience.


-Chris

Tim Gossett wrote:

On Mon, Oct 6, 2008 at 11:02 AM, Jay Levitt [EMAIL PROTECTED]wrote:

  

Tim Gossett wrote:



This particular problem will go away when git becomes accessible enough to
Chris Parrish, and all of the SnS extensions move to github.

  

So... what can we do to get Chris on git? :)

I remember he was having trouble w/being on Windows.  I've got Windows and
Mac on my Mac, and though I don't know git very well, if there's any sort of
hey, can you replicate this problem, I'm happy to help out.  I think git's
got linefeeds sorted out now, which was one of the bigger interoperability
problems.




I'm just spit-balling here, but I would guess the migration from SVN to git
would take these steps:

   1. git-svn clone locally
   2. gitignore .svn directories and other SVN files which are to be ignored
   3. git commit
   4. git push to github repo

I'm sure there are a few of you out there who have actually done this
before, and can provide a more detailed outline. As Sean has generously
offered, Chris can get setup on git at the Radiant Sprint Weekend (if he's
willing). For anyone else in Chris' situation, a quick guide on a wiki
somewhere would be great.

Perhaps I can be the Mohit of github for a minute here and request that
someone expand http://github.com/guides/import-from-subversion for those git
users on Windows?

  


___
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: 0.6.9 sass_filter Extension

2008-08-31 Thread Chris Parrish
I like SASS.  I like promoting SASS.  But giving SASS as an option to 
every page might be confusing to a basic, non-technical user.


SASS is really geared at the designer.  Does the SASS filter take this 
user role into account?


FWIW, I'm sort of inclined to want Textile and Markup not be standard 
but rather a regular extension.  After all, some may prefer to leave 
them out and instead use WMD, or even a WYSIWYG editor.  And there have 
been some discussions of wanting to use different Markdown or Textile 
parsers too.


Just my $0.02.

-Chris


Andrew Neil wrote:


On 29 Aug 2008, at 20:35, Chuck Barr wrote:


Sean Cribbs wrote:

Haml has been included in Radiant since 0.6.7.  We need to remove it
from the sass_filter extension.

Sean


I realize there's potential confusion for the new user but sass_filter
should come stock like textile or markdown.


+1

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] Thanks for SnS Extension

2008-08-22 Thread Chris Parrish
I've been off list for about two weeks now and I just wanted to say how 
heartwarming it is to come back to something like this.  As any 
developer, I'm glad to know my work is being used and is helpful to 
someone.  But you don't necessarily expect any public recognition.


I've always appreciated how generous, knowledgable, and super 
professional this community is -- this just takes the cake.


Oh, and guys, I've obviously been busy here lately but let me know if 
there's anything I can do to help with the documentation, too.



-Chris

Jamey Cribbs wrote:

Deal.  It's the least I can do for such a great CMS and a great
extension.  I will try to get to this today.

Jamey


On Mon, Aug 18, 2008 at 11:05 AM, Mohit Sindhwani [EMAIL PROTECTED] wrote:
  

Jamey Cribbs wrote:


Just wanted to publicly thank Chris Parrish for the Styles 'n Scripts
extension.  I have been wanting to try this extension for a while, so,
over the weekend, I upgraded one of my radiant apps to 0.6.9 and
installed the extension.  Very nice!  It's great to be able to make a
minor change to the site's css and not have to do a deploy.

Thanks, Chris!

Jamey Cribbs
  

Jamey, can I lean on you for some support towards the Summer Reboot
documentation [1]?  There's a part there for SnS under Chapter 1 of the
documentation.  I'll make you a deal - if you'll do the basic text, I'll do
the proofreading, test out that it works, and ensure that the instructions
work and add screenshots, if needed.

If you're busy, just ignore this message.

Cheers
Mohit.

[1] http://wiki.radiantcms.org/Summer_Reboot
___
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] SnS extension problem -- Fixed (New SnS Release)

2008-07-28 Thread Chris Parrish
Marshal, those links helped.  The controller/models weren't declaring a 
status code on success (just on failures) and apparently LiteSpeed 
doesn't like that (though Mongrel and Webrick seem just fine with it).


Anyway, I've released an updated version of SnS to address this.  You 
can get it here:  
https://secure.svnrepository.com/s_swanki/open/radiant/extensions/styles_n_scripts/tags/latest


The new and improved specs now claim it's working but I don't run 
LiteSpeed.  Could you (or somebody) test this to make sure it solves 
this issue?



-Chris


Marshal Linfoot wrote:

Hi Chris.

I found a couple of threads in the litespeed forums that might be helpful.

http://www.litespeedtech.com/support/forum/showthread.php?t=1422
http://www.litespeedtech.com/support/forum/showthread.php?t=821

  


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


Re: [Radiant] SnS extension problem -- Fixed (New SnS Release)

2008-07-28 Thread Chris Parrish
Oh, I forgot to mention, you'll need to clear the text asset cache too 
so that the new status header gets updated.   You can do this one of two 
ways:


  1. Save a javascript or stylesheet file (this will clear the cache
 for all javascripts and stylesheets).
  2. Delete the text asset cache directory manually (the next request
 for each file will rebuild your cache). The default location for
 this is:
 [RADIANT_ROOT]/text_asset_cache.

Also, I've just corrected the version issue and committed SnS v0.6.2 as 
the new latest version.  (You can update your version of the extension 
but it won't affect this status header issue).


Anyway, please test either version for me once you've cleared the cache 
and tell me if that fixes it.


If it doesn't, please browse to the text asset cache directory and check 
the contents of the YML part of the cached file (given the default 
location above, it would be at:

   [RADIANT_ROOT]/text_asset_cache/stylesheet_cache/[your_file_name].yml).

It should look something like:
   ---
   expires: 2009-07-28 10:25:57.84 -06:00
   headers:
 Last-Modified: Thu, 19 Jun 2008 00:30:15 GMT
 Status: 200 OK
 cookie: []
  
 Content-Type: text/css


The line I care about is the Status: 200 OK one.  Make sure it's there.

-Chris


Marshal Linfoot wrote:

Hi Chris. I hate to say it, but no change. Downloaded the latest
version from the link in your message to vendor/extensions/sns. Ran
the rake tasks again just to be safe. Page still displays without any
styling.

Here's what I see when accessing the css/elastic page directly:

[EMAIL PROTECTED] curl -I test.octopusgardenyoga.com/css/elastic
HTTP/1.1 404 Not Found
Content-Type: text/css; charset=utf-8
Last-Modified: Wed, 23 Jul 2008 16:36:09 GMT
X-Runtime: 0.00239
ETag: f95c66d251410f2f579f72e87fd28049
Date: Mon, 28 Jul 2008 13:42:16 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100

PS. Minor thing...version says 0.5 on the Admin UI Extensions page.

On Mon, Jul 28, 2008 at 2:15 AM, Chris Parrish
[EMAIL PROTECTED] wrote:
  

Marshal, those links helped.  The controller/models weren't declaring a
status code on success (just on failures) and apparently LiteSpeed doesn't
like that (though Mongrel and Webrick seem just fine with it).

Anyway, I've released an updated version of SnS to address this.  You can
get it here:
 
https://secure.svnrepository.com/s_swanki/open/radiant/extensions/styles_n_scripts/tags/latest

The new and improved specs now claim it's working but I don't run LiteSpeed.
 Could you (or somebody) test this to make sure it solves this issue?


-Chris



  


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


Re: [Radiant] SnS extension problem

2008-07-25 Thread Chris Parrish
=64320817.1201870961.4.2.utmcsr=octopusgardenyoga.com|utmccn=(referral)|utmcmd=referral|utmcct=%2Flists%2Fadmin%2F;
_radiant_session=34d224ec40d533ed1ac0fc36474823de

If-Modified-Since: Wed, 23 Jul 2008 16:36:09 GMT

If-None-Match: f95c66d251410f2f579f72e87fd28049



HTTP/1.x 304 Not Modified

Content-Type: text/css; charset=utf-8

Last-Modified: Wed, 23 Jul 2008 16:36:09 GMT

X-Runtime: 0.01098

Date: Fri, 25 Jul 2008 03:01:58 GMT

Server: LiteSpeed

Connection: Keep-Alive

Keep-Alive: timeout=5, max=100

--

On Thu, Jul 24, 2008 at 10:43 AM, Chris Parrish
[EMAIL PROTECTED] wrote:
  

Yes, you got it right. But I need some help from other Radiant users out
there.

And, as I mentioned in my other email.  This one's serving up with a
HTTP/1.1 200 OK response so it looks like SnS could be the culprit. But I
have *no* idea where to look in LiteSpeed to find out why it thinks the
response should be 404 -- I've never used it.  Anyone?

Does it have some sort of log or is there a debugging tool?

TextAssetResponseCache must be handing over something different than the
standard ResponseCache that pages use and LiteSpeed is choking on this
difference.  But I'm not getting this behavior on my development machine
(which uses mongrel to serve up the content).

-Chris




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


Re: [Radiant] SnS extension problem

2008-07-24 Thread Chris Parrish
Yes, you got it right. But I need some help from other Radiant users out 
there.


And, as I mentioned in my other email.  This one's serving up with a 
HTTP/1.1 200 OK response so it looks like SnS could be the culprit. 
But I have *no* idea where to look in LiteSpeed to find out why it 
thinks the response should be 404 -- I've never used it.  Anyone?


Does it have some sort of log or is there a debugging tool?

TextAssetResponseCache must be handing over something different than the 
standard ResponseCache that pages use and LiteSpeed is choking on this 
difference.  But I'm not getting this behavior on my development machine 
(which uses mongrel to serve up the content).


-Chris

Marshal Linfoot wrote:

OK Chris, I  get it now. Ready for you to take a look. Thanks for all
of this, by the way. Much appreciated.

On Wed, Jul 23, 2008 at 7:14 PM, Chris Parrish
[EMAIL PROTECTED] wrote:
  

Marshal Linfoot wrote:


Chris, I hope this is what you had in mind...a slimmed down version of
what I currently use for the live site.

  

Not quite.  That looks like a regular html page and not a css one.  To
create what I was talking about, do the following:

 1. Create a new template\
* Name it: CSS
* Expand the more button and change the content-type to:
  text/css
* In the body of the layout, put nothing but: r:content
* save the layout
 2. Go to your tester page and change its layout to: CSS

This should serve up your tester page using text/css mime type and
without all the header/footer layout stuff.

-Chris




  


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


Re: [Radiant] New RedCloth

2008-07-24 Thread Chris Parrish

I'm fine with it.  Looks like a good improvement too.

Now all we need is a better Markdown parser.

-Chris

Sean Cribbs wrote:
How would people feel about switching to a gem dependency on the 
latest RedCloth (instead of packaging it)?


Sean

Ollivier Robert wrote:

Have you seen this announcement?

http://feeds.feedburner.com/~r/RubyInside/~3/342732232/redcloth-4-released-962.html 



Apart from dropping of Markdown support (does radiant use it?), it
could be interesting to update it.
  


___
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] New RedCloth

2008-07-24 Thread Chris Parrish
I understood discoount to be *nix only (no Windows).  I'll have to look 
into it further.


-Chris

Jim Gay wrote:

It's a bit of a detour from Radiant being geared toward shared hosting.

John Muhl is working on a branch than uses RDiscount (which is a 
better Markdown parser).

http://github.com/johnmuhl/radiant/tree/markdown

On Jul 24, 2008, at 11:05 AM, Chris Parrish wrote:


I'm fine with it.  Looks like a good improvement too.

Now all we need is a better Markdown parser.

-Chris

Sean Cribbs wrote:
How would people feel about switching to a gem dependency on the 
latest RedCloth (instead of packaging it)?


Sean

Ollivier Robert wrote:

Have you seen this announcement?

http://feeds.feedburner.com/~r/RubyInside/~3/342732232/redcloth-4-released-962.html 



Apart from dropping of Markdown support (does radiant use it?), it
could be interesting to update it.


Jim Gay
http://www.saturnflyer.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] New RedCloth

2008-07-24 Thread Chris Parrish
I saw somewhere that Luis Lavena was researching porting rDiscount to 
Windows but also that it didn't look good (discount depends on some *nix 
only libraries, I think)


Hopefully I'm wrong, though.

Either way, I didn't mean to hijack a thread.  New Redcloth for all!

-Chris



john muhl wrote:

On 2008/07/24, at 07:44, Sean Cribbs wrote:

How would people feel about switching to a gem dependency on the 
latest RedCloth (instead of packaging it)?


I think it's going to have to happen at some point unless Radiant 
wants to keep using the same old text parsing libraries from 
2004/2005. Waiting for the pure ruby libraries catch back up is the 
other (wishful) option.



On 2008/07/24, at 09:31, Chris Parrish wrote:

I understood discoount to be *nix only (no Windows).  I'll have to 
look into it further.


That's right. Although there isn't anything really stopping it from 
being compiled for windows with mingw just like they did RedCloth 4; 
except of course finding people who use windows to do the work :) 
There is also PEG markdown (rpeg-markdown in ruby land) but right now 
it is completely unusable on big (huge?) spans of text and I'm not 
sure it's any easier to get running in windows. Personally, I'd rather 
have a PEG based Markdown than a Discount based one.



As far as getting a new Markdown parser into core I'd say don't even 
bother yet. As has been stated Discount doesn't (yet) run on windows, 
and PEG Markdown is crashy (and probably doesn't run on windows either).


I would definitely like to see Radiant upgrade to RedCloth 4 sometime 
soon. If no one jumps up to take it on in the next week, I'll try to 
get it running then.



p.s. I did put together a standalone Markdown filter that uses 
rdiscount, so if you can install gems and don't run windows you can 
use that until something better is in the core. I use it on live sites 
with no problems (some were even started with the standard Markdown 
filter and upgraded without issue).


http://github.com/johnmuhl/radiant-markdown-extension


___
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] SnS extension problem

2008-07-23 Thread Chris Parrish
Weird.  Your CSS headers look right.  Your CSS validates (well enough, 
anyway).  Stranger still, if I download it using firefox and run it 
locally, all's well.


My best guess is the @import line.  What happens if you remove it?

-Chris

Marshal Linfoot wrote:

Hi all.

I'm having a problem with the SnS extension and need some help.
Radiant 0.6.7 (gem) and Styles and Scripts extension v0.6. The
extension installed without any errors, I can access the CSS and JS
tabs, and have created a stylesheet called elastic.

In the layout for my pages I have: r:stylesheet name=elastic
as=link media=screen / which renders as link rel=stylesheet
href=/css/elastic type=text/css media=screen /. Looks okay to
me, but the page renders without the css being applied -- no styling.
The Radiant production log shows:

Processing SiteController#show_page (for 99.232.3.139 at 2008-07-23
14:58:33) [GET]
  Parameters: {url=/, action=show_page, controller=site}
Completed in 0.19283 (5 reqs/sec) | DB: 0.0 (0%) | 200 OK
[http://test.octopusgardenyoga.com/]

Processing SiteController#show_page (for 99.232.3.139 at 2008-07-23
14:58:34) [GET]
  Parameters: {url=[css, elastic], action=show_page,
controller=site}
Filter chain halted as
[#ActionController::Filters::ClassMethods::SymbolFilter:0x2adc426c66d0
@filter=:parse_url_for_text_a
ssets] rendered_or_redirected.
Completed in 0.01643 (60 reqs/sec) | DB: 0.0 (0%) | 304 Not
Modified [http://test.octopusgardenyoga.com/css/elastic]

I have no idea why the css isn't being applied. Tried naming it
elastic.css, same results. Tried r:stylesheet name=elastic
as=inline  / and it places the css inline as expected, but no
styling.

Thanks for any help. I'm eager to use this extension for all the good
reasons Chris mentions in the README.

PS. You can see the rendered pages at http://test.octopusgardenyoga.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] SnS extension problem

2008-07-23 Thread Chris Parrish
Doh!  Tim beat me to it.  I don't have time to look right now but if 
those are Sass imports, I doubt it'll work.  And it doesn't look like 
you have a file named:  http://test.octopusgardenyoga.com/css/gallery.css


You can, however, use the r:stylesheet name=anotherfile.css to 
include stylesheet B into stylesheet A (kind of a snippets for 
stylesheets).  That way you can skip the @import altogether.  And the 
extension will even track your dependencies so if B changes, its 
LAST-MODIFIED will bubble up to A.


-Chris

Tim Gossett wrote:

On Wed, Jul 23, 2008 at 11:10 AM, Marshal Linfoot [EMAIL PROTECTED]
wrote:
  

The Radiant production log shows:

Processing SiteController#show_page (for 99.232.3.139 at 2008-07-23
14:58:33) [GET]
 Parameters: {url=/, action=show_page, controller=site}
Completed in 0.19283 (5 reqs/sec) | DB: 0.0 (0%) | 200 OK
[http://test.octopusgardenyoga.com/]

Processing SiteController#show_page (for 99.232.3.139 at 2008-07-23
14:58:34) [GET]
 Parameters: {url=[css, elastic], action=show_page,
controller=site}
Filter chain halted as
[#ActionController::Filters::ClassMethods::SymbolFilter:0x2adc426c66d0
@filter=:parse_url_for_text_a
ssets] rendered_or_redirected.
Completed in 0.01643 (60 reqs/sec) | DB: 0.0 (0%) | 304 Not
Modified [http://test.octopusgardenyoga.com/css/elastic]

I have no idea why the css isn't being applied. Tried naming it
elastic.css, same results. Tried r:stylesheet name=elastic
as=inline  / and it places the css inline as expected, but no
styling.



I think your problem is the first line:

@import url(gallery.css)

I don't think the SnS extension can handle SASS imports (because SASS looks
for a .sass or .css file in the filesystem, not in the DB), so it passes the
directive into the rendered stylesheet. Since @import is not valid CSS, your
browser stops processing rules, and no styles get applied. You'll need to
add a r:stylesheet / tag for every stylesheet you want to use.

Maybe Chris is working on a way to include multiple stylesheets with one
tag. For now, though, you should use one tag per css file.

--
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] SnS extension problem

2008-07-23 Thread Chris Parrish
Personally, I am no longer using the @import but rather building one 
master stylesheet via the r:stylesheet command I mentioned earlier.  
This gives me the same benefits of compartmentalized code while allowing 
me to only serve up one file to the browser (faster download times, less 
bandwidth, etc.)


By the way. This also works with javascript using the r:javascript tag 
so you could build your own custom protaculous file from the independent 
prototype.js, effects.js, dragdrop.js, etc.


Oh, and throw in SnS Minification and it gets kinda fun.

-Chris


Josh Schairbaum wrote:
That's funny, I was just playing around with this yesterday.  I'm 
running Radiant Edge with a recentish-SNS install.  I'm using multiple 
imports in my stylesheets, but they have to be at the top of the 
file.  I am not using SASS.


Josh

On Jul 23, 2008, at 1:47 PM, Alan wrote:


Marshal Linfoot wrote:

More weirdness...

If I point my browser (FF 3 on Linux) to
http://test.octopusgardenyoga.com/css/elastic, the text of the css is
displayed. But if I use that same URI, or just
test.octopusgardenyoga.com, and try to validate with the W3C CSS
Validator ( http://jigsaw.w3.org/css-validator) it says File not
found: http://test.octopusgardenyoga.com/css/elastic: Not Found.

Does this give anyone any clue as to what's going on? I am admittedly,
clueless :/

On Wed, Jul 23, 2008 at 12:46 PM, Marshal Linfoot 
[EMAIL PROTECTED] wrote:



Weirder yet. Renders ok with Safari, but not with FF 2 on MacOSX, FF 3
on Linux, or IE 7 on Vista (last one checked with
CrossBrowserTesting.com).

Am I missing something obvious like needing to create a public/css 
directory?






Well looking at it with FireBug on FF3 on Fedora I am seeing a 404 
error for the css/elasitic file. Yet it is also returning the css 
content. The header does not include a content-length either.


for elastic
Response Headers
Content-Type text/css; charset=utf-8
Last-Modified Wed, 23 Jul 2008 16:36:09 GMT
X-Runtime 0.00882
Date Wed, 23 Jul 2008 17:44:53 GMT
Server LiteSpeed
Connection Keep-Alive
Keep-Alive timeout=5, max=100


for lightbox.css
Response Headers
Date Wed, 23 Jul 2008 17:39:46 GMT
Server LiteSpeed
Accept-Ranges bytes
Cache-Control max-age=604800
Expires Wed, 30 Jul 2008 17:39:46 GMT
Etag 989-477db31c-28bd7
Last-Modified Fri, 04 Jan 2008 04:16:28 GMT
Content-Type text/css
Content-Length 924
Content-Encoding gzip
Vary Accept-Encoding


Hope that helps... Don't really know what could be done to fix it 
that you haven't tried already.


--
Alan Peabody
___
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] SnS extension problem

2008-07-23 Thread Chris Parrish

Marshal Linfoot wrote:

Chris, I hope this is what you had in mind...a slimmed down version of
what I currently use for the live site.
  


Not quite.  That looks like a regular html page and not a css one.  To 
create what I was talking about, do the following:


  1. Create a new template\
 * Name it: CSS
 * Expand the more button and change the content-type to:
   text/css
 * In the body of the layout, put nothing but: r:content
 * save the layout
  2. Go to your tester page and change its layout to: CSS

This should serve up your tester page using text/css mime type and 
without all the header/footer layout stuff.


-Chris


stylesheet layout template with r:content and a content-type of text/css
A styles page that uses the stylesheet template, and child page
test with slug test.css
Simple layout template called test with link
href=/styles/test.css rel=stylesheet type=text/css / to use css
the old-fashioned way
Simple page called tester that uses the test layout template.

View the rendered page at http://test.octopusgardenyoga.com/tester

PS. How do you see all the HTTP response headers?

On Wed, Jul 23, 2008 at 6:10 PM, Chris Parrish
[EMAIL PROTECTED] wrote:
  

As you mentioned, the full file is being served up but the response
includes:
 RESPONSE:  HTTP/1.1 404 Not Found

That has to be the problem but what is the cause?

Anybody know enough about LightSpeed to know if this is a server issue
(mime-type config, perhaps)?

In the meantime, can you create a CSS page the old-fashioned way (build a
template with just r:content and a content-type of text/css then
create a regular old page that uses that layout)?  I'd like to know what its
headers look like (does it come up with a 200 like your home page or 404
like the stylesheets).  That may tell us if it is server related or not.


-Chris






  


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


Re: [Radiant] SnS extension problem

2008-07-23 Thread Chris Parrish
Ok, it looks like you created a page with a stylesheet template 
(http://test.octopusgardenyoga.com/tester) and its headers give a 200 
response.  So this makes me think that SnS isn't interacting well with 
LightSpeed (likely a bug on my part from the TextAssetResponseCache).


Since I don't use LightSpeed, does anyone else out there know a 
debugging procedure to identify the issue here?


I'll look at my code in the meantime but there isn't much there -- it 
mostly inherits from Radiant's ResponseCache.


-Chris
___
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 Browser Support -- Drop IE6?

2008-07-21 Thread Chris Parrish
Hello all.  Thanks for the input.  As John mentioned, I am beginning 
work on the new Radiant UI, and my main goals are:


  1. It needs to function correctly
  2. I want the CSS/Markup to be as simple (understandable) as possible
 as this is open source
  3. I want to produce something that won't inadvertently break
 (maintainer removes one line to change something only to learn
 that that line was necessary as a browser hack)

Browser limitations/variations work against all of these (I'm currently 
fighting with Firefox).  I'm trying to find a happy (read: 
sane)-medium and I wanted people's take on things.


The consensus seems to be:

   * Most could live without IE6 (no current users requiring it)
   * Many/some could foresee a case where IE6 might be needed

So, I agree with John  Jim that we should shoot for IE 7+ support with 
the ability to add in IE 6 as an extension.  Besides, I'm working on 
some of the harder parts now and it's looking like PNG support may be 
the only limitation (I had other ones in mind when I asked this question 
but I think those may be working themselves out).



Jim Gay wrote:
Chris, I'm trying to clear up my schedule to get more involved in the 
new UI. Have you forked radiant-prototype or do you gave a public 
location for ideas that you're working on?




It didn't make sense to fork John's Radiant Prototype as that is really 
a complete prototype of the existing UI.  I have made a copy of it and 
will be hosting it on GitHub here shortly (I'm trying to get the 
_layout.haml file working so that the nav will be nailed down before 
releasing).


Time permitting, I'll have it up by Wednesday.

-Chris
___
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 Browser Support -- Drop IE6?

2008-07-21 Thread Chris Parrish
I can get PNGs to work just fine with IE 6 via pngfix.js or just using 
IE's proprietary filters in the CSS.  But you can't do any fancy 
positioning -- just left/top aligned images for backgrounds.


There are other ways to skin that cat, so there should be a solution 
there somewhere.  I just don't want to have to support or maintain it.


There will be other issues that crop up before we're done, I'm sure.

-Chris

Nate Turnage wrote:

On Mon, Jul 21, 2008 at 9:38 AM, Chris Parrish 
[EMAIL PROTECTED] wrote:

  

So, I agree with John  Jim that we should shoot for IE 7+ support with the
ability to add in IE 6 as an extension.  Besides, I'm working on some of the
harder parts now and it's looking like PNG support may be the only
limitation (I had other ones in mind when I asked this




I always use pngfix.js to get IE6 to work with transparent png files and it
works like a charm.

Find it here: http://homepage.ntlworld.com/bobosola/index.htm



~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


[Radiant] Radiant Browser Support -- Drop IE6?

2008-07-19 Thread Chris Parrish

I have a question for all the Radiant users out there...

Would anyone be left out if Radiant failed to support IE 6?

I am working on some UI/CSS improvements for Radiant which require hacks 
and workarounds to support this browser.  It can be done but I'm not 
sure it's worth it.


IE 8 is already in beta and IE 7 is freely available for all but Windows 
2000 -- and that OS is 8 years old (benefits of a public education right 
there, baby).  And Win2k can easily install Firefox, Opera, or Safari so 
it's not like they're stuck.


Thoughts?


-Chris

P.S. Please don't waste bandwidth with Microsoft or IE bashing (I'm not 
interested in why everyone should use insert your favorite browser 
here). I just want to know whether it would be a problem for Radiant 
admin users to need IE 7+.



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


Re: [Radiant] SnS extension

2008-07-19 Thread Chris Parrish
What version of Radiant do you have installed?  Is this version already 
installed and you are adding SnS to it or are you rolling out Radiant 
for the first time with SnS in place?


-Chris

Andrew Gehring wrote:

After installing SnS, whenever I try to do a db:migrate (for other
extensions), I get:

rake development db:migrate:extensions
(in /var/www/ra/project_dev)
rake aborted!
undefined local variable or method `no_login_required' for SiteController:Class

(See full trace by running task with --trace)

Am I doing something goofy?

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] Radiant Browser Support -- Drop IE6?

2008-07-19 Thread Chris Parrish

Ha! Radiant for Web-TV...

-Chris

Adam van den Hoven wrote:
I say release without IE6 support and then create a Legacy Admin UI 
extension to add support for IE  7, WebTV and other fringe user agents.


Adam

On 19-Jul-08, at 12:49 PM, Sean Cribbs wrote:

I'm of the opinion that IE6 is going the way of the dinosaur.  Unless 
your client absolutely needs it, I would avoid bending over backwards 
for it.  IE6 support on the front-end is a different story (alas you 
may need at least minimal support for it -- still has approximate 25% 
market share), but I think it's reasonable to require modern browsers 
for the admin UI.


Sean

Alex Wayne wrote:

I would dance a god damn jig.

Seriously though, I think public sites still need to support IE6.  
But gated admin areas that have a small number of users, I think its 
fine to declare IE7 the minimum.  And, if we're lucky, the rest of 
the internet will follow suit.


-Alex
http://beautifulpixel.com

On Jul 19, 2008, at 11:39 AM, Chris Parrish wrote:


I have a question for all the Radiant users out there...

Would anyone be left out if Radiant failed to support IE 6?

I am working on some UI/CSS improvements for Radiant which require 
hacks and workarounds to support this browser.  It can be done but 
I'm not sure it's worth it.


IE 8 is already in beta and IE 7 is freely available for all but 
Windows 2000 -- and that OS is 8 years old (benefits of a public 
education right there, baby).  And Win2k can easily install 
Firefox, Opera, or Safari so it's not like they're stuck.


Thoughts?


-Chris

P.S. Please don't waste bandwidth with Microsoft or IE bashing (I'm 
not interested in why everyone should use insert your favorite 
browser here). I just want to know whether it would be a problem 
for Radiant admin users to need IE 7+.



___
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] [ANN] Styles 'n Scripts v0.6 Styles 'n Scripts Sass Filter v0.2

2008-07-15 Thread Chris Parrish

Minor changes here...
https://secure.svnrepository.com/s_swanki/open/radiant/extensions/styles_n_scripts/tags/latest
https://secure.svnrepository.com/s_swanki/open/radiant/extensions/sns_sass_filter/tags/latest

Styles 'n Scripts now belongs in a directory named sns like:
 [your radiant project]/vendor/extensions/sns

No changes to your db, no changes to the UI, no rake updating -- just 
this directory name change. Everything else is the same to you and your 
users.  (Except all the rake tasks use sns instead of 
styles_n_scripts but that should be a welcome change).


The new SnS Sass Filter version is required to work with the new Sns 
release.



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


Re: [Radiant] Has anyone added WMD to the admin interface?

2008-07-15 Thread Chris Parrish

Ooh, WMD's gone MIT licensing. Now this is nice to see.

One more thing to play with...

-Chris


Oli Studholme wrote:

Hi All,

Has anyone added the WMD markdown editor to the admin interface yet? 
Or any WYSIWIG editor? I’m looking for some advice on the recommended 
way to do so.


peace - oli
___
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] Styles n Scripts feature request

2008-07-14 Thread Chris Parrish
You can solve item #2 using r:stylesheet and multiple stylesheet 
files.  Just like you can use the r:javascript to reference multiple 
libraries and create a one-script-to-rule-them-all master to just serve 
up one library file, you can also incorporate many stylesheets into one 
master.


So you could create:
 main.css
 main-colors.css

where main.css includes:
 ... some stylesheet definitions...
 r:stylesheet name=main-colors.css /
 ... the rest of your style definitions ...

then you'd just stick all your colors in... wait for it... main-colors.css

Of course what's missing there is the neat UI grouping that parts tabs 
afford.  But what's also missing is the hassle of building, testing, and 
maintaining a parts structure (abstract_controller really keen on 
managing has-many sub-models and I have to build my own new table 
structure since Parts isn't really designed for subclassing).


Originally, I debated page parts but decided that, since the audience 
was more technical, making them mentally keep track of several separate 
stylesheets that aren't conveniently visible via tabs seemed acceptable 
and worth the trade off (after all if they can keep track of CSS rules 
and their impact on the page, they can juggle 3 or 4 files).


Now, having said all that.  Are you using my Sass filter plugin?  If 
not, I might consider it.  Sass has a notation for setting document-wide 
constants so you could, say, declare all your color info at the very top 
and maybe get by with only one stylesheet.  From the Sass documentation:


 !main_color = #00ff00

 #main
   :color = !main_color
   :p
 :background-color = !main_color
 :color #00

More at: http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html

I'll respond to item #1 in a separate email.

-Chris

Jim Gay wrote:
I was working to move my page based stylesheets into the 
styles_n_scripts extension when I ran into a problem.


I'd love to see 2 features of doing stylesheets in pages:
1) support for radius tags from pages
2) page parts (or something like it)

I have one client that is managing the design of the site, but we're 
handling the HTML/CSS. So in the stylesheet, I use something like

#header {
  background: url('r:find url=/r:attachment:url name=logo.png 
/') no-repeat left top;

}

This allows them to use page_attachments to change images specified in 
the stylesheet without needing to muck about in CSS.


Less importantly, I break out the stylesheet into different parts to 
make it easier to manage, but also easier for the client to update.
For example, I'll add r:content part=colors / to the body which is 
the part of the stylesheet (page) where all of the colors are 
specified. The client can go in and go directly to the colors part and 
knows enough to edit the part for particular items in the site. I'll 
only put the color information in the colors part so that the extra 
CSS declarations don't confuse them.


The reason I found this is because of this 
http://dev.rubyonrails.org/ticket/10886 which is fixed in the version 
of Rails later than what is currently in Radiant. But my form data was 
apparently too big to be saved properly by Rails.

___
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] Styles n Scripts feature request

2008-07-14 Thread Chris Parrish
Hmm, on re-reading my last answer, I don't like to be so can't-do.  So 
here's a solution for you...


As I mentioned, your needs involve two static tags. (If used in a 
stylesheet, the only way they'd change the stylesheet's output would be 
to edit them in that stylesheet.  In other words, the stylesheet's 
updated_at date would be the true LAST-MODIFIED date for the served up 
file).


So while I don't want to start adding these things into SnS, you could 
write a simple extension that add these tags yourself.  It should be 
really simple since I modeled everything after how Radiant handles 
creating page tags.


Something like:
sns_custom_tags_extension/lib/text_asset_tags.rb

 module TextAssetTags
   include Radiant::Taggable
   class TagError  StandardError; end

   desc %{your tag's description here}
   tag('url') do |tag|
 copy/paste/massage the page's url tag into this tag
   end

   ... same with r:attachment:url ...

 end

Bonus points if you figure out a slick way to keep things DRY by reusing 
the code from the pages tag definitions.



-Chris


Chris Parrish wrote:

Ok, item #1.  Unfortunately, this is hairier than you'd think:

  1. Pages have an entirely different context than stylesheets and
 their tags don't exactly snap in (what exactly is the parent of a
 stylesheet? the slug?)  Basically, I'd have to rebuild these tags
 for stylesheet/javascript consumption.

  2. I built a whiz-bang dependency observer that tracks relationships
 for my r:stylesheet andr:javascript tags so that I could
 create a better caching mechanism for these files.  This caching
 was a core goal of this extension.  If I go adding page tags, I
 risk breaking the caching (some tags, like the ones you've
 specified, are really static tags -- the page they're in only
 changes if the tag is changed somehow -- but many of the radius
 tags are dynamic)  Radiant doesn't know which tags are which and,
 so, has to assume the worst -- hence Radiant's 5-minute cache.

So, it's not that it isn't doable, it's just that I want to approach 
this very cautiously.  I figure that someone's eventually going to 
come up with a case that will be so necessary as to make me change 
this one but man I'm gonna go kicking and screaming ;-)



-Chris

Jim Gay wrote:
I was working to move my page based stylesheets into the 
styles_n_scripts extension when I ran into a problem.


I'd love to see 2 features of doing stylesheets in pages:
1) support for radius tags from pages
2) page parts (or something like it)

I have one client that is managing the design of the site, but we're 
handling the HTML/CSS. So in the stylesheet, I use something like

#header {
  background: url('r:find url=/r:attachment:url name=logo.png 
/') no-repeat left top;

}

This allows them to use page_attachments to change images specified 
in the stylesheet without needing to muck about in CSS.


Less importantly, I break out the stylesheet into different parts to 
make it easier to manage, but also easier for the client to update.
For example, I'll add r:content part=colors / to the body which 
is the part of the stylesheet (page) where all of the colors are 
specified. The client can go in and go directly to the colors part 
and knows enough to edit the part for particular items in the site. 
I'll only put the color information in the colors part so that the 
extra CSS declarations don't confuse them.


The reason I found this is because of this 
http://dev.rubyonrails.org/ticket/10886 which is fixed in the version 
of Rails later than what is currently in Radiant. But my form data 
was apparently too big to be saved properly by Rails.

___
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] [ANN] SnS extensions on GitHub

2008-07-09 Thread Chris Parrish
Actually, I've been working towards it (and the SnS renaming -- kind of 
wish you'd told me that you were working on it).


Anybody have any good Windows references for Git.  I currently develop 
with RadRails and really like the SVN integration (Git is non-existent) 
so I've really been dragging my feet there.


-Chris

Tim Gossett wrote:

Not to pre-empt Chris Parrish, but I've renamed the styles_n_scripts
extension to sns as mentioned earlier on this list.

I'm a recent GitHub convert, still floating on a cloud of GitHub Zen,
so I've mirrored all of Chirs' work in my GitHub account.

SnS proper:http://github.com/MrGossett/radiant_sns_extension/tree/master
SnS Minifier:
http://github.com/MrGossett/radiant_sns_minifier_extension/tree/master
SnS SASS filter:
http://github.com/MrGossett/radiant_sns_sass_filter_extension/tree/master

I'm planning to just track Chris' SVN repository
(https://secure.svnrepository.com/s_swanki/open/radiant/extensions/)
and not really make many modifications myself... I just want it on
GitHub so that I can add it as a submodule in all my Radiant projects.

Any plans to get on GitHub, Chris?

--
Tim Gossett
___
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] if_content multiple parts (was if_content with inherit)

2008-07-08 Thread Chris Parrish
Since the all / find / require_all / inclusive attribute is both 
required and boolean (yeah I know XOR's been mentioned but I'm not going 
there), why not try to include that condition in the rest of it somehow?


r:if_content part=my part  (notice that the name part is singular)
r:if_content any_part=my part, my other part
r:if_content all_parts=my part, my other part

So in this example, you'd have 3 different possible attributes.  Its 
always easier to read one attribute name than to have to combine two or 
three into a single meaning.


This stuff really is really motivating me to get my conditionals 
extension back to life ;-)


-Chris


Jim Gay wrote:

On Jul 8, 2008, at 2:43 PM, Tim Gossett wrote:
On Tue, Jul 8, 2008 at 2:27 PM, Sean Cribbs [EMAIL PROTECTED] 
wrote:
Or I'm thinking that inclusive=true might be good since we've got 
mostly

true/false for extra attributes on r:content

r:content [part=part_name] [inherit=true|false]
[contextual=true|false] /
r:if_content [part=part_name, other_part]  [inherit=true|false]
[inclusive=true|false]
r:unless_content [part=part_name, other_part]  
[inherit=true|false]

[inclusive=true|false]

inclusive=true being the default (meaning AND)

Would either of those be clear to everyone?
I'd personally opt for the first (select=all) for clarity of 
meaning.


I'm tempted to shy away from all of this and create a new tag like
r:if_any_part part=one, two and r:if_all_parts... but I think 
that
that will add more complexity in the long run. I don't think the 
answer is
more tags. If the r:if_content chooses a reasonable default and 
provides an
easy override with select=any then communicating its use and 
purpose to

users will be relatively simple.

I agree that adding a boolean attribute would stay in the spirit of 
the
original tags.  I'm not sure if 'inclusive' is the clearest but it's 
a good

start.  Some other options:

all=true|false
requireall=true|false



Of these two, I like requireall=true|false

Your thoughts?


I think find=all|any is the clearest of what we've discussed so far.


Perhaps, but I think any=true | false is pretty clear.

Making the attribute's value boolean for the sake of conformity 
doesn't seem
to outweigh clarity. Also, what if we want to add something with the 
effect
of find=XOR or find=NOR or find=NAND? If we were to add all of 
these,

we'd have


I'm currently trying to implement based on my real-world needs. 
Anything hypothetical is probably not worthwhile.



r:content [part=part_name] [inherit=true,false]
[contextual=true,false] / (I'm not quite sure what contextual 
does, but

I'll read about it when 0.6.8 is released... looking forward to it!)


This already exists in 0.6.7 (and previous versions I believe) so take 
a look at your Available Tags



r:if_content [part=part_name,other_part] [inherit=true,false]
[find=all,any,either,neither,none] /
r:unless_content [part=part_name,other_part] [inherit=true,false]
[find=all,any,either,neither,none] /

With those extra values, there's some overlap with unless_content, but I
like the flexibility.

Thoughts?


I find that confusing and unnecessary. If you have a real example of 
where you have already had the need for something like that I'd say 
there's an argument for it, but I think that's way more complex than 
anyone would regularly need. In my opinion it would be fine as an 
extension.


if_content (the next version) takes a list of parts, not just 1 or 2, 
so 'either' and 'neither' don't really make sense in there. 'none' is 
handled by unless_content, so we're back to 'all' and 'any' (in my 
opinion).


-Jim
___
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] Shared Layouts

2008-07-08 Thread Chris Parrish
In your example, Sean, you create a StatsController that inherits from 
ApplicationController (which is the default if you use Radiant's 
controller generators).  Anyway I've been getting all kinds of errors 
with my specs and banging my head against a wall only to *finally* 
realize that ApplicationController includes the LoginSystem.  (I'm 
always logged in so I never noticed).


I'd like to save others the bloody foreheads since most using the Shared 
Layouts extension will be designing public-facing controllers.  Thoughts?


For others, I fixed this by simply adding:
 no_login_required

to my controller.

In fact, other than maybe rescue_action_in_public, is there any real 
benefit to inheriting from ApplicationController vs. good ol' 
ActionController::Base for a Shared Layouts Controller?


-Chris

Sean Cribbs wrote:
I got one started with a lot more detail than the email message.  I'll 
try to finish the rest tonight:


http://wiki.radiantcms.org/Creating_an_extension_VI

Cheers,

Sean

John W. Long wrote:

On Jul 6, 2008, at 1:06 PM, Sean Cribbs wrote:
Since there seems to be some confusion about how to use 
share_layouts lately, I'll break it down into steps for you and 
everyone.


I hope this makes it on the wiki somewhere. :-)

--
John Long
http://wiseheartdesign.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] [ANN] SnS Minifier

2008-07-07 Thread Chris Parrish
New release!  You can find v0.1.1 at: 
https://secure.svnrepository.com/s_swanki/open/radiant/extensions/sns_minifier/tags/latest


Thanks to Tim who found this naming issue (see below).  What can I say - 
it was getting late.


-Chris

Tim Gossett wrote:

I got the following error for /admin/css/new:

undefined method `minify' for #Stylesheet:0x2756ac8

(I'm on OS X 10.5, Rails 2.1, Radiant 0.6.7 using SQLite3)

When I rake db:extensions:sns_minifier:migrate, the add_column never
gets executed. I renamed
sns_minifier/lib/tasks/minify_extension_tasks.rake to
sns_minifier/lib/tasks/sns_minifier_extension_tasks.rake and
remigrated (migrate VERSION=0 then migrate), and it was fixed.

I am now enjoying SASS-filtered, minified stylesheets. Thanks a bunch, Chris!

--
Tim Gossett
___
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] SnS Minifier

2008-07-07 Thread Chris Parrish

Tim Gossett wrote:

On Mon, Jul 7, 2008 at 1:30 AM, Chris Parrish 
[EMAIL PROTECTED] wrote:

  

You will need the Styles 'n Scripts extension installed for this to work
and you
will also probably need to change your project's environment.rb file to
twiddle
the load order (the SnS Extension must be loaded before this one). For
example,
you could use something like:
config.extensions = [ :all, :sns_minifier ]




I think extensions are loaded in alphabetical order unless otherwise
specified by config.extensions. If you rename this extension to
styles_n_scripts_minifier (or rename styles_n_scripts to sns), you won't
need the change in environment.rb.

I was poking around in the SVN repo last night and spotted these new
extensions. They look great!

  


Tim, you're right about the load order thing.  I had debated naming the 
new extensions styles_n_scripts_xxx but I've decided that carpal 
tunnel syndrome just is not for me.


But I hadn't considered renaming the whole extension to sns though.  I 
think I like that idea for several reasons.


However, it would require users to physically change something on their 
servers -- not just update from svn.  You would have to change from:

   /vendor/extensions/styles_n_scripts
to:
   /vendor/extensions/sns

Would anyone be opposed to my renaming the extension like this?

-Chris

P.S. Just to be clear, I'd only be renaming files and their related 
code. Oh, and rake tasks would now be rake radiant:extensions:sns  But 
otherwise everything would be *identical* to your users (even the 
extension name in the Admin panel would still show Styles 'n Scripts).

___
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] SnS Minifier

2008-07-07 Thread Chris Parrish

Tim Gossett wrote:

None of the models would be renamed (right?), so users should be able to
swap out the existing extension directory for a renamed one and get off
without a hitch. If I had a few spare moments, I'd try it for myself right
now... maybe there'd be a clash with the version number in the
extension_meta table, and maybe there wouldn't because it's listed as
Styles 'n Scripts.
  
No, I can keep the Styles 'n Scripts name in the meta table and in the 
Admin-Extensions page.  So all that would be needed is for the user to 
update to the latest version of SnS and  to change the 
styles_n_scripts folder name to sns.  (Or change the 
/vendor/extensions folder's properties if using svn:externals).


But for me it does require renaming all the rake tasks, the 
xx_extension.rb file, and probably something else I'm not thinking of.


I'd also probably change StylesNScripts::Config to SnS::Config (and 
there would be a *bunch* of references to that that would need to change 
accordingly).  Not strictly necessary but something I'd want.


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


[Radiant] [ANN] Styles 'n Scripts v0.5

2008-07-06 Thread Chris Parrish
Some new features, refactoring, and bug squishing.  Latest version can 
be found at:

https://secure.svnrepository.com/s_swanki/open/radiant/extensions/styles_n_scripts/tags/latest


For those with inquiring minds, the changes (taken from HISTORY) are:

Lots of improvements here.  Some new features some just refactoring.

Added Shards to the edit view so now this extension can be extended
(watch for SnS extension extensions to come soon).

Added support for filters.  The only real one planned is Sass for the
CSS files but, the way I did it, it's pretty extensible (based on how
Radiant handles page content filters).  Did I mention that there were
some SnS extension extensions coming soon...

Changed the way stylesheet and javascript urls were routed and evaluated
(now its a before_filter hooked into SiteController's show_page method).
This has the added bonus of allowing the stylesheet and javascript
directories to be changed during runtime (see next point).

Configurations are now handled differently.  Rather than setting them
once at load-time, they are changed dynamically via Rake tasks.  The
only exception is the caching directory -- you really don't want to do
that one dynamcially -- so it's been pulled out of the config and made a
constant.

Caching is more better.  No more caching the whole url path -- just the
file, thank you.  This makes it possible to change the directory name
on the fly.
  
Bug fixes:

 * Added a 'url' definition (just ) to the extension to fix an issue
   with a change in Radiant 0.6.7 behavior (I really shoulda done that
   all along).
  
 * Corrected an issue where this extension is included as part of a new

   Radiant install.  The RAKE db:bootstrap task would initialize the
   extension which would then try to write the default settings to a
   not-yet-existing config table.


Enjoy

-Chris


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


[Radiant] [ANN] SnS Minifier

2008-07-06 Thread Chris Parrish

I did say more coming soon, right... So here's another.

This time it's the SnS Minifier Extension found at:
https://secure.svnrepository.com/s_swanki/open/radiant/extensions/sns_minifier/tags/latest

Again, early release (v0.1) so please give me feedback.

From the README file:

= Styles 'n Scripts Minifier

Adds the ability to minify CSS and JS files. This way, you can keep your 
code

the way you like it in the editor but serve up minified files. (And if you
really want to speed things up, add GZip to the mix to have your server 
crunch

it further).


== Available Minifiers

* JSMin v1.0.0 - This is based on the original C code by Douglas Crockford
(http://www.crockford.com/javascript/jsmin.html) but wonderfully repackaged
into a plugin by Ryan Grove (http://github.com/rgrove/cssmin/tree/master).

JSMin is often seen as being an older but safer technology. It certainly
doesn't pack as well as some others out there but is tried and true.

* CSSMin v1.0.0 - This is Ryan Grove's port of the YUI Compressor's
(http://www.julienlecomte.net/yuicompressor/) CSS minifier (which was itself
taken from Isaac Schlueter’s regular expression based CSS minifier
(http://foohack.com/2007/09/squish-it-good-code-compression-for-the-masses/)

Ryan nicely ported this one to a plugin too. And I added a minor addition
too (which is available via options -- see below)

* Packr - James Coglan was nice enough to port Dean Edward's famous Packer
(http://dean.edwards.name/packer/). More about the plugin version used here
can be found at: (http://blog.jcoglan.com/packr/)

Packer is a great tool but it is pretty strict about terminating javascripts
with semicolons (http://dean.edwards.name/packer/usage/sample.html).

* Rainpress - This is a newer ruby project by Uwe L. Korn to minify CSS 
files

(http://code.google.com/p/rainpress/). There isn't much history but it
seems solid enough.

I had to repackage this one into a plugin (and strip a lot of the command
line stuff out). Originally I did all this as I didn't know about CSSMin.
Anyway, I included this too basically because I'd already done everything.


== Usage
It's pretty simple, really. Once installed, it adds a Minify? checkbox 
to the
bottom of your Stylesheet and Javascript pages. Just check the box and 
save the

file. Viola, the content is minified.

The configuration can be changed via the @@settings variable inside:
/lib/text_asset_mixins.rb

There, you can choose which minifiers you want to use and set any of their
available options.


== Requirements
You'll need:
* Radiant v0.6.7 or higher
* Styles 'n Scripts Extension v0.5 or higher


== Installation
Install the extension in your Radiant project like:
[your project]/vendor/extensions/sns_minifier

You will need the Styles 'n Scripts extension installed for this to work 
and you
will also probably need to change your project's environment.rb file to 
twiddle
the load order (the SnS Extension must be loaded before this one). For 
example,

you could use something like:
config.extensions = [ :all, :sns_minifier ]


== To Do
Well first of all this extension needs some specs.

But after that I'd *love* to find where someone ported the YUI 
Compressor (JS

version) to ruby. It appears to be much more flexible (read forgiving) than
Packer while still crunching stuff way down. A second option would be to let
admins install the java version and make this plugin interact with that.

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


Re: [Radiant] Settings Extension for easy access to configuration

2008-07-04 Thread Chris Parrish

Alex Wayne wrote:

I whipped up a quick extension today that some might find useful.  I
searched around a little and didn't come with any solutions that I was
happy with, form a functional or aesthetic standpoint.
  


Nice work.


It adds a Settings tab that provides a nice looking interface to
configuration settings.  You can easily rebrand your admin with a title
and subtitle, set default page parts and publishing status, all with the
settings that Radiant supports already.

If you're an extension developer and you want to store some settings in
the Radiant::Config model, those settings will show up on this tab
automatically.
  


One caution, here.  The SnS extension does use Radiant::Config so this 
should give you access to those settings.  However, the extension has 
it's own interface: StylesNScripts::Config which also offers validations 
(makes sure you don't use invalid path names for your css files, say).  
This won't cause any problems if you're careful about how you set things 
but I could see an extension having even more going on (like needing to 
spawn other methods when setting a value).


I guess my point here is to know what you're setting and how that 
application/extension will handle your twiddling.



This is a general solution for any configuration settings, but most
sites probably won't need it, since many of this is set it and forget
it.  However, one thing I would like to integrated in radiant core
somewhere is a more specific preference pane.  A page designed to set
all the config options with a more specific and UI, rather than just a
list of variables.

Is that something you think belongs in Radiant core or not?
  


I've brought this point up as something I think core needs.  And I think 
it is something that I think John is planning to release in the near 
term.  So I'm with you 100%


Where I'd approach it differently is in two areas:

   * I think Radiant needs a place to store settings (both for its own
 settings and for extension settings).  This way the content lives
 in one area of the admin panel and settings are located
 elsewhere.  For example, today, content goes in tabs and many of
 Radiant's settings have their own UI space (users, and extensions)

   * Just like extensions let you add tabs, Radiant should let you plug
 into the settings area.  That way extension developers can write
 their own validations, create their ideal UI and also keep users
 away from the actual db storage.

But of course, that's a much bigger task and really belongs as a core thing.

-Chris

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



Re: [Radiant] Styles 'n Scripts SASS filter?

2008-07-01 Thread Chris Parrish
Tim, hanks for the kind words and interest in the Styles 'n Scripts 
Extensions. I am about to release a new version of SnS which 
incorporates Shards.  I've had several ideas to improve SnS but that 
always seemed like extensions in their own right.  Once this is done, I 
will be offering some extensions to the SnS extension.  These include:


   * SASS filter
   * Compression/Minification
   * Syntax highlighting editor to replace the textarea

I'm hoping to be able to release v0.5 of SnS here by Friday.  The 
extensions will follow that.


BTW, I've begun work on the Minification and Syntax Highlighting but not 
the SASS one yet.  If anyone wants to tackle that extension or just 
contribute let me know (my biggest issue right now is time).  I'm 
guessing the SASS filter would be pretty simple, though.


-Chris

Tim Gossett wrote:

The SnS extensions looks awesome, but I want to keep all of my CSS in SASS.
How can I use the SASS filter with SnS?

--
Tim Gossett
___
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] r:children:if_first r:children:if_last

2008-06-26 Thread Chris Parrish
All this discussion of yet more r:if_x tags and another recent 
thread with the desire to pass values to snippets has me thinking of 
digging up my old conditional/variables extension.  I'm sure it needs 
revamped for the current versions of Radiant and I'd like to clean up 
the syntax some but, mostly, I'd like to know if folks out there would 
find it useful...


Here's what I'm thinking.  Please let me know if it'd be helpful to you, 
if you have any suggestions, and if you'd be interested in contributing:


  1. General conditional statements.  For instance, instead of solving
 this post's problem by creating a new tag (more tags for our users
 to learn), with a syntax different than the other r:if_x (also
 complicating things for them), we'd simply have a single r:if
 tag so you could write: r:if cond=children.index = 1.

 The r:if tag already knows how to parse the cond attribute, and
 how to evaluate the condition (true, false, greater than, string
 compare, regexp matching, etc) so you don't have to rewrite the
 logic every time.  To solve this problem, all that would be needed
 is to tell it how to evaluate children.index (or some such
 notation).  Currently I have implemented:
 * page.url
 * page.title
 * page.slug
 * page.breadcrumb
 * page.children.count
 * page.part[part_name]
 * vars[my_variable_name] (more on this in point #2)

  2. Ways to get/set basic variables.  For this one I had created a
 r:store / tag that could be used like:
 r:store vars=my_var1: 'some string text'; my_var2: 100;
 my_var3: false /
 r:puts value_for=vars[my_var1] /   --  some string text

 You could also use puts with the above like...
 r:puts value_for=page.children.count /  (not sure how
 useful this is...)

 Where it got nice though is using it with the conditionals like:
    in page 
 r:store vars=linkText: 'Some example link text'; url:
 my/target/url;
 class: myClass /
 r:snippet name=link /

    in snippet 
 a href=r:puts value_for=vars[url] /
 r:if cond=vars[class] class=r:puts
 value_for=vars[class] //r:if
   r:puts value_for=vars[linkText] /
 /a

 I had also implemented a modified r:snippet tag to make the
 first part easier so you could just do:
    in page 
 r:snippet name=link vars=linkText: 'Some example link
 text'; url: my/target/url;
   class: myClass /

Ok, so that's a long explanation.  I'm happy to resurrect the extension, 
but the big question is would this (or something similar) be useful?


Let me know...

-Chris



John W. Long wrote:

On Jun 26, 2008, at 8:36 AM, Jim Gay wrote:

I think it should allow a group or size option.

r:if_first size=3 would apply to the first 3. Working with more 
than just one would be useful.


I would want to have these tags with that option:
if_first / unless_first
if_last / unless_last

I'm not sure about the name of the parameter though. Perhaps 
r:if_first window=3


How about:

r:if_index in=1,2,3# if it's one of the first 3 children
r:if_index in=-1,-2,-3 # if it's one of the last 3 children
r:if_index is=1# equivalent to r:if_first /
r:if_index is=-1   # equivalent to r:if_last /
r:if_index is=even # if it's an even row
r:if_index is=odd  # if index is an odd row

Seems like a 1 based index would be most helpful here.

--
John Long
http://wiseheartdesign.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] r:children:if_first r:children:if_last

2008-06-26 Thread Chris Parrish

Thanks for your response and kind words, Jim.  See my comments below...

Jim Gay wrote:
I agree that the list of if_this unless_that can get very long, but 
there is a benefit in that the intentions of the code are clear.
I remember seeing emails about your extension and being very 
interested in the past, Chris, but I didn't have time to take a look 
at it.


I agree with the principle that a single r:if would make life simpler, 
but my gut reaction is that it starts looking less natural. But maybe 
I'd feel better with some nomenclature changes.


Please resurrect it. I've got some questions that might just be 
cleared by using it.


At this point, I plan to bring it back.  I have two issues I'd like to 
address and time is the big factor.




Something just bugs me when I see shortcuts such as the attribute 
cond when I feel like condition would be clearer. I think that in 
a system like Radiant, which seems to have some good coverage with 
non-technical users, clear intentions are important.


I agree.  Actually, in my original version I permitted both cond=xxx 
and condition=xxx to allow for quicker typing among the geeks.




I would scope the variables stuff more explicitly, such as
r:variables:store and r:variables:output
Because, although I haven't done it yet, I think a simple ecommerce 
web store would be a nice extension and r:store would make sense there.


Good idea.  Other variations included r:set var[s]=x: 1; y: 20  I'm 
now thinking that a better approach would be r:vars x=10 book=John 
chapter=3 verse=16 /.  It seems more readable.


By the way, I opted to only create a specific variable setter but a 
generalized getter.  Since my r:if condition=page.title == foo had 
to be able to evaluate page.title to compare it, it seemed natural to 
create a way to output anything evaluation-able.  So you can also:

   r:puts value_for=page.title /  or
   r:puts value_for=page.part[my part] /

Now, these two examples overlap with the existing r:title and 
r:content part=my part which are more concise, but it makes it nice 
for extension writers to easily offer:

   r:puts value_for=this.that /

(more on this.that below...)




You mentioned using r:if cond=children.index = 1 but should that 
have a double equal (==)?


It currently allows x=1, x ==1, or  x equals 1 since radiant is 
geared at the non-programmer.  Incidentally, x == y is also permitted.



Does it allow the use of RegExp matching with =~ ?


It currently allows x matches /regexp/ and x match /regexp/ but also 
including =~ would be trivial.


In addition, the following comparisons are permitted:

   * x exists, x exists?, or just x
   * x blank, x is_blank, or x blank?
   * x empty, x is_empty, or x empty?
   * x not 12 or y != 'my string value'
   * x  y or 1 lt 2 ( and gt also available)
   * y = 'A' or x lte z (= and gte also available)


Does the extension provide a way to easily describe how to parse 
things like children.index or this.that ?


No -- though I've always considered this critically needed.  This is 
where I got stuck as my ruby and radiant chops just weren't there.  I'd 
love to look into it now that I am much more familiar with radiant but 
this is also the place I would very much welcome help.


Basically, my code parses the condition into left and right symbols and 
the comparison element and then hands off the symbols to be evaluated.  
I'd want extension writers to be able to add in code to define how to 
evaluate their own custom symbols.  I need a good mechanism for that.   
So if you define a current_shopper.index, you could instantly offer:

   r:if condition=current_shopper.index equals 100
   strongHurray! You're the millionth shopper!/strong
   /r:if


Does it have the equivalent unless tag?


Sure does.



I disagree with John's suggestion too. r:if_index in=-1,-2,-3 
makes me think, huh?


Just this evening I was walking a client through parts of their 
Radiant site. I always say something to the effect of you can always 
contact us when things need to be changed, but this is how its done...
Some people speak up and say Ok, forget it, I don't need to see that 
while others pay attention.
When I walked through a few examples we have with r:if_content 
part=part_name the client said, Oh, cool. The intentions of that 
code are very clear and I have little fear (depending on the user) 
that someone can screw that up.


That's not to say that everything should be dumbed down, but to me 
something like r:if_first group_of=10 is very friendly. So a DRYer 
r:if would be nice, but I think a friendly dialect (for lack of a 
better term) is very important.


What he said.

I too, want to see maximum usability and comprehension for the 
non-techie.  And I *certainly* welcome input as to how to improve the 
wording/syntax/approach used here to deliver on this.


-Chris

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: 

Re: [Radiant] Odd Behavior During Testing

2008-06-25 Thread Chris Parrish

Anyone?

Further testing shows that when I don't include my module, I can verify 
during any controller's spec that:

   controllers_where_no_login_required = [SiteController]

As soon as I mix it in (even though it's an empty module), during the 
environment init and just before specs start to run:

   controllers_where_no_login_required = [SiteController]

But once the specs start to run, I get:
   controllers_where_no_login_required = []

Which, of course, messes up the tests.

Sounds like rSpec could be getting in the way but I don't even know 
where to start here.   Can anyone provide some insight -- or even just 
suggest some way to start tackling this?


-Chris


Chris Parrish wrote:

I'm completely lost here.  Can anyone shed some light on this?


In the SnS extension I have created the following...

In styles_n_scripts_extension.rb (activate method):
 SiteController.send :include, SiteControllerExtensions

In the /lib/site_controller_extensions.rb file:
 module SiteControllerExtensions; end  (Yes, it's empty. I stripped 
everything out trying to debug)


In the failing spec (describing SiteController):
 it should render an existing page do
   get :show_page, :url = '/'
   response.body.should == Hello World!
 end


Apparently, the SiteController also mixes-in the login_system which 
creates its own before_filter that calls the #authenticate method.  
This method, in turn, calls no_login_required?  SiteController 
*should* respond 'true' -- that no login is required.  But here's 
where it gets weird...


If I comment out my include line (the one in the extension's activate 
method above) SiteController does, indeed respond 'true' to 
no_login_required?  But, the minute I add in that include and mix in 
my extensions -- even with *nothing* in my mixed-in module -- 
SiteController starts responding 'false' -- that login is required.  
My spec'ed get request then returns a redirect to the login page.


This only happens when running specs.  Testing with a server in 
development mode works fine.  Thoughts anyone?



-Chris
___
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] Odd Behavior During Testing

2008-06-25 Thread Chris Parrish

Only tests (specs, actually).

Alex Wayne wrote:
Does the site work ok when you boot the server?  Or is it only tests 
that are broken?


-Alex
http://beautifulpixel.com

On Jun 25, 2008, at 7:28 AM, Chris Parrish wrote:


Anyone?

Further testing shows that when I don't include my module, I can 
verify during any controller's spec that:

  controllers_where_no_login_required = [SiteController]

As soon as I mix it in (even though it's an empty module), during the 
environment init and just before specs start to run:

  controllers_where_no_login_required = [SiteController]

But once the specs start to run, I get:
  controllers_where_no_login_required = []

Which, of course, messes up the tests.

Sounds like rSpec could be getting in the way but I don't even know 
where to start here.   Can anyone provide some insight -- or even 
just suggest some way to start tackling this?


-Chris


Chris Parrish wrote:

I'm completely lost here.  Can anyone shed some light on this?


In the SnS extension I have created the following...

In styles_n_scripts_extension.rb (activate method):
SiteController.send :include, SiteControllerExtensions

In the /lib/site_controller_extensions.rb file:
module SiteControllerExtensions; end  (Yes, it's empty. I stripped 
everything out trying to debug)


In the failing spec (describing SiteController):
it should render an existing page do
  get :show_page, :url = '/'
  response.body.should == Hello World!
end


Apparently, the SiteController also mixes-in the login_system which 
creates its own before_filter that calls the #authenticate method.  
This method, in turn, calls no_login_required?  SiteController 
*should* respond 'true' -- that no login is required.  But here's 
where it gets weird...


If I comment out my include line (the one in the extension's 
activate method above) SiteController does, indeed respond 'true' to 
no_login_required?  But, the minute I add in that include and mix in 
my extensions -- even with *nothing* in my mixed-in module -- 
SiteController starts responding 'false' -- that login is required.  
My spec'ed get request then returns a redirect to the login page.


This only happens when running specs.  Testing with a server in 
development mode works fine.  Thoughts anyone?



-Chris
___
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] Writing an radius tag extension article - running specs

2008-06-25 Thread Chris Parrish
Use rake spec:extensions EXT=your_extension_name to just run the specs 
for your extension.


By the way, does anyone else think it would be useful to run specific 
spec(s) within an extension?


Perhaps using syntax like:
   rake spec:extensions EXT=your_extension_name 
FILE=app/controllers/my_controller_spec.rb


or via grouping like radiant does:
   rake spec:extensions:models EXT=your_extension_name

Just a thought...

-Chris

Marty Haught wrote:

On Tue, Jun 24, 2008 at 9:15 PM, Alex Wayne [EMAIL PROTECTED] wrote:
  

Radiant 0.6.7 generates extensions with a spec directory by default, and no
test directory at all. Its all hooked up already for ya.



Hi Alex,

Yes, I see that but I've run into problems just getting them to run.
So I have a fresh Radiant 6.7 install (on Mac Leopard).  I used the
extension generators as Alex mentioned.  I then wrote a really basic
spec under spec/models.  Here it is:

require File.dirname(__FILE__) + '/../spec_helper'

describe 'SimpleTest' do
it 'should just pass' do
true.should be_true
end
end

I then drop to terminal and run rake spec from the extension's root.
Here's the output I get:

http://pastie.org/222063

Even though all I have is a single example, it's picking up all sorts
of other tests that fail.  Has no one else seen this?

Thoughts?

Cheers,
Marty
___
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] Writing an radius tag extension article - running specs

2008-06-25 Thread Chris Parrish

Chris Parrish wrote:
Use rake spec:extensions EXT=your_extension_name to just run the 
specs for your extension.



Oh, and you run it from the project's root - not the extension's.

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


Re: [Radiant] Writing an radius tag extension article - running specs

2008-06-25 Thread Chris Parrish

Alex Wayne wrote:
Thats quite odd.  Are you sure you are running the latest rspec gem?  
Try a


 gem install rspec

-Alex
http://beautifulpixel.com

I've had troubles using the rSpec gem because Radiant ships with its own 
version of rSpec and rSpec on Rails.  Whenever I tried to use the gem, 
rSpec on Rails complained that its version didn't match my gem's (even 
though I used the same release).


I've seen comments about this here on the list but I'm not sure that 
anyone's has found a solution to allow you to use your own installed gem 
--hence the radiant rake commands to execute radiant's plugged-in versions).


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


[Radiant] Odd Behavior During Testing

2008-06-23 Thread Chris Parrish

I'm completely lost here.  Can anyone shed some light on this?


In the SnS extension I have created the following...

In styles_n_scripts_extension.rb (activate method):
 SiteController.send :include, SiteControllerExtensions

In the /lib/site_controller_extensions.rb file:
 module SiteControllerExtensions; end  (Yes, it's empty. I stripped 
everything out trying to debug)


In the failing spec (describing SiteController):
 it should render an existing page do
   get :show_page, :url = '/'
   response.body.should == Hello World!
 end


Apparently, the SiteController also mixes-in the login_system which 
creates its own before_filter that calls the #authenticate method.  This 
method, in turn, calls no_login_required?  SiteController *should* 
respond 'true' -- that no login is required.  But here's where it gets 
weird...


If I comment out my include line (the one in the extension's activate 
method above) SiteController does, indeed respond 'true' to 
no_login_required?  But, the minute I add in that include and mix in my 
extensions -- even with *nothing* in my mixed-in module -- 
SiteController starts responding 'false' -- that login is required.  My 
spec'ed get request then returns a redirect to the login page.


This only happens when running specs.  Testing with a server in 
development mode works fine.  Thoughts anyone?



-Chris
___
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: Re: Adminstrator and Developer role clarification

2008-06-22 Thread Chris Parrish

Um, this thread's starting to deteriorate a bit.

@Alex - As you mentioned, I'm starting to like the component-ized 
approach as it makes it possible for extension builders to integrate new 
roles without breaking the UI (which oddly enough uses checkboxes = 
component mentality).


@ Anton - My choice of wording certainly is certainly objective but I 
chose it with the goal of conveying information to a lay user or small 
business owner to help them understand what the roles offer and what 
their boundaries are.  Again, it's debatable but I think you would have 
more folks give you an answer closer to what we mean here if you asked, 
what does your website designer do vs. what does your website 
developer do?


I think that part of this stems from the fact that the word developer 
is generally only used in the context of:


   * Software Developer
   * Land/Subdivision Developer

This is one of those cases, where designer leads the new user to the 
right conclusion but, once you know what the role already means, 
developer is probably more technically accurate.


Interestingly, in one of your later posts, you define Developer and 
Designer separately where Developer was working outside of the 
Radiant UI (including RoR and DB tasks).  And where Developer got into 
(x)html or css, the role overlapped with your definition of Designer  
It kind of made my point.


In any case, I'm not stuck on one particular name.  I was only trying to 
find a term that someone from outside of the web world could look at and 
make a fairly close guess at the scope of that role.


-Chris

Anton Aylward wrote:

Jonathan McCoy said the following on 22/06/08 03:12 PM:
  

Anton Aylward wrote:


blah
  
Whatever. Nice argument. Sadly it fell apart shortly after For most 
businesses The reality is quite different, and I can assure you 
that the ability to write copy, doesn't provide you with the competence 
to make design or technical decisions. 



I never said it did.
I wasn't denigrating those roles.

Unlike you I wasn't denigrating any roles.
All have to play their part.

Calling the people involved in content development Idiots as you did
is insulting.

  


___
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: Re: Re: Adminstrator and Developer role clarificatio

2008-06-22 Thread Chris Parrish

Jonathan McCoy wrote:

Chris Parrish wrote:
  

Interestingly, in one of your later posts, you define Developer and
Designer separately where Developer was working outside of the
Radiant UI (including RoR and DB tasks).  And where Developer got into
(x)html or css, the role overlapped with your definition of Designer
It kind of made my point.



Actually, that was my post ;)
  


Doh!

Thanks for the correction.

Whatever happens, and I seem to be banging on about this one, Snippets 
should be moved to the same level as Layouts. 


The problem here is that some sites use snippets extensively for content 
and writers need to create and edit those in order to create pages.  
That's the beauty of snippets, they're versatile.  But like you noticed, 
when snippets hold Layout or other design-level content, it gets hairy 
because writers have permissions to those snippets.


I once suggested that there could be Page Snippets and Layout Snippets 
(or Content Snippets and Design Snippets) but you run into the 
complication-factor.  At some point we're sliding down the slippery 
slope to WordPress or some other massively-featured CMS.


-Chris
___
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: Reloading Routes with a Rake Task

2008-06-19 Thread Chris Parrish
Actually, I was just thinking about using a before filter too.  I hate 
being so obtrusive with alias_method_chain, but I'm not sure a 
before_filter will work.


The job I'm trying to do here is find and render css and js files and, 
if the file's not found, let SiteController try to render it as a page 
(or render the 404 for me). There are two approaches (that I can think 
of anyway):


  1. Set up a route to catch #{javascript_directory}/*filename
 (similar for stylesheets) and send it to my controller to look for
 and render the file.  If my controller can't find the file, pass
 things along to SiteController's #show_page method.  (This is how
 SnS did it originally)

  2. Don't use any cust6m routing but instead piggyback on
 SiteController's #show_page method.  Instead of site controller
 looking for pages, I'd first steal the processing and try to match
 the params[:url] against the javascript_directory.  If it matches
 a js or css file - render it.  If the file can't be found, return
 processing back to your regularly scheduled action (#show_page)
 and let it do its thing. 

My question was originally tied to approach #1.  I could use a Rake task 
to change the javascript_directory but couldn't get the 
already-running server to reload its routes.


Now I'm working on having an augmented SiteController#show_page action 
process the whole thing (#2).  If I use a before_filter to call my 
#show_text_asset action and it finds and renders the script/stylesheet, 
how to I then prevent things from proceeding on to #show_page? 


Will rails let you set up a before_filter against only one action, anyway?


-Chris

Alex Wayne wrote:

Chris Parrish wrote:
  

Nevermind.  I wound up going the route of alias_method_chain-ing
SiteController's #show_page method.  It makes things more tightly
coupled to Radiant but it's also closer to how it'd be if built-in.

If anybody else out there is already using alias_method_chain on this
method in your extension, let me know.  I'd sure love to avoid a 20 car
pileup there if a user has multiple extensions installed.

-Chris



Could you simply add a before filter in that controller instead?  before 
filters can stack up without overriding other filters in other 
extensions.  And seems cleaner than an alias_method_chain


  before_filter :reload_routes, :only = :show

  private
def reload_routes
  ActionController::Routing::Routes.reload!
end

And yes, since rake loads up its own rails process, it wont work for 
this.  The only way I can see send a message like this into a rails form 
outside is via http.  So your rake task would send a request to 
http://mysite.com/reload_routes; which would do what you want.


But that gets hairy too.  Lets say you have multiple mongrels, 1 out of 
4 got that request, and reloads its routes.  All other mongrel don't 
have their routes reloaded.


In general, I don't think you can use rake very well to modify the state 
of an already running rails process.  You definitely want a hook in your 
extension to load the routes as needed.  And remember that just because 
you updated the routes in the rails process that handled the admin 
requested route change doesn't mean its been updated in the other 
processes.  This is a bug that would work fine in development mode with 
a single process, and suddenly cause weird issues in a more distrubed 
production deployment.
  


___
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: Reloading Routes with a Rake Task

2008-06-19 Thread Chris Parrish

Hmm.  Will give that a whirl then.  I'll let you know.  Thanks.

-Chris

Alex Wayne wrote:

Chris Parrish wrote:
  

My question was originally tied to approach #1.  I could use a Rake task
to change the javascript_directory but couldn't get the
already-running server to reload its routes.

Now I'm working on having an augmented SiteController#show_page action
process the whole thing (#2).  If I use a before_filter to call my
#show_text_asset action and it finds and renders the script/stylesheet,
how to I then prevent things from proceeding on to #show_page?

Will rails let you set up a before_filter against only one action, 
anyway?



-Chris



I believe, in any rails before_filter if you call render or redirect_to, 
it halts the filter chain and prevents further execution.  This is 
commonly used for access control.  So as long as you render something, 
it should works just as you need it too.  Unless radiant does something 
funky with rendering that I dont know about.


  before_filter :authorize
  def authorize
redirect_to login_url unless admin_logged_in?
  end


And yes, you can fine tune your before filters by passing action names 
to the :only or :except keys of the options hash.


  before_filter :foo, :only = [:index, :show]
  before_filter :foo, :except = [:create]

They are pretty flexible creatures.
  


___
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-Dev] [ANN] Styles 'n Scripts Extension

2008-06-18 Thread Chris Parrish

Sean Cribbs wrote:

Chris,

We might be able to make a rake task that loads the environment with 
no extensions installed.  In fact, it should be as easy as something 
like this:


task :minimal_environment do
   Radiant::Initializer.run do |config|
  config.extensions = []
   end
end

Then we could make db:bootstrap and anything else that needs to 
prevent extensions from loading depend on that instead of the default 
:environment task.


Sean


I tried the idea above (added it to my extension -- not Radiant) and set 
up my extension's tasks like:

 task :migrate = :minimal_environment do
   ...

I got an error that the constant StylesNScripts wasn't defined (at least 
that's what I remembered).


I probably just did something wrong here but I wanted to post the result 
as an FYI.


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


[Radiant] Reloading Routes with a Rake Task

2008-06-18 Thread Chris Parrish
This may be more Rails than Radiant but can anyone give me a hand with 
this one...


How do I execute ActionController::Routing::Routes.reload! for a running 
instance of Radiant from a Rake task?  It works fine if I trigger it 
from within the app but I need it to run from Rake and it seems that 
Rake runs in a separate process.



Background for those who want it:

In the SnS extension, I define custom routes for CSS and JS files to 
route to my own TextAssetSiteController.  I did this to prevent coupling 
too tightly with SiteController.


Well, now I'm upgrading the functionality to allow admins to change the 
configuration on the fly using Rake tasks.  This includes settings that 
require the route to be updated and I don't know how to get Rake to run 
ActionController::Routing::Routes.reload! for a running instance of Radiant.


-Chris
___
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-Dev] [ANN] Styles 'n Scripts Extension

2008-06-15 Thread Chris Parrish
For anyone (now or in the future) following this thread, I've identified 
the issue nurullah mentioned here.  It is indeed a bug with the SnS 
extension and will be resolved in the upcoming 0.5 release.


For those interested, it's caused by the interplay between the way SnS 
extension stores its settings, and the way Radiant rake tasks are performed.


SnS creates its default settings and then overwrites those with any 
custom settings during initialize.


Well, it turns out that extensions are initialized during any Rake task 
-- including 'rake db:bootstrap'  So, if you're including SnS in a 
*brand new* installation of Radiant (not already bootstrapped), when you 
try to create the database, the SnS extension gets initialized and tries 
to store some settings in the not-yet-created config table.  Doh!


Those adding SnS to an existing Radiant install will never see this issue.

-Chris

nurullah wrote:

although all installation steps fail it adds tabs on panels and some columns
on config table


5|stylesheet_mime_type|text/css
6|response_cache_directory|text_asset_cache
7|javascript_mime_type|text/javascript
8|javascript_directory|js
9|stylesheet_directory|css

but you are right production.log says it cannot find text_assets table and
right there is no such table on db file




On 5/19/08, Chris Parrish [EMAIL PROTECTED]
wrote:
  

The Styles 'n Scripts extension makes use of Radiant's built-in
Radiant::Config settings (which get stored in the config table).  So this
sound like a Radiant setup issue. (The only table my extension adds is
text_assets).

Remove my extension (all extensions, really) and make sure that your
plain-vanilla Radiant extension has this table created (should have been
created when you ran:
 rake db:bootstrap (or rake production db:bootstrap if running in
production mode).

-Chris

Arik Jones wrote:



I think this is a fault of Radiant. Could be wrong.

nurullah wrote:


  

I could get it run on a clean install  (0.6.7) tho, with sqlite3 and no
other extension installed

it gives Could not find table 'config' error

On 5/18/08, Chris Parrish [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 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-Dev] [ANN] Styles 'n Scripts Extension

2008-06-15 Thread Chris Parrish
I'm not opposed to your solution in anyway.  I think it'd be helpful. I 
just think that the right solution for my extension would be to:


   *  have my extension's default settings installed via the initial
 migrate task
   * offer a rake task to allow administrators (server admins) to
 change the css/js settings on the fly.  This need only be run once
 manually (after bootstrap) and not at every init.  I'd probably
 throw in a restore_defaults task too.

I designed the StylesNScripts::Config bit with the future UI designs of 
Radiant in mind -- for the day when we'll have a settings/configuration 
admin panel where extensions can add into the Radiant UI (instead of 
sticking settings in some tab or hard coded and loaded at init).


My problem is that I broke this rule and made the settings load during 
init just for now and shot myself in the foot.  If I do what I've 
outlined above, it'll be trivial to hook into Radiant's shiny new 
settings UI when it arrives


-Chris


Sean Cribbs wrote:

Chris,

We might be able to make a rake task that loads the environment with 
no extensions installed.  In fact, it should be as easy as something 
like this:


task :minimal_environment do
   Radiant::Initializer.run do |config|
  config.extensions = []
   end
end

Then we could make db:bootstrap and anything else that needs to 
prevent extensions from loading depend on that instead of the default 
:environment task.


Sean

Chris Parrish wrote:
For anyone (now or in the future) following this thread, I've 
identified the issue nurullah mentioned here.  It is indeed a bug 
with the SnS extension and will be resolved in the upcoming 0.5 release.


For those interested, it's caused by the interplay between the way 
SnS extension stores its settings, and the way Radiant rake tasks are 
performed.


SnS creates its default settings and then overwrites those with any 
custom settings during initialize.


Well, it turns out that extensions are initialized during any Rake 
task -- including 'rake db:bootstrap'  So, if you're including SnS in 
a *brand new* installation of Radiant (not already bootstrapped), 
when you try to create the database, the SnS extension gets 
initialized and tries to store some settings in the not-yet-created 
config table.  Doh!


Those adding SnS to an existing Radiant install will never see this 
issue.


-Chris

nurullah wrote:
although all installation steps fail it adds tabs on panels and some 
columns

on config table


5|stylesheet_mime_type|text/css
6|response_cache_directory|text_asset_cache
7|javascript_mime_type|text/javascript
8|javascript_directory|js
9|stylesheet_directory|css

but you are right production.log says it cannot find text_assets 
table and

right there is no such table on db file




On 5/19/08, Chris Parrish 
[EMAIL PROTECTED]

wrote:
 

The Styles 'n Scripts extension makes use of Radiant's built-in
Radiant::Config settings (which get stored in the config table).  
So this

sound like a Radiant setup issue. (The only table my extension adds is
text_assets).

Remove my extension (all extensions, really) and make sure that your
plain-vanilla Radiant extension has this table created (should have 
been

created when you ran:
 rake db:bootstrap (or rake production db:bootstrap if running in
production mode).

-Chris

Arik Jones wrote:

  

I think this is a fault of Radiant. Could be wrong.

nurullah wrote:



I could get it run on a clean install  (0.6.7) tho, with sqlite3 
and no

other extension installed

it gives Could not find table 'config' error

On 5/18/08, Chris Parrish 
[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 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] Re: Re: [Radiant-Dev] [ANN] Styles 'n Scripts Extension

2008-06-15 Thread Chris Parrish
I just outlined the fix in a reply to Sean's post.  It's a little more 
elaborate (though I think more elegant) than I'd post here.


If you're trying to get it to just work for now you can simply comment 
out the following line from the styles_n_scripts_extension.rb file:

 include CustomSettings

Run your rake db:bootstrap to create the database, then un-comment 
that line back in.


-Chris


Jim Gay wrote:

What was the fix for SnS?
I saw the same problem with RBAC Base on a clean install (which I must 
not have tried when we created it) and haven't had time to look into it.


-Jim

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


Re: [Radiant] share_layouts extension

2008-06-14 Thread Chris Parrish

Whoops, I lied.  You do *not* need to uncomment:
require_dependency 'application'

for your extension to play with share_layouts (unless you're doing 
something with your controllers in the activate method too).


I was looking at the wrong extension's code when I mistyped -- sorry.

-Chris


Chris Parrish wrote:

Will Emerson wrote:

Through trial and error, I got the rails_support extension working in
0.6.7 and Rails 2.0.2. But now I'm trying out the share_layouts
extension and I'm having some problems getting it to work. In this
project, my app is already made into an extension and I'm trying to
integrate with the Radiant part of the site. Will share_layouts work
being called from a controller in an extension? Or does it expect there
to be a RAILS_ROOT/app folder.
I'm using share_layouts within an extension (using the extension's 
controllers to process the page) currently with 0.6.7.  Make sure that 
you uncomment the following line from your my_extension_name.rb file:


 require_dependency 'application'


When I use the line
radiant_layout 'Main'

I get an error that radiant_layout in an undefined method.
  


Hmm, that's weird.  Where are you putting that line?  It should be 
available as a class method like:


 class MyController  ApplicationController
   radiant_layout 'Main'

   ... your methods/actions here...

 end


When I use

@radiant_layout = 'Main'

it creates the page but displays it in the admin layout.  ???
If I substitute a fake name for Main, it does the same thing so it
appears to be defaulting to the admin layout.

  


Do you actually have a layout created in Radiant called Main?

-Chris
___
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] adding shards regions

2008-06-12 Thread Chris Parrish

Jim Gay wrote:

I want to add regions into the interface for radiant-help.
Is this possible? If so, can I get some pointers on how to go about that?

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

Ditto for Styles 'n Scripts

-Chris
___
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-11 Thread Chris Parrish

David Piehler wrote:

Chris Parrish wrote:

  

   1. Using Radiant - This section covers all the stuff users do from
  within the Radiant Admin Interface
   2. Installing Radiant - This section covers getting the source
  (including extensions) and getting it to run
   3. Extending Radiant - This section covers writing extensions.

These three focus areas sound good. We should expand #2 to include 
Mohit's idea of creating a solution around Radiant with mini How-Tos 
for accomplishing goals via specific extensions.
  


Dave, that's exactly what I had in mind.  Anything that helps people set 
up Radiant, install extensions, or otherwise find and integrate the 
pieces for their Radiant/Rails application goes here.


The exceptions would be:

   * Anything that deals with using the Radiant UI (building site
 navigation, complex layouts, etc) goes in section #1
   * Anything that entails them writing their own code, goes in section #3


Mohit's idea of printable documentation for the end user who will be 
updating Pages, Snippets, and Layouts is interesting. My company 
currently gives all our Radiant users a User Guide created for their 
specific Radiant install. We make these using Adobe InDesign, so they 
are really nice looking but are time consuming to update. If we could 
figure out a way to make printable user guides via some common method 
(maybe using a demo Generic Radiant Website), that would be great.


  


I, too, like the printed documentation. However, I think that this 
applies only to Section #1.  This would also be the only section 
included in a Radiant help system (and I'm sure its the only part you'd 
hand out to your users).


If Section #1 were bundled with Radiant as a help system, I don't see 
why we couldn't combine some printable HTML/CSS or PDF templates and use 
a Rails gem/plugin/whatever like:

http://wiki.rubyonrails.org/rails/pages/Rfpdf
http://maruku.rubyforge.org/
http://wiki.rubyonrails.com/rails/pages/HTMLDOC
http://railspdfplugin.rubyforge.org/wiki/wiki.pl

That way you could use a Rake task to spit out the help as PDF during 
install/upgrade then link to it from the Radiant Help system.



Sections #2  #3 are IT and Programmer focused and should just stay on 
the Wiki (my opinion, anyway).



I think the core goals for the documentation are...

* easily update-able
* allow for screenshots inline with text and code samples
* clean printouts
* packaged with Radiant itself and each extension that wants to hook 
into it
* expandable by people not involved with maintenance of the extension 
itself
  

  


I really like the idea of extension writers being able to extend the 
help system (Section #1) -- say adding documentation for their tags or 
explaining how to use their UI elements, or adding context sensitive 
help to their UI elements.  Then you could crank out a PDF and have it 
be a complete user's guide -- extensions and all.


When it comes to section #2, however, I think the Radiant Wiki should 
point out a few extensions, perhaps, but ultimately lead users back to 
the extension developer's documentation.


It would be *very* nice, however, for RadiantCMS.org to offer a place 
for extension developers to more formally show off their wares and 
encourage a standardized style to the documentation.  This would make it 
easier for users to find extensions and learn about them (since their 
documentation would follow a standard the user would quickly learn).


I'm not sure that you'd offer a lot of space for extension developers 
but perhaps just a page like: http://agilewebdevelopment.com/plugins


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


Re: [Radiant] Proposal for a drafts or staging extension

2008-06-09 Thread Chris Parrish
This issue was brought up some time ago so it might be worth checking 
the maillist history, but I'm not sure anything was ever implemented.  
One of the interesting things brought up , if I remember correctly, was 
the mention of Rick Olson's acts_as_draftable plugin.  It might be worth 
looking into (it can be found here: 
http://svn.techno-weenie.net/projects/plugins/acts_as_draftable/).


Drafting functionality is something that Radiant could certainly benefit 
from.  Let us know if you plan to release something.


FWIW, I think the biggest challenge would be coming up with a clean, 
Radiant-worthy UI that lets users perform these functions via an 
easy-to-understand, concise design.  Radiant's UI currently doesn't 
think this way.


-Chris

Jamey Cribbs wrote:

I'm going to ask the client if they would give permission for me to release
it.  Right now, it only works for mysql, as I'm using mysqldump.  Works
great for my specific needs, but I might try to genericize it using Sean's
export code and fixture loading before I release it.

On Mon, Jun 9, 2008 at 11:15 AM, Mohit Sindhwani [EMAIL PROTECTED] wrote:

  

Jamey Cribbs wrote:



Thanks, but as you said, the dev functionality does not do
everything we need.  If you have an existing page that you want to
change, you have to set the status back to draft and then the page
does not show at all on the production site.

Anyway, after much investigation, I ended up going a totally different
route.  I created a staging extension and setup an additional
radiant environment called staging.  The extension disables all
admin functions in the production environment and adds an admin tab in
the staging environment that allows you to click on a link, whereby it
copies relevant tables from the staging db to the production db.  It
would have been great to not have to run a separate environment, but
so far it seems to be working well.


  

That's true.  I just wanted to point out the obvious because it is easy to
miss it some times (I didn't know about it for quite a while).

I remember Sean had a preview extension that would preview the page but
again it's not a staging environment.  Your extension does sound
interesting.  Do you have plans to release it?

Cheers,
Mohit.
6/9/2008 | 11:15 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
  


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


Re: [Radiant] Proposal for a drafts or staging extension

2008-06-09 Thread Chris Parrish
First of all let me say, Jim, that I *really* like your analysis of the 
Review Drafts use case.  You are so right that, as a reviewer, I want 
to focus my attention on the changes not the stuff that's the same.  I 
really hadn't given this issue much thought before you brought it up.


That said, I would discourage going down the road of idea #2.  Here's why:

   * To the user, a Page is the atomic unit -- sure, as a developer, I
 see the Page as a single model/record with mutliple related
 PagePart models/records but Radiant nicely keeps these
 implementation details off the UI.  It's pages that we create,
 edit and destroy.  This is good because, frankly, it's Pages that
 are served.

   * This would make creating a draft different from creating a Page. 
 When we create a Page we don't individually save the Parts -- only

 pages.  But this idea would require the user to work differently
 with Parts when drafting.

   * Many users don't get into using page parts.  This solution would
 force Parts into their awareness (sort of a what? another
 button?  man, what's this one do? Why can't I just save my page?
 experience).

   * Identifying which part has changed doesn't necessarily help me
 anyway. For example, what if I have a really long Page Part and
 it's only the bottom paragraph that's been edited? I still end up
 reviewing all the unchanged content needlessly.  Or how do I know
 that they only changed the Page's slug?

 Weirder still, what if the writer adds a Part that isn't used in
 the Page at all?  Sure that Part shows that it's been changed but
 it doesn't alert the reviewer to the fact that they can ignore
 this Part altogether.


Now, back to the bit I *love* from your idea #2...

I think we should give the user (writer or reviewer) some sort of 
analysis of the difference between the currently published version of 
the page and the current draft. This diff could be as simple as 
identifying which elements (parts, title, slug, whatever) are different 
from the currently published version (this is what you suggested) or 
could even go so far as a source code style diff showing which 
lines/characters were changed within each element.  On a completely 
different tack, you could also diff the output of both versions to only 
show relevant edits to the draft.


As to how this diff info is presented, you could:

   * Run the diff when loading the Edit Screen and highlight all the
 elements in the form that have changed (sort of like highlighting
 validation errors but with a different look).  This lends itself
 to the basic diff -- just showing which elements have differences
 within.

   * Have a button or link for the user to manually run the diff which
 highlights all the elements that have changed.  (Same as above,
 just manual).

   * Have a button or link for the user to manually run the diff and
 pop up a window reporting the findings.  This method allows for as
 basic or complex diff analysis as you like.

-Chris



Jim Gay wrote:
I haven't had time to work on this myself, but I was thinking about 
the interface and I'm curious to hear how the community expects this 
to work.


Once a site is up and running, I would expect that people would want 
to use drafts in 2 different ways.
1) each page has a draft. Any and all associated parts would be 
reviewed prior to publishing. (This is what Jamey described)
2) each page_part has a draft. Users could write drafts for individual 
parts.


I would think that option 2 is what would happen more often. An 
example I imagine is editing several parts on an About Us page. The 
introduction part might rarely change, but the bios part may need 
drafts as staff members come and go. I wouldn't want to be forced to 
review the introduction with each staff change only to find that 
nothing at all has changed in that part. If we view the entire page as 
a draft, I would expect that this would be the behavior of the reviewer.
On the other side of that coin, I wouldn't want to just assume that 
the introduction part is unchanged when someone actually did change 
it and made changes that I would not allow if I spent the time to 
review it.


If, however, the reviewer knows that only certain parts have drafts, 
it makes the reviewing much easier.


Whenever I think about drafts, I think of them on a per part basis 
because users are likely to change content only in important parts, 
not necessarily all of them. Having a separate staging instance 
increases this problem to need to review the entire site. It's great 
for a re-launch, but day-to-day changes would be frustrating.


There is certainly a lot of interest in drafts but aside from Jamey, 
I haven't heard much about how people expect this to work. I can 
imagine that, like me, some expectations differ quite a bit from what 
others expect from drafts.


Does everyone agree with Jamey, that a per 

Re: [Radiant] Best way to refer to a stylesheet?

2008-06-08 Thread Chris Parrish

John and Catherine Allen wrote:

Chris,

Thanks - in fact I had successfully installed the Styles 'n Scripts 
extension but was not clear about how to make use of it. I'll try the 
r:stylesheet tag approach.


John



Both the r:stylesheet and r:javascript tags have explanations if you 
click on the available tags link on the Edit Page screen.  These 
descriptions should be self explanatory -- well, I understand them, 
anyway ;-)


It's also worth noting that the SnS extension uses default locations for 
your stylesheets and javascripts (they are /css  /js respectively) but 
you and your users never need to know these locations to use the tags.  
Just fill out the name of your stylesheet and the rendered output will 
include the full path automatically.


You can also change the default settings (including these asset 
directories) via the custom_settings.rb file.


Let me know if you have any troubles -- I want to make that extension as 
usable as possible for the community.


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


  1   2   >