[Radiant] Ordering of pages

2007-01-26 Thread Anton J Aylward
How can you order pages under a  ?

I can see the "by" parameter but what does that amount to?

I can see that it could be the title or the publication date, but what I'm
trying to do is a a bit different that that.
Let me express it as a general problem.

Can I do something like create a tab for each page under a parent, call it
"sequence" and put a sequence number in it?

Can I do something like select the single item from a list of pages
describing events that is the next one if there is a tab that has the date
in it?

Can I control the order of menu items ?

/anton


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


[Radiant] Redirect?

2007-01-28 Thread Anton J Aylward
Is there a way to set up a page so that it silently redirects to another one

Something that results in what one might conceive of as

with appropriate 404 handling?

-- 
An NSA-employed acquaintance, when asked whether the government
can crack DES traffic, quipped that real systems are so insecure
that they never need to bother. Unfortunately, there are no easy
recipes for making a system secure, no substitute for careful
design and critical, ongoing scrutiny.
  -- Matt Blaze in AC2
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Extended content in distributed example

2007-01-28 Thread Anton J Aylward
In the distribution example, the Home Page has a line of code


  

  Continue Reading…

  

(Its one one line in the example)
Since its in the context of the 'child' I presume it refers to the child.

When viewed as the web site I'm prototyping this has a link to

http://server:3000/presentations/2007/01/27/jan-27th-event/#extended

However when I click on that link I get take to a page that has that in the
address bar but is identical to
http://server:3000/presentations/2007/01/27/jan-27th-event

That is: the content I put in the 'extended' tab that I created for that for
that page doesn't appear.  Actually I'm surprised the base page appears!

What am I doing wrong or misunderstanding?

-- 
"A Meltdown? One of those annoying buzzwords. We prefer to think of it as an
unrequested fission surplus!"
  -- Monty Burns
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Redirect?

2007-01-28 Thread Anton J Aylward
Farrel Lifson said the following on 01/28/2007 03:13 PM:
> On 28/01/07, Anton J Aylward <[EMAIL PROTECTED]> wrote:
>> Is there a way to set up a page so that it silently redirects to another one
>>
> 
> I set up a layout called 'Redirect' that has the following template:
>  
>CONTENT="0;URL=" />
>  
> 
> Then if I have a page I want to redirect elsewhere I just give it the
> 'Redirect' layout and put the url I want to redirect to in the body.

AYAH!
Wonderful!
-- 
Two key perspectives from Jim Collin's book "Good to Great".
1) "Being great is a decision" and
2) "Being good is an enemy of being great"
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Radiant Digest, Vol 10, Issue 73

2007-01-29 Thread Anton J Aylward
Brian Sam-Bodden said the following on 01/29/2007 09:16 AM:
> Oliver,
>It seems that our setups are exactly the same yet I get no email
> delivered nor do I get any hints of why it doesn't get delivered. I'll
> switch my testing to a dev machine and report back any findings.

It may be that your hosting machine has an issue.

One site I hosted on the ISP forgot to set the SMTP to allow my domain to
use the MTA.

MTAs are often configured NOT to forward mail for any than specified domain
so that they can't be used as 'open relays' for spammers.

-- 
Security is old, older than computers And old-guard security thinks of
countermeasures as a way to manage risk.  Avoiding threat is black & white,
either you avoid it or you don't.
Managing risk is continuous.
 - B Schneier, "Secrets and Lies" pp 385
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] How to dump and reload?

2007-02-02 Thread Anton J Aylward
This is really a Rails question, I suppose, but in context its a Radiant problem

John graciously supplied us with a script script/set-up_database
that preloaded some templates, snippets and pages.

Its not quite a Rake task, but ...
it does load content from YAML files.

Now Rake out of the box can dump and load the schema and dump the database
structure to a SQL file.

But what I need to do is dump a Sqlite3 database and restore a MySQL database.

Its like this:

I've put together a small site for a local club (aka non-profit) which has
about 100 members.  The idea is that the 'board' can keep it up to date
since the kid who volunteered to run the site for them has fallen down on
the job.

I've run up a demo on my laptop and they are happy with that.
I now have to put up the live site on an ISP.

