MediaWiki:Monobook.css

From Blankclubencyclopedia

(Difference between revisions)
 
(2 intermediate revisions not shown)
Line 134: Line 134:
padding: 5px;
padding: 5px;
}
}
-
 
-
<?php
 
-
/**
 
-
* WikiSpeller - some folks can spel, smart peple use a speller checker
 
-
*
 
-
* More details at http://it.extension.org/wiki/WikiSpeller
 
-
*
 
-
* Developed with funding by the National eXtension Initiative.
 
-
*
 
-
* For the latest version, please see:
 
-
* https://sourcecode.extension.org/MediaWiki/WikiSpeller/
 
-
*
 
-
* This is a MediaWiki Extension.  To activate the extension,
 
-
* include it from your LocalSettings.php with:
 
-
*  include_once("extensions/WikiSpeller/WikiSpeller.php");
 
-
*
 
-
* @package WikiSpeller
 
-
* @version 1.2
 
-
* @author James E. Robinson, III <james.robinson@extension.org>
 
-
* @copyright North Carolina State University 2006
 
-
*/
 
-
$gsVersion = "1.2";
 
-
 
-
/*
 
-
 
-
&copy; Copyright 2006        North Carolina State University
 
-
 
-
Redistribution and use in source and binary forms, with or without
 
-
modification, are permitted provided that the following conditions are met:
 
-
 
-
1. Redistributions of source code must retain the above copyright notice,
 
-
this list of conditions and the following disclaimer.
 
-
 
-
2. Redistributions in binary form must reproduce the above copyright notice,
 
-
this list of conditions and the following disclaimer in the documentation
 
-
and/or other materials provided with the distribution.
 
-
 
-
3. The name of the author may not be used to endorse or promote products
 
-
derived from this software without specific prior written permission.
 
-
 
-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 
-
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 
-
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 
-
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 
-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 
-
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 
-
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-
*/
 
-
 
-
/**
 
-
* Your countries default Google domain.
 
-
*/
 
-
define('GOOGLE_SITE', 'www.google.com');
 
-
 
-
/**
 
-
* Built-in XML proxy for Google
 
-
* based on version written by Clem (http://labs.beffa.org/)
 
-
*/
 
-
if ( ! defined('MEDIAWIKI') ) {
 
-
 
-
  $lang = urlencode($_GET['lang']);
 
-
  $url = 'http://' . GOOGLE_SITE . '/tbproxy/spell?lang=' . $lang;
 
-
 
-
  $data = file_get_contents('php://input');
 
-
 
-
  $curl_opts = array(
 
-
                      CURLOPT_URL => $url,
 
-
                      CURLOPT_POST => 1,
 
-
                      CURLOPT_POSTFIELDS => $data,
 
-
                      CURLOPT_RETURNTRANSFER => 1
 
-
                      );
 
-
 
-
  $ch = curl_init();
 
-
  foreach ( $curl_opts as $opt => $val ) {
 
-
      curl_setopt($ch, $opt, $val);
 
-
  }
 
-
  $output = curl_exec ($ch);
 
-
  curl_close ($ch);
 
-
 
-
  print $output;
 
-
 
-
  exit(0);
 
-
}
 
-
 
-
/**
 
-
* This should take care of typical MediaWiki installs.
 
-
* If not, change it.
 
-
* It should be the relative web path to the top-level WikiSpeller
 
-
* directory.
 
-
*/
 
-
$WikiSpellWebPath = $GLOBALS['wgScriptPath'] . '/extensions/WikiSpeller/';
 
-
 
-
/**#@+
 
-
* Extension entry points used by MW.
 
-
*
 
-
* @access public
 
-
*/
 
-
function wfWikiSpeller() {
 
-
  WikiSpeller::addIncludes();
 
-
  return;
 
-
}
 
-
/**#@-*/
 
-
 
-
/**
 
-
* Class with functions that add the appropriate javascript and CSS
 
-
* hooks to the MediaWiki output to allow googiespell to work.
 
-
*
 
-
* @package WikiSpeller
 
-
* @author James E. Robinson, III <james.robinson@extension.org>
 
-
* @version $Revision: 83 $
 
-
* @copyright North Carolina State University 2006
 
-
*/
 
-
class WikiSpeller {
 
-
 
-
  /**#@+
 
-
    * @access private
 
-
    */
 
-
  var $debug;
 
-
  /**#@-*/
 
-
 
-
  /**
 
-
    * Class constructor.
 
-
    *
 
-
    * @access public
 
-
    */
 
-
  function WikiSpeller() {
 
-
      $fname = __CLASS__ . '::' . __FUNCTION__;
 
-
      wfProfileIn($fname);
 
-
      $this->debug = False;
 
-
      wfProfileOut($fname);
 
-
      return;
 
-
  }
 
-
 
-
  /**
 
-
    * Includes the required spell-check files - css and js.
 
-
    *
 
-
    * @access private
 
-
    */
 
-
  function addIncludes() {
 
-
      $fname = __CLASS__ . '::' . __FUNCTION__;
 
-
      wfProfileIn($fname);
 
-
 
-
      $action = $GLOBALS['wgRequest']->getVal('action');
 
-
      $preview = $GLOBALS['wgRequest']->getCheck('wpPreview');
 
-
 
-
      if ( $action != 'edit' ) {
 
-
        if ( $preview && ($action == 'submit') ) {
 
-
            $action = 'edit';
 
-
        }
 
-
      }
 
-
 
-
      if ( $action == 'edit' ) {
 
-
 
-
        $uri = $GLOBALS['WikiSpellWebPath'];
 
-
        $goog = $uri . 'gs/googiespell/';
 
-
        $scr = '
 
-
        <script type="text/javascript"
 
-
                src="' . $goog . 'AmiJS.js"></script>
 
-
        <script type="text/javascript"
 
-
                src="'. $goog . 'googiespell.js"></script>
 
-
        <script type="text/javascript"
 
-
                src="' . $goog . 'cookiesupport.js"></script>
 
-
        <link href="' . $goog . 'googiespell.css"
 
-
              rel="stylesheet" type="text/css" media="all" />';
 
-
 
-
        // add JS - the std MW text edit box is name="wpTextbox1"
 
-
        $scr .= '
 
-
        <script type="text/javascript">
 
-
            if (typeof document.attachEvent!=\'undefined\') {
 
-
              window.attachEvent(\'onload\',Spellorate);
 
-
            } else {
 
-
              window.addEventListener(\'load\',Spellorate,false);
 
-
            }
 
-
 
-
            function getGoogleUrl() {
 
-
              return "' . $uri . 'WikiSpeller.php' . '?lang=" + CURRENT_LANG;
 
-
            }
 
-
 
-
            var GOOGIE_IMAGE_DIR = "' . $uri . 'gs/googiespell/";
 
-
            var CURRENT_LANG;
 
-
 
-
            function Spellorate(){
 
-
              var cookie_value;
 
-
 
-
              cookie_value = getCookie("language");
 
-
              if ( cookie_value != null ) {
 
-
                  CURRENT_LANG = cookie_value;
 
-
              } else {
 
-
                  CURRENT_LANG = "en";
 
-
              }
 
-
 
-
              document.editform.wpTextbox1.setAttribute("id", "wpTextbox1");
 
-
              googieDecorateTextarea("wpTextbox1");
 
-
            }
 
-
        </script>';
 
-
 
-
        // make the lang and spellcheck elements closer together to
 
-
        // give the lang drop-down some context
 
-
        $scr .= '<style> #editform table { width: 300px; } </style>';
 
-
 
-
        $GLOBALS['wgOut']->addScript($scr);
 
-
      }
 
-
 
-
      wfProfileOut($fname);
 
-
      return;
 
-
  }
 
-
 
-
  /**
 
-
    * Returns version string for module.
 
-
    *
 
-
    * @param string $version Primary version string.
 
-
    * @return string Module version with build number and date.
 
-
    * @access public
 
-
    */
 
-
  function getVersion($version) {
 
-
      $fname = __CLASS__ . '::' . __FUNCTION__;
 
-
 
-
      // svn propset svn:keywords "Date Revision"
 
-
      $revision = '$Revision: 83 $';
 
-
      $date = '$Date: 2006-03-28 09:01:07 -0500 (Tue, 28 Mar 2006) $';
 
-
      $build = '';
 
-
      $shortdate = '';
 
-
 
-
      // grab only the number
 
-
      $rc = preg_match('(\\d+)', $revision, $matches);
 
-
      if ( $rc ) {
 
-
        $build = $matches[0];
 
-
      }
 
-
 
-
      // just get the yr mo day string
 
-
      $rc = preg_match('(\\d+-\\d+-\\d+)', $date, $matches);
 
-
      if ( $rc ) {
 
-
        $shortdate = $matches[0];
 
-
      }
 
-
 
-
      return "v.$version($build) $shortdate";
 
-
  }
 
-
 
-
  /**
 
-
    * Output module debugging information.
 
-
    *
 
-
    * @param mixed $input Zero or more variables or strings to log.
 
-
    * @param string $more Additional text to output.  Optional.
 
-
    * @access private
 
-
    * @see GlobalFunctions
 
-
    */
 
-
  function debug($input=False) {
 
-
      $fname = __CLASS__ . '::' . __FUNCTION__;
 
-
 
-
      if(! $this->debug ) return;
 
-
 
-
      wfProfileIn($fname);
 
-
 
-
      if ( func_num_args() > 1 || !is_array($input) ) {
 
-
        $input = func_get_args();
 
-
      }
 
-
 
-
      // use a buffer to capture output
 
-
      ob_start();
 
-
      var_dump($input);
 
-
      $output = ob_get_contents();
 
-
      ob_end_clean();
 
-
 
-
      wfDebug($output . "\
 
-
");
 
-
 
-
      wfProfileOut($fname);
 
-
      return;
 
-
  }
 
-
 
-
}
 
-
 
-
// Register extension functions
 
-
$wgExtensionFunctions[] = 'wfWikiSpeller';
 
-
 
-
$gsVersion = WikiSpeller::getVersion($gsVersion);
 
-
 
-
$wgExtensionCredits['parserhook'][] = array
 
-
  (
 
-
  'name' => "WikiSpeller $gsVersion",
 
-
  'author' => 'James E. Robinson, III',
 
-
  'url' => 'http://it.extension.org/wiki/WikiSpeller'
 
-
  );
 
-
 
-
?>
 
/*
/*
</pre>
</pre>
*/
*/

Current revision as of 16:56, 19 March 2007

/*
<pre>
*/

body
{ 
background-image: url(http://www.google.com/images/firefox/grgrad.gif);
background-repeat: repeat-x;
background-position: top left
}

/*TOC layout*/
#toc,
.toc {
   background-color: #F9F9F9;
   border: 1px solid #AAAAAA;
   padding: 5px;
   font-size: 95%;
}

#toc h2,
.toc h2 {
   display: inline;
   border: none;
   padding: 0;
   font-size: 100%;
   font-weight: bold;
}

#toc #toctitle,
.toc #toctitle,
#toc .toctitle,
.toc .toctitle {
   text-align: center;
   background-color: transparent;
}

#toc ul,
.toc ul {
   list-style-type: none;
   list-style-image: none;
   margin-left: 0;
   padding-left: 0;
   text-align: left;
}

#toc ul ul,
.toc ul ul {
   margin: 0 0 0 1em;
}

#toc .toctoggle,
.toc .toctoggle {
   font-size: 100%;
}

li.toclevel-1 {
   border-top: 1px solid #AAAAAA;
}

.toc a,
#toc a {
   text-decoration:none;
}



legend {
	background-color: #F9F9F9;
	border: 1px solid #AAAAAA;
	color: #F9F9F9;
}

fieldset { background-color: #F9F9F9; }

#preftoc li {
	background-color: transparent;
	border: 0px;
}

#preftoc li a { color: #AAAAAA; }

#preftoc li.selected {
	border: 1px;
	background-color: #F9F9F9;
}

ol ol { list-style-type: lower-latin; }

ol ol ol { list-style-type: lower-roman; }

li#pt-userpage {
	background: url("/graphics/user.gif") top left no-repeat !important;
	background-repeat: no-repeat;
	background-color: transparent !important;
	padding-left: 20px;
	text-transform: none;
}

/* Bold 'edit this page' link to encourage newcomers */
#ca-edit a { font-weight: bold !important; }

 /* rounded corners - Mozilla/Firefox only */
 .pBody {
  padding: 0.1em 0.1em;
  -moz-border-radius-topright: 0.5em;
  -moz-border-radius-bottomright: 0.5em;
 }
 #p-cactions ul li, #p-cactions ul li a {  
  -moz-border-radius-topright: 0.5em;
  -moz-border-radius-topleft: 0.5em;
 }
 #content {
  -moz-border-radius-topleft: 0.5em;
  -moz-border-radius-topright: 0.5em;
  -moz-border-radius-bottomleft: 0.5em;
  -moz-border-radius-bottomright: 0.5em;
 }

 /* buttons and input boxes */
 input[type="submit"] { border: 1px solid #aaa; border-bottom: 2px solid #aaa; border-right: 2px solid #aaa; background: #eee; }
 input[type="text"], input[type="password"], textarea[name="wpTextbox1"] { border: 1px solid #aaa; border-top: 2px solid #aaa; border-left: 2px solid #aaa; }

/* Add small Blank-themed background image to bottom right of categories bar */
#catlinks { 
background-image: url(http://editthis.info/blankclubencyclopedia/images/blankclubencyclopedia/d/d5/Category_pic.png);
background-repeat: no-repeat;
background-position: right;
}

p.catlinks {
	border: 1px outset #282828;
	margin: 2px;
	padding: 5px;
}

/*
</pre>
*/
Personal tools