Jack Applin |
CS Dept. PmWiki WikiFarmDefinitionsPmWiki:
Farm:
Field:
Directory hierarchiesThe directory hierarchy for the wiki farm at pmwiki/ the entire farm cookbook/ farm-wide recipes, one per file array.php defines the recipe (:array:) … unavailable.php defines the recipe (:unavailable:) local/ farmconfig.php customization for this entire farm pmwiki.php the main PmWiki script pub/ skins/ skins affect how wiki pages apear CS3/ Jack’s imitation of CS-Roo pmwiki/ default pmwiki skin print/ skin for printing scripts/ other parts of the PmWiki implementation wikilib.d/ standard documentation wiki pages The directory hierarchy for the wiki field at
.htaccess web server control: map all requests to index.php index.php a “springboard” that transfers control to the farm pmwiki/ the entire field cookbook/ local recipes, for this field only bash.php define (:bash:) for live bash examples local/ config.php customization for this field pub/ css/ local.css CSS styles for this field Main.Schedule.css CSS styles for this particular page wiki.d/ Lecture.Bash an actual wiki page … Main.HomePage an actual wiki page Main.Schedule an actual wiki page Main.Syllabus an actual wiki page Execution
Here is <?php # A (Wiki)Farm has many (Wiki)Fields. # # Farm: # The pmwiki executables, scripts, and common data such as skins. # Our farm is in ~cs000/public_html/pmwiki. We need only one copy # of the pmwiki scripts--easier to keep up-to-date. Also, we only # need one copy of the local customization cookbook/ scripts. # # Field: # Essentially only the data pages for this particular wiki. # It also contains css/ customization, and local cookbook/ scripts. # The field for CT320 Fall17 is ~ct320/public_html/Fall17/pmwiki. chdir('pmwiki'); # field directory require posix_getpwnam('cs000')['dir'] . '/public_html/pmwiki/pmwiki.php'; File/Directory PermissionsThe farm is completely open. Everything is owned owned by Field files are all owned by the field owner (e.g., drwxr-xr-x Fall18 drwx--x--x Fall18/pmwiki drwx------ Fall18/pmwiki/cookbook -rw------- Fall18/pmwiki/cookbook/*.php drwx------ Fall18/pmwiki/local -rwx------ Fall18/pmwiki/local/config.php drwx--x--x Fall18/pmwiki/pub drwx--x--x Fall18/pmwiki/pub/css -rw-r--r-- Fall18/pmwiki/pub/css/*.css drwx------ Fall18/pmwiki/wiki.d -rw-rw-r-- Fall18/pmwiki/wiki.d/*
All other plain files (recipes, config.php, and wiki pages) are read only by PHP scripts. Therefore, they can be mode 600. The permissions of Edit Access
<?php $staff = 'id:'.get_current_user() # the class itself (e.g., ct320) . ',id:applin' # the instructor, Jack Applin . ',id:TA-NAME-HERE'; # a teaching assistant # Only teaching staff may edit pages:
URLsWiki URLs look like this:
Wiki pages have a two-level hierarchy, a group and a page.
The group defaults to In all cases, the Apache web server executes the springboard
script |