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
Leacock<http://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

Reply via email to