AW: AW: AW: AW: [Radiant] Escaping HTML Tags

2008-12-10 Thread Patrick Scheips
On the page extensions in the Radiant backend the extension Escape Json 
appears as enabled.
So I used the tags r:escape_jsonan and /r:escape_json in a page part.

The result is the following error message (appearing in the frontend):
undefined tag `escape_json'

I followed your (Sean's) instruction step by step.

Any ideas?

Thanks,
Patrick


 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:radiant-
 [EMAIL PROTECTED] Im Auftrag von Sean Cribbs
 Gesendet: Dienstag, 9. Dezember 2008 14:54
 An: radiant@radiantcms.org
 Betreff: Re: AW: AW: AW: [Radiant] Escaping HTML Tags
 
 Patrick:
 
 Simply use the tag in the page that contains the text you want to
 escape. e.g.
 
 $('foo').update(r:escape_jsondiv id=barHello,
 world!/div/r:escape_json);
 
 Sean
 
 Patrick Scheips wrote:
  Hi Sean,
 
  Thanks, that worked great for me.
  What to do next in order to use the tag?
 
  Thanks in advance!
 
  -- Patrick
 
 
 
  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED] [mailto:radiant-
  [EMAIL PROTECTED] Im Auftrag von Sean Cribbs
  Gesendet: Montag, 8. Dezember 2008 14:28
  An: radiant@radiantcms.org
  Betreff: Re: AW: AW: [Radiant] Escaping HTML Tags
 
  I'm sorry I didn't make that clear.
 
  1) Generate a new extension with `script/generate extension
  escape_json`
  2) Open vendor/extensions/escape_json/escape_json_extension.rb in a
  text
  editor
  3) Inside the extension class, put:
 
  def activate
  Page.class_eval do
  tag 'escape_json' do |tag|
  tag.expand.to_jso
  end
  end
  end
 
  4) Save the file, restart your server.
 
  Sean
 
  Patrick Scheips wrote:
 
  Well, I'm not sure if I really understand that.
  Where do I have to enter this and how to use it?
 
  Thanks,
  Patrick
 
 
 
 
  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED] [mailto:radiant-
  [EMAIL PROTECTED] Im Auftrag von Sean Cribbs
  Gesendet: Freitag, 5. Dezember 2008 17:10
  An: radiant@radiantcms.org
  Betreff: Re: AW: [Radiant] Escaping HTML Tags
 
  Just thought of this... Rails has built-in support for JSON
 
  escaping.
 
  You could make a tag like this:
 
  tag 'escape_json' do |tag|
tag.expand.to_json
  end
 
  This will return a string with everything properly escaped.
 
  Sean
 
  Patrick Scheips wrote:
 
 
  Thanks, Sean!
  Unfortunately that doesn't work for me...
 
  Patrick
 
 
 
 
 
  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED] [mailto:radiant-
  [EMAIL PROTECTED] Im Auftrag von Sean Cribbs
  Gesendet: Freitag, 5. Dezember 2008 16:40
  An: radiant@radiantcms.org
  Betreff: Re: [Radiant] Escaping HTML Tags
 
  Patrick,
 
  There is r:escape_html, which does a standard HTML escaping,
 but
 
 
  will
 
 
  not escape quotes.  Not sure if that helps.
 
  Sean
 
  Patrick Scheips wrote:
 
 
 
  Hi all,
 
  is there a possibility to escape the HTML tags  of a Radiant
 Page
 
 
  in
 
 
  order to pass them (and the rest of the page, of course) to a
  JavaScript function (as a parameter)?
 
 
 
  The problem is that I cannot pass content containing closing
 HTML
 
 
 
  tags (/b, /p and so on) to a JavaScript function - I have to
 
 
  escape
 
 
  the content by putting a backslash ( \ ) before the slash
 (result:
  \/b).
 
 
 
  Any ideas how to escape such characters?
 
  Thanks,
  Patrick
  ___
  Radiant mailing list
  Post:   Radiant@radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
 
 
 
 
  ___
  Radiant mailing list
  Post:   Radiant@radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
 
 
  ___
  Radiant mailing list
  Post:   Radiant@radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
 
 
 
  ___
  Radiant mailing list
  Post:   Radiant@radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
 
  ___
  Radiant mailing list
  Post:   Radiant@radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
 
 
  ___
  Radiant mailing list
  Post:   Radiant@radiantcms.org
  Search: http://radiantcms.org/mailing-list/search/
  Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
 
  ___
  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:  

Re: [Radiant] Re: [Radiant-Dev] Re: Radiant 0.7.0 release candidate 1 available

2008-12-10 Thread Sean Cribbs

Anton,

Radiant 0.7.x will be ActiveResource compatible, i.e. having a simple 
XML/JSON REST API.  Any other APIs will need to be supported by 
extensions.  While the roadmap says 0.7 is the blogging release, we are 
incrementing the version number without necessarily moving forward the 
feature set toward those goals.  We feel the internal refactoring 
represents enough of a significant departure from previous versions to 
warrant the new number.  This is what I mean when I say we've been 
slavish to the roadmap in the past - that we need the version numbers to 
more adequately reflect the amount of progress, not some 
externally-determined feature set.


Sean

Anton J Aylward wrote:

There was discussion of Radiant 7 having APIs for suff like WebDav.

Did that happen?

  


___
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-Dev] Re: Radiant 0.7.0 release candidate 1 available

2008-12-10 Thread Anton J Aylward
Sean Cribbs said the following on 12/10/2008 01:22 PM:
 Anton,
 
 Radiant 0.7.x will be ActiveResource compatible, i.e. having a simple 
 XML/JSON REST API.  Any other APIs will need to be supported by 
 extensions.  While the roadmap says 0.7 is the blogging release, we are 
 incrementing the version number without necessarily moving forward the 
 feature set toward those goals.  We feel the internal refactoring 
 represents enough of a significant departure from previous versions to 
 warrant the new number.  This is what I mean when I say we've been 
 slavish to the roadmap in the past - that we need the version numbers to 
 more adequately reflect the amount of progress, not some 
 externally-determined feature set.

That's OK, just asking.

I'm glad that the internals are getting a work-over.  Things can only
grow so much on a certain size of 'skeleton'.  In many ways software is
more like a crustacean than a mammal in having an exoskeleton that can
limit its growth.

The reason I asked was some users are unhappy with the idea of logging
in and editing.   I can't imagine what they expect - telepathy?

-- 
He who stops being better stops being good.
 - Oliver Cromwell
___
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-Dev] Re: Radiant 0.7.0 release candidate 1 available

2008-12-10 Thread Sean Cribbs
There's already a VIM plugin, but with the ARes API it should be easier 
to build stuff into local text editors.  I could even envision including 
this in the Radius TextMate bundle.


Sean

Anton J Aylward wrote:

Sean Cribbs said the following on 12/10/2008 01:22 PM:
  

Anton,

Radiant 0.7.x will be ActiveResource compatible, i.e. having a simple 
XML/JSON REST API.  Any other APIs will need to be supported by 
extensions.  While the roadmap says 0.7 is the blogging release, we are 
incrementing the version number without necessarily moving forward the 
feature set toward those goals.  We feel the internal refactoring 
represents enough of a significant departure from previous versions to 
warrant the new number.  This is what I mean when I say we've been 
slavish to the roadmap in the past - that we need the version numbers to 
more adequately reflect the amount of progress, not some 
externally-determined feature set.



That's OK, just asking.

I'm glad that the internals are getting a work-over.  Things can only
grow so much on a certain size of 'skeleton'.  In many ways software is
more like a crustacean than a mammal in having an exoskeleton that can
limit its growth.

The reason I asked was some users are unhappy with the idea of logging
in and editing.   I can't imagine what they expect - telepathy?

  


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


[Radiant] Trouble getting gallery extension running

2008-12-10 Thread Ken Mayer
I've been having trouble getting the gallery extension working. This  
is a brand new install, so perhaps it's a version compatibility issue.


After following the installation instructions, and creating my first  
gallery, I tried uploading a single image (JPG). I got the following  
error:



The error occurred while evaluating nil.gallery_id=):
/vendor/extensions/gallery/app/models/gallery_item.rb:39


Here's the code in app/models/gallery_item.rb:38-40:


  before_thumbnail_saved do |item, thumbnail|
thumbnail.gallery_id = item.gallery_id
  end



So, thumbnail is assigned nil. I checked attachment_fu and it seems  
like it only expects a single argument to the block (thumbnail). I  
tried all sorts of alternative ways of hooking this in and failed.  
Oddly enough, even the debugger got sick (with a stack error).  
Eventually I simply commented out the line and tried again --  
surprisingly, everything seems to work (even with gallery_id set to  
nil for the thumbnail items)!


Any ideas? I'm a little nervous about commenting out code when I don't  
know what it's for. Alternatively, less code is better :-)


Aloha a hui hou,
Ken
--
Ken Mayer / [EMAIL PROTECTED] / 808-722-6142 / http://www.bitwrangler.com/


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