[Home]WikiPatches/Templates

UseModWiki | WikiPatches | RecentChanges | Preferences

Alert - The person who originally created this page and reportedly had a template patch, Philo Vivero, is retracting. When I wrote to him today and asked him about the template, he replied today as follows... (-- MatthewSimpson - July 14, 2002)

I made a template system work for usemod wiki, but then opened it up to CVS and someone came it and futzed it all up trying to add Unicode support (or something). Now the proggy doesn't even parse correctly anymore....Since usemod appeared (and appears?) to not be under active development anymore, I went looking elsewhere... I stumbled on Twiki (http://twiki.org) which has templating, revision control, file upload, and about 300 other cool features, as well as being under active development, written in Perl, and is GPL software (the items that were important to me). Now, the usemod link I've given is hopelessly out of date. I should just delete it. I haven't touched that in over 9 months. --PhiloVivero?

Alternative patches

WikiPatches/CSSskins gives users a choice of a selection of headers, stored on the server as truncated HTML files.

WikiWithCascadingStyleSheet gives a large amount of control over the look of your Wiki


Original Text

Choose how you want your wiki to look in gory detail. Edit templates with FrontPage? or DreamWeaver? or whatever, then your site looks like that.

No diffs, I've given you a .tar.gz and CVS access (no more CVS for a while, sorry)!

This modified script does not work for me. It is simply outputting a "0" to the browser. If anyone finds the solution, please let me know: theo@theoretic.com Thanks!

(Theo, the .tar.gz that I've given should work. I gave people CVS access to the code, and someone screwed it all up to the point where I couldn't recover it. Only the usemod094.tar.gz is currently working. -- PhiloVivero?)

2002-06-27 User Comments: This is a sorry excuse for a template patch. This is supposed to be SIMPLE. Can anybody organize this section so that even somebody that doesn't program Perl can figure out? I would really appreciate it. Using templates seems like such a BASIC task, I can't understand why it is a "patch"!! (sleite@yahoo.com)

I don't think you appreciate the difficulty of changing the existing wiki code to do templates. I did not design UseModWiki to use templates, since I wanted a relatively simple wiki that emphasized functionality over presentation. Later, when the wiki became more popular, I considered doing some kind of templating, but decided that it might be easier to rewrite the wiki instead. I am impressed that someone else was able to add templates to the wiki, and I appreciate that he made the patches available. --CliffordAdams

I use CSS to modify the look of UseModWiki (http://allmyfaqs.com/faq.pl), and the translation file to change program-generated text (http://unumondo.com/cgi-bin/wiki.pl). When I want something with different functionality, I use a different wiki engine (http://ebookwiki.com/wiki/), or run UseModWiki with raw HTML enabled (http://hytext.com/cgi-bin/htm.pl). -- JerryMuelver

As I am working on 2.0, it has become painfully obvious that the templated approach, a prentation-oriented architecture, requires rewriting the entire script which is currently flow-oriented. I could cry. -- SunirShah

For UseMod, I don't think templates are necessary - there are other wikis that add that complication. Personally, I prefer to change the source to include extra html to enable a more flexible layout with style sheets - Scumble

I recently added templates to my UseMod 0.92 based wiki code... I thought about going the HTML fragment route then I got an inspiration to put the template into the wiki as a wiki page. This means the templates can be edited within the wiki itself. (Maybe my wiki is the only wiki that can do this?) Individual pages can specify which template they want to use, or they can use the site wide template. See http://www.bookax.com for a tour of the templates I've finished so far. GarnetChaney


--

User Comment: Poor's man templates

This is a really nasty hack, but just in case you need it's here free for you to use

With $UserHeader you can add extra HTML code previous to the HEAD tag, but not to the BODY, but using a combination of $UserHeader, $FooterNote and $UserBody you can add code in the HEAD and BODY.

Basically use this :

 $BGColor     = '';
 $UserHeader  = <<EOH;           # Optional HTML header additional content

        <link rel="stylesheet" type="text/css" href="/some/stylesheet.css" />
 </HEAD>
 <body bgcolor="#333333" text="#dddddd">
 <table>
    <tr>
        <td>
              <!-- BYE HEAD AND BODY

 EOH

 $UserBody    = '--';    # Optional <BODY> tag additional content

 $FooterNote  = <<EOF;             # HTML for bottom of every page

            </td>

          </tr>
        </table>

 EOF

The hack is that $UserHeader is inserted in the HEAD and closed (automatically wiki.pl does it) with the </HEAD> and <BODY> plus the tags passed in $UserBody. Finally the page is closed with $FooterNote, some that looks like this to your browser :

 <HTML>
     <HEAD><TITLE>xxxxxxx</TITLE>
     $UserHeader
     </HEAD>
     <BODY $UserBody>
     ... Here goes the wiki page ...
     $FooterNote

So if you try to use $UserHeader to insert code in the BODY your HTML ends with two </HEAD> and two <BODY> (the ones added by wiki.pl and the ones you tried to use :-P). To avoid this just end the $UserHeader opening a comment tag and closing it in the $UserBody with two slashes that combined with > enclose the HEAD and BOYD in a comment, what cuases that your HEAD and BODY (inserted in $UserHeader) take control.

This conver your HTML in something like this :

 <HTML>
     <HEAD><TITLE>xxxxxxx</TITLE>

        <link rel="stylesheet" type="text/css" href="/some/stylesheet.css" />
     </HEAD>
     <body bgcolor="#333333" text="#dddddd">
     <table>
      <tr>
        <td>
              <!-- BYE HEAD AND BODY
     </HEAD>
     <BODY -->

        ... Here goes the wiki page ...

         </td>

       </tr>
     </table>

Want to look it in action ?? Preview it at http://www.bit-man.com.ar/cgi-bin/wiki.pl?HomePage !! (BrokenLink 8 March 2009)

-- [Bit-Man] May 18, 2006


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 6, 2023 9:09 pm by MarkusLude (diff)
Search: