Re: [Radiant] Question on workflow

2008-07-22 Thread Alex Wayne
Putting the sqlite3 database is a nifty idea, as long as you never  
make changes to your site in production mode.


-Alex
http://beautifulpixel.com

On Jul 22, 2008, at 8:34 AM, Sean Cribbs wrote:

If your site doesn't get a lot of traffic (or won't), I would  
suggest using sqlite3 and git locally in your project, and using the  
copy strategy in Capistrano.  These settings should do the trick:


set :deploy_via, :copy
set :copy_strategy, :export
set :scm, :git
set :repository, '/full/path/to/the/local/project'
set :git_enable_submodules, true

The last line will help when you have extensions and/or Radiant  
installed as submodules.  If you add the sqlite3 database to the  
repository (at least initially), you won't have to run setup on the  
server.


Sean

Beau O'Hara wrote:

Hi,
I spent part of my day getting more into Radiant.  I really like  
what I see so far.  It is pretty awesome how much such a simple  
looking tool can accomplish right out of the box.  I am confident  
that radiant will work well for my project  needs, and I am looking  
for any suggestions on production setup and workflow.


I plan on setting this up on a small VPS.   I have never started  
with an existing rails app before here is my plan on a rails ready  
VPS


1. install radiant gem on server
2. run the radiant setup
3. Do Initial svn import
4. Checkout a local copy for development
5. Deploy via Capistrano. (Is this necessary with Radiant?)

Also, I am curious how best to handle image/file uploads with  
capistrano?


Thanks in advance.

___
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] setting the default text filter

2008-07-22 Thread Alex Wayne
This has been added to Radiant edge.  If you freeze your vendor/ 
radiant to edge you should have a new defaults.page.filter config  
setting you can set to whatever you like.




-Alex
http://beautifulpixel.com

On Jul 22, 2008, at 9:50 PM, Oli Studholme wrote:


Hi All,

I came across a couple of mentions in the archives of people asking  
how to set a default filter for articles, but no “here’s how”  
answers. Did anyone manage to do this, either via extension or  
config/enironment.rb?


thanks in advance!

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] Settings Extension for easy access to configuration

2008-07-20 Thread Alex Wayne

Jim Gay wrote:
 We don't have plans to try to takeover this extension since Alex is
 doing a great job with it.
 Our fork provides the ability to add your own settings because we  
have

 at least one server where ruby-inline is not installed so we can't do
 script/console and having the ability to add new settings was crucial
 for setting up 'dev.host'

 I don't recall any SettingsExtension.root problem, so it may just  
be a

 fluke that it works in our fork.

 For the most part, we only forked to help with improving it and
 writing specs, so keep your eye on the Squeegy repository.

 -Jim

Thanks for the contributions guys.  After a busy few weeks I am back  
on this stuff.  All code has been rolled in and updated.  Great work.   
Being part of this small yet productive radiant communinty is a pretty  
damn cool thing.


Thanks guys!

-Alex
http://beautifulpixel.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] Styles n Scripts feature request

2008-07-20 Thread Alex Wayne


On Jul 15, 2008, at 12:28 PM, Tim Gossett wrote:


That said, I think I like Sass much more than both Haml and regular  
CSS (I
still haven't used it enough to have a firm conclusion).  It's much  
simpler
than Haml and doesn't have to handle things like running ruby in  
the middle
of your template.  And it encourages some very good CSS behaviors.   
Worth

trying for sure.



Here, here. SASS actually provides more control than plain old CSS.  
Here's

something I did with SASS when on a golden-ratio trip:


SASS really is better than regular CSS in absolutely every way.
Really.  You don't give up any control at all, and you gain so much.   
The constants and math stuff is just icing on the cake.  The real meat  
is the nesting of selectors.  This is how CSS should have worked.   
Once you get used to SASS, there is no possible way you can tolerate  
working with plain CSS for any large layout job ever again.


SASS for president!
___
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 Alex Wayne

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


Re: [Radiant] Stylesheet generates background color only when not in radiant

2008-07-02 Thread Alex Wayne

That makes much more sense!  Sorry for the CSS alarm.

-Alex
http://beautifulpixel.com

On Jul 2, 2008, at 5:11 PM, dave4c03 wrote:

Actually, I was imprecise and not clear.  The gif is 1x800 pixels  
and the

pixel color varies as it goes down the page.

On Wed, Jul 2, 2008 at 1:59 PM, Alex Wayne [EMAIL PROTECTED]  
wrote:



Also, there should be no reason to repeat a 1px square image as a
background.  Just use a background color.

-Alex
http://beautifulpixel.com


On Jul 2, 2008, at 1:47 PM, Josh Schairbaum wrote:

If you're going to go the styles.css route, make sure to create a  
layout
specifically for stylesheets and give it a mime type of text/css,  
otherwise

it will render it as HTML.

In that layout, simply put r:content/.

Regards,
Josh

On Jul 2, 2008, at 4:29 PM, dave4c03 wrote:

The following css code when embedded in a layout works and  
generates a

colored background (by repeating the 1 pixel wide gif).

The css also works if a style.css file is external to radiant.

However, it does not work properly if the css is created as a  
radiant

page
with a slug of style.css and referenced by a href=/style.css  
link in

the
layout.

Is this a known radiant bug or is this my problem?

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
title/title
style type=text/css
BODY {
MARGIN-LEFT: 0px;
MARGIN-RIGHT: 0px;
MARGIN-TOP: 0px;
MARGIN-BOTTOM: 20px;
BACKGROUND-IMAGE: url('/images/background.gif');
BACKGROUND-COLOR: #FF;
background-repeat: repeat;
FONT-SIZE: 10pt;
COLOR: #00;
FONT-FAMILY: Verdana, Sans-Serif;
}

TABLE.OUTLINE {
HEIGHT: 100%;
WIDTH: 750px;
}
/style
/head
body
table class=OUTLINE align=center cellpadding=0
cellspacing=0 border=0
r:content
/table
/body
/html
___
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] Help with r:children:each and r:snippet

2008-06-27 Thread Alex Wayne
I am trying to render a blog post snippet iteratively on a blog index  
page.  When when I view the blog page, I get wrong number of  
arguments (2 for 1)


First off, any way I can get info about that error?  Radiant seems to  
trap all errors from bubbling up, and they don't even appear in my log  
file.


Here's the markup in question
http://www.pastie.org/223693

Also, I just discovered if I render a blank snippet, it still errors.   
It's as if r:snippet inside r:children:each just crashes.  Any  
ideas?



-Alex
http://beautifulpixel.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] Help with r:children:each and r:snippet

