[Home]WikiPatches/SimpleWiki

UseModWiki | WikiPatches | RecentChanges | Preferences

# Wiki's are cool.  UseMod wiki is easy to set up
# and reasonably easy to customize.  UseMod also
# has a *lot* of features that can be overwhelming
# to people who have never used a wiki before.
#
# This patch removes links to "Preferences", removes
# display of "Preview" button, removes option to 
# "summarize changes" and "mark as minor change".
#
# The features are still there, but there is no user
# interface to display them.  In the case of an
# internal "WhiteBoard" where nobody  has used a wiki
# before, a lot of this functionality is unnecessary.
#
# Consider this patch / config option a way to trick
# users into using the wiki ("look how simple it is!")
# and then know that you can turn on the real UseMod
# cool features when they start asking for them.
# 
# -- Robert Ames (ramses0!yahoo.com)
# Patch is in "diff -u" format.  Contact me for questions / updates.
--- wiki.pl	Sun Sep  1 17:15:58 2002
+++ wiki-simple.pl	Mon Jul 14 11:28:24 2003
@@ -45,7 +45,7 @@
   $UrlProtocols $UrlPattern $ImageExtensions $RFCPattern $ISBNPattern
   $FS $FS1 $FS2 $FS3 $CookieName $SiteBase $StyleSheet $NotFoundPg
   $FooterNote $EditNote $MaxPost $NewText $NotifyDefault $HttpCharset
-  $UserGotoBar);
+  $UserGotoBar $SimpleWiki);
 # Note: $NotifyDefault is kept because it was a config variable in 0.90
 # Other global variables:
 use vars qw(%Page %Section %Text %InterSite %SaveUrl %SaveNumUrl
@@ -85,6 +85,8 @@
 $NewText     = "";              # New page text ("" for default message)
 $HttpCharset = "";              # Charset for pages, like "iso-8859-2"
 $UserGotoBar = "";              # HTML added to end of goto bar
+$SimpleWiki = 1;                # 1 = Only draw reduced functionality 
+                                # (basically only a "Save" and "Edit" button, no pref's, etc.)
 
 # Major options:
 $UseSubpage  = 1;       # 1 = use subpages,       0 = do not use subpages
@@ -1095,7 +1097,9 @@
     $bartext .= " | " . &GetPageLink($main);
   }
   $bartext .= " | " . &GetPageLink($RCName);
-  $bartext .= " | " . &GetPrefsLink();
+  if( !$SimpleWiki ) {
+    $bartext .= " | " . &GetPrefsLink();
+  }
   if (&GetParam("linkrandom", 0)) {
     $bartext .= " | " . &GetRandomLink();
   }
@@ -2587,35 +2591,39 @@
   }
   print &GetTextArea('text', $oldText, $editRows, $editCols);
   $summary = &GetParam("summary", "*");
-  print "<p>", T('Summary:'),
-        $q->textfield(-name=>'summary',
-                      -default=>$summary, -override=>1,
-                      -size=>60, -maxlength=>200);
-  if (&GetParam("recent_edit") eq "on") {
-    print "<br>", $q->checkbox(-name=>'recent_edit', -checked=>1,
-                               -label=>T('This change is a minor edit.'));
-  } else {
-    print "<br>", $q->checkbox(-name=>'recent_edit',
-                               -label=>T('This change is a minor edit.'));
-  }
-  if ($EmailNotify) {
-    print "   " .
-           $q->checkbox(-name=> 'do_email_notify',
-      -label=>Ts('Send email notification that %s has been changed.', $id));
+  if( !$SimpleWiki ) {
+    print "<p>", T('Summary:'),
+          $q->textfield(-name=>'summary',
+                        -default=>$summary, -override=>1,
+                        -size=>60, -maxlength=>200);
+    if (&GetParam("recent_edit") eq "on") {
+      print "<br>", $q->checkbox(-name=>'recent_edit', -checked=>1,
+                                 -label=>T('This change is a minor edit.'));
+    } else {
+      print "<br>", $q->checkbox(-name=>'recent_edit',
+                                 -label=>T('This change is a minor edit.'));
+    }
+    if ($EmailNotify) {
+      print "   " .
+             $q->checkbox(-name=> 'do_email_notify',
+        -label=>Ts('Send email notification that %s has been changed.', $id));
+    }
   }
   print "<br>";
   if ($EditNote ne '') {
     print T($EditNote) . '<br>';  # Allow translation
   }
   print $q->submit(-name=>'Save', -value=>T('Save')), "\n";
-  $userName = &GetParam("username", "");
-  if ($userName ne "") {
-    print ' (', T('Your user name is'), ' ',
-          &GetPageLink($userName) . ') ';
-  } else {
-    print ' (', Ts('Visit %s to set your user name.', &GetPrefsLink()), ') ';
+  if( !$SimpleWiki ) {
+    $userName = &GetParam("username", "");
+    if ($userName ne "") {
+      print ' (', T('Your user name is'), ' ',
+            &GetPageLink($userName) . ') ';
+    } else {
+      print ' (', Ts('Visit %s to set your user name.', &GetPrefsLink()), ') ';
+    }
+    print $q->submit(-name=>'Preview', -value=>T('Preview')), "\n";
   }
-  print $q->submit(-name=>'Preview', -value=>T('Preview')), "\n";
 
   if ($isConflict) {
     print "\n<br><hr><p><strong>", T('This is the text you submitted:'),

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited October 3, 2007 11:03 am by JuanmaMP (diff)
Search: