Recent Changes - Search:

Home Pages Pidgin   Azarennya (S|N) Mac Textanium Reference ToDo Food Local Edit

Local: Hide

Language: Hide

Fantasy: Hide

SciFi: Hide

Film: Hide

Music: Hide

REALbasic: Hide

ResourcesGarageUniversityWebRingForums:REALElfDataPlugins and Code:BKeeneyDeclareSubEinhugurJoeRestrepoTempelmannZAZ

Coding: Hide

Forums:PowWebPHPWebmasterCodingWalkersPerlIntroMonksPHPJavaScriptToolboxUnobtrusiveJavaScriptJavaScriptCompressorRegularExpressions (test)JSLintSQLCocoaCocoaBuilderCocoaDevCocoaLabAppleScriptBBSUserlandFaqintoshFileMakerFileMakerTipsFileMakerWorldFileMakerPlugins

Science: Hide

History: Hide

1421

News/Politics: Hide

Cults/Crime: Hide

ClambakeInfidels

Miscellaneous: Hide

AdaptPhed

PHED has served well as a general-purpose editor. It has a crude plugin system for performing both file-level and directory-level operations. I am considering making my Wiki editor into a general-purpose editor for editing text files on the server; perhaps I could adapt PHED, and make it capable of editing Wiki entries and saving them as Wiki entries (i.e., save them to the Wiki log, then save them again in the "entries" folder, in one operation).

I might revamp the interface, though.

The file list would appear without an editor pane. (It would have a preview iframe, though, so you could preview pictures and run scripts.) There would be "dir-XXXX.php" plugins such as "dir-upload.php", and "file-XXXX.php" plugins for renaming and deleting files. Each filename would have a checkbox next to it. There'd also be options to edit each file as either text or hex bytes.

The editor is strictly to edit one file. You can save the entry as a file, or you can save it as a Wiki entry.

Desired features of PHED II

  • Safe saving. Before a file (or entry) is overwritten, it is copied into a log directory so that it can be recovered.
  • Safe deletion. The file manager should use the log as a recycle bin -- it should not use "unlink" unless the user specifically says "Yes, I want to free up server space and understand that I cannot get this file back if I change my mind later."
  • Undo. Older versions of a file (or entry) should be viewable and recoverable. (Recovering a file does not destroy the current version; it simply copies the older version into the editor so you can save it normally, as if it were a new version.)
  • Wiki-like links. To make a link within one entry to another entry, use "<?php link('MyNewEntry'); ?>". (Of course, I'll want some JavaScript to make this easier.) Show.php's link() function will search for "/store/myn/MyNewEntry" and output a link to (say) "/page/MyNewEntry" if the file exists, or to (say) "/edit/MyNewEntry" if it doesn't.
  • Nice URLs. This is really a function of the .htaccess file, but URLs like "karig.net/something/else" should be rewritten to "karig.net?p=something&a=else". [So "karig.net/edit/ANewEntry" redirects to "karig.net/index.php?p=edit&a=ANewEntry", and index.php will load edit/index.php instead of trying to load a plugin script.]

File and directory formats

  • /log folder. This folder contains at least one subfolder. Files to be overwritten are copied into this subfolder. Once the subfolder fills up, another subfolder is created. Each subfolder's name is a number; the highest number is the name of the subfolder into which new files are to be copied.
    • The file to be overwritten is copied into the log subfolder and renamed (the current date and time is the filename; ".f" is the extension).
    • Accompanying the file is a "restore file," which is a text file containing the other file's original path and extension, and perhaps such things as the IP address from which the overwrite request originated, and whether the operation was an ordinary save or a recovery of a previous version. The restore file has the same name as the other file, but has ".r" as the extension.
  • /edit folder.
    • /dir folder. This contains plugins for handling directories:
      • all_sizes.php retrieves sizes in bytes of the current folder, each of its subfolders, and all files.
      • mkdir.php creates a subfolder in the current folder.
      • upload.php uploads a file into the current folder.
      • wipeout_dir.php deletes all files and subfolders from the current folder.
    • /file folder. This contains plugins for handling whole files.
Edit - History - Print - Recent Changes - Search
Page last modified on August 07, 2007, at 08:49 AM