2008-06-27 Thread Alex Wayne
Turns our I am getting this when rendering ANY snippet, and ANY  
context :(


-Alex
http://beautifulpixel.com

On Jun 27, 2008, at 2:24 PM, Alex Wayne wrote:

I am trying to render a blog post snippet iteratively on a blog  
index page.  When when I view the blog page, I get wrong number of  
arguments (2 for 1)


First off, any way I can get info about that error?  Radiant seems  
to trap all errors from bubbling up, and they don't even appear in  
my log file.


Here's the markup in question
http://www.pastie.org/223693

Also, I just discovered if I render a blank snippet, it still  
errors.  It's as if r:snippet inside r:children:each just  
crashes.  Any ideas?



-Alex
http://beautifulpixel.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] Odd Behavior During Testing

2008-06-25 Thread Alex Wayne
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


Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-25 Thread Alex Wayne

But the provided matcher that does

  page.should render(tag).as(expected)

is so handy!  But you are definitely right.  White space issues  
especially make this a bit cumbersome.  Perhaps that matcher needs to  
be expanded.  What if you could do this:


  page.should render(tag).with_tag('h1', 'Test Title')

or even

  page.should render(tag).with_tags do |output|
output.should have_tag('div') do |div|
  div.should have_tag('p', 'Content')
end
  end

that would make speccing custom tags far easier I think.  Plus it  
should be easy to just hook into the have_tag matcher.  I smell  
another patch brewing...


-Alex
http://beautifulpixel.com

On Jun 25, 2008, at 8:24 AM, Andrew O'Brien wrote:


Nice work!

One thing I'd add to your spec section (and I'll let you decide how
you want to integrate this into the article) is to use should
have_tag instead of string comparison.  The main disadvantage I've
found with strings is that it's hard to track down individual
characters sometimes (especially if they're blanks) and can be quite
fragile when the code is changed.

I've put up a pastie with some spec code that uses should have_tag:

http://pastie.org/private/xgab7akob3tqbxdltzeeg

(The before is a little nasty -- I wrote this before scenarios where
available.)  Feel free to adapt this to the examples in the article
(or get in touch with me if you'd like some assistance).

-Andrew

On Tue, Jun 24, 2008 at 11: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.

-Alex

On Jun 24, 2008, at 7:50 PM, Marty Haught [EMAIL PROTECTED]  
wrote:


On Tue, Jun 24, 2008 at 3:26 PM, Alex Wayne  
[EMAIL PROTECTED]

wrote:


I got inspired this morning and managed to complete an article  
about

writing
an extension to implement a custom tag, with a spec driven process.

http://wiki.radiantcms.org/Creating_an_extension_I

I hope its accurate, as I am still a bit of a noob with Radiant.


Nice start to the article.  I'm curious on your steps on integrating
rspec and scenarios into your extension.  I just started the  
migration
to spec and scenarios from test:unit and fixtures and am getting  
some

strange errors.  We should definitely document any additional steps
beyond running the extension generator for getting up and running.

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


___
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] Can't install radiant

2008-06-25 Thread Alex Wayne
Maybe config['foo'] should just return nil if no config table exists?   
Or radiant maybe shouldn't load plugins at all if the project has no  
database yet?


-Alex
http://beautifulpixel.com

On Jun 25, 2008, at 11:11 AM, Jim Gay wrote:


What would be the way to fix this for extension developers?

On Jun 25, 2008, at 1:59 PM, Alex Wayne wrote:

You should be able to install it now without a problem.  That  
extension, apparently, depends on some database table being present  
when your radiant instance boots up.  Running rake db:bootstrap  
boots up your radiant, but if those tables aren't there yet, and  
that extension doesn't handle that very well.  Once your  
bootstrapped, your database exists, and the extension will no  
longer crash.


The extension should probably allow you bootstrap with the  
extension installed.  It's a bug.


-Alex
http://beautifulpixel.com

On Jun 25, 2008, at 10:44 AM, Alfredo Perez wrote:


I deleted the gallery folder extension and now it works.

However, I would like to install gallery extension, can I do that  
now?


Alex, why was the gallery extension causing the problem?

Alfredo


On Wed, Jun 25, 2008 at 10:31:22AM -0700, Alex Wayne wrote:
/usr/lib/ruby/gems/1.8/gems/radiant-0.6.7/vendor/extensions/ 
gallery/

app/models/gallery_item.rb:16

There's your problem.  Try removing that extension,  
bootstrapping, then

putting it back in.

-Alex
http://beautifulpixel.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] Writing an radius tag extension article - running specs

2008-06-25 Thread Alex Wayne
Thats quite odd.  Are you sure you are running the latest rspec gem?   
Try a


 gem install rspec

-Alex
http://beautifulpixel.com

On Jun 25, 2008, at 12:24 PM, 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] radiant-settings error on mysql 5.0.27

2008-06-25 Thread Alex Wayne
Yes, I noticed that on one of my projects when I pushed it to the  
server.  Not patch yet.  I think this is a bug in the rails MySQL  
adapter for not treating key as a reserved word.  I think.


-Alex
http://beautifulpixel.com

On Jun 25, 2008, at 12:08 PM, Jim Gay wrote:

I'm trying to use the radiant-settings extension and having a  
problem in MySQL 5.0.27:
ActiveRecord::StatementInvalid (Mysql::Error: You have an error in  
your SQL syntax; check the manual that corresponds to your MySQL  
server version for the right syntax to use near 'key' at line 1:  
SELECT * FROM `config`ORDER BY key):

http://pastie.org/222044

Works fine in SQLite.

-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] Import Export forked

2008-06-24 Thread Alex Wayne
Seems like this would miss any table without a class.  A  
has_and_belongs_to_many association, for instance, would not get  
exported if I am reading that patch right.


Maybe thats not even an issue :)

-Alex
http://beautifulpixel.com

On Jun 24, 2008, at 3:57 PM, Andrew Neil wrote:


Hi,

I was trying out the import_export extension, and I noticed that it  
wasn't backing up records from my subscribers table. (The  
subscribers table was added by a migration in the subscriber_lists  
extension[1]). Looking at the source, I could see an easy way of  
fixing this, changing:


	self.models = [Radiant::Config, User, Page, PagePart, Snippet,  
Layout]

to:
	self.models = [Radiant::Config, User, Page, PagePart, Snippet,  
Layout, Subscriber]


I figured it would be better if the exporter actually looked at the  
database to find out what tables are there. I've forked the  
extension, and added this functionality. Here it is:


	http://github.com/nelstrom/radiant-import-export-extension/tree/ 
master


It seems to work OK for export. It will need a little more work  
though for the importer, but that is for another day.


Cheers,
Drew

[1]: http://github.com/nelstrom/radiant-subscriber-lists-extension/tree/master
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


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


Re: [Radiant] Summer doc project - Writing an radius tag extension article

2008-06-24 Thread Alex Wayne
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.


-Alex

On Jun 24, 2008, at 7:50 PM, Marty Haught [EMAIL PROTECTED] wrote:

On Tue, Jun 24, 2008 at 3:26 PM, Alex Wayne  
[EMAIL PROTECTED] wrote:
I got inspired this morning and managed to complete an article  
about writing

an extension to implement a custom tag, with a spec driven process.

http://wiki.radiantcms.org/Creating_an_extension_I

I hope its accurate, as I am still a bit of a noob with Radiant.


Nice start to the article.  I'm curious on your steps on integrating
rspec and scenarios into your extension.  I just started the migration
to spec and scenarios from test:unit and fixtures and am getting some
strange errors.  We should definitely document any additional steps
beyond running the extension generator for getting up and running.

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] Re: Git repository refactoring and Status update

2008-06-23 Thread Alex Wayne

On Jun 23, 2008, at 4:10 PM, aslak hellesoy wrote:

On Mon, Jun 23, 2008 at 5:12 PM, David Piehler  
[EMAIL PROTECTED] wrote:

Sean Cribbs wrote:

The Radiant git repository has been refactored!  All of the existing
code has been added to a new, neutral, 'radiant' user on github.   
Please

update your watches and remove your forks of
github.com/seancribbs/radiant -- it will be disappearing soon.  I  
will

do my best to incorporate existing pull requests into the new
repositories.




http://github.com/radiant/radiant/tree/master seems to have been
imported raw (without the git history). It would be nice if the svn
history was kept intact.

I suppose the plan is to have all the Radiant subprojects in separate
Git repos from now on. To my regret it seems like they have all been
imported without git-svn.

In my opinion, the initial import to
http://github.com/seancribbs/radiant/tree/master got it right. It
seems to have been imported with git-svn.

Is there any particular reason why git-svn has (apparently) not been
used in the migration of the other radiant git repos?

Cheers,
Aslak


My guess is because they no longer follow the same structure they used  
to.  It wouldn't make sense to have a history duplicated of a huge  
number of commits that don't even apply to the sliver of code that not  
exists in its own repo.


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


[Radiant] Settings Extension for easy access to configuration

2008-06-22 Thread Alex Wayne
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.

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.

Furthermore, it adds a description field to each setting in the config
table.  When you migrate the extension it will fill in some descriptive
text for all the default config entries.  If your extension uses the
config table, you can add your own description to tell the user just
what this setting controls.

  GitHub Project:
  http://github.com/Squeegy/radiant-settings

  Screenshots on the Wiki:
  http://github.com/Squeegy/radiant-settings/wikis

Let me know what you think.

---

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


[Radiant] Re: Git repository refactoring and Status update

2008-06-21 Thread Alex Wayne
Sean Cribbs wrote:
 What does this mean for you?
 
 1) The Radiant core application is separated from all of the ancillary
 projects, including extensions.
 2) Extensions are in individual repos, making it easier to develop them
 in parallel.
 3) You can watch or ignore whichever parts of the project interest you 
 most.
 4) We will have an extension registry and install/uninstall sooner
 rather than later!
 5) Extensions will get more attention as we will be able to bring in
 more contributors who are interested most in specific extensions.
 6) We will soon support rake radiant:freeze:edge pulling from the git 
 repo.
 7) We will be phasing out the old SVN repository, which happens to be
 several commits old anyway because git-svn broke on me.


This is all great news.  Rock on.
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Adminstrator and Developer role clarification

2008-06-21 Thread Alex Wayne
Is the Adminstrator role considered to be the all powerful role? And
developer has less priveleges?  Or is it the other way around?

I see 2 main roles in my use of Radiant so far.

* Site setup person.  Layouts, css, taking care of where page parts go,
everything you need to have a functional radiant framework for your
site.
* Content person.  Once the layout is in place, this person would create
and manage pages of content.

Given the names administrator and developer I would assume that
developer means they have access close to the code level.  Which, by
process of eleimination, means admiistrator has less access to content
only.

Are my assumptions right?  I just want to be sure that in my public
extensions I am exposing the right sections to the right users.

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


[Radiant] Re: Adminstrator and Developer role clarification

2008-06-21 Thread Alex Wayne
Chris Parrish wrote:
 John,  have you ever considered changing the name developer to
 designer?  I think it'd be more clear.
 
 Also, I'd think clarity could be further improved by:

Well said.  In my mind, it should work one of two ways.

1. Have a 3 tier permission system where each tier has more rights than 
the one before.  Perhaps Administrator, Designer, and Author.  This 
seems close to the current radiant approach, but the UI needs to a drop 
down box with a little documentation about what each setting means. 
Having checkboxes makes this confusing since options with more 
previliges are inclusive of the other options.

2. Have a component based permission system where each user can have any 
number of roles.  Each role give them access to something else.  In this 
case the permissions should be labeled by what that allows them to do. 
Perhaps User Management, Development, Authoring.  Any user may 
have any combination of these.  This allows someone to manage users and 
post content, but not be allowed to mess with the layout or other more 
technical aspects defined in extenstions, for instance.  This method 
works well with using checkboxes for each permission type.

Option 2 seems more flexible, as Chris noted.  And perhaps those aren't 
the best permission names or levels.  But if you guys can decide on an 
official approach, I would be happy to submit a well specced patch 
implementing it.

If, of course, enough people feel this needs attention at all.

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


[Radiant] inherited page parts?

2008-06-20 Thread Alex Wayne
Basically, I want a page to have a sidebar part.  Now a child of this
page has no sidebar part.  So on this child page I want to display the
sidebar of its parent.  And if I am 10 levels deep, I want it to look
back up the tree as far as it needs to to find a part of the name I need
for display.

I think I could write a custom tag to walk of the tree and ask the pages
wether it has a part for that.  Is that possible?

Can this be done without a custom tag?  That would probably be better.

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


[Radiant] Re: Reloading Routes with a Rake Task

2008-06-19 Thread Alex Wayne
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.
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Re: Reloading Routes with a Rake Task

2008-06-19 Thread Alex Wayne
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.
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Calling a radius tag from my custom tag

2008-06-18 Thread Alex Wayne
Sean Cribbs wrote:
 Alex,
 
 Foo title: #{render_tag('title')} should work.
 
 Sean

Thanks I think I found it here: 
http://github.com/seancribbs/radiant/tree/master/radiant/app/models/page_context.rb#L14

I should be able to add attributes and content to the tag with a hash 
and black right?

  render_tag('foobar', :baz = 'asdf') do
Tag content
  end

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


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

2008-05-13 Thread Alex Wayne
First off, what I have done so far in Radiant has been pretty inspiring.
I usually hate CMS solutions due to their inflexibility.  The super
simple Radiant extension is a huge selling point for me.  I intend to
use a Radiant install as the base for projects since it gives me
publishing, admin authentication, and admin architecture for almost no
effort.  I'm pretty experienced with Rails, but new to Radiant.

Maintaining layouts and snippets in the admin interface via text area is
so much less fun than editing these things in Textmate.  My current
workflow is to use the It's all text Firefox plugin to edit text area
contents in Textmate.  It's not so bad, but I have switch to the browser
and press the save button, then switch to my tab with the radiant app
and refresh to see my changes.  Its far more tedious than the usual
cmd-s, cmd-tab, F5 I'm used to.  Page content would change far more
frequently and is a good fit for the database, in my opinion.  Plus the
regular, non-technical, maintainers of the site probably shouldn't have
access to changing layouts and snippets anyway.

So, I am looking for a way to store site structure files in the file
system, version controlled and in a higher level template language like
erb or haml.  Then store page content in the database in radius format
just like normal.

Is there an extension for that?  Or is that even a good idea?

Thanks for the great tool,
-Alex
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Getting children a oage that is not the current page

2008-04-24 Thread Alex Wayne
I have a navigation element in my layout that I want to always show
links to all children of a certain page that is nested one or 2 levels
inside my hierarchy.

I guess I need something like:

r:page url=/foo/bar
  r:chilren:each
a href=r:url /r:title/a
  /r:children:each
/r:page

I can't seem to figure out how to load up a specific page like that to
operate on like that.

Thanks for helping out this radiant noob.
-Alex
-- 
Posted via http://www.ruby-forum.com/.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant