$StyleSheet = ""; # URL for CSS stylesheet (like "/wiki.css")
this should be a readable file on your system. by the way, there is an over-ride on the address line of &stylesheet="*"
One impact is to include a line in the generated HTML that declares what the style sheet should be: <LINK REL="stylesheet" HREF="$stylesheet">
there is a question on the User preferences page to allow setting up a stylesheet on personal basis. Typical information to put in a style sheet is on the /StyleSheetExample? page.
The following new config variables allow customizing the look of the wiki.
Along with the stylesheet, there are some new config variables that affect the look of the wiki:
$BGColor = 'white'; # Background color ('' to disable) $DiffColor1 = '#ffffaf'; # Background color of old/deleted text $DiffColor2 = '#cfffcf'; # Background color of new/added text $FavIcon = ''; # URL of bookmark/favorites icon, or '' $OldThinLine = 0; # 1 = old ==== thick line, 0 = ------ for thick line
RSS feeds are available for any 1.0 wiki--visit LocalWiki:action=rss to view the feed in your browser. The RSS settings are:
$InterWikiMoniker = ''; # InterWiki moniker for this wiki. (for RSS) $SiteDescription = $SiteName; # Description of this wiki. (for RSS) $RssLogoUrl = ''; # Optional image for RSS feed $RssDays = 7; # Default number of days in RSS feed
The $InterWikiMoniker? optional setting is the first part of an InterWiki link to your site (like 'MeatBall' for MeatBallWiki). The $SiteDescription? setting defaults to your site name ("Meatball Wiki" for MeatBall), but you can change it. $RssLogoUrl is the full URL of an image to be displayed with your feed. $RssDays? is the default number of days in an RSS feed. (Users can go to LocalWiki:action=rss&days=20 for 20 days.) If you have a lot of changes and limited bandwidth, you may want to minimize $RssDays?.
File uploading is an optional feature that is turned off by default. The upload settings are:
$UseUpload = 0; # 1 = allow uploads, 0 = no uploads $AllUpload = 0; # 1 = anyone can upload, 0 = only editor/admins $UploadDir = ''; # Full path (like /foo/www/uploads) for files $UploadUrl = ''; # Full URL (like http://foo.com/uploads) $MaxPost = 1024 * 210; # Maximum 210K posts (about 200K for pages)
To enable uploads for wiki admins ($AdminPass?) and editors ($EditPass), set $UseUpload? to 1. If you are using an intranet or private wiki, you may want to set $AllUpload? to 1 (to allow everyone to upload), but this is not recommended for public sites. Set $UploadDir? to the directory where files should be stored, and $UploadUrl? to the URL prefix to reach these files. In other words, $UploadDir? and $UploadUrl? must refer to the same web-accessible directory.
$UploadDir = '/var/www/html/uploads'; $UploadUrl = 'http://mysite.net/uploads';
Finally, the $MaxPost? setting limits the maximum size of uploads as well as the maximum size of wiki pages. (I recommend adding about 10K to the desired maximum size to allow for overhead.)
Once the upload feature is set up, users who are capable of uploading will see an "Upload" link after the "Preferences" link on the standard link bar. Following that link will lead to the form upload page which lets you choose the file to upload. After the file is uploaded, the next page will display the wiki text used to link to the uploaded file ("upload:filename"). (For file names with spaces, the spaces will be replaced with "%20".) Cut and paste this text to a wiki page to create a link to the uploaded file. If the file is an image, it will also be displayed.
Uploaded files may be overwritten by simply uploading another file with the same name. While there is no feature to delete uploads, one can simply upload a 1-byte file with the same name.
open UPLOADFILE, ">$UploadDir$filename"; binmode(UPLOADFILE);
The 0.92 release reserved the character/byte 0xB3 (hex) for internal use (the $FS variable). The 1.0 release can use a multi-byte $FS with the $NewFS option, allowing the 0xB3 byte to be used in user text.
If you are starting a new wiki, setting $NewFS to 1 is recommended. (The default value is 0 for compatability with existing wikis.)
Existing wikis can be converted using the LocalWiki:action=convert action (only usable by admins). The procedure for converting an existing wiki is as follows:
1. Make a complete backup of your $DataDir. The converter has been tested several times, but any problems in the converter could wipe out your entire wiki.
2. Set the $AdminPass? variable in the config file to some non-blank text (no spaces allowed within a password).
3. Change the $NewFS setting to 1 in the config file. Once this is done, none of the existing pages will be readable until the conversion is finished.
4. Go to the Preferences link and type in the $AdminPass? password in the "Administrator Password" line. You must do this after step 3, because your old preference file will be unreadable (because it is in the old format).
5. Visit LocalWiki:action=convert to do the conversion. If the conversion does not complete, visit the same page again. (The converter will skip already-converted directories and files.) At the end of the conversion you will see a message telling you to remove a lock file to allow wiki editing. (The conversion utility locks the wiki automatically, but does not unlock it automatically. I did not want the wiki to be unlocked until the admin makes sure it is working.)
6. Visit a few pages (including RecentChanges), and try editing a page. If everything works, remove the lock file from step 5 (or click on the "Unlock Site" link on the admin toolbar).
If something goes wrong in the conversion, restore the contents of your $DataDir from your backup and contact email@example.com.
The 1.0 release automatically defines LocalWiki: and Local: InterWiki links. For example, LocalWiki:SandBox and Local:SandBox will always link to the local wiki. This can be useful for pages that are copied to other wikis, especially for actions like LocalWiki:action=version (which can be cut and pasted to any 1.0 wiki). See DoLinks for some more samples. These default values for LocalWiki: and Local: can be overridden by the "intermap" file if desired.
$KeepSize = 0; # If non-zero, maximum size (in bytes) of keep file
If $KeepSize? is set to a non-zero value, it will be the maximum allowed size of the keep file for any wiki page. (The keep files store old revisions of pages.) If adding a new revision to the keep file would increase its size beyond the $KeepSize? limit, that revision will not be added. This means that newer (non-current) revisions will not be stored, leading to a gap in the version history. (The current revision is not affected by this setting.)
The $KeepSize? limit can be used to prevent large frequently-edited pages from consuming a huge amount of disk space. (A 30K page that is edited 51 times would have 50 old revisions for a size of approximately 1.5 MB.) The limit may also be useful if your hosting provider limits the amount of memory that a CGI script can use. (Multiple copies of the keep file are made in memory when a page is saved or maintenance is done.)
Let's face it : UseMod is great wiki software, but its look and feel is awful :-P
Don't worry, there're some enhancements in 1.0 that let you (the proud wiki owner) enhance it. These are:
$UserHeader = ''; $UserBody = ''; $FooterNote = '';
Still thirsty ?? Do you want more ?? Take a look at [Poor's man templates]
# New configuration settings added after 0.92: $EarlyRules = ''; # Local syntax rules for wiki->html (evaled) $LateRules = ''; # Local syntax rules for wiki->html (evaled) $StartUID = 1001; # Starting number for user IDs @ImageSites = qw(); # Url prefixes of good image sites: ()=all $DeletedPage = 'DeletedPage'; # 0 = disable, 'PageName' = tag to delete page $ReplaceFile = 'ReplaceFile'; # 0 = disable, 'PageName' = indicator tag @ReplaceableFiles = (); # List of allowed server files to replace $TableSyntax = 1; # 1 = wiki syntax tables, 0 = no table syntax $NewFS = 0; # 1 = new multibyte $FS, 0 = old $FS $MetaKeywords = 1; # 1 = Google-friendly, 0 = search-engine averse $NamedAnchors = 1; # 0 = no anchors, 1 = enable anchors, # 2 = enable but suppress display $SlashLinks = 0; # 1 = use script/action links, 0 = script?action $UpperFirst = 1; # 1 = free links start uppercase, 0 = no ucfirst $AdminBar = 1; # 1 = admins see admin links, 0 = no admin bar $RepInterMap = 0; # 1 = intermap is replacable, 0 = not replacable $ConfirmDel = 1; # 1 = delete link confirm page, 0 = immediate delete $MaskHosts = 0; # 1 = mask hosts/IPs, 0 = no masking $LockCrash = 0; # 1 = crash if lock stuck, 0 = auto clear locks $HistoryEdit = 0; # 1 = edit links on history page, 0 = no edit links $NumberDates = 0; # 1 = 2003-6-17 dates, 0 = June 17, 2003 dates $ParseParas = 0; # 1 = new paragraph markup, 0 = old markup $AuthorFooter = 1; # 1 = show last author in footer, 0 = do not show $LimitFileUrl = 1; # 1 = limited use of file: URLs, 0 = no limits $MaintTrimRc = 0; # 1 = maintain action trims RC, 0 = only maintainrc $SearchButton = 0; # 1 = search button on page, 0 = old behavior $EditNameLink = 0; # 1 = edit links use name (CSS), 0 = '?' links $UseMetaWiki = 0; # 1 = add MetaWiki search links, 0 = no MW links $BracketImg = 1; # 1 = [url url.gif] becomes image link, 0 = no img # Names of sites. (The first entry is used for the number link.) @IsbnNames = ('bn.com', 'amazon.com', 'powells.com', 'search'); # Full URL of each site before the ISBN @IsbnPre = ('http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=', 'http://www.amazon.com/exec/obidos/ISBN=', 'http://www.powells.com/cgi-bin/biblio?isbn=', 'http://www.pricescan.com/books/BookDetail.asp?isbn='); # Rest of URL of each site after the ISBN (usually '') @IsbnPost = ('', '', '', '');