FLOOBLE.COM PAD V. 0.1 BY LEV EPSHTEYN README ------------------------------------------------ Contents: 1. What is it 2. License 3. Requirements/Install 4. Usage 5. Issues 6. Author 1. What is it? flooble.com pad ("pad" for the rest of the document) is a perl script that lets web surfers use a regular web page for taking notes. These notes are displayed in a text area on the page, and stored on the pad server. pad works as a javascript include (though server side include functionality has been coded, but not tested), and thus allows anyone with a web page (even on geocities or some such) to utilise the pad. (The server where pad is run off of must have Perl installed, and allow for CGI script execution, but the users of pad need not have access to that server - only be able to edit HTML hosted anywhere on the internet). For a demonstration of an end user experience visit http://www.flooble.com/pad/ 2. License pad is copyright 2001 by Lev Epshteyn flooble.com pad is a free software, distributed under GNU GPL, (see the file COPYING in this archive). In short you are free to use and modify this script as you see fit, as long as you make your changes public. While this is not required, I would appreciate it if you could provide a link to http://www.flooble.com/pad and/or to http://www.levik.com if you decide to use pad. Also I'd love to hear if you found it useful and decided to use/modify it. (See http://ww.levik.com for my contact info.) 3. Requirements/Install pad is written in perl and has been tested with perl 5. It may work with earlier version of perl as well. You will need to have CGI.pm installed. This great module is freely available from http://stein.cshl.org/WWW/software/CGI/ To install, copy pad.pl into your cgi-bin/ directory, create a writable directory for the pad data, then edit pad.pl to set the proper config values in the top section of the file. (Note that the $data_dir value can be an absolute path or a path relative to the pad.pl file, but it must end with a '/' character.) For each pad user, you will have to create a userid.pad file in the pad data directory, where userid is the id of that user. That file should contain the following lines (the bracketed values should be replaced by actual values with no brackets): name=[userName] login=[userId] password=[password] rows=[rowNumber] cols=[columnNumber] plain=[plainPadFile] secure=[securePadFile] email=[userEmail] The order of these is not important. Some notes: * Yes, the password is in plaintext. I know this is a security risk, but I was too lazy to fix this. If you want to do this, it should be simple enough. I would advise calling it something else for backward compatibility though (like "encpassword=[gobeldygook]") * The rows/cols values specify the rows and columns of the textarea that the pad will display. I personally find that 35 cols x 10 rows are pretty good dimensions. * The plain/secure values specify the filenames of text files that will contain the data for plain and secure pads for that user. These will be in the pad data directory, and will be created the first time a user saves a pad. I personally use [userid].pad.plain and [userid].pad.secure for these, but if you only have one user, the names don't really matter. * The name will be what's displayed on top of the pad (i.e. "Bob's pad") If you will only use the pad for one user, creating this file by hand should not be a problem. However if you wish to let multiple users take advantage of pad, you may want to throw together a quick signup script to generate these files automatically. (But check all values for special chars, this may be a security risk.) 4. Usage As I said before, pad was designed to work primarily as a JavaScript include, but will probably work as an SSI. For JS mode you will need at least a 4.0 browser, since earlier versions did not support JS includes. To embed pad into a page, use the following code: Replacing [server] with your hostname and [userid] with the desired user id. (This lets you embed into dynamically generated pages as well.) pad includes virtually no design elements (other than the flooble logo by default), and should look good on almost any page you drop it into. If not, feel free to change the code to your liking. If you are trying to embed pad into a page using SSI, use the url of the script above without a "js=true" parameter. This will make pad output straihgt HTML instead of javascript code. You can also use the url directly in the browser (once again, removing "js=true") but the results are pretty bad to look at layout and design wise. (It works though.) 5. Issues pad seems to have problems with the Opera browser which caches the result returned by the JS include. I have so far been unable to solve this issue. By default, pad relies on the referrer header to know the address of the main page (as "document.location.reload()" cannot be called by documents in third-party domains in newer browsers). If this header is missing the main window will not properly reload on these browsers, and the user will have to reload it manually. Of course this is not a problem if the domain of the page containing pad is the same as the domain where pad is installed. 6. Author This program is written by Lev Epshteyn. For contact and general info, visit http://www.levik.com