Copy

stephen barncard stephenREVOLUTION2 at barncard.com
Sun Dec 1 17:33:23 EST 2013


On Sun, Dec 1, 2013 at 2:28 PM, stephen barncard <
stephenREVOLUTION2 at barncard.com> wrote:
>
>


[PART TWO - with a bit of overlap ]  (damn this text limit…)

the index file looks like this. it includes the master file in the lib
folder.
the master file can also work in the folder solo without abstraction.

<?rev
  set the itemdelimiter to "/"
  get $_SERVER[PATH_TRANSLATED]
  include (item 1 to 4 of it) & "/_lib/download-player.irev"
?>

I've further rigged all folders in the system to display several different
types of web pages as well as index.html. Below is the  .htaccess file at
site root. Note the DirectoryIndex.

Options +ExecCGI FollowSymLinks
AddHandler livecode-script .lc .irev
AddHandler php5-script php htm html
DirectoryIndex index.irev index.lc index.php index.html dir.irev video.irev
audio.irev gallery.irev
Action livecode-script /cgi-bin/livecode-server/livecode-community-server


I have many folder default indexes, and they define the player type of the
folder. This makes it easier to set up each folder for automatic action.


PGM FLOW

If the folder is accessed, either by
"www.site.com/audio/whatever/"   or  "
www.site.com/audio/whatever/download.irev"
then
download.irev executes and immediately includes master file in
 "/_lib/download-player.irev"

PUT HEADER   -- needed for full html5 validation
set errormode
set up variables
init defaults

loadconfig             - reads config.txt  (see above) config file
setEnclosingFolder   - where am I
setFullURL              -  establishes current web available address
createValidateURLf  -  creates a validation link
newListingComplete -  pretty file listing with exceptions and links

the rest is html and css code with imbedded iRev strings built from
variables.

DISCLAIMER:

This is a peek into my little code world. I hope it is readable to others
but I hadn't planned on sharing this yet without comments!  Am I insane? Am
I doing this the 'wrong way?'  I have no idea.

  sqb

--
Stephen Barncard - San Francisco Ca. USA - Deeds Not Words



More information about the Use-livecode mailing list