Updates to Squeak 1.31
There are several kinds of updates available for Squeak 1.31. Unless they say otherwise, you can assume that these fixes are independent of one another. Most of these have already been incorporated into Squeak 2.0Beta.
- IN 2.0 BETA!Ted Kaehler has fixed a number of different things in the 1.31 PWS Swiki implementation. These include more robust file manipulation and a small fix I contributed to avoid two pages getting the same URL. His fileIn is at http://guzdial.cc.gatech.edu/st/tk_Swiki_XD.16Feb.cs
- IN 2.0 BETA!There is a serious file leak bug in 1.31 Swiki. File in http://guzdial.cc.gatech.edu/st/SwikiPage-timeOfAccept.st to repair it. You can grab this one all by itself.
- IN 2.0 BETA!Fri, May 1, 1998 Lex Spoon has made a dramatic speedup in HTMLformatter for serving Swiki. Get his code at http://guzdial.cc.gatech.edu/st/lexHTMLformatter2.st. Note that Lex's fixes actually change some of the semantics of embedded code. You can't declare local variables anymore (but you can define block variables and pass in values to them), but it does speed things up alot. Lex also changes HTML formatting for Swikis, and caches the templates for faster access.
- IN 2.0 BETA!I've developed a new kind of Swiki which allows for usernames and passwords on pages. Here's a brief blurb on it:
Here is a change set that enables Private Swikis. "PSwikiAction setUp: 'private'" will work -- you can also restore an existing 1.31 Swiki into the private format. There are three new classes: PSwikiAction, PSwikiPage, and PURLmap. I tried not to rewrite PSwikiAction>>process:, but in the end I had to because the authentication request needs to occur before the end-of-header.
You also need a new pedit.html page that expects to be put into the 'swiki' folder.
You can try it out at http://triton.cc.gatech.edu/private. Recent
list does display privileges, and I patched display-all so that it asks for
protected pages' username and password. You can protect writing (editing)
The change set is at http://guzdial.cc.gatech.edu/st/pswiki.1May.cs and the new editor file (that asks for username and password) is at http://guzdial.cc.gatech.edu/st/pedit.html. (You'll probably have to save-source in order to get the download right.)
- IN 2.0 BETA!If you want ftp and mailto links to be recognized in Swiki, you can fileIn http://guzdial.cc.gatech.edu/st/URLmap-linkForfromstoringTo.st
- IN 2.0 BETA!Thu, Apr 30, 1998 at 9:47:20 AM An alternative to the Private Swiki is the AuthorizedSwiki at http://guzdial.cc.gatech.edu/st/authorizedSwiki.st. Ross Philipson did this one. Instead of each page having protection, the whole Swiki is under authorization. To read or write, you have to enter the username and password. Here's his sample code for creating an authorized Swiki:
a := Authorizer new.
a realm: 'SwikiArea'.
a mapName: 'swiki' password: 'viki' to: 'swiki'.
AuthorizedSwikiAction setUp: 'SWSecure'.
s := AuthorizedSwikiAction new restore: 'SWSecure'.
s authorizer: a.
- Mon, Mar 23, 1998 One of the requests that I often get about Swiki's are "Can I start with something other than a blank page?" Templates ( http://guzdial.cc.gatech.edu/st/templates.23Mar943am.cs ) will use a "Template" file in your Swiki folder as the initial text in a new page. The template is run through the HTMLformatter(class)>>evalEmbedded:with: method, with the new page as the input. This allows you to access the new page's name (<? request name ?>)or the action's name (<? request action name ?>) in the new page. I've used this Template successfully:
Edit this page to enter your text on
- IN 2.0 BETA!Mon, Mar 23, 1998 CachedSwikiAction ( http://guzdial.cc.gatech.edu/st/cachedSwiki.26Mar1244pm.cs ) caches Swiki pages for faster serving. I'm using it to serve pages from WebStar (a fast, native Mac webserver) while still using PWS for editing and searching. (Try it at http://pbl.cc.gatech.edu/cs2390/1.html ) You need a cswiki folder, because the standard swiki template folder needs to be modified to (potentially) point at two different servers. The cswiki folder can be found at http://guzdial.cc.gatech.edu/st/cswiki.sea or http://guzdial.cc.gatech.edu/st/cswiki.tar. CachedSwiki's do depend on Ted Kaehler's fixes (above).
To use the CachedSwikiAction, you must first modify three class methods:
- defaultCacheDirectory points to where you'll have your caches stored.
- defaultCacheURL is the URL prefix of the webserver you'll be serving the cache from.
- defaultPWSURL is the URL prefix of the PWS you'll be processing edits and searches from.
To move an existing Swiki into a CachedSwiki:
- Create a folder/directory with the same name as your action in your CacheDirectory.
- Execute CachedSwikiAction new restore: 'yourActionName'. This will create the new action on the PWS side, generate all the cached pages, and generate the new cached Recent Changes list.
Restoring a CachedSwikiAction is a horrendously long process (cs2390 has 340 pages -- it took 30 minutes to generate on a PowerMac 7100). If the PWS server crashes and you only want to restore the PWS internal datastructures, you can CachedSwikiAction new restoreNoGen: 'yourActionName'.
Currently, the CacheDirectory must be accessible from the PWS using FileStream. Another interesting option might be to use FTPSocket to move the cache to a big central Webserver. Haven't tried that.
The idea of a CachedSwikiAction was suggested to me by Eddie Cottongim ( http://pbl.cc.gatech.edu/cs2390/165.html ) who was one of the first undergraduates at Georgia Tech to use Squeak.
- IN 2.0 BETA!There is a problem with the low-level PluggableWebServer in that people stopping an incomplete load of a page can eventually crash the server. I was having this problem daily on my most frequently hit server, but not at all on others. John Maloney has been putting in an enormous amount of effort into fixing this problem, which is much appreciated! A more robust and well-tested version will probably appear in the next release of Squeak. John's fixes don't work on UNIX right now! Georg Gollman is working on a set of fixes that will be cross-platform.
The two fileIns are http://guzdial.cc.gatech.edu/st/jhmServerFixes.cs and http://guzdial.cc.gatech.edu/st/serverLoop.cs. NOTE: WHEN RUNNING THESE VERSIONS, DO NOT SAVE OUT YOUR IMAGE WHILE THE SERVER IS RUNNING! Stop the server before saving, then restart it after. Weird file stuff can happen otherwise.
- IN 2.0 BETA!The new version of John's fixes can be found at http://guzdial.cc.gatech.edu/st/nusrc/ These should run cross-platform.
More About Squeak...
Home Page for How To Squeak
Last modified at 5/11/98; 11:43:01 AM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | CS2390, Modeling and Design | STABLE