Merging Scribus and Nighthawk repositories... Mercurial saves the day...again :-)
authorDan
Tue, 10 Jul 2007 00:40:52 -0400
changeset 58 8f532d8ab5f5
parent 48 fc9762553a3c (current diff)
parent 57 b354deeaa4c4 (diff)
child 59 7c4a851fb5c5
Merging Scribus and Nighthawk repositories... Mercurial saves the day...again :-)
--- a/includes/clientside/static/ajax.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/ajax.js	Tue Jul 10 00:40:52 2007 -0400
@@ -51,7 +51,11 @@
 
 // Page editor
 
-function ajaxEditor() {
+function ajaxEditor()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
       if(ajax.readyState == 4) {
@@ -106,7 +110,11 @@
   $('switcher').object.innerHTML = 'wikitext editor  |  <a href="#" onclick="setEditorMCE(); return false;">graphical editor</a>';
 }
 
-function ajaxViewSource() {
+function ajaxViewSource()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
       if(ajax.readyState == 4) {
@@ -135,6 +143,9 @@
 
 function ajaxShowPreview()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   goBusy('Loading preview...');
   var text = ajaxEscape($('ajaxEditArea').getContent());
   if(document.mdgAjaxEditor.minor.checked) minor='&minor';
@@ -148,7 +159,11 @@
   });
 }
 
-function ajaxSavePage() {
+function ajaxSavePage()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   goBusy('Saving page...');
   var text = ajaxEscape($('ajaxEditArea').getContent());
   if(document.mdgAjaxEditor.minor.checked) minor='&minor';
@@ -164,13 +179,21 @@
   });
 }
 
-function ajaxDiscard() {
+function ajaxDiscard()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   c = confirm('Do you really want to discard your changes?');
   if(!c) return;
   ajaxReset();
 }
 
-function ajaxReset() {
+function ajaxReset()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   enableUnload();
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=getpage&noheaders', function() {
@@ -187,6 +210,9 @@
 // Miscellaneous AJAX applets
 
 function ajaxProtect(l) {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   if(shift) {
     r = 'NO_REASON';
   } else {
@@ -207,7 +233,11 @@
   });
 }
 
-function ajaxRename() {
+function ajaxRename()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   r = prompt('What title should this page be renamed to?\nNote: This does not and will never change the URL of this page, that must be done from the admin panel.');
   if(!r || r=='') return;
   setAjaxLoading();
@@ -219,7 +249,11 @@
   });
 }
 
-function ajaxMakePage() {
+function ajaxMakePage()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   ajaxPost(ENANO_SPECIAL_CREATEPAGE, ENANO_CREATEPAGE_PARAMS, function() {
     if(ajax.readyState == 4) {
@@ -229,7 +263,11 @@
   });
 }
 
-function ajaxDeletePage() {
+function ajaxDeletePage()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   var reason = prompt('Please enter your reason for deleting this page.');
   if ( !reason || reason == '' )
   {
@@ -250,7 +288,11 @@
   });
 }
 
-function ajaxDelVote() {
+function ajaxDelVote()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   c = confirm('Are you sure that you want to vote that this page be deleted?');
   if(!c) return;
   setAjaxLoading();
@@ -262,7 +304,11 @@
   });
 }
 
-function ajaxResetDelVotes() {
+function ajaxResetDelVotes()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   c = confirm('This will reset the number of votes against this page to zero. Do you really want to do this?');
   if(!c) return;
   setAjaxLoading();
@@ -281,6 +327,9 @@
 }
 
 function ajaxSetWikiMode(val) {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   document.getElementById('wikibtn_0').style.textDecoration = 'none';
   document.getElementById('wikibtn_1').style.textDecoration = 'none';
@@ -301,7 +350,11 @@
 // This was not easy to write, I hope enjoy it, and dang I swear I'm gonna
 // find someone to work on just the Javascript part of Enano...
 
-function ajaxCatEdit() {
+function ajaxCatEdit()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=catedit', function() {
     if(ajax.readyState == 4) {
@@ -314,6 +367,9 @@
 
 function ajaxCatSave()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   if(!catlist)
   {
     alert('Var catlist has no properties');
@@ -340,7 +396,11 @@
 
 // History stuff
 
-function ajaxHistory() {
+function ajaxHistory()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=histlist', function() {
     if(ajax.readyState == 4) {
@@ -355,6 +415,9 @@
 }
 
 function ajaxHistView(oldid, tit) {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   if(!tit) tit=title;
   setAjaxLoading();
   ajaxGet(append_sid(scriptPath+'/ajax.php?title='+tit+'&_mode=getpage&oldid='+oldid), function() {
@@ -367,6 +430,9 @@
 }
 
 function ajaxRollback(id) {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
     if(ajax.readyState == 4) {
@@ -376,7 +442,11 @@
   });
 }
 
-function ajaxClearLogs() {
+function ajaxClearLogs()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   c = confirm('You are about to DESTROY all log entries for this page. As opposed to (example) deleting this page, this action is completely IRREVERSIBLE and should not be used except in dire circumstances. Do you REALLY want to do this?');
   if(!c) return;
   c = confirm('You\'re ABSOLUTELY sure???');
@@ -450,6 +520,9 @@
 
 function ajaxHistDiff()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   var id1=false;
   var id2=false;
   for ( i = 0; i < arrDiff1Buttons.length; i++ )
@@ -476,6 +549,9 @@
 
 function ajaxChangeStyle()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   var inner_html = '';
   inner_html += '<p><label>Theme: ';
   inner_html += '  <select id="chtheme_sel_theme" onchange="ajaxGetStyles(this.value);">';
@@ -489,6 +565,9 @@
 
 function ajaxGetStyles(id)
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   var thediv = document.getElementById('chtheme_sel_style_parent');
   if ( thediv )
   {
@@ -547,6 +626,9 @@
 
 function ajaxChangeStyleComplete()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   var theme = $('chtheme_sel_theme');
   var style = $('chtheme_sel_style');
   if ( !theme.object || !style.object )
@@ -603,6 +685,9 @@
 /*
 function ajaxChangeStyle()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   var win = document.getElementById("cn2");
   win.innerHTML = ' \
     <form action="'+ENANO_SPECIAL_CHANGESTYLE+'" onsubmit="jws.closeWin(\'root2\');" method="post" style="text-align: center"> \
@@ -640,7 +725,11 @@
 }
 */
 
-function ajaxSwapCSS() {
+function ajaxSwapCSS()
+{
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   setAjaxLoading();
   if(_css) {
     document.getElementById('mdgCss').href = main_css;
@@ -655,6 +744,9 @@
 
 function ajaxSetPassword()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   pass = hex_sha1(document.getElementById('mdgPassSetField').value);
   setAjaxLoading();
   ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function()
@@ -670,6 +762,9 @@
 
 function ajaxWikiEditHelp()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   jws.openWin('root3', 640, 480);
   setAjaxLoading();
   ajaxGet(stdAjaxPrefix+'&_mode=wikihelp', function() {
@@ -683,6 +778,9 @@
 
 function ajaxStartLogin()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   ajaxPromptAdminAuth(function(k) {
       window.location.reload();
     }, 2);
@@ -690,6 +788,9 @@
 
 function ajaxAdminPage()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   if ( auth_level < USER_LEVEL_ADMIN )
   {
     ajaxPromptAdminAuth(function(k) {
@@ -709,6 +810,9 @@
 
 function ajaxDisableEmbeddedPHP()
 {
+  // IE <6 pseudo-compatibility
+  if ( KILL_SWITCH )
+    return true;
   if ( !confirm('Are you really sure you want to do this? Some pages might not function if this emergency-only feature is activated.') )
     return false;
   var $killdiv = $dynano('php_killer');
--- a/includes/clientside/static/dropdown.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/dropdown.js	Tue Jul 10 00:40:52 2007 -0400
@@ -40,6 +40,8 @@
 // Initializes each menu.
 function jBoxBatchSetup()
 {
+  if ( KILL_SWITCH )
+    return false;
   var menus = document.getElementsByClassName('div', 'menu_nojs');
   if ( menus.length > 0 )
   {
--- a/includes/clientside/static/editor.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/editor.js	Tue Jul 10 00:40:52 2007 -0400
@@ -16,7 +16,10 @@
       theme_advanced_buttons3_add_before : "tablecontrols,separator",
       theme_advanced_statusbar_location : 'bottom'
     }
-    tinyMCE.init(options);
+    if ( !KILL_SWITCH )
+    {
+      tinyMCE.init(options);
+    }
   }
 }
 addOnloadHook(initTinyMCE);
--- a/includes/clientside/static/enano-lib-basic.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Tue Jul 10 00:40:52 2007 -0400
@@ -25,9 +25,6 @@
 var IE;
 var is_Safari;
 
-// dummy tinyMCE object
-var tinyMCE = new Object();
-
 // Detect whether the user is running the Evil One or not...
 
 function checkIt(string) {
@@ -38,6 +35,35 @@
 if (checkIt('msie')) IE = true;
 else IE = false;
 
+var KILL_SWITCH = false;
+
+if ( IE )
+{
+  var version = window.navigator.appVersion;
+  version = version.substr( ( version.indexOf('MSIE') + 5 ) );
+  var rawversion = '';
+  for ( var i = 0; i < version.length; i++ )
+  {
+    var chr = version.substr(i, 1);
+    if ( !chr.match(/[0-9\.]/) )
+    {
+      break;
+    }
+    rawversion += chr;
+  }
+  rawversion = parseInt(rawversion);
+  if ( rawversion < 6 )
+  {
+    KILL_SWITCH = true;
+  }
+}
+
+// dummy tinyMCE object
+var tinyMCE = new Object();
+
+// Obsolete JSON kill switch
+function disableJSONExts() { };
+
 is_Safari = checkIt('safari') ? true : false;
 
 var cmt_open;
@@ -173,44 +199,6 @@
 
 var stdAjaxPrefix = append_sid(scriptPath+'/ajax.php?title='+title);
 
-// Code for parsing JSON strings - full source code in json.js
-if(!Object.prototype.toJSONString){Array.prototype.toJSONString=function(){var a=['['],b,i,l=this.length,v;function p(s){if(b){a.push(',');}
-a.push(s);b=true;}
-for(i=0;i<l;i+=1){v=this[i];switch(typeof v){case'undefined':case'function':case'unknown':break;case'object':if(v){if(typeof v.toJSONString==='function'){p(v.toJSONString());}}else{p("null");}
-break;default:p(v.toJSONString());}}
-a.push(']');return a.join('');};Boolean.prototype.toJSONString=function(){return String(this);};Date.prototype.toJSONString=function(){function f(n){return n<10?'0'+n:n;}
-return'"'+this.getFullYear()+'-'+
-f(this.getMonth()+1)+'-'+
-f(this.getDate())+'T'+
-f(this.getHours())+':'+
-f(this.getMinutes())+':'+
-f(this.getSeconds())+'"';};Number.prototype.toJSONString=function(){return isFinite(this)?String(this):"null";};Object.prototype.toJSONString=function(){var a=['{'],b,i,v;function p(s){if(b){a.push(',');}
-a.push(i.toJSONString(),':',s);b=true;}
-for(i in this){if(this.hasOwnProperty(i)){v=this[i];switch(typeof v){case'undefined':case'function':case'unknown':break;case'object':if(v){if(typeof v.toJSONString==='function'){p(v.toJSONString());}}else{p("null");}
-break;default:p(v.toJSONString());}}}
-a.push('}');return a.join('');};(function(s){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};s.parseJSON=function(filter){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)){var j=eval('('+this+')');if(typeof filter==='function'){function walk(k,v){if(v&&typeof v==='object'){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i]);}}}
-return filter(k,v);}
-return walk('',j);}
-return j;}}catch(e){}
-throw new SyntaxError("parseJSON");};s.toJSONString=function(){if(/["\\\x00-\x1f]/.test(this)){return'"'+this.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
-c=b.charCodeAt();return'\\u00'+
-Math.floor(c/16).toString(16)+
-(c%16).toString(16);})+'"';}
-return'"'+this+'"';};})(String.prototype);}
-
-function disableJSONExts()
-{
-  delete(Object.prototype.toJSONString);
-  delete(Array.prototype.toJSONString);
-  delete(Boolean.prototype.toJSONString);
-  delete(Date.prototype.toJSONString);
-  delete(Number.prototype.toJSONString);
-  delete(String.prototype.toJSONString);
-}
-
-// JSON extensions are deprecated now - use the toJSONString **function**
-disableJSONExts();
-
 var $_REQUEST = new Object();
 if ( window.location.hash )
 {
@@ -227,10 +215,13 @@
 }
 
 var head = document.getElementsByTagName('head')[0];
-var script = document.createElement('script');
-script.type="text/javascript";
-script.src=scriptPath+"/includes/clientside/tinymce/tiny_mce_src.js";
-head.appendChild(script);
+if ( !KILL_SWITCH )
+{
+  var script = document.createElement('script');
+  script.type="text/javascript";
+  script.src=scriptPath+"/includes/clientside/tinymce/tiny_mce_src.js";
+  head.appendChild(script);
+}
 
 // Start loading files
 var thefiles = [
@@ -259,10 +250,8 @@
 ];
 
 var problem_scripts = {
-  'faders.js' : true,
-  'acl.js' : true,
-  'admin-menu.js' : true,
-  'loader.js' : true
+  'json.js' : true,
+  'template-compiler.js' : true
 };
 
 for(var f in thefiles)
@@ -271,10 +260,12 @@
     continue;
   var script = document.createElement('script');
   script.type="text/javascript";
-  //if ( problem_scripts[thefiles[f]] )
-    script.src=scriptPath+"/includes/clientside/static/"+thefiles[f];
-  //else
-  //  script.src=scriptPath+"/includes/clientside/jsres.php?file="+thefiles[f];
+  if ( problem_scripts[thefiles[f]] && KILL_SWITCH )
+  {
+    // alert('kill switch and problem script');
+    continue;
+  }
+  script.src=scriptPath+"/includes/clientside/static/"+thefiles[f];
   head.appendChild(script);
 }
 
--- a/includes/clientside/static/faders.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/faders.js	Tue Jul 10 00:40:52 2007 -0400
@@ -380,6 +380,32 @@
     }
 }
 
+var opacityDOMCache = new Object();
+function domOpacity(obj, opacStart, opacEnd, millisec) {
+    //speed for each frame
+    var speed = Math.round(millisec / 100);
+    var timer = 0;
+    
+    // unique ID for this animation
+    var uniqid = Math.floor(Math.random() * 1000000);
+    opacityDOMCache[uniqid] = obj;
+
+    //determine the direction for the blending, if start and end are the same nothing happens
+    if(opacStart > opacEnd) {
+        for(i = opacStart; i >= opacEnd; i--) {
+            setTimeout("var obj = opacityDOMCache["+uniqid+"]; domObjChangeOpac(" + i + ",obj)",(timer * speed));
+            timer++;
+        }
+    } else if(opacStart < opacEnd) {
+        for(i = opacStart; i <= opacEnd; i++)
+            {
+            setTimeout("var obj = opacityDOMCache["+uniqid+"]; domObjChangeOpac(" + i + ",obj)",(timer * speed));
+            timer++;
+        }
+    }
+    setTimeout("delete(opacityDOMCache["+uniqid+"]);",(timer * speed));
+}
+
 //change the opacity for different browsers
 function changeOpac(opacity, id) {
     var object = document.getElementById(id).style;
--- a/includes/clientside/static/loader.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/loader.js	Tue Jul 10 00:40:52 2007 -0400
@@ -42,5 +42,9 @@
   ld(e);
   mdgInnerLoader(e);
 }
-window.onload = enano_init;
 
+if ( typeof(KILL_SWITCH) == 'boolean' && !KILL_SWITCH )
+{
+  window.onload = enano_init;
+}
+
--- a/includes/clientside/static/sliders.js	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/clientside/static/sliders.js	Tue Jul 10 00:40:52 2007 -0400
@@ -8,6 +8,8 @@
 function initSliders()
 {
   sliders_initted = true;
+  if ( KILL_SWITCH )
+    return false;
     // detect whether the user has ie or not, how we get the height is different 
     var useragent = navigator.userAgent.toLowerCase();
     var ie = ((useragent.indexOf('msie') != -1) && (useragent.indexOf('opera') == -1) && (useragent.indexOf('webtv') == -1));
@@ -63,6 +65,8 @@
 {
   if(IE)
     return false;
+  if ( KILL_SWITCH )
+    return false;
   if ( !sliders_initted )
     initSliders();
     // reset our inertia base and interval
--- a/includes/pageutils.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/pageutils.php	Tue Jul 10 00:40:52 2007 -0400
@@ -576,7 +576,7 @@
             <input type="hidden" name="do" value="diff" />
             <input type="submit" value="Compare selected revisions" />
             </form>
-            <script type="text/javascript">buildDiffList();</script>';
+            <script type="text/javascript">if ( !KILL_SWITCH ) { buildDiffList(); }</script>';
     }
     $db->free_result();
     echo '<h3>Other changes:</h3>';
--- a/includes/paths.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/paths.php	Tue Jul 10 00:40:52 2007 -0400
@@ -513,7 +513,9 @@
   }
   function getParam($id = 0)
   {
-    if(isset($_SERVER['PATH_INFO']))
+    // using !empty here is a bugfix for IIS 5.x on Windows 2000 Server
+    // It may affect other IIS versions as well
+    if(isset($_SERVER['PATH_INFO']) && !empty($_SERVER['PATH_INFO']))
     {
       $pi = explode('/', $_SERVER['PATH_INFO']);
       $id = $id + 2;
@@ -532,7 +534,6 @@
       {
         if(substr($c, 0, 1) == '/')
         {
-          
           // Bugfix for apache somehow passing dots as underscores
           global $mime_types;
           $exts = array_keys($mime_types);
@@ -551,7 +552,9 @@
   
   function getAllParams()
   {
-    if(isset($_SERVER['PATH_INFO']))
+    // using !empty here is a bugfix for IIS 5.x on Windows 2000 Server
+    // It may affect other IIS versions as well
+    if(isset($_SERVER['PATH_INFO']) && !empty($_SERVER['PATH_INFO']))
     {
       $pi = explode('/', $_SERVER['PATH_INFO']);
       unset($pi[0], $pi[1]);
--- a/includes/rijndael.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/rijndael.php	Tue Jul 10 00:40:52 2007 -0400
@@ -744,6 +744,8 @@
    
   function encrypt($text, $key, $return_encoding = ENC_HEX)
   {
+    if ( $text == '' )
+      return '';
     if ( $this->mcrypt && $this->blockSizeInBits == mcrypt_module_get_algo_block_size(eval('return MCRYPT_RIJNDAEL_'.$this->keySizeInBits.';')) )
     {
       $iv_size = mcrypt_get_iv_size($this->mcrypt, MCRYPT_MODE_ECB);
@@ -800,6 +802,8 @@
    
   function decrypt($text, $key, $input_encoding = ENC_HEX)
   {
+    if ( $text == '' )
+      return '';
     switch($input_encoding)
     {
       case ENC_BINARY:
@@ -997,7 +1001,8 @@
   }
    
   function encrypt($str, $key) {
-      if ($str == "") {
+      if ($str == "")
+      {
           return "";
       }
       $v = $this->str2long($str, true);
--- a/includes/sessions.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/sessions.php	Tue Jul 10 00:40:52 2007 -0400
@@ -2385,6 +2385,7 @@
           {
             if(testpassed)
             {
+              var frm = document.forms.'.$form_name.';
               pass = frm.'.$pw_field.'.value;
               chal = frm.'.$challenge.'.value;
               challenge = hex_md5(pass + chal) + chal;
--- a/includes/template.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/includes/template.php	Tue Jul 10 00:40:52 2007 -0400
@@ -23,6 +23,13 @@
   
   var $site_disabled = false;
   
+  /**
+   * One of the absolute best parts of Enano :-P
+   * @var string
+   */
+  
+  var $fading_button = '';
+  
   function __construct()
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
@@ -35,6 +42,13 @@
     $this->plugin_blocks = Array();
     $this->theme_loaded = false;
     
+    $fading_button = '<a href="http://enanocms.org" onclick="if ( !KILL_SWITCH ) { window.open(this.href); return false; }" style="text-align: center; margin: 0 auto; display: table; background-image: none;">
+                            <img alt="Powered by Enano CMS" style="border-width: 0; position: absolute;" 
+                                 src="' . scriptPath . '/images/about-powered-enano.png" id="enanoFader" onmouseover="domOpacity(this, 100, 0, 500);" 
+                                 onmouseout="opacity(this.id, 0, 100, 500);" />
+                            <img alt="Powered by Enano CMS" style="border-width: 0px;" src="' . scriptPath . '/images/about-powered-enano-hover.png" />
+                          </a>';
+    
     $this->theme_list = Array();
     $this->named_theme_list = Array();
     $e = $db->sql_query('SELECT theme_id,theme_name,enabled,default_style FROM '.table_prefix.'themes WHERE enabled=1 ORDER BY theme_order;');
@@ -233,7 +247,7 @@
     $parser = $this->makeParserText($btn_selected);
     
     $parser->assign_vars(array(
-        'FLAGS' => 'onclick="void(ajaxReset()); return false;" title="View the page contents, all of the page contents, and nothing but the page contents (alt-a)" accesskey="a"',
+        'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxReset()); return false; }" title="View the page contents, all of the page contents, and nothing but the page contents (alt-a)" accesskey="a"',
         'PARENTFLAGS' => 'id="mdgToolbar_article"',
         'HREF' => makeUrl($paths->page, null, true),
         'TEXT' => $this->namespace_string
@@ -277,7 +291,7 @@
       }
       
       $button->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxComments()); return false;" title="View the comments that other users have posted about this page (alt-c)" accesskey="c"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxComments()); return false; }" title="View the comments that other users have posted about this page (alt-c)" accesskey="c"',
           'PARENTFLAGS' => 'id="mdgToolbar_discussion"',
           'HREF' => makeUrl($paths->page, 'do=comments', true),
           'TEXT' => 'discussion ('.$n.')',
@@ -289,7 +303,7 @@
     if($session->get_permissions('read') && ($paths->namespace != 'Special' && $paths->namespace != 'Admin') && ( $session->get_permissions('edit_page') && ( ( $paths->page_protected && $session->get_permissions('even_when_protected') ) || !$paths->page_protected ) ) )
     {
       $button->assign_vars(array(
-        'FLAGS' => 'onclick="void(ajaxEditor()); return false;" title="Edit the contents of this page (alt-e)" accesskey="e"',
+        'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxEditor()); return false; }" title="Edit the contents of this page (alt-e)" accesskey="e"',
         'PARENTFLAGS' => 'id="mdgToolbar_edit"',
         'HREF' => makeUrl($paths->page, 'do=edit', true),
         'TEXT' => 'edit this page'
@@ -300,7 +314,7 @@
     else if($session->get_permissions('view_source') && ( !$session->get_permissions('edit_page') || !$session->get_permissions('even_when_protected') && $paths->page_protected ) && $paths->namespace != 'Special' && $paths->namespace != 'Admin') 
     {
       $button->assign_vars(array(
-        'FLAGS' => 'onclick="void(ajaxViewSource()); return false;" title="View the source code (wiki markup) that this page uses (alt-e)" accesskey="e"',
+        'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxViewSource()); return false; }" title="View the source code (wiki markup) that this page uses (alt-e)" accesskey="e"',
         'PARENTFLAGS' => 'id="mdgToolbar_edit"',
         'HREF' => makeUrl($paths->page, 'do=viewsource', true),
         'TEXT' => 'view source'
@@ -311,7 +325,7 @@
     if ( $session->get_permissions('read') /* && $paths->wiki_mode */ && $paths->page_exists && $paths->namespace != 'Special' && $paths->namespace != 'Admin' && $session->get_permissions('history_view') )
     {
       $button->assign_vars(array(
-        'FLAGS'       => 'onclick="void(ajaxHistory()); return false;" title="View a log of actions taken on this page (alt-h)" accesskey="h"',
+        'FLAGS'       => 'onclick="if ( !KILL_SWITCH ) { void(ajaxHistory()); return false; }" title="View a log of actions taken on this page (alt-h)" accesskey="h"',
         'PARENTFLAGS' => 'id="mdgToolbar_history"',
         'HREF'        => makeUrl($paths->page, 'do=history', true),
         'TEXT'        => 'history'
@@ -326,7 +340,7 @@
     if ( $session->get_permissions('read') && $paths->page_exists && ( $session->get_permissions('rename') && ( $paths->page_protected && $session->get_permissions('even_when_protected') || !$paths->page_protected ) ) && $paths->namespace != 'Special' && $paths->namespace != 'Admin' )
     {
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxRename()); return false;" title="Change the display name of this page (alt-r)" accesskey="r"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxRename()); return false; }" title="Change the display name of this page (alt-r)" accesskey="r"',
           'HREF'  => makeUrl($paths->page, 'do=rename', true),
           'TEXT'  => 'rename',
         ));
@@ -337,7 +351,7 @@
     if ( $paths->wiki_mode && $session->get_permissions('vote_delete') && $paths->page_exists && $paths->namespace != 'Special' && $paths->namespace != 'Admin')
     {
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxDelVote()); return false;" title="Vote to have this page deleted (alt-d)" accesskey="d"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxDelVote()); return false; }" title="Vote to have this page deleted (alt-d)" accesskey="d"',
           'HREF'  => makeUrl($paths->page, 'do=delvote', true),
           'TEXT'  => 'vote to delete this page',
         ));
@@ -348,7 +362,7 @@
     if ( $session->get_permissions('read') && $paths->wiki_mode && $paths->page_exists && $paths->namespace != 'Special' && $paths->namespace != 'Admin' && $session->get_permissions('vote_reset') && $paths->cpage['delvotes'] > 0)
     {
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxResetDelVotes()); return false;" title="Vote to have this page deleted (alt-y)" accesskey="y"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxResetDelVotes()); return false; }" title="Vote to have this page deleted (alt-y)" accesskey="y"',
           'HREF'  => makeUrl($paths->page, 'do=resetvotes', true),
           'TEXT'  => 'reset deletion votes',
         ));
@@ -380,7 +394,7 @@
         $ctmp=' style="text-decoration: underline;"';
       }
       $menubtn->assign_vars(array(
-          'FLAGS' => 'accesskey="i" onclick="ajaxProtect(1); return false;" id="protbtn_1" title="Prevents all non-administrators from editing this page. [alt-i]"'.$ctmp,
+          'FLAGS' => 'accesskey="i" onclick="if ( !KILL_SWITCH ) { ajaxProtect(1); return false; }" id="protbtn_1" title="Prevents all non-administrators from editing this page. [alt-i]"'.$ctmp,
           'HREF'  => makeUrl($paths->page, 'do=protect&level=1', true),
           'TEXT'  => 'on'
         ));
@@ -392,7 +406,7 @@
         $ctmp=' style="text-decoration: underline;"';
       }
       $menubtn->assign_vars(array(
-          'FLAGS' => 'accesskey="o" onclick="ajaxProtect(0); return false;" id="protbtn_0" title="Allows everyone to edit this page. [alt-o]"'.$ctmp,
+          'FLAGS' => 'accesskey="o" onclick="if ( !KILL_SWITCH ) { ajaxProtect(0); return false; }" id="protbtn_0" title="Allows everyone to edit this page. [alt-o]"'.$ctmp,
           'HREF'  => makeUrl($paths->page, 'do=protect&level=0', true),
           'TEXT'  => 'off'
         ));
@@ -404,7 +418,7 @@
         $ctmp = ' style="text-decoration: underline;"';
       }
       $menubtn->assign_vars(array(
-          'FLAGS' => 'accesskey="p" onclick="ajaxProtect(2); return false;" id="protbtn_2" title="Allows only users who have been registered for 4 days to edit this page. [alt-p]"'.$ctmp,
+          'FLAGS' => 'accesskey="p" onclick="if ( !KILL_SWITCH ) { ajaxProtect(2); return false; }" id="protbtn_2" title="Allows only users who have been registered for 4 days to edit this page. [alt-p]"'.$ctmp,
           'HREF'  => makeUrl($paths->page, 'do=protect&level=2', true),
           'TEXT'  => 'semi'
         ));
@@ -435,7 +449,7 @@
         $ctmp = ' style="text-decoration: underline;"';
       }
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="ajaxSetWikiMode(1); return false;" id="wikibtn_1" title="Forces wiki functions to be allowed on this page."'.$ctmp,
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { ajaxSetWikiMode(1); return false; }" id="wikibtn_1" title="Forces wiki functions to be allowed on this page."'.$ctmp,
           'HREF' => makeUrl($paths->page, 'do=setwikimode&level=1', true),
           'TEXT' => 'on'
         ));
@@ -448,7 +462,7 @@
         $ctmp=' style="text-decoration: underline;"';
       }
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="ajaxSetWikiMode(0); return false;" id="wikibtn_0" title="Forces wiki functions to be disabled on this page."'.$ctmp,
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { ajaxSetWikiMode(0); return false; }" id="wikibtn_0" title="Forces wiki functions to be disabled on this page."'.$ctmp,
           'HREF' => makeUrl($paths->page, 'do=setwikimode&level=0', true),
           'TEXT' => 'off'
         ));
@@ -461,7 +475,7 @@
         $ctmp=' style="text-decoration: underline;"';
       }
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="ajaxSetWikiMode(2); return false;" id="wikibtn_2" title="Causes this page to use the global wiki mode setting (default)"'.$ctmp,
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { ajaxSetWikiMode(2); return false; }" id="wikibtn_2" title="Causes this page to use the global wiki mode setting (default)"'.$ctmp,
           'HREF' => makeUrl($paths->page, 'do=setwikimode&level=2', true),
           'TEXT' => 'global'
         ));
@@ -482,7 +496,7 @@
     if ( $session->get_permissions('read') && $session->get_permissions('clear_logs') && $paths->namespace != 'Special' && $paths->namespace != 'Admin' )
     {
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxClearLogs()); return false;" title="Remove all edit and action logs for this page from the database. IRREVERSIBLE! (alt-l)" accesskey="l"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxClearLogs()); return false; }" title="Remove all edit and action logs for this page from the database. IRREVERSIBLE! (alt-l)" accesskey="l"',
           'HREF'  => makeUrl($paths->page, 'do=flushlogs', true),
           'TEXT'  => 'clear page logs',
         ));
@@ -503,7 +517,7 @@
       }
       
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxDeletePage()); return false;" title="Delete this page. This is always reversible unless the logs are cleared. (alt-k)" accesskey="k"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxDeletePage()); return false; }" title="Delete this page. This is always reversible unless the logs are cleared. (alt-k)" accesskey="k"',
           'HREF'  => makeUrl($paths->page, 'do=deletepage', true),
           'TEXT'  => $s,
         ));
@@ -535,7 +549,7 @@
       $t0 = $label->run();
       
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxSetPassword()); return false;" title="Require a password in order for this page to be viewed"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxSetPassword()); return false; }" title="Require a password in order for this page to be viewed"',
           'HREF'  => '#',
           'TEXT'  => 'set',
         ));
@@ -548,7 +562,7 @@
     if($session->get_permissions('edit_acl') || $session->user_level >= USER_LEVEL_ADMIN)
     {
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="return ajaxOpenACLManager();" title="Manage who can do what with this page (alt-m)" accesskey="m"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { return ajaxOpenACLManager(); }" title="Manage who can do what with this page (alt-m)" accesskey="m"',
           'HREF'  => makeUrl($paths->page, 'do=aclmanager', true),
           'TEXT'  => 'manage page access',
         ));
@@ -559,7 +573,7 @@
     if ( $session->user_level >= USER_LEVEL_ADMIN && $paths->page_exists && $paths->namespace != 'Special' && $paths->namespace != 'Admin' )
     {
       $menubtn->assign_vars(array(
-          'FLAGS' => 'onclick="void(ajaxAdminPage()); return false;" title="Administrative options for this page" accesskey="g"',
+          'FLAGS' => 'onclick="if ( !KILL_SWITCH ) { void(ajaxAdminPage()); return false; }" title="Administrative options for this page" accesskey="g"',
           'HREF'  => makeUrlNS('Special', 'Administration', 'module='.$paths->nslist['Admin'].'PageManager', true),
           'TEXT'  => 'administrative options',
         ));
@@ -569,7 +583,7 @@
     if ( strlen($this->toolbar_menu) > 0 )
     {
       $button->assign_vars(array(
-        'FLAGS'       => 'id="mdgToolbar_moreoptions" onclick="return false;" title="Additional options for working with this page"',
+        'FLAGS'       => 'id="mdgToolbar_moreoptions" onclick="if ( !KILL_SWITCH ) { return false; }" title="Additional options for working with this page"',
         'PARENTFLAGS' => '',
         'HREF'        => makeUrl($paths->page, 'do=moreoptions', true),
         'TEXT'        => 'more options'
@@ -629,7 +643,7 @@
     
     $parser->assign_vars(Array(
         'HREF'=>makeUrlNS('Special', 'Logout'),
-        'FLAGS'=>'onclick="mb_logout(); return false;"',
+        'FLAGS'=>'onclick="if ( !KILL_SWITCH ) { mb_logout(); return false; }"',
         'TEXT'=>'Log out',
       ));
     
@@ -637,7 +651,7 @@
     
     $parser->assign_vars(Array(
         'HREF'=>makeUrlNS('Special', 'Login/' . $paths->page),
-        'FLAGS'=>'onclick="ajaxStartLogin(); return false;"',
+        'FLAGS'=>'onclick="if ( !KILL_SWITCH ) { ajaxStartLogin(); return false; }"',
         'TEXT'=>'Log in',
       ));
     
@@ -645,7 +659,7 @@
     
     $parser->assign_vars(Array(
         'HREF'=>makeUrlNS('Special', 'ChangeStyle/'.$paths->page),
-        'FLAGS'=>'onclick="ajaxChangeStyle(); return false;"',
+        'FLAGS'=>'onclick="if ( !KILL_SWITCH ) { ajaxChangeStyle(); return false; }"',
         'TEXT'=>'Change theme',
       ));
     
@@ -1221,7 +1235,7 @@
     $randomid = md5(microtime() . mt_rand());
     $html = '';
     $html .= '<textarea name="' . $name . '" rows="'.$rows.'" cols="'.$cols.'" style="width: 100%;" id="toggleMCEroot_'.$randomid.'">' . $content . '</textarea>';
-    $html .= '<div style="float: right; display: table;" id="mceSwitchAgent_' . $randomid . '">text editor&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="toggleMCE_'.$randomid.'(); return false;">graphical editor</a></div>';
+    $html .= '<div style="float: right; display: table;" id="mceSwitchAgent_' . $randomid . '">text editor&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="if ( !KILL_SWITCH ) { toggleMCE_'.$randomid.'(); return false; }">graphical editor</a></div>';
     $html .= '<script type="text/javascript">
                 // <![CDATA[
                 function toggleMCE_'.$randomid.'()
@@ -1231,12 +1245,12 @@
                   if ( the_obj.dnIsMCE == "yes" )
                   {
                     $dynano(the_obj).destroyMCE();
-                    panel.innerHTML = \'text editor&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="toggleMCE_'.$randomid.'(); return false;">graphical editor</a>\';
+                    panel.innerHTML = \'text editor&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="if ( !KILL_SWITCH ) { toggleMCE_'.$randomid.'(); return false; }">graphical editor</a>\';
                   }
                   else
                   {
                     $dynano(the_obj).switchToMCE();
-                    panel.innerHTML = \'<a href="#" onclick="toggleMCE_'.$randomid.'(); return false;">text editor</a>&nbsp;&nbsp;|&nbsp;&nbsp;graphical editor\';
+                    panel.innerHTML = \'<a href="#" onclick="if ( !KILL_SWITCH ) { toggleMCE_'.$randomid.'(); return false; }">text editor</a>&nbsp;&nbsp;|&nbsp;&nbsp;graphical editor\';
                   }
                 }
                 // ]]>
@@ -1369,18 +1383,17 @@
     // SourceForge/W3C buttons
     $ob = Array();
     $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN ) ? 'title="You may disable this button in the admin panel under General Configuration."' : '';
-    if(getConfig('powered_btn') =='1') $ob[] = '<a style="text-align: center;" href="http://enanocms.org/" onclick="window.open(this.href);return false;"><img '.$admintitle.'  alt="Powered by Enano" src="'.scriptPath.'/images/about-powered-enano.png" onmouseover="this.src=\''.scriptPath.'/images/about-powered-enano-hover.png\';" onmouseout="this.src=\''.scriptPath.'/images/about-powered-enano.png\';" style="border-width: 0px;" width="88" height="31" /></a>';
     if(getConfig('sflogo_enabled')=='1')
     {
-      $ob[] = '<a style="text-align: center;" href="http://sourceforge.net/" onclick="window.open(this.href);return false;"><img style="border-width: 0px;" alt="SourceForge.net Logo" src="http://sflogo.sourceforge.net/sflogo.php?group_id='.getConfig('sflogo_groupid').'&amp;type='.getConfig('sflogo_type').'" /></a>';
+      $ob[] = '<a style="text-align: center;" href="http://sourceforge.net/" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border-width: 0px;" alt="SourceForge.net Logo" src="http://sflogo.sourceforge.net/sflogo.php?group_id='.getConfig('sflogo_groupid').'&amp;type='.getConfig('sflogo_type').'" /></a>';
     }
-    if(getConfig('w3c_v32')     =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="Valid HTML 3.2"  src="http://www.w3.org/Icons/valid-html32" /></a>';
-    if(getConfig('w3c_v40')     =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="Valid HTML 4.0"  src="http://www.w3.org/Icons/valid-html40" /></a>';
-    if(getConfig('w3c_v401')    =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="Valid HTML 4.01" src="http://www.w3.org/Icons/valid-html401" /></a>';
-    if(getConfig('w3c_vxhtml10')=='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="Valid XHTML 1.0" src="http://www.w3.org/Icons/valid-xhtml10" /></a>';
-    if(getConfig('w3c_vxhtml11')=='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="Valid XHTML 1.1" src="http://www.w3.org/Icons/valid-xhtml11" /></a>';
-    if(getConfig('w3c_vcss')    =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="Valid CSS"       src="http://www.w3.org/Icons/valid-css" /></a>';
-    if(getConfig('dbd_button')  =='1') $ob[] = '<a style="text-align: center;" href="http://www.defectivebydesign.org/join/button" onclick="window.open(this.href);return false;"><img style="border: 0px solid #FFFFFF;" alt="DRM technology restricts what you can do with your computer" src="http://defectivebydesign.org/sites/nodrm.civicactions.net/files/images/dbd_sm_btn.gif" /><br /><small>Protect your freedom >></small></a>';
+    if(getConfig('w3c_v32')     =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="Valid HTML 3.2"  src="http://www.w3.org/Icons/valid-html32" /></a>';
+    if(getConfig('w3c_v40')     =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="Valid HTML 4.0"  src="http://www.w3.org/Icons/valid-html40" /></a>';
+    if(getConfig('w3c_v401')    =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="Valid HTML 4.01" src="http://www.w3.org/Icons/valid-html401" /></a>';
+    if(getConfig('w3c_vxhtml10')=='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="Valid XHTML 1.0" src="http://www.w3.org/Icons/valid-xhtml10" /></a>';
+    if(getConfig('w3c_vxhtml11')=='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="Valid XHTML 1.1" src="http://www.w3.org/Icons/valid-xhtml11" /></a>';
+    if(getConfig('w3c_vcss')    =='1') $ob[] = '<a style="text-align: center;" href="http://validator.w3.org/check?uri=referer" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="Valid CSS"       src="http://www.w3.org/Icons/valid-css" /></a>';
+    if(getConfig('dbd_button')  =='1') $ob[] = '<a style="text-align: center;" href="http://www.defectivebydesign.org/join/button" onclick="if ( !KILL_SWITCH ) { window.open(this.href);return false; }"><img style="border: 0px solid #FFFFFF;" alt="DRM technology restricts what you can do with your computer" src="http://defectivebydesign.org/sites/nodrm.civicactions.net/files/images/dbd_sm_btn.gif" /><br /><small>Protect your freedom >></small></a>';
     
     $code = $plugins->setHook('links_widget');
     foreach ( $code as $cmd )
@@ -1388,7 +1401,7 @@
       eval($cmd);
     }
     
-    if(count($ob) > 0) $sb_links = '<div style="text-align: center; padding: 5px 0;">'.implode('<br />', $ob).'</div>';
+    if(count($ob) > 0) $sb_links = '<div style="text-align: center; padding: 5px 0;">'. ( ( getConfig('powered_btn') == '1' ) ? $this->fading_button : '' ) . implode('<br />', $ob).'</div>';
     else $sb_links = '';
     
     $this->sidebar_widget('Links', $sb_links);
@@ -1535,7 +1548,7 @@
     // Get the "article" button text (depends on namespace)
     if(defined('IN_ENANO_INSTALL')) $ns = 'installation page';
     else $ns = 'system error page';
-    $t = str_replace('{FLAGS}', 'onclick="return false;" title="Hey! A button that doesn\'t do anything. Clever..." accesskey="a"', $tplvars['toolbar_button']);
+    $t = str_replace('{FLAGS}', 'onclick="if ( !KILL_SWITCH ) { return false; }" title="Hey! A button that doesn\'t do anything. Clever..." accesskey="a"', $tplvars['toolbar_button']);
     $t = str_replace('{HREF}', '#', $t);
     $t = str_replace('{TEXT}', $ns, $t);
     $tb .= $t;
@@ -1708,7 +1721,7 @@
     $text = preg_replace('#<!-- BEGIN (.*?) -->#is', '\'; if($this->tpl_bool[\'\\1\']) { $tpl_code .= \'', $text);
     $text = preg_replace('#<!-- IFPLUGIN (.*?) -->#is', '\'; if(getConfig(\'plugin_\\1\')==\'1\') { $tpl_code .= \'', $text);
     if(defined('IN_ENANO_INSTALL')) $text = str_replace('<!-- SYSMSG Sidebar -->', '<div class="slider"><div class="heading"><a class="head">Installation progress</a></div><div class="slideblock">'.$sideinfo.'</div></div>', $text);
-    else $text = str_replace('<!-- SYSMSG Sidebar -->', '<div class="slider"><div class="heading"><a class="head">System error</a></div><div class="slideblock"><a href="#" onclick="return false;">Enano critical error page</a></div></div>', $text);
+    else $text = str_replace('<!-- SYSMSG Sidebar -->', '<div class="slider"><div class="heading"><a class="head">System error</a></div><div class="slideblock"><a href="#" onclick="return false;>Enano critical error page</a></div></div>', $text);
     $text = preg_replace('#<!-- SYSMSG (.*?) -->#is', '', $text);
     $text = preg_replace('#<!-- BEGINNOT (.*?) -->#is', '\'; if(!$this->tpl_bool[\'\\1\']) { $tpl_code .= \'', $text);
     $text = preg_replace('#<!-- BEGINELSE (.*?) -->#is', '\'; } else { $tpl_code .= \'', $text);
--- a/plugins/SpecialAdmin.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/plugins/SpecialAdmin.php	Tue Jul 10 00:40:52 2007 -0400
@@ -2350,6 +2350,11 @@
     <script type="text/javascript">
     function ajaxPage(t)
     {
+      if ( KILL_SWITCH )
+      {
+        document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>';
+        return false;
+      }
       if ( t == namespace_list.Admin + 'AdminLogout' )
       {
         var mb = new messagebox(MB_YESNO|MB_ICONQUESTION, 'Are you sure you want to de-authenticate?', 'If you de-authenticate, you will no longer be able to use the administration panel until you re-authenticate again. You may do so at any time using the Administration button on the sidebar.');
@@ -2379,6 +2384,11 @@
     }
     function ajaxPageBin(t)
     {
+      if ( KILL_SWITCH )
+      {
+        document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>';
+        return false;
+      }
       document.getElementById('ajaxPageContainer').innerHTML = '<div class="wait-box">Loading page...</div>';
       ajaxGet('<?php echo scriptPath; ?>/ajax.php?title='+t+'&_mode=getpage&noheaders&auth=<?php echo $session->sid_super; ?>', function() {
           if(ajax.readyState == 4) {
@@ -2424,7 +2434,10 @@
         <td class="holder" valign="top">
           <div class="pad" style="padding-right: 20px;">
             <script type="text/javascript">
-            new tree(TREE_ITEMS, TREE_TPL);
+            if ( !KILL_SWITCH )
+            {
+              new tree(TREE_ITEMS, TREE_TPL);
+            }
             </script>
           </div>
         </td>
@@ -2459,6 +2472,12 @@
           }
           ?>
           </div>
+          <script type="text/javascript">
+            if ( KILL_SWITCH )
+            {
+              document.getElementById('ajaxPageContainer').innerHTML = '<div class="error-box">Because of the lack of AJAX support, support for Internet Explorer versions less than 6.0 has been disabled in Runt. You can download and use Mozilla Firefox (or Seamonkey under Windows 95); both have an up-to-date standards-compliant rendering engine that has been tested thoroughly with Enano.</div>';
+            }
+        </script>
         </td>
       </tr>
     </table>
--- a/plugins/SpecialPageFuncs.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/plugins/SpecialPageFuncs.php	Tue Jul 10 00:40:52 2007 -0400
@@ -314,16 +314,16 @@
       </td></tr>
       <tr>
         <td class="row2" colspan="2">
-        <table border="0" style="margin: 0 auto; background: none; width: 100%;" cellpadding="5">
+          <table border="0" style="margin: 0 auto; background: none; width: 100%;" cellpadding="5">
             <tr>
-            <td style="text-align: center;">
+              <td style="text-align: center;">
                 <a href="http://enanocms.org/" onclick="window.open(this.href); return false;" style="background: none; padding: 0;">
-                  <img alt="Powered by Enano"
-                       src="<?php echo scriptPath; ?>/images/about-powered-enano.png"
-                       onmouseover="this.src='<?php echo scriptPath; ?>/images/about-powered-enano-hover.png';"
-                       onmouseout="this.src='<?php echo scriptPath; ?>/images/about-powered-enano.png';"
-                       style="border-width: 0px;" width="88" height="31" />
-                </a>
+                    <img alt="Powered by Enano"
+                         src="<?php echo scriptPath; ?>/images/about-powered-enano.png"
+                         onmouseover="this.src='<?php echo scriptPath; ?>/images/about-powered-enano-hover.png';"
+                         onmouseout="this.src='<?php echo scriptPath; ?>/images/about-powered-enano.png';"
+                         style="border-width: 0px;" width="88" height="31" />
+                  </a>
               </td>
               <td style="text-align: center;">
                 <a href="http://www.php.net/" onclick="window.open(this.href); return false;" style="background: none; padding: 0;">
--- a/plugins/SpecialUserFuncs.php	Fri Jul 06 11:45:50 2007 -0400
+++ b/plugins/SpecialUserFuncs.php	Tue Jul 10 00:40:52 2007 -0400
@@ -853,7 +853,9 @@
       </div>
     </form>
     <script type="text/javascript">
-    disableJSONExts();
+    if ( !KILL_SWITCH )
+    {
+      disableJSONExts();
       str = '';
       for(i=0;i<keySizeInBits/4;i++) str+='0';
       var key = hexToByteArray(str);
@@ -889,6 +891,7 @@
       }
       function runEncryption()
       {
+        var frm = document.forms.resetform;
         pass1 = frm.pass.value;
         pass2 = frm.pass_confirm.value;
         if ( pass1 != pass2 )
@@ -917,6 +920,7 @@
         }
         return true;
       }
+    }
     </script>
     <?php
     $template->footer();
--- a/themes/admin/header.tpl	Fri Jul 06 11:45:50 2007 -0400
+++ b/themes/admin/header.tpl	Tue Jul 10 00:40:52 2007 -0400
@@ -14,7 +14,7 @@
     <div id="header">
       <div class="sitename">{SITE_NAME}</div>
       <div class="menulink"><a href="#" onclick="adminOpenMenu('sidebar', this); return false;">expand menu</a></div>
-      [&nbsp;<a href="{SCRIPTPATH}/{ADMIN_SID_AUTO}">Main page &#0187;</a>&nbsp;]
+      [&nbsp;<a href="{SCRIPTPATH}/{ADMIN_SID_QUES}">Main page &#0187;</a>&nbsp;]
     </div>
     <div class="menu_nojs" id="pagebar_main">
       <div class="label">Page tools</div>
--- a/themes/oxygen/header.tpl	Fri Jul 06 11:45:50 2007 -0400
+++ b/themes/oxygen/header.tpl	Tue Jul 10 00:40:52 2007 -0400
@@ -22,12 +22,18 @@
           elem.style.display = 'block';
           counter.style.display = 'none';
           elem.parentNode.style.width = '156px';
-          createCookie(side+'_sidebar', 'open', 365);
+          if ( !KILL_SWITCH )
+          {
+            createCookie(side+'_sidebar', 'open', 365);
+          }
         } else {
           elem.style.display = 'none';
           counter.style.display = 'block';
           elem.parentNode.style.width = '25px';
-          createCookie(side+'_sidebar', 'collapsed', 365);
+          if ( !KILL_SWITCH )
+          {
+            createCookie(side+'_sidebar', 'collapsed', 365);
+          }
         }
       }
       
@@ -43,16 +49,25 @@
       }
       */
       
-      addOnloadHook(function() {
-          if(typeof readCookie == 'function')
-          {
-            if(readCookie('left_sidebar') =='collapsed') collapseSidebar('left');
-            if(readCookie('right_sidebar')=='collapsed') collapseSidebar('right');
-          }
-        });
+      if ( typeof(KILL_SWITCH) != 'undefined' )
+      {
+        if ( !KILL_SWITCH )
+        {
+          var oxygenSidebarSetup = function() {
+              if(typeof readCookie == 'function')
+              {
+                if(readCookie('left_sidebar') =='collapsed') collapseSidebar('left');
+                if(readCookie('right_sidebar')=='collapsed') collapseSidebar('right');
+              }
+            };
+          addOnloadHook(oxygenSidebarSetup);
+        }
+      }
       
       function ajaxRenameInline()
       {
+        if ( KILL_SWITCH )
+          return false;
         // This trick is _so_ vBulletin...
         elem = document.getElementById('h2PageName');
         if(!elem) return;
--- a/themes/stpatty/css/shamrock.css	Fri Jul 06 11:45:50 2007 -0400
+++ b/themes/stpatty/css/shamrock.css	Tue Jul 10 00:40:52 2007 -0400
@@ -427,7 +427,7 @@
   background-color: #73b038;
 }
 
-input:active {
+input:active, input:focus {
   background-color: #83c048;
 }
 
--- a/themes/stpatty/header.tpl	Fri Jul 06 11:45:50 2007 -0400
+++ b/themes/stpatty/header.tpl	Tue Jul 10 00:40:52 2007 -0400
@@ -8,7 +8,7 @@
     <link id="mdgCss" rel="stylesheet" type="text/css" href="{SCRIPTPATH}/themes/{THEME_ID}/css/{STYLE_ID}.css" />
     <!-- This script automatically loads the other 15 JS files -->
     <script type="text/javascript" src="{SCRIPTPATH}/includes/clientside/static/enano-lib-basic.js"></script>
-    <!--[if IE]>
+    <!--[if lt IE 7]>
     <link rel="stylesheet" type="text/css" href="{SCRIPTPATH}/themes/{THEME_ID}/css-extra/ie-fixes.css" />
     <![endif]-->
     <script type="text/javascript">
--- a/upgrade.sql	Fri Jul 06 11:45:50 2007 -0400
+++ b/upgrade.sql	Tue Jul 10 00:40:52 2007 -0400
@@ -5,8 +5,11 @@
 DELETE FROM {{TABLE_PREFIX}}config WHERE config_name='enano_version' OR config_name='enano_beta_version' OR config_name='enano_alpha_version' OR config_name='enano_rc_version';
 INSERT INTO {{TABLE_PREFIX}}config (config_name, config_value) VALUES( 'enano_version', '1.0' );
 ---BEGIN 1.0RC3---
--- Placeholder (all versions need to have at least one query performed)
-ALTER {{TABLE_PREFIX}}users ADD COLUMN user_coppa tinyint(1) NOT NULL DEFAULT 0;
+ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_coppa tinyint(1) NOT NULL DEFAULT 0;
+UPDATE {{TABLE_PREFIX}}sidebar SET block_content='[[User:$USERNAME$|User page]]\n[[Special:Contributions/$USERNAME$|My Contributions]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|Preferences]]\n[[Special:PrivateMessages|Private messages ($UNREAD_PMS$)]]\n[[Special:Usergroups|Group control panel]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[Special:Register|Create an account]]\n$LOGIN_LINK$\n[[Special:Login/Special:PrivateMessages|Private messages]]\n{/if}' WHERE item_id=3;
+-- Updated PHP-ized search box
+-- block_type=3: 3 = BLOCK_PHP
+UPDATE {{TABLE_PREFIX}}sidebar SET block_content='?><div class=\"slideblock2\" style=\"padding: 0px;\"><form action=\"<?php echo makeUrlNS(\'Special\', \'Search\'); ?>\" method=\"get\"><input name=\"q\" alt=\"Search box\" type=\"text\" size=\"10\" style=\"width: 70%\" /> <input type=\"submit\" value=\"Go\" style=\"width: 20%\" /></form></div>',block_type=3 WHERE block_name='Search';
 ---END 1.0RC3---
 ---BEGIN 1.0RC2---
 -- Add the "Moderators" group
@@ -15,17 +18,20 @@
 ALTER TABLE {{TABLE_PREFIX}}groups ADD COLUMN system_group tinyint(1) NOT NULL DEFAULT 0;
 UPDATE {{TABLE_PREFIX}}groups SET system_group=1 WHERE group_id=1 OR group_id=2;
 INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(3, 'Moderators', 3, 1);
+ALTER TABLE {{TABLE_PREFIX}}privmsgs ADD COLUMN message_read tinyint(1) NOT NULL DEFAULT 0;
 -- ...and add the associated ACL rule
 INSERT INTO {{TABLE_PREFIX}}acl(target_type,target_id,page_id,namespace,rules) VALUES(1,3,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=3;clear_logs=2;vote_delete=4;vote_reset=4;delete_page=4;set_wiki_mode=2;password_set=2;password_reset=2;mod_misc=2;edit_cat=4;even_when_protected=4;upload_files=2;upload_new_version=3;create_page=3;php_in_pages=2;edit_acl=2;');
 -- Create table with extra user information
 CREATE TABLE users_extra( user_id mediumint(8) NOT NULL, user_aim varchar(63) default NULL, user_yahoo varchar(63) default NULL, user_msn varchar(255) default NULL, user_xmpp varchar(255) default NULL, user_homepage text, user_location text, user_job text, user_hobbies text, email_public tinyint(1) NOT NULL default '0', userpage_comments smallint(5) NOT NULL default '0', PRIMARY KEY ( user_id ) );
+-- Turn on the Enano button on the sidebar
+INSERT INTO {{TABLE_PREFIX}}config(config_name,config_value) VALUES('powered_btn', '1');
 ---END 1.0RC2---
 ---BEGIN 1.0RC1---
 -- Not too many DB changes in this release - that's a good sign ;-)
 ALTER TABLE {{TABLE_PREFIX}}search_index MODIFY COLUMN word varbinary(64) NOT NULL;
 CREATE FULLTEXT INDEX {{TABLE_PREFIX}}page_search_idx ON {{TABLE_PREFIX}}page_text(page_id,namespace,page_text);
 UPDATE {{TABLE_PREFIX}}users SET user_level=3 WHERE user_level=2;
-UPDATE {{TABLE_PREFIX}}sidebar SET block_content='[[$NS_USER$$USERNAME$|User page]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|My Contributions]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|Preferences]]\n[[$NS_SPECIAL$PrivateMessages|Private messages]]\n[[$NS_SPECIAL$Usergroups|Group control panel]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|Create an account]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|Private messages]]\n{/if}',block_name='$USERNAME$' WHERE block_name='$USERNAME' AND item_id=3;
+UPDATE {{TABLE_PREFIX}}sidebar SET block_content='[[$NS_USER$$USERNAME$|User page]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|My Contributions]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|Preferences]]\n[[$NS_SPECIAL$PrivateMessages|Private messages]]\n[[$NS_SPECIAL$Usergroups|Group control panel]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|Create an account]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|Private messages]]\n{/if}',block_name='$USERNAME$' WHERE ( block_name='$USERNAME' OR block_name='$USERNAME$' ) AND item_id=3;
 ---END 1.0RC1---
 ---BEGIN 1.0b4---
 CREATE TABLE {{TABLE_PREFIX}}hits( hit_id bigint(20) NOT NULL auto_increment, username varchar(63) NOT NULL, time int(12) NOT NULL DEFAULT 0, page_id varchar(63), namespace varchar(63), PRIMARY KEY ( hit_id ) );