This means dumping the content of the database on my laptop (Sq lite3) and
restoring it on the ISPs server (MySQL)

I'm a little surprised that Rails doesn't have this.  Or am I mistaken?
What I've found on the web tells me it isn't.

I did find code that has different patches for Sqlite, MySQL and Postgress,
but doesn't work with Sqlite3.
http://www.realityforge.org/articles/2005/12/14/dumping-database-to-yaml-fixtures
http://www.realityforge.org/files/dump_fixtures.rake
http://www.bigbold.com/snippets/posts/show/3393

Am I missing something 'cos I'm not a RoR coder?  I would have thought this
a common and obvious task.


-- 
Never criticise somebody until you have walked a mile in their shoes.
That way, they're a mile away, and you have their shoes.
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] new to radiant

2007-03-07 Thread Anton J Aylward
ali b said the following on 03/07/2007 05:19 PM:
> hi everybody,
> 
> I'm new to radiant and to rails.
> 
> I've got a problem with :
> 
> 'script/server -e production'
> I get a :'script' is not recognized as an internal or external command,
> operable program or batch file.
> 
> I don't know what I've done wrong :(
> 
> thank you very much for your help

This is a "new to Linux" problem.
Check your path.

You should be at the top of the rails directory tree

$ pwd
/home/anton/Ruby/Radiant
$ ls
app/CHANGELOGCONTRIBUTORS  lib/ public/   script/  vendor/
bin/components/  db/   LICENSE  Rakefile  test/
cache/  config/  doc/  log/ READMEtmp/

so when you run the ruby command you specify the full or the relative path

ruby ./script/server -e production
or
ruby /home/anton/Ruby/Radiant/script/server -e production

As I said, this is not a rail or ruby problem.  You need to learn the basics
of the command line shell.


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


Re: [Radiant] cookies and login

2007-10-09 Thread Anton J Aylward
Matt Hughes said the following on 10/09/2007 09:54 PM:
> How about accessing cookies from the model?
> 
> I basically want my application to have two tags:
> 
>  and 
> 
> Where the Ruby code that implements those tags (in the models
> according to the tutorial) would check for the presence of certain
> cookies.  But from my initial experiments, I don't have access to the
> cookies variable in the model code.
> 
> 
> Any ideas?

Why not make it generic and allow access to ANY HTTP header?

Add that to  

All that useful stuff like remote host, address, port ...

When it comes down to it, the cookie alone won't tell you if the user is
validated. In fact that's an assumption that will open up some security
holes :-(

Try session_id and session_variable ...

Actually, what I did for an e-commerce site was to have the session_id plus
a time-stamp in the cookie in encrypted form - so that 'time-out' cold be
done and so that the cookie wasn't the same every exchange.  (The encryption
key had to change periodically as well which made it hairy!)   The
session_id was not predictable - see how that is done TCP sequence numbers
in late model kernels.

Some day I may get around to recoding this in Ruby/Rails ...

But PLEASE!
Don't code up something that is a security CFM and make your site a target
for all manner of attacks and zombifications.  Putting "isLoggedIn" or
equivilent (e.g. raw data or predictable session_id) in the cookie is a real
security risk.

http://www.rorsecurity.info/ - Ruby on Rails Security Project

http://www.owasp.org/index.php/OWASP_AppSec_FAQ - Gives good advice on how
to design the login process.

http://rubythis.blogspot.com/2006/11/rails-security-checklist.html

http://www.quarkruby.com/2007/9/20/ruby-on-rails-security-guide

http://www.rorsecurity.info/2007/03/20/logingenerator-and-loginsugar-security-vulnerabilities/

-- 
Anton J Aylward, CISSP, CISA <[EMAIL PROTECTED]>
System Integrity
Minister in the Church of St Sysiphus The Perplexed,
The patron saint of InfoSec


Anton J Aylward, CISSP, CISA <[EMAIL PROTECTED]>
System Integrity
http://si.on.ca - System Integrity
http://infosecblog.antonaylward.com - The InfoSec Blog



-- 
Genius is one per cent inspiration, ninety-nine per cent perspiration.
Thomas A. Edison, Harper's Monthly, 1932
___
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant