Jason,

> ooh cool :-) Thanks for the heads-up.
>  As you see, I've been away from Rebol for a while. Very nice to see this
>  site now-- well done!

Glad you like it. Thanks!


>  Can you describe the site design and contents formatting in more detail
>  please

Take a look at this script in the Library

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=cookie-example
.r

It uses many routines lifted direct from the REBOL.org CGIs, and demonstrates 
some of techniques we use -- techniques that could be common to almost any 
website built in REBOL:

-- HTML templates with place-holders for variable substitution (RSP does it 
better; if I was starting the site over again, I'd be tempted to use RSP)
-- Making an object out of the CGI input fields
-- "Defusing" CGI input fields to prevent XSS attacks, or just weird output 
formatting
-- Validating CGI input fields
-- Setting a cookie for session control
-- Using the cookie to retrieve user data
--Wrapping all the code in an error? try so you get an apology message rather 
than a server error if the code goes off-rail.


> Please can you point me to the actual search script which is running on the
>  site?
>  What do the actual entries look like?

The indexing and searching code isn't mine, so I'll have to pass on the 
request to publish it -- it's Carl's code with a lot of changes by Gregg.  But I 
can give you a peek at the files it uses.

The indexing builds two files. The first is mainly the scripts' header 
information and looks like this:
===
[file %3kbnewsreader.r size 4605 title "3KB News Reader" author "Ryan C. 
Christiansen" date 30-Aug-2003 version 0.1.1 purpose "Simple CLI news reader." 
library [level 'intermediate platform none type 'Tool domain 'other-net 
tested-under none support none license none]]
[file %accumulate.r size 1098 title "Accumulate" author "Andrew Martin" date 
30-Aug-2003 version 1.0.1 purpose {Cumulates values in a block together, by 
successively applying the function to each value in Series.} library [level 
'intermediate platform none type 'function domain 'math tested-under none support 
none license none]]
[file %add-link.r size 2295 title "Link Maintainer" author "Anonymous" date 
30-Aug-2003 version 1.0.0 purpose "Cgi for maintaining links to REBOL 
materials" library [level 'advanced platform none type 'Tool domain 'cgi tested-under 
none support none license none]]
etc
====

And the second is an index of all words found, and looks like this:

=====
exponent
312
exponential
125
export
15 72 122 182 183 262
expose
359 361 362 363
expose-list
362
Exposed
359 362
=====
Where the numbers are indexes to script names. So six scripts contain the 
word "export".  This scheme works well with around 500 scripts of total size 
nearly 2MB. Gregg is working on some improvements so we keep ahead of the curve as 
the dataset grows.

Sunanda.
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to