Changeset 755
- Timestamp:
- 10/16/2007 07:33:45 AM (21 months ago)
- Location:
- branches/1.1.6.4
- Files:
-
- 6 modified
-
actions/usersettings.php (modified) (5 diffs)
-
handlers/page/backlinks.php (modified) (3 diffs)
-
handlers/page/clone.php (modified) (10 diffs)
-
handlers/page/showcode.php (modified) (3 diffs)
-
libs/Wakka.class.php (modified) (8 diffs)
-
setup/install.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1.6.4/actions/usersettings.php
r747 r755 11 11 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} (further cleanup, i18n, replaced JS dialogs with server-generated messages) 12 12 * 13 * @uses Wakka::LogoutUser() 14 * @uses Wakka::Redirect() 15 * @uses Wakka::Getuser() 16 * @uses Wakka::GetSafeVar() 17 * @uses Wakka::Query() 18 * @uses Wakka::SetUser() 19 * @uses Wakka::LoadUser() 20 * @uses Wakka::FormOpen() 21 * @uses Wakka::FormClose() 22 * @uses Wakka::Link() 23 * @uses Wakka::Format() to be avoided 13 24 * @uses Wakka::htmlspecialchars_ent() 25 * @uses Wakka::IsWikiName() 26 * @uses Wakka::existsPage() 14 27 * 15 28 * @todo use different actions for registration / login / user settings; … … 18 31 * invalid input fields; 19 32 * @todo remove useless redirections; 33 * @todo avoid use of Format() (too costly for just headings and erro rstrings) 20 34 * @todo [accessibility] make logout independent of JavaScript 21 35 */ … … 397 411 $username_highlight = INPUT_ERROR_STYLE; 398 412 break; 399 case ($this->existsPage($name )): // name change413 case ($this->existsPage($name,NULL,FALSE)): // name change, new interface (check for non-active page, too) 400 414 $error = ERROR_RESERVED_PAGENAME; 401 415 $username_highlight = INPUT_ERROR_STYLE; … … 454 468 elseif (isset($_POST['action']) && ($_POST['action'] == 'updatepass')) 455 469 { 456 $name = trim($_POST['yourname']);470 $name = trim($_POST['yourname']); 457 471 if (strlen($name) == 0) // empty username 458 472 { … … 492 506 <input type="hidden" name="action" value="login" /> 493 507 <table class="usersettings"> 494 <tr>495 <td colspan="2"><?php echo $this->Format(REGISTER_HEADING) ?></td>496 <td> </td>497 </tr>508 <tr> 509 <td colspan="2"><?php echo $this->Format(REGISTER_HEADING) ?></td> 510 <td> </td> 511 </tr> 498 512 <tr> 499 513 <td> </td> -
branches/1.1.6.4/handlers/page/backlinks.php
r747 r755 1 <div class="page">2 1 <?php 3 2 /** … … 9 8 * It first checks if they exist and prints them on the screen. 10 9 * 11 * @package Handlers10 * @package Handlers 12 11 * @subpackage 13 * @name backlinks12 * @name backlinks 14 13 * 15 * @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original idea and code.16 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} - code rewritten, existsPage check added, removed links array.17 * @version 0.318 * @since Wikka 1.1.6.X14 * @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original idea and code. 15 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} - code rewritten, existsPage check added, removed links array. 16 * @version 0.4 17 * @since Wikka 1.1.6.2 19 18 * 20 * @todo 19 * @uses Wakka::LoadPagesLinkingTo() 20 * @uses Wakka::existsPage() 21 * @uses Wakka::Link() 22 * 23 * @todo optional (GET) parameter to list links from non-active (deleted, renamed) 24 * pages as well 25 * @todo build array and use core formatting routine to format as list or columns 21 26 * 22 27 */ … … 24 29 // User-interface: strings 25 30 define('PAGE_TITLE','Pages linking to %s'); 26 define('ERROR_NO_BACKLINKS','There are no backlinks to this page.'); 31 define('MESSAGE_NO_BACKLINKS','There are no backlinks to this page.'); 32 33 echo '<div class="page">'."\n"; 27 34 28 35 // build backlinks list 29 echo $this->Format('=== '.sprintf(PAGE_TITLE,'[['.$this->tag.']]').' === --- ---'); 36 #echo $this->Format('=== '.sprintf(PAGE_TITLE,'[['.$this->tag.']]').' === --- ---'); 37 echo '<h3>'.sprintf(PAGE_TITLE,$this->tag.'</h3><br />'."\n"; 30 38 if ($pages = $this->LoadPagesLinkingTo($this->tag)) { 31 39 foreach ($pages as $page) { 32 if ($this->existsPage($page['tag'])) { // name change 40 if ($this->existsPage($page['tag'])) { // name change, interface change (active pages only) 33 41 print $this->Link($page['tag']).'<br />'; 34 42 } 35 43 } 36 44 } else { 37 print ERROR_NO_BACKLINKS;45 print MESSAGE_NO_BACKLINKS; 38 46 } 39 47 ?> -
branches/1.1.6.4/handlers/page/clone.php
r747 r755 1 <div class="page">2 1 <?php 3 2 /** … … 12 11 * edition immediately after its creation. 13 12 * 14 * @package Handlers13 * @package Handlers 15 14 * @subpackage 16 * @name clone15 * @name clone 17 16 * 18 * @author {@link http://wikkawiki.org/ChristianBarthelemy Christian Barthelemy} - original idea and code.19 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} - bugs fixed, code improved, removed popup alerts.20 * @version 0.421 * @since Wikka 1.1.6.017 * @author {@link http://wikkawiki.org/ChristianBarthelemy Christian Barthelemy} - original idea and code. 18 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} - bugs fixed, code improved, removed popup alerts. 19 * @version 0.4 20 * @since Wikka 1.1.6.0 22 21 * 23 * @input string $to required: the page to be created 24 * must be a non existing page and current user must be authorized to create it 25 * default is source page name 22 * @uses Wakka::HasAccess() 23 * @uses Wakka::existsPage() 24 * @uses Wakka::LoadPage() 25 * @uses Wakka::Savepage() 26 * @uses Wakka::Redirect() 27 * @uses Wakka::Link() 28 * @uses Wakka::GetpageTag() 29 * @uses Wakka;:FormOpen() 30 * @uses Wakka::FormClose() 26 31 * 27 * @input string $note optional: the note to be added to the page when created 28 * default is "Cloned from " followed by the name of the source page 32 * @input string $to required: the page to be created 33 * must be a non existing page and current user must be authorized 34 * to create it 35 * default is source page name 36 * @input string $note optional: the note to be added to the page when created 37 * default is "Cloned from " followed by the name of the source page 38 * @input boolean $editoption optional: if true, the new page will be opened for 39 * editing on creation 40 * default is FALSE (to allow multiple cloning of the same source) 29 41 * 30 * @input boolean $editoption optional: if true, the new page will be opened for edition on creation 31 * default is false (to allow multiple cloning of the same source) 32 * 33 * @todo Use central library for valid pagenames. 42 * @todo Use central regex library for valid pagenames. 43 * @todo Decide whether it's allowed to "re-create" a page of which only non-active versions exist 34 44 * 35 45 */ … … 38 48 39 49 // i18n 40 define('CLONE_HEADER', '==== Clone current page ===='); 50 #define('CLONE_HEADER', '==== Clone current page ===='); 51 define('CLONE_HEADER', 'Clone current page'); 41 52 define('CLONE_SUCCESSFUL', '%s was succesfully created!'); 42 53 define('CLONE_X_TO', 'Clone %s to:'); … … 59 70 $box = PLEASE_FILL_VALID_TARGET; 60 71 72 echo '<div class="page">'."\n"; 73 61 74 // print header 62 echo $this->Format(CLONE_HEADER); 75 #echo $this->Format(CLONE_HEADER); 76 echo '<h3>'.CLONE_HEADER.'</h3>'."\n"; 63 77 64 78 // 1. check source page existence 65 if (!$this->existsPage($from)) // name change79 if (!$this->existsPage($from)) // name change, interface change (allows only active page (if not, LoadPage() will fail!)) 66 80 { 67 81 // source page does not exist! 68 $box = sprintf(ERROR_PAGE_NOT_EXIST, $from);82 $box = '<em class="error">'.sprintf(ERROR_PAGE_NOT_EXIST, $from).'</em>'; 69 83 } else 70 84 { … … 73 87 { 74 88 // user can't read source page! 75 $box = ERROR_ACL_READ;89 $box = '<em class="error">'.ERROR_ACL_READ.'</em>'; 76 90 } else 77 91 { 78 92 // page exists and user has read-access to the source - proceed 79 if (isset($_POST) && $_POST) 93 if (isset($_POST) && $_POST) // @@@ ??? what are we testing here? 80 94 { 81 95 // get parameters 82 96 $to = isset($_POST['to']) && $_POST['to'] ? $_POST['to'] : $to; 83 97 $note = isset($_POST['note']) && $_POST['note'] ? $_POST['note'] : $note; 84 $editoption = (isset($_POST['editoption'])) ? 'checked="checked"' : '';98 $editoption = (isset($_POST['editoption'])) ? ' checked="checked"' : ''; 85 99 86 100 // 3. check target pagename validity … … 88 102 { 89 103 // invalid pagename! 90 $box = ' ""<em class="error">'.ERROR_INVALID_PAGENAME.'</em>""';104 $box = '<em class="error">'.ERROR_INVALID_PAGENAME.'</em>'; 91 105 } else 92 106 { … … 94 108 if (!$this->HasAccess('write', $to)) 95 109 { 96 $box = ' ""<em class="error">'.sprintf(ERROR_ACL_WRITE, $to).'</em>""';110 $box = '<em class="error">'.sprintf(ERROR_ACL_WRITE, $to).'</em>'; 97 111 } else 98 112 { 99 113 // 5. check target page existence 100 if ($this->existsPage($to )) // name change114 if ($this->existsPage($to, NULL, FALSE)) // name change, interface change (checks for non-active page, too) @@@ 101 115 { 102 116 // page already exists! 103 $box = ' ""<em class="error">'.ERROR_PAGE_ALREADY_EXIST.'</em>""';117 $box = '<em class="error">'.ERROR_PAGE_ALREADY_EXIST.'</em>'; 104 118 } else 105 119 { 106 120 // 6. Valid request - proceed to page cloning 107 $thepage =$this->LoadPage($from); # load the source page121 $thepage = $this->LoadPage($from); # load the source page 108 122 if ($thepage) $pagecontent = $thepage['body']; # get its content 109 123 $this->SavePage($to, $pagecontent, $note); #create target page 110 if ($editoption == ' checked="checked"')124 if ($editoption == ' checked="checked"') 111 125 { 112 126 // quick edit … … 115 129 { 116 130 // show confirmation message 117 $box = ' ""<em class="success">'.sprintf(CLONE_SUCCESSFUL, $to).'</em>""';131 $box = '<em class="success">'.sprintf(CLONE_SUCCESSFUL, $to).'</em>'; 118 132 } 119 133 } … … 135 149 '<td></td>'."\n". 136 150 '<td>'."\n". 137 '<input type="checkbox" name="editoption" '.$editoption.' id="editoption" /><label for="editoption">'.LABEL_EDIT_OPTION.'</label>'."\n".151 '<input type="checkbox" name="editoption"'.$editoption.' id="editoption" /><label for="editoption">'.LABEL_EDIT_OPTION.'</label>'."\n". 138 152 '<input type="submit" name="create" value="'.LABEL_CLONE.'" />'."\n". 139 153 '</td>'."\n". … … 145 159 146 160 // display messages 147 if (isset($box)) echo $this->Format(' --- '.$box.' --- --- '); 161 #if (isset($box)) echo $this->Format(' --- '.$box.' --- --- '); 162 if (isset($box)) echo '<p>'.$box.'</p><br />'."\n"; 148 163 // print form 149 164 if (isset($form)) print $form; -
branches/1.1.6.4/handlers/page/showcode.php
r747 r755 12 12 * @since Wikka 1.1.6.0 13 13 * 14 * @uses Wakka::existsPage() 15 * @uses Wakka::HasAccess() 16 * @uses Wakka::Link() 17 * @uses Wakka::htmlspecialchars_ent() 18 * 14 19 * @output Wiki source of current page (if it exists). 15 * @todo - move structural elements to templating class;20 * @todo - move structural elements to template; 16 21 * - create GeSHi highlighter for Wikka markup; #144 17 22 */ 18 23 19 24 // i18n strings 20 if(!defined('SOURCE_HEADING')) define('SOURCE_HEADING', '=== Formatting code for [[%s]] ==='); //TODO: check for consistency with other handlers (formatting code vs. source vs. markup) 21 if(!defined('RAW_LINK_LABEL')) define('RAW_LINK_LABEL', 'show source only'); 22 if(!defined('ERROR_NOT_EXISTING_PAGE')) define('ERROR_NOT_EXISTING_PAGE', 'Sorry, this page doesn\'t exist.'); 23 if(!defined('ERROR_NO_READ_ACCESS')) define('ERROR_NO_READ_ACCESS', 'Sorry, you aren\'t allowed to read this page.'); 25 #if(!defined('SOURCE_HEADING')) define('SOURCE_HEADING', '=== Formatting code for [[%s]] ==='); //TODO: check for consistency with other handlers (formatting code vs. source vs. markup) 26 if (!defined('SOURCE_HEADING')) define('SOURCE_HEADING', 'Formatting code for %s'); //TODO: check for consistency with other handlers (formatting code vs. source vs. markup) 27 if (!defined('RAW_LINK_LABEL')) define('RAW_LINK_LABEL', 'show source only'); 28 if (!defined('ERROR_NOT_EXISTING_PAGE')) define('ERROR_NOT_EXISTING_PAGE', 'Sorry, this page doesn\'t exist.'); 29 if (!defined('ERROR_NO_READ_ACCESS')) define('ERROR_NO_READ_ACCESS', 'Sorry, you aren\'t allowed to read this page.'); 24 30 25 echo '<div class="page">'."\n"; //TODO: move to templating class31 echo '<div class="page">'."\n"; 26 32 27 33 //check if page exists 28 if ($this->existsPage($this->tag)) // name change34 if ($this->existsPage($this->tag)) // name change, interface change (allow active page only) 29 35 { 30 36 //check if user has read access … … 32 38 { 33 39 // display raw page, slightly formatted for viewing 34 echo $this->Format(sprintf(SOURCE_HEADING.' --- ', $this->tag)); 40 #echo $this->Format(sprintf(SOURCE_HEADING.' --- ', $this->tag)); 41 echo '<h3>'.sprintf(SOURCE_HEADING, $this->Link($this->tag)).'<h3><br />'."\n";; 35 42 echo '(<a href="'.$this->href('raw').'">'.RAW_LINK_LABEL.'</a>)<br /><br />'; 36 echo '<tt>'.nl2br($this->htmlspecialchars_ent($this->page[ "body"], ENT_QUOTES)).'</tt>';43 echo '<tt>'.nl2br($this->htmlspecialchars_ent($this->page['body'], ENT_QUOTES)).'</tt>'; 37 44 } 38 45 else … … 46 53 } 47 54 48 echo '</div>'; //TODO: move to templating class55 echo '</div>'; 49 56 ?> -
branches/1.1.6.4/libs/Wakka.class.php
r749 r755 589 589 * @uses Wakka::config 590 590 * @uses GeShi 591 * @todo support for GeSHi line number styles592 * @todo enable error handling591 * @todo support for GeSHi line number styles 592 * @todo enable error handling 593 593 * 594 594 * @param string $sourcecode required: source code to be highlighted … … 1063 1063 * 1064 1064 * @access public 1065 * @uses makeId()1066 1065 * @uses ID_LENGTH 1067 * @uses existsHandler() 1068 * @uses existsPage() 1069 * @uses Href() 1070 * @uses MiniHref() only for hidden field 1066 * @uses Wakka::makeId() 1067 * @uses Wakka::existsHandler() 1068 * @uses Wakka::existsPage() 1069 * @uses Wakka::Href() 1070 * @uses Wakka::MiniHref() only for hidden field 1071 1071 * 1072 1072 * @param string $handler optional: "handler" which consists of handler name and possibly a query string … … 1103 1103 $handler = ''; 1104 1104 } 1105 if (!empty($tag) && !$this->existsPage($tag)) 1105 if (!empty($tag) && !$this->existsPage($tag)) // name change, interface change (check for active page only) 1106 1106 { 1107 1107 $tag = ''; // Href() will pick up current page name if none specified … … 1235 1235 * @copyright Copyright © 2004, Marjolein Katsma 1236 1236 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 1237 * @version 1.0 1238 * 1239 * NOTE: name changed from ExistsPage() to existsPage() !!! 1237 * @version 1.1 1238 * 1239 * NOTE: v. 1.0 -> 1.1 1240 * - name changed from ExistsPage() to existsPage() !!! 1241 * - added $prefix param so it can be used from installer 1242 * - added $current param so it checks by default for a current page only 1240 1243 * 1241 1244 * @access public … … 1243 1246 * 1244 1247 * @param string $page page name to check 1248 * @param string $prefix optional: table prefix to use 1249 * pass NULL if you need to override the $active parameter 1250 * default: prefix as in configuration file 1251 * @param string $active optional: if TRUE, check for actgive page only 1252 * default: TRUE 1245 1253 * @return boolean TRUE if page exists, FALSE otherwise 1246 1254 */ 1247 function existsPage($page) 1248 { 1255 function existsPage($page, $prefix='', $active=TRUE) 1256 { 1257 // init 1249 1258 $count = 0; 1250 $query = "SELECT COUNT(tag) 1251 FROM ".$this->config['table_prefix']."pages 1252 WHERE tag='".mysql_real_escape_string($page)."'"; 1259 $table_prefix = (empty($prefix)) ? $this->config['table_prefix'] : $prefix; 1260 // build query 1261 $query = "SELECT COUNT(tag) 1262 FROM ".$table_prefix."pages 1263 WHERE tag='".mysql_real_escape_string($page)."'"; 1264 if ($active) 1265 { 1266 $query .= " AND latest='Y'"; 1267 } 1268 // do query 1253 1269 if ($r = $this->Query($query)) 1254 1270 { … … 1256 1272 mysql_free_result($r); 1257 1273 } 1274 // report 1258 1275 return ($count > 0) ? TRUE : FALSE; 1259 1276 } … … 1301 1318 // valid action name, so we pull out the parts 1302 1319 $action_name = strtolower($matches[1]); 1303 $paramlist = trim($matches[2]); 1304 } 1305 1320 $paramlist = (isset($matches[2])) ? trim($matches[2]) : ''; 1321 } 1322 1323 // prepare an array for extract() (in $this->IncludeBuffered()) to work with 1324 $vars = array(); 1306 1325 // search for parameters if there was more than just a (syntactically valid) action name 1307 1326 if ('' != $paramlist) … … 1311 1330 1312 1331 // prepare an array for extract() (in $this->IncludeBuffered()) to work with 1313 $vars = array();1332 #$vars = array(); 1314 1333 if (is_array($matches)) 1315 1334 { -
branches/1.1.6.4/setup/install.php
r734 r755 31 31 test("Creating page table...", 32 32 @mysql_query( 33 "CREATE TABLE ".$config[ "table_prefix"]."pages (".34 "id int(10) unsigned NOT NULL auto_increment,".35 "tag varchar(75) NOT NULL default '',".36 "time datetime NOT NULL default '0000-00-00 00:00:00',".37 "body mediumtext NOT NULL,".38 "owner varchar(75) NOT NULL default '',".39 "user varchar(75) NOT NULL default '',".40 "latest enum('Y','N') NOT NULL default 'N',".41 "note varchar(100) NOT NULL default '',".42 "handler varchar(30) NOT NULL default 'page',".43 "PRIMARY KEY (id),".44 "KEY idx_tag (tag),".45 "FULLTEXT KEY body (body),".46 "KEY idx_time (time),".47 "KEY idx_latest (latest)".33 "CREATE TABLE ".$config['table_prefix']."pages (". 34 "id int(10) unsigned NOT NULL auto_increment,". 35 "tag varchar(75) NOT NULL default '',". 36 "time datetime NOT NULL default '0000-00-00 00:00:00',". 37 "body mediumtext NOT NULL,". 38 "owner varchar(75) NOT NULL default '',". 39 "user varchar(75) NOT NULL default '',". 40 "latest enum('Y','N') NOT NULL default 'N',". 41 "note varchar(100) NOT NULL default '',". 42 "handler varchar(30) NOT NULL default 'page',". 43 "PRIMARY KEY (id),". 44 "KEY idx_tag (tag),". 45 "FULLTEXT KEY body (body),". 46 "KEY idx_time (time),". 47 "KEY idx_latest (latest)". 48 48 ") TYPE=MyISAM;", $dblink), "Already exists?", 0); 49 49 test("Creating ACL table...", 50 50 @mysql_query( 51 "CREATE TABLE ".$config[ "table_prefix"]."acls (".52 "page_tag varchar(75) NOT NULL default '',".53 "read_acl text NOT NULL,".54 "write_acl text NOT NULL,".55 "comment_acl text NOT NULL,".56 "PRIMARY KEY (page_tag)".51 "CREATE TABLE ".$config['table_prefix']."acls (". 52 "page_tag varchar(75) NOT NULL default '',". 53 "read_acl text NOT NULL,". 54 "write_acl text NOT NULL,". 55 "comment_acl text NOT NULL,". 56 "PRIMARY KEY (page_tag)". 57 57 ") TYPE=MyISAM", $dblink), "Already exists?", 0); 58 58 test("Creating link tracking table...", 59 59 @mysql_query( 60 "CREATE TABLE ".$config[ "table_prefix"]."links (".60 "CREATE TABLE ".$config['table_prefix']."links (". 61 61 "from_tag varchar(75) NOT NULL default '',". 62 "to_tag varchar(75) NOT NULL default '',".63 "UNIQUE KEY from_tag (from_tag,to_tag),".64 "KEY idx_from (from_tag),".65 "KEY idx_to (to_tag)".62 "to_tag varchar(75) NOT NULL default '',". 63 "UNIQUE KEY from_tag (from_tag,to_tag),". 64 "KEY idx_from (from_tag),". 65 "KEY idx_to (to_tag)". 66 66 ") TYPE=MyISAM", $dblink), "Already exists?", 0); 67 67 test("Creating referrer table...", 68 68 @mysql_query( 69 "CREATE TABLE ".$config[ "table_prefix"]."referrers (".70 "page_tag varchar(75) NOT NULL default '',".71 "referrer varchar(150) NOT NULL default '',".72 "time datetime NOT NULL default '0000-00-00 00:00:00',".73 "KEY idx_page_tag (page_tag),".74 "KEY idx_time (time)".69 "CREATE TABLE ".$config['table_prefix']."referrers (". 70 "page_tag varchar(75) NOT NULL default '',". 71 "referrer varchar(150) NOT NULL default '',". 72 "time datetime NOT NULL default '0000-00-00 00:00:00',". 73 "KEY idx_page_tag (page_tag),". 74 "KEY idx_time (time)". 75 75 ") TYPE=MyISAM", $dblink), "Already exists?", 0); 76 76 test("Creating referrer blacklist table...", 77 77 @mysql_query( 78 "CREATE TABLE ".$config[ "table_prefix"]."referrer_blacklist (".79 "spammer varchar(150) NOT NULL default '',".80 "KEY idx_spammer (spammer)".78 "CREATE TABLE ".$config['table_prefix']."referrer_blacklist (". 79 "spammer varchar(150) NOT NULL default '',". 80 "KEY idx_spammer (spammer)". 81 81 ") TYPE=MyISAM", $dblink), "Already exists?", 0); 82 82 test("Creating user table...", 83 83 @mysql_query( 84 "CREATE TABLE ".$config[ "table_prefix"]."users (".85 "name varchar(75) NOT NULL default '',".86 "password varchar(32) NOT NULL default '',".87 "email varchar(50) NOT NULL default '',".88 "revisioncount int(10) unsigned NOT NULL default '20',".89 "changescount int(10) unsigned NOT NULL default '50',".90 "doubleclickedit enum('Y','N') NOT NULL default 'Y',".91 "signuptime datetime NOT NULL default '0000-00-00 00:00:00',".92 "show_comments enum('Y','N') NOT NULL default 'N',".93 "PRIMARY KEY (name),".94 "KEY idx_signuptime (signuptime)".84 "CREATE TABLE ".$config['table_prefix']."users (". 85 "name varchar(75) NOT NULL default '',". 86 "password varchar(32) NOT NULL default '',". 87 "email varchar(50) NOT NULL default '',". 88 "revisioncount int(10) unsigned NOT NULL default '20',". 89 "changescount int(10) unsigned NOT NULL default '50',". 90 "doubleclickedit enum('Y','N') NOT NULL default 'Y',". 91 "signuptime datetime NOT NULL default '0000-00-00 00:00:00',". 92 "show_comments enum('Y','N') NOT NULL default 'N',". 93 "PRIMARY KEY (name),". 94 "KEY idx_signuptime (signuptime)". 95 95 ") TYPE=MyISAM", $dblink), "Already exists?", 0); 96 96 test("Creating comment table...", 97 97 @mysql_query( 98 "CREATE TABLE ".$config[ "table_prefix"]."comments (".99 "id int(10) unsigned NOT NULL auto_increment,".100 "page_tag varchar(75) NOT NULL default '',".101 "time datetime NOT NULL default '0000-00-00 00:00:00',".102 "comment text NOT NULL,".103 "user varchar(75) NOT NULL default '',".104 "PRIMARY KEY (id),".105 "KEY idx_page_tag (page_tag),".106 "KEY idx_time (time)".98 "CREATE TABLE ".$config['table_prefix']."comments (". 99 "id int(10) unsigned NOT NULL auto_increment,". 100 "page_tag varchar(75) NOT NULL default '',". 101 "time datetime NOT NULL default '0000-00-00 00:00:00',". 102 "comment text NOT NULL,". 103 "user varchar(75) NOT NULL default '',". 104 "PRIMARY KEY (id),". 105 "KEY idx_page_tag (page_tag),". 106 "KEY idx_time (time)". 107 107 ") TYPE=MyISAM;", $dblink), "Already exists?", 0); 108 108 109 test("Adding admin user...", 110 @mysql_query("insert into ".$config["table_prefix"]."users set name = '".$config["admin_users"]."', password = md5('".mysql_real_escape_string($_POST["password"])."'), email = '".$config["admin_email"]."', signuptime = now()", $dblink), "Hmm!", 0); 109 test("Adding admin user...", 110 @mysql_query("insert into ".$config['table_prefix']."users set name = '".$config["admin_users"]."', password = md5('".mysql_real_escape_string($_POST["password"])."'), email = '".$config["admin_email"]."', signuptime = now()", $dblink), "Hmm!", 0); // @@@ The "Hmm!" is confusing people... 111 111 112 112 test("Adding default pages...", 1); 113 mysql_query("insert into ".$config["table_prefix"]."pages set tag = '".$config["root_page"]."', body = '{{image url=\"images/wikka_logo.jpg\" alt=\"wikka logo\" title=\"Welcome to your Wikka site!\"}}\n\nThanks for installing [[Wikka:HomePage WikkaWiki]]! This site is running on version ##{{wikkaversion}}## (see WikkaReleaseNotes). \nYou need to [[UserSettings login]] and then double-click on any page or click on the \"Edit page\" link at the bottom to get started. \n\nAlso don\'t forget to visit the [[Wikka:HomePage WikkaWiki website]]! \n\nUseful pages: FormattingRules, WikkaDocumentation, OrphanedPages, WantedPages, TextSearch.', user = 'WikkaInstaller', owner = '".$config["admin_users"]."', time = now(), latest = 'Y'", $dblink); 114 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'RecentChanges', body = '{{RecentChanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 115 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'RecentlyCommented', body = '{{RecentlyCommented}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 116 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'UserSettings', body = '{{UserSettings}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 117 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'PageIndex', body = '{{PageIndex}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 118 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'WikkaReleaseNotes', body = '{{wikkachanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 119 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'WikkaDocumentation' , body = '=====Wikka Documentation=====\n\nComprehensive and up-to-date documentation on Wikka Wiki can be found on the [[http://wikkawiki.org/WikkaDocumentation main Wikka server]].', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 120 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'WantedPages', body = '{{WantedPages}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 121 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'OrphanedPages', body = '====Orphaned Pages====\n\nThe following list shows those pages held in the Wiki that are not linked to on any other pages.\n\n{{OrphanedPages}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 122 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'TextSearch', body = '{{TextSearch}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 123 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'TextSearchExpanded', body = '{{textsearchexpanded}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 124 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'MyPages', body = '{{MyPages}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 125 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'MyChanges', body = '{{MyChanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 126 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'InterWiki', body = '{{interwikilist}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 127 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'PasswordForgotten', body = '{{emailpassword}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 128 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'WikiCategory', body = '===This wiki is using a very flexible but simple categorizing system to keep everything properly organized.===\n\n{{Category page=\"/\" col=\"10\"}}\n==Here\'s how it works :==\n~- The master list of the categories is **Category Category** (//without the space//) which will automatically list all known maincategories, and should never be edited. This list is easily accessed from the Wiki\'s top navigation bar. (Categories).\n~- Each category has a WikiName name of the form \"\"CategoryName\"\" for example CategoryWiki etc. (see list of maincategories above)\n~- Pages can belong to zero or more categories. Including a page in a category is done by simply mentioning the \"\"CategoryName\"\" on the page (by convention at the very end of the page).\n~- The system allows to build hierarchies of categories by referring to the parent category in the subcategory page. The parent category page will then automatically include the subcategory page in its list.\n~- A special kind of category is **\"\"Category Users\"\"** (//without the space//) to group the userpages, so your Wiki homepage should include it at the end to be included in the category-driven userlist.\n~- New categories can be created (think very hard before doing this though, we don\'t need too much of them) by creating a \"\"CategoryName\"\" page, including \"\"{{Category}}\"\" in it and placing it in the **Category Category** (//without the space//) category (for a main category or another parent category in case you want to create a subcategory).\n\n**Please help to keep this place organized by including the relevant categories in new and existing pages !**\n\n**Notes:** \n~- The above bold items above //include spaces// to prevent this page from showing up in the mentioned categories. This page only belongs in CategoryWiki (which can be safely mentioned) after all !\n~- In order to avoid accidental miscategorization you should **avoid** mentioning a non-related \"\"CategoryName\"\" on a page. This is a side-effect of how the categorizing system works: it\'s based on a textsearch and is not restricted to the footer convention.\n~- Don\'t be put of by the name of this page (WikiCategory) which is a logical name (it\'s about the Wiki and explains Category) but doesn\'t have any special role in the Categorizing system.\n~- To end with this is the **standard convention** to include the categories (both the wiki code and the result):\n\n%%==Categories==\nCategoryWiki%%\n\n==Categories==\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 129 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'CategoryWiki', body = '===Wiki Related Category===\nThis Category will contain links to pages talking about Wikis and Wikis specific topics. When creating such pages, be sure to include CategoryWiki at the bottom of each page, so that page shows listed.\n\n\n----\n\n{{Category col=\"3\"}}\n\n\n----\n[[CategoryCategory List of all categories]]', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 130 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'CategoryCategory', body = '===List of All Categories===\nBelow is the list of all Categories existing on this Wiki, granted that users did things right when they created their pages or new Categories. See WikiCategory for how the system works.\n\n----\n\n{{Category}}', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 131 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'FormattingRules', body = '======Wikka Formatting Guide======\n\n<<**Note:** Anything between 2 sets of double-quotes is not formatted.<<::c::\nOnce you have read through this, test your formatting skills in the SandBox.\n----\n===1. Text Formatting===\n\n~##\"\"**I\'m bold**\"\"##\n~**I\'m bold **\n\n~##\"\"//I\'m italic text!//\"\"##\n~//I\'m italic text!//\n\n~##\"\"And I\'m __underlined__!\"\"##\n~And I\'m __underlined__!\n\n~##\"\"##monospace text##\"\"##\n~##monospace text##\n\n~##\"\"\'\'highlight text\'\'\"\"## (using 2 single-quotes)\n~\'\'highlight text\'\'\n\n~##\"\"++Strike through text++\"\"##\n~++Strike through text++\n\n~##\"\"Press #%ANY KEY#%\"\"##\n~Press #%ANY KEY#%\n\n~##\"\"@@Center text@@\"\"##\n~@@Center text@@\n\n===2. Headers===\n\nUse between five ##=## (for the biggest header) and two ##=## (for the smallest header) on both sides of a text to render it as a header.\n\n~##\"\"====== Really big header ======\"\"##\n~====== Really big header ======\n \n~##\"\"===== Rather big header =====\"\"##\n~===== Rather big header =====\n\n~##\"\"==== Medium header ====\"\"##\n~==== Medium header ====\n\n~##\"\"=== Not-so-big header ===\"\"##\n~=== Not-so-big header ===\n\n~##\"\"== Smallish header ==\"\"##\n~== Smallish header ==\n\n===3. Horizontal separator===\n~##\"\"----\"\"##\n----\n\n===4. Forced line break===\n~##\"\"---\"\"##\n---\n\n===5. Lists and indents===\n\nYou can indent text using a **~**, a **tab** or **4 spaces** (which will auto-convert into a tab).\n\n##\"\"~This text is indented<br />~~This text is double-indented<br /> This text is also indented\"\"##\n\n~This text is indented\n~~This text is double-indented\n This text is also indented\n\nTo create bulleted/ordered lists, use the following markup (you can always use 4 spaces instead of a ##**~**##):\n\n**Bulleted lists**\n##\"\"~- Line one\"\"##\n##\"\"~- Line two\"\"##\n\n- Line one\n- Line two\n\n**Numbered lists**\n##\"\"~1) Line one\"\"##\n##\"\"~1) Line two\"\"##\n\n1) Line one\n1) Line two\n\n**Ordered lists using uppercase characters**\n##\"\"~A) Line one\"\"##\n##\"\"~A) Line two\"\"##\n\nA) Line one\nA) Line two\n\n**Ordered lists using lowercase characters**\n##\"\"~a) Line one\"\"##\n##\"\"~a) Line two\"\"##\n\na) Line one\na) Line two\n\n**Ordered lists using roman numerals**\n##\"\"~I) Line one\"\"##\n##\"\"~I) Line two\"\"##\n\n I) Line one\nI) Line two\n\n**Ordered lists using lowercase roman numerals**\n##\"\"~i) Line one\"\"##\n##\"\"~i) Line two\"\"##\n\n i) Line one\ni) Line two\n\n===6. Inline comments===\n\nTo format some text as an inline comment, use an indent ( **~**, a **tab** or **4 spaces**) followed by a **\"\"&\"\"**.\n\n**Example:**\n\n##\"\"~& Comment\"\"##\n##\"\"~~& Subcomment\"\"##\n##\"\"~~~& Subsubcomment\"\"##\n\n~& Comment\n~~& Subcomment\n~~~& Subsubcomment\n\n===7. Images===\n\nTo place images on a Wiki page, you can use the ##image## action.\n\n**Example:**\n\n~##\"\"{{image class=\"center\" alt=\"DVD logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\"\"##\n~{{image class=\"center\" alt=\"dvd logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\n\nLinks can be external, or internal Wiki links. You don\'t need to enter a link at all, and in that case just an image will be inserted. You can use the optional classes ##left## and ##right## to float images left and right. You don\'t need to use all those attributes, only ##url## is required while ##alt## is recommended for accessibility.\n\n===8. Links===\n\nTo create a **link to a wiki page** you can use any of the following options: ---\n~1) type a ##\"\"WikiName\"\"##: --- --- ##\"\"FormattingRules\"\"## --- FormattingRules --- ---\n~1) add a forced link surrounding the page name by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[SandBox Test your formatting skills]]\"\"## --- [[SandBox Test your formatting skills]] --- --- ##\"\"[[SandBox 沙箱]]\"\"## --- [[SandBox 沙箱]] --- ---\n~1) add an image with a link (see instructions above).\n\nTo **link to external pages**, you can do any of the following: ---\n~1) type a URL inside the page: --- --- ##\"\"http://www.example.com\"\"## --- http://www.example.com --- --- \n~1) add a forced link surrounding the URL by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[http://example.com/jenna/ Jenna\'s Home Page]]\"\"## --- [[http://example.com/jenna/ Jenna\'s Home Page]] --- --- ##\"\"[[mail@example.com Write me!]]\"\"## --- [[mail@example.com Write me!]] --- ---\n~1) add an image with a link (see instructions above);\n~1) add an interwiki link (browse the [[InterWiki list of available interwiki tags]]): --- --- ##\"\"WikiPedia:WikkaWiki\"\"## --- WikiPedia:WikkaWiki --- --- ##\"\"Google:CSS\"\"## --- Google:CSS --- --- ##\"\"Thesaurus:Happy\"\"## --- Thesaurus:Happy --- ---\n\n===9. Tables===\n\nTo create a table, you can use the ##table## action.\n\n**Example:**\n\n~##\"\"{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\"\"##\n\n~{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\n\nNote that ##\"\"###\"\"## must be used to indicate an empty cell.\nComplex tables can also be created by embedding HTML code in a wiki page (see instructions below).\n\n===10. Colored Text===\n\nColored text can be created using the ##color## action:\n\n**Example:**\n\n~##\"\"{{color c=\"blue\" text=\"This is a test.\"}}\"\"##\n~{{color c=\"blue\" text=\"This is a test.\"}}\n\nYou can also use hex values:\n\n**Example:**\n\n~##\"\"{{color hex=\"#DD0000\" text=\"This is another test.\"}}\"\"##\n~{{color hex=\"#DD0000\" text=\"This is another test.\"}}\n\nAlternatively, you can specify a foreground and background color using the ##fg## and ##bg## parameters (they accept both named and hex values):\n\n**Examples:**\n\n~##\"\"{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\n\n~##\"\"{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\n\n\n===11. Floats===\n\nTo create a **left floated box**, use two ##<## characters before and after the block.\n\n**Example:**\n\n~##\"\"<<Some text in a left-floated box hanging around<< Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n<<Some text in a left-floated box hanging around<<Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c::To create a **right floated box**, use two ##>## characters before and after the block.\n\n**Example:**\n\n~##\"\">>Some text in a right-floated box hanging around>> Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n >>Some text in a right-floated box hanging around>>Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c:: Use ##\"\"::c::\"\"## to clear floated blocks.\n\n===12. Code formatters===\n\nYou can easily embed code blocks in a wiki page using a simple markup. Anything within a code block is displayed literally. \nTo create a **generic code block** you can use the following markup:\n\n~##\"\"%% This is a code block %%\"\"##. \n\n%% This is a code block %%\n\nTo create a **code block with syntax highlighting**, you need to specify a //code formatter// (see below for a list of available code formatters). \n\n~##\"\"%%(\"\"{{color c=\"red\" text=\"php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nYou can also specify an optional //starting line// number.\n\n~##\"\"%%(php;\"\"{{color c=\"red\" text=\"15\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nIf you specify a //filename//, this will be used for downloading the code.\n\n~##\"\"%%(php;15;\"\"{{color c=\"red\" text=\"test.php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15;test.php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\n**List of available code formatters:**\n{{table columns=\"6\" cellpadding=\"1\" cells=\"LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;Actionscript;actionscript;ADA;ada;Apache Log;apache;AppleScript; applescript;ASM;asm;ASP;asp;AutoIT;autoit;Bash;bash;BlitzBasic;blitzbasic;BNF;bnf;C;c;C for Macs;c_mac;c#;csharp;C++;cpp;C++ (QT extensions);cpp-qt;CAD DCL;caddcl;CadLisp;cadlisp;CFDG;cfdg;ColdFusion;cfm; CSS;css;D;d;Delphi;delphi;Diff-Output;diff;DIV; div;DOS;dos;Eiffel;eiffel;Fortran;fortran;FreeBasic;freebasic;GML;gml;Groovy;groovy;HTML;html4strict;INI;ini;IO;io;Inno Script;inno;Java 5;java5;Java;java;Javascript;javascript;LaTeX;latex;Lisp;lisp;Lua;lua;Matlab;matlab;Microchip Assembler;mpasm;Microsoft Registry;reg;mIRC;mirc;MySQL;mysql;NSIS;nsis;Objective C;objc;OpenOffice BASIC;oobas;Objective Caml;ocaml;Objective Caml (brief);ocaml-brief;Oracle 8;oracle8;Pascal;pascal;Perl;perl;PHP;php;PHP (brief);php-brief;PL/SQL;plsql;Python;phyton;Q(uick)BASIC;qbasic;robots.txt;robots;Ruby;ruby;SAS;sas;Scheme;scheme;sdlBasic;sdlbasic;SmallTalk;smalltalk;Smarty;smarty;SQL;sql;TCL/iTCL;tcl;T-SQL;tsql;Text;text;thinBasic;thinbasic;Unoidl;idl;VB.NET;vbnet;VHDL;vhdl;Visual BASIC;vb;Visual Fox Pro;visualfoxpro;WinBatch;winbatch;XML;xml;ZiLOG Z80;z80\"}}\n\n===13. Mindmaps===\n\nWikka has native support for [[Wikka:FreeMind mindmaps]]. There are two options for embedding a mindmap in a wiki page.\n\n**Option 1:** Upload a \"\"FreeMind\"\" file to a webserver, and then place a link to it on a wikka page:\n ##\"\"http://yourdomain.com/freemind/freemind.mm\"\"##\nNo special formatting is necessary.\n\n**Option 2:** Paste the \"\"FreeMind\"\" data directly into a wikka page:\n~- Open a \"\"FreeMind\"\" file with a text editor.\n~- Select all, and copy the data.\n~- Browse to your Wikka site and paste the Freemind data into a page. \n\n===14. Embedded HTML===\n\nYou can easily paste HTML in a wiki page by wrapping it into two sets of doublequotes. \n\n~##""[html code]""##\n\n**Examples:**\n\n~##""y = x<sup>n+1</sup>""##\n~\"\"y = x<sup>n+1</sup>\"\"\n\n~##""<acronym title=\"Cascade Style Sheet\">CSS</acronym>""##\n~\"\"<acronym title=\"Cascade Style Sheet\">CSS</acronym>\"\"\n\nBy default, some HTML tags are removed by the \"\"SafeHTML\"\" parser to protect against potentially dangerous code. The list of tags that are stripped can be found on the Wikka:SafeHTML page.\n\nIt is possible to allow //all// HTML tags to be used, see Wikka:UsingHTML for more information.\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 132 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'OwnedPages', body = '{{ownedpages}}{{nocomments}}These numbers merely reflect how many pages you have created, not how much content you have contributed or the quality of your contributions. To see how you rank with other members, you may be interested in checking out the HighScores. \n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 133 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'SandBox', body = 'Test your formatting skills here.\n\n\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 134 mysql_query("insert into ".$config["table_prefix"]."pages set tag = 'SysInfo', body = '===== System Information =====\n\n~-Wikka version: ##{{wikkaversion}}##\n~-PHP version: ##{{phpversion}}##\n~-\"\"MySQL\"\" version: ##{{mysqlversion}}##\n~-\"\"GeSHi\"\" version: ##{{geshiversion}}##\n~-Server:\n~~-Host: ##{{system show=\"host\"}}##\n~~-Operative System: ##{{system show=\"os\"}}##\n~~-Machine: ##{{system show=\"machine\"}}##\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 113 // Do not create another (active) copy when re-running teh installer 114 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = '".$config["root_page"]."', body = '{{image url=\"images/wikka_logo.jpg\" alt=\"wikka logo\" title=\"Welcome to your Wikka site!\"}}\n\nThanks for installing [[Wikka:HomePage WikkaWiki]]! This site is running on version ##{{wikkaversion}}## (see WikkaReleaseNotes). \nYou need to [[UserSettings login]] and then double-click on any page or click on the \"Edit page\" link at the bottom to get started. \n\nAlso don\'t forget to visit the [[Wikka:HomePage WikkaWiki website]]! \n\nUseful pages: FormattingRules, WikkaDocumentation, OrphanedPages, WantedPages, TextSearch.', user = 'WikkaInstaller', owner = '".$config["admin_users"]."', time = now(), latest = 'Y'", $dblink); 115 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'RecentChanges', body = '{{RecentChanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 116 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'RecentlyCommented', body = '{{RecentlyCommented}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 117 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'UserSettings', body = '{{UserSettings}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 118 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'PageIndex', body = '{{PageIndex}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 119 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'WikkaReleaseNotes', body = '{{wikkachanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 120 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'WikkaDocumentation' , body = '=====Wikka Documentation=====\n\nComprehensive and up-to-date documentation on Wikka Wiki can be found on the [[http://wikkawiki.org/WikkaDocumentation main Wikka server]].', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 121 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'WantedPages', body = '{{WantedPages}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 122 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'OrphanedPages', body = '====Orphaned Pages====\n\nThe following list shows those pages held in the Wiki that are not linked to on any other pages.\n\n{{OrphanedPages}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 123 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'TextSearch', body = '{{TextSearch}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 124 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'TextSearchExpanded', body = '{{textsearchexpanded}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 125 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'MyPages', body = '{{MyPages}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 126 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'MyChanges', body = '{{MyChanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 127 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'InterWiki', body = '{{interwikilist}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 128 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'PasswordForgotten', body = '{{emailpassword}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 129 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'WikiCategory', body = '===This wiki is using a very flexible but simple categorizing system to keep everything properly organized.===\n\n{{Category page=\"/\" col=\"10\"}}\n==Here\'s how it works :==\n~- The master list of the categories is **Category Category** (//without the space//) which will automatically list all known maincategories, and should never be edited. This list is easily accessed from the Wiki\'s top navigation bar. (Categories).\n~- Each category has a WikiName name of the form \"\"CategoryName\"\" for example CategoryWiki etc. (see list of maincategories above)\n~- Pages can belong to zero or more categories. Including a page in a category is done by simply mentioning the \"\"CategoryName\"\" on the page (by convention at the very end of the page).\n~- The system allows to build hierarchies of categories by referring to the parent category in the subcategory page. The parent category page will then automatically include the subcategory page in its list.\n~- A special kind of category is **\"\"Category Users\"\"** (//without the space//) to group the userpages, so your Wiki homepage should include it at the end to be included in the category-driven userlist.\n~- New categories can be created (think very hard before doing this though, we don\'t need too much of them) by creating a \"\"CategoryName\"\" page, including \"\"{{Category}}\"\" in it and placing it in the **Category Category** (//without the space//) category (for a main category or another parent category in case you want to create a subcategory).\n\n**Please help to keep this place organized by including the relevant categories in new and existing pages !**\n\n**Notes:** \n~- The above bold items above //include spaces// to prevent this page from showing up in the mentioned categories. This page only belongs in CategoryWiki (which can be safely mentioned) after all !\n~- In order to avoid accidental miscategorization you should **avoid** mentioning a non-related \"\"CategoryName\"\" on a page. This is a side-effect of how the categorizing system works: it\'s based on a textsearch and is not restricted to the footer convention.\n~- Don\'t be put of by the name of this page (WikiCategory) which is a logical name (it\'s about the Wiki and explains Category) but doesn\'t have any special role in the Categorizing system.\n~- To end with this is the **standard convention** to include the categories (both the wiki code and the result):\n\n%%==Categories==\nCategoryWiki%%\n\n==Categories==\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 130 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'CategoryWiki', body = '===Wiki Related Category===\nThis Category will contain links to pages talking about Wikis and Wikis specific topics. When creating such pages, be sure to include CategoryWiki at the bottom of each page, so that page shows listed.\n\n\n----\n\n{{Category col=\"3\"}}\n\n\n----\n[[CategoryCategory List of all categories]]', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 131 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'CategoryCategory', body = '===List of All Categories===\nBelow is the list of all Categories existing on this Wiki, granted that users did things right when they created their pages or new Categories. See WikiCategory for how the system works.\n\n----\n\n{{Category}}', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 132 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'FormattingRules', body = '======Wikka Formatting Guide======\n\n<<**Note:** Anything between 2 sets of double-quotes is not formatted.<<::c::\nOnce you have read through this, test your formatting skills in the SandBox.\n----\n===1. Text Formatting===\n\n~##\"\"**I\'m bold**\"\"##\n~**I\'m bold **\n\n~##\"\"//I\'m italic text!//\"\"##\n~//I\'m italic text!//\n\n~##\"\"And I\'m __underlined__!\"\"##\n~And I\'m __underlined__!\n\n~##\"\"##monospace text##\"\"##\n~##monospace text##\n\n~##\"\"\'\'highlight text\'\'\"\"## (using 2 single-quotes)\n~\'\'highlight text\'\'\n\n~##\"\"++Strike through text++\"\"##\n~++Strike through text++\n\n~##\"\"Press #%ANY KEY#%\"\"##\n~Press #%ANY KEY#%\n\n~##\"\"@@Center text@@\"\"##\n~@@Center text@@\n\n===2. Headers===\n\nUse between five ##=## (for the biggest header) and two ##=## (for the smallest header) on both sides of a text to render it as a header.\n\n~##\"\"====== Really big header ======\"\"##\n~====== Really big header ======\n \n~##\"\"===== Rather big header =====\"\"##\n~===== Rather big header =====\n\n~##\"\"==== Medium header ====\"\"##\n~==== Medium header ====\n\n~##\"\"=== Not-so-big header ===\"\"##\n~=== Not-so-big header ===\n\n~##\"\"== Smallish header ==\"\"##\n~== Smallish header ==\n\n===3. Horizontal separator===\n~##\"\"----\"\"##\n----\n\n===4. Forced line break===\n~##\"\"---\"\"##\n---\n\n===5. Lists and indents===\n\nYou can indent text using a **~**, a **tab** or **4 spaces** (which will auto-convert into a tab).\n\n##\"\"~This text is indented<br />~~This text is double-indented<br /> This text is also indented\"\"##\n\n~This text is indented\n~~This text is double-indented\n This text is also indented\n\nTo create bulleted/ordered lists, use the following markup (you can always use 4 spaces instead of a ##**~**##):\n\n**Bulleted lists**\n##\"\"~- Line one\"\"##\n##\"\"~- Line two\"\"##\n\n- Line one\n- Line two\n\n**Numbered lists**\n##\"\"~1) Line one\"\"##\n##\"\"~1) Line two\"\"##\n\n1) Line one\n1) Line two\n\n**Ordered lists using uppercase characters**\n##\"\"~A) Line one\"\"##\n##\"\"~A) Line two\"\"##\n\nA) Line one\nA) Line two\n\n**Ordered lists using lowercase characters**\n##\"\"~a) Line one\"\"##\n##\"\"~a) Line two\"\"##\n\na) Line one\na) Line two\n\n**Ordered lists using roman numerals**\n##\"\"~I) Line one\"\"##\n##\"\"~I) Line two\"\"##\n\n I) Line one\nI) Line two\n\n**Ordered lists using lowercase roman numerals**\n##\"\"~i) Line one\"\"##\n##\"\"~i) Line two\"\"##\n\n i) Line one\ni) Line two\n\n===6. Inline comments===\n\nTo format some text as an inline comment, use an indent ( **~**, a **tab** or **4 spaces**) followed by a **\"\"&\"\"**.\n\n**Example:**\n\n##\"\"~& Comment\"\"##\n##\"\"~~& Subcomment\"\"##\n##\"\"~~~& Subsubcomment\"\"##\n\n~& Comment\n~~& Subcomment\n~~~& Subsubcomment\n\n===7. Images===\n\nTo place images on a Wiki page, you can use the ##image## action.\n\n**Example:**\n\n~##\"\"{{image class=\"center\" alt=\"DVD logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\"\"##\n~{{image class=\"center\" alt=\"dvd logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\n\nLinks can be external, or internal Wiki links. You don\'t need to enter a link at all, and in that case just an image will be inserted. You can use the optional classes ##left## and ##right## to float images left and right. You don\'t need to use all those attributes, only ##url## is required while ##alt## is recommended for accessibility.\n\n===8. Links===\n\nTo create a **link to a wiki page** you can use any of the following options: ---\n~1) type a ##\"\"WikiName\"\"##: --- --- ##\"\"FormattingRules\"\"## --- FormattingRules --- ---\n~1) add a forced link surrounding the page name by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[SandBox Test your formatting skills]]\"\"## --- [[SandBox Test your formatting skills]] --- --- ##\"\"[[SandBox 沙箱]]\"\"## --- [[SandBox 沙箱]] --- ---\n~1) add an image with a link (see instructions above).\n\nTo **link to external pages**, you can do any of the following: ---\n~1) type a URL inside the page: --- --- ##\"\"http://www.example.com\"\"## --- http://www.example.com --- --- \n~1) add a forced link surrounding the URL by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[http://example.com/jenna/ Jenna\'s Home Page]]\"\"## --- [[http://example.com/jenna/ Jenna\'s Home Page]] --- --- ##\"\"[[mail@example.com Write me!]]\"\"## --- [[mail@example.com Write me!]] --- ---\n~1) add an image with a link (see instructions above);\n~1) add an interwiki link (browse the [[InterWiki list of available interwiki tags]]): --- --- ##\"\"WikiPedia:WikkaWiki\"\"## --- WikiPedia:WikkaWiki --- --- ##\"\"Google:CSS\"\"## --- Google:CSS --- --- ##\"\"Thesaurus:Happy\"\"## --- Thesaurus:Happy --- ---\n\n===9. Tables===\n\nTo create a table, you can use the ##table## action.\n\n**Example:**\n\n~##\"\"{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\"\"##\n\n~{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\n\nNote that ##\"\"###\"\"## must be used to indicate an empty cell.\nComplex tables can also be created by embedding HTML code in a wiki page (see instructions below).\n\n===10. Colored Text===\n\nColored text can be created using the ##color## action:\n\n**Example:**\n\n~##\"\"{{color c=\"blue\" text=\"This is a test.\"}}\"\"##\n~{{color c=\"blue\" text=\"This is a test.\"}}\n\nYou can also use hex values:\n\n**Example:**\n\n~##\"\"{{color hex=\"#DD0000\" text=\"This is another test.\"}}\"\"##\n~{{color hex=\"#DD0000\" text=\"This is another test.\"}}\n\nAlternatively, you can specify a foreground and background color using the ##fg## and ##bg## parameters (they accept both named and hex values):\n\n**Examples:**\n\n~##\"\"{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\n\n~##\"\"{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\n\n\n===11. Floats===\n\nTo create a **left floated box**, use two ##<## characters before and after the block.\n\n**Example:**\n\n~##\"\"<<Some text in a left-floated box hanging around<< Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n<<Some text in a left-floated box hanging around<<Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c::To create a **right floated box**, use two ##>## characters before and after the block.\n\n**Example:**\n\n~##\"\">>Some text in a right-floated box hanging around>> Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n >>Some text in a right-floated box hanging around>>Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c:: Use ##\"\"::c::\"\"## to clear floated blocks.\n\n===12. Code formatters===\n\nYou can easily embed code blocks in a wiki page using a simple markup. Anything within a code block is displayed literally. \nTo create a **generic code block** you can use the following markup:\n\n~##\"\"%% This is a code block %%\"\"##. \n\n%% This is a code block %%\n\nTo create a **code block with syntax highlighting**, you need to specify a //code formatter// (see below for a list of available code formatters). \n\n~##\"\"%%(\"\"{{color c=\"red\" text=\"php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nYou can also specify an optional //starting line// number.\n\n~##\"\"%%(php;\"\"{{color c=\"red\" text=\"15\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nIf you specify a //filename//, this will be used for downloading the code.\n\n~##\"\"%%(php;15;\"\"{{color c=\"red\" text=\"test.php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15;test.php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\n**List of available code formatters:**\n{{table columns=\"6\" cellpadding=\"1\" cells=\"LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;Actionscript;actionscript;ADA;ada;Apache Log;apache;AppleScript; applescript;ASM;asm;ASP;asp;AutoIT;autoit;Bash;bash;BlitzBasic;blitzbasic;BNF;bnf;C;c;C for Macs;c_mac;c#;csharp;C++;cpp;C++ (QT extensions);cpp-qt;CAD DCL;caddcl;CadLisp;cadlisp;CFDG;cfdg;ColdFusion;cfm; CSS;css;D;d;Delphi;delphi;Diff-Output;diff;DIV; div;DOS;dos;Eiffel;eiffel;Fortran;fortran;FreeBasic;freebasic;GML;gml;Groovy;groovy;HTML;html4strict;INI;ini;IO;io;Inno Script;inno;Java 5;java5;Java;java;Javascript;javascript;LaTeX;latex;Lisp;lisp;Lua;lua;Matlab;matlab;Microchip Assembler;mpasm;Microsoft Registry;reg;mIRC;mirc;MySQL;mysql;NSIS;nsis;Objective C;objc;OpenOffice BASIC;oobas;Objective Caml;ocaml;Objective Caml (brief);ocaml-brief;Oracle 8;oracle8;Pascal;pascal;Perl;perl;PHP;php;PHP (brief);php-brief;PL/SQL;plsql;Python;phyton;Q(uick)BASIC;qbasic;robots.txt;robots;Ruby;ruby;SAS;sas;Scheme;scheme;sdlBasic;sdlbasic;SmallTalk;smalltalk;Smarty;smarty;SQL;sql;TCL/iTCL;tcl;T-SQL;tsql;Text;text;thinBasic;thinbasic;Unoidl;idl;VB.NET;vbnet;VHDL;vhdl;Visual BASIC;vb;Visual Fox Pro;visualfoxpro;WinBatch;winbatch;XML;xml;ZiLOG Z80;z80\"}}\n\n===13. Mindmaps===\n\nWikka has native support for [[Wikka:FreeMind mindmaps]]. There are two options for embedding a mindmap in a wiki page.\n\n**Option 1:** Upload a \"\"FreeMind\"\" file to a webserver, and then place a link to it on a wikka page:\n ##\"\"http://yourdomain.com/freemind/freemind.mm\"\"##\nNo special formatting is necessary.\n\n**Option 2:** Paste the \"\"FreeMind\"\" data directly into a wikka page:\n~- Open a \"\"FreeMind\"\" file with a text editor.\n~- Select all, and copy the data.\n~- Browse to your Wikka site and paste the Freemind data into a page. \n\n===14. Embedded HTML===\n\nYou can easily paste HTML in a wiki page by wrapping it into two sets of doublequotes. \n\n~##""[html code]""##\n\n**Examples:**\n\n~##""y = x<sup>n+1</sup>""##\n~\"\"y = x<sup>n+1</sup>\"\"\n\n~##""<acronym title=\"Cascade Style Sheet\">CSS</acronym>""##\n~\"\"<acronym title=\"Cascade Style Sheet\">CSS</acronym>\"\"\n\nBy default, some HTML tags are removed by the \"\"SafeHTML\"\" parser to protect against potentially dangerous code. The list of tags that are stripped can be found on the Wikka:SafeHTML page.\n\nIt is possible to allow //all// HTML tags to be used, see Wikka:UsingHTML for more information.\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 133 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'OwnedPages', body = '{{ownedpages}}{{nocomments}}These numbers merely reflect how many pages you have created, not how much content you have contributed or the quality of your contributions. To see how you rank with other members, you may be interested in checking out the HighScores. \n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 134 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'SandBox', body = 'Test your formatting skills here.\n\n\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 135 if (!Wakka::existsPage('pages',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."pages set tag = 'SysInfo', body = '===== System Information =====\n\n~-Wikka version: ##{{wikkaversion}}##\n~-PHP version: ##{{phpversion}}##\n~-\"\"MySQL\"\" version: ##{{mysqlversion}}##\n~-\"\"GeSHi\"\" version: ##{{geshiversion}}##\n~-Server:\n~~-Host: ##{{system show=\"host\"}}##\n~~-Operative System: ##{{system show=\"os\"}}##\n~~-Machine: ##{{system show=\"machine\"}}##\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink); 135 136 136 137 test("Setting default ACL...", 1); 137 mysql_query("insert into ".$config["table_prefix"]."acls set page_tag = 'UserSettings', read_acl = '*', write_acl = '+', comment_acl = '+'", $dblink); 138 // Do not create another (active) copy when re-running teh installer 139 if (!Wakka::existsPage('acls',$config['table_prefix'])) mysql_query("insert into ".$config['table_prefix']."acls set page_tag = 'UserSettings', read_acl = '*', write_acl = '+', comment_acl = '+'", $dblink); 138 140 139 141 break; … … 145 147 case "0.1": 146 148 print("<strong>Wakka 0.1 to 0.1.1</strong><br />\n"); 147 test("Just very slightly altering the pages table...", 148 @mysql_query("alter table ".$config[ "table_prefix"]."pages add body_r text not null default '' after body", $dblink), "Already done? Hmm!", 0);149 test("Just very slightly altering the pages table...", 150 @mysql_query("alter table ".$config['table_prefix']."pages add body_r text not null default '' after body", $dblink), "Already done? Hmm!", 0); 149 151 test("Claiming all your base...", 1); 150 152 … … 162 164 print("<strong>Wakka 0.1.3-dev to Wikka 1.0.0 changes:</strong><br />\n"); 163 165 test("Adding note column to the pages table...", 164 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."pages ADD note varchar(50) NOT NULL default '' after latest", $dblink), "Failed.", 1);165 test("Just slightly altering the pages table...", 166 @mysql_query("alter table ".$config[ "table_prefix"]."pages DROP COLUMN body_r", $dblink), "Already done? Hmm!", 0);167 test("Just slightly altering the users table...", 168 @mysql_query("alter table ".$config[ "table_prefix"]."users DROP COLUMN motto", $dblink), "Already done? Hmm!", 0);166 @mysql_query("ALTER TABLE ".$config['table_prefix']."pages ADD note varchar(50) NOT NULL default '' after latest", $dblink), "Failed.", 1); 167 test("Just slightly altering the pages table...", 168 @mysql_query("alter table ".$config['table_prefix']."pages DROP COLUMN body_r", $dblink), "Already done? Hmm!", 0); 169 test("Just slightly altering the users table...", 170 @mysql_query("alter table ".$config['table_prefix']."users DROP COLUMN motto", $dblink), "Already done? Hmm!", 0); 169 171 case "1.0": 170 172 case "1.0.1": … … 181 183 test("Creating comment table...", 182 184 @mysql_query( 183 "CREATE TABLE ".$config[ "table_prefix"]."comments (".184 "id int(10) unsigned NOT NULL auto_increment,".185 "page_tag varchar(75) NOT NULL default '',".186 "time datetime NOT NULL default '0000-00-00 00:00:00',".187 "comment text NOT NULL,".188 "user varchar(75) NOT NULL default '',".189 "PRIMARY KEY (id),".190 "KEY idx_page_tag (page_tag),".191 "KEY idx_time (time)".185 "CREATE TABLE ".$config['table_prefix']."comments (". 186 "id int(10) unsigned NOT NULL auto_increment,". 187 "page_tag varchar(75) NOT NULL default '',". 188 "time datetime NOT NULL default '0000-00-00 00:00:00',". 189 "comment text NOT NULL,". 190 "user varchar(75) NOT NULL default '',". 191 "PRIMARY KEY (id),". 192 "KEY idx_page_tag (page_tag),". 193 "KEY idx_time (time)". 192 194 ") TYPE=MyISAM", $dblink), "Already done? Hmm!", 1); 193 test("Copying comments from the pages table to the new comments table...", 194 @mysql_query("INSERT INTO ".$config[ "table_prefix"]."comments (page_tag, time, comment, user) SELECT comment_on, time, body, user FROM ".$config["table_prefix"]."pages WHERE comment_on != '';", $dblink), "Already done? Hmm!", 1);195 test("Deleting comments from the pages table...", 196 @mysql_query("DELETE FROM ".$config[ "table_prefix"]."pages WHERE comment_on != ''", $dblink), "Already done? Hmm!", 1);197 test("Removing comment_on field from the pages table...", 198 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."pages DROP comment_on", $dblink), "Already done? Hmm!", 1);199 test("Removing comment pages from the ACL table...", 200 @mysql_query("DELETE FROM ".$config[ "table_prefix"]."acls WHERE page_tag like 'Comment%'", $dblink), "Already done? Hmm!", 1);195 test("Copying comments from the pages table to the new comments table...", 196 @mysql_query("INSERT INTO ".$config['table_prefix']."comments (page_tag, time, comment, user) SELECT comment_on, time, body, user FROM ".$config['table_prefix']."pages WHERE comment_on != '';", $dblink), "Already done? Hmm!", 1); 197 test("Deleting comments from the pages table...", 198 @mysql_query("DELETE FROM ".$config['table_prefix']."pages WHERE comment_on != ''", $dblink), "Already done? Hmm!", 1); 199 test("Removing comment_on field from the pages table...", 200 @mysql_query("ALTER TABLE ".$config['table_prefix']."pages DROP comment_on", $dblink), "Already done? Hmm!", 1); 201 test("Removing comment pages from the ACL table...", 202 @mysql_query("DELETE FROM ".$config['table_prefix']."acls WHERE page_tag like 'Comment%'", $dblink), "Already done? Hmm!", 1); 201 203 case "1.1.0": 202 204 print("<strong>1.1.0 to 1.1.2 changes:</strong><br />\n"); 203 test("Dropping current ACL table structure...", 204 @mysql_query("DROP TABLE ".$config[ "table_prefix"]."acls", $dblink), "Already done? Hmm!", 0);205 test("Dropping current ACL table structure...", 206 @mysql_query("DROP TABLE ".$config['table_prefix']."acls", $dblink), "Already done? Hmm!", 0); 205 207 test("Creating new ACL table structure...", 206 208 @mysql_query( 207 "CREATE TABLE ".$config[ "table_prefix"]."acls (".208 "page_tag varchar(75) NOT NULL default '',".209 "read_acl text NOT NULL,".210 "write_acl text NOT NULL,".211 "comment_acl text NOT NULL,".212 "PRIMARY KEY (page_tag)".209 "CREATE TABLE ".$config['table_prefix']."acls (". 210 "page_tag varchar(75) NOT NULL default '',". 211 "read_acl text NOT NULL,". 212 "write_acl text NOT NULL,". 213 "comment_acl text NOT NULL,". 214 "PRIMARY KEY (page_tag)". 213 215 ") TYPE=MyISAM", $dblink), "Already exists?", 1); 214 216 case "1.1.2": … … 216 218 print("<strong>1.1.3 to 1.1.3.1 changes:</strong><br />\n"); 217 219 test("Altering pages table structure...", 218 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."pages CHANGE tag tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);220 @mysql_query("ALTER TABLE ".$config['table_prefix']."pages CHANGE tag tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 219 221 test("Altering pages table structure...", 220 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."pages CHANGE user user varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);222 @mysql_query("ALTER TABLE ".$config['table_prefix']."pages CHANGE user user varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 221 223 test("Altering pages table structure...", 222 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."pages CHANGE owner owner varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);224 @mysql_query("ALTER TABLE ".$config['table_prefix']."pages CHANGE owner owner varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 223 225 test("Altering pages table structure...", 224 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."pages CHANGE note note varchar(100) NOT NULL default ''", $dblink), "Failed. ?", 1);226 @mysql_query("ALTER TABLE ".$config['table_prefix']."pages CHANGE note note varchar(100) NOT NULL default ''", $dblink), "Failed. ?", 1); 225 227 test("Altering user table structure...", 226 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."users CHANGE name name varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);228 @mysql_query("ALTER TABLE ".$config['table_prefix']."users CHANGE name name varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 227 229 test("Altering comments table structure...", 228 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."comments CHANGE page_tag page_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);230 @mysql_query("ALTER TABLE ".$config['table_prefix']."comments CHANGE page_tag page_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 229 231 test("Altering comments table structure...", 230 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."comments CHANGE user user varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);232 @mysql_query("ALTER TABLE ".$config['table_prefix']."comments CHANGE user user varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 231 233 test("Altering acls table structure...", 232 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."acls CHANGE page_tag page_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);234 @mysql_query("ALTER TABLE ".$config['table_prefix']."acls CHANGE page_tag page_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 233 235 test("Altering links table structure...", 234 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."links CHANGE from_tag from_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);236 @mysql_query("ALTER TABLE ".$config['table_prefix']."links CHANGE from_tag from_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 235 237 test("Altering links table structure...", 236 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."links CHANGE to_tag to_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);238 @mysql_query("ALTER TABLE ".$config['table_prefix']."links CHANGE to_tag to_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 237 239 test("Altering referrers table structure...", 238 @mysql_query("ALTER TABLE ".$config[ "table_prefix"]."referrers CHANGE page_tag page_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1);240 @mysql_query("ALTER TABLE ".$config['table_prefix']."referrers CHANGE page_tag page_tag varchar(75) NOT NULL default ''", $dblink), "Failed. ?", 1); 239 241 test("Creating referrer_blacklist table...", 240 242 @mysql_query( 241 "CREATE TABLE ".$config[ "table_prefix"]."referrer_blacklist (".242 "spammer varchar(150) NOT NULL default '',".243 "KEY idx_spammer (spammer)".243 "CREATE TABLE ".$config['table_prefix']."referrer_blacklist (". 244 "spammer varchar(150) NOT NULL default '',". 245 "KEY idx_spammer (spammer)". 244 246 ") TYPE=MyISAM", $dblink), "Already exists? Hmm!", 1); 245 test("Altering a pages table index...", 246 @mysql_query("alter table ".$config[ "table_prefix"]."pages DROP INDEX tag", $dblink), "Already done? Hmm!", 0);247 test("Altering a pages table index...", 248 @mysql_query("alter table ".$config[ "table_prefix"]."pages ADD FULLTEXT body (body)", $dblink), "Already done? Hmm!", 0);249 test("Altering a users table index...", 250 @mysql_query("alter table ".$config[ "table_prefix"]."users DROP INDEX idx_name", $dblink), "Already done? Hmm!", 0);247 test("Altering a pages table index...", 248 @mysql_query("alter table ".$config['table_prefix']."pages DROP INDEX tag", $dblink), "Already done? Hmm!", 0); 249 test("Altering a pages table index...", 250 @mysql_query("alter table ".$config['table_prefix']."pages ADD FULLTEXT body (body)", $dblink), "Already done? Hmm!", 0); 251 test("Altering a users table index...", 252 @mysql_query("alter table ".$config['table_prefix']."users DROP INDEX idx_name", $dblink), "Already done? Hmm!", 0); 251 253 case "1.1.3.1": 252 254 case "1.1.3.2": … … 266 268 case "1.1.5.2": 267 269 case "1.1.5.3": 268 test("Adding WikkaReleaseNotes page...", 269 mysql_query("insert into ".$config[ "table_prefix"]."pages set tag = 'WikkaReleaseNotes', body = '{{wikkachanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0);270 test("Adding WikkaDocumentation page...", 271 mysql_query("insert into ".$config[ "table_prefix"]."pages set tag = 'WikkaDocumentation' , body = '=====Wikka Documentation=====\n\nComprehensive and up-to-date documentation on Wikka Wiki can be found on the [[http://wikkawiki.org/WikkaDocumentation main Wikka server]].', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0);270 test("Adding WikkaReleaseNotes page...", 271 mysql_query("insert into ".$config['table_prefix']."pages set tag = 'WikkaReleaseNotes', body = '{{wikkachanges}}{{nocomments}}\n\n\n----\nCategoryWiki', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0); 272 test("Adding WikkaDocumentation page...", 273 mysql_query("insert into ".$config['table_prefix']."pages set tag = 'WikkaDocumentation' , body = '=====Wikka Documentation=====\n\nComprehensive and up-to-date documentation on Wikka Wiki can be found on the [[http://wikkawiki.org/WikkaDocumentation main Wikka server]].', owner = '(Public)', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0); 272 274 // cookie names have changed -- logout user and delete the old cookies 273 275 test(DELETING_COOKIES, 1); 274 276 DeleteCookie("name"); 275 DeleteCookie("password"); 277 DeleteCookie("password"); 276 278 // delete files removed from previous version 277 279 @unlink('actions/wakkabug.php'); … … 294 296 test(DELETING_COOKIES, 1); 295 297 DeleteCookie("wikka_user_name"); 296 DeleteCookie("wikka_pass"); 298 DeleteCookie("wikka_pass"); 297 299 //adding SysInfo page 298 300 test("Adding SysInfo page...", 299 mysql_query("insert into ".$config[ "table_prefix"]."pages set tag = 'SysInfo', body = '===== System Information =====\n\n~-Wikka version: ##{{wikkaversion}}##\n~-PHP version: ##{{phpversion}}##\n~-\"\"MySQL\"\" version: ##{{mysqlversion}}##\n~-\"\"GeSHi\"\" version: ##{{geshiversion}}##\n~-Server:\n~~-Host: ##{{system show=\"host\"}}##\n~~-Operative System: ##{{system show=\"os\"}}##\n~~-Machine: ##{{system show=\"machine\"}}##\n\n----\nCategoryWiki', owner = '(Public)', note='".$upgrade_note."', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0);301 mysql_query("insert into ".$config['table_prefix']."pages set tag = 'SysInfo', body = '===== System Information =====\n\n~-Wikka version: ##{{wikkaversion}}##\n~-PHP version: ##{{phpversion}}##\n~-\"\"MySQL\"\" version: ##{{mysqlversion}}##\n~-\"\"GeSHi\"\" version: ##{{geshiversion}}##\n~-Server:\n~~-Host: ##{{system show=\"host\"}}##\n~~-Operative System: ##{{system show=\"os\"}}##\n~~-Machine: ##{{system show=\"machine\"}}##\n\n----\nCategoryWiki', owner = '(Public)', note='".$upgrade_note."', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0); 300 302 case "1.1.6.2-alpha": 301 303 case "1.1.6.2-beta": 302 304 case "1.1.6.2": 303 test("Archiving latest FormattingRules revision...", 304 mysql_query("update ".$config[ "table_prefix"]."pages set latest = 'N' where tag = 'FormattingRules'"), "Already done? OK!", 0);305 test("Archiving latest FormattingRules revision...", 306 mysql_query("update ".$config['table_prefix']."pages set latest = 'N' where tag = 'FormattingRules'"), "Already done? OK!", 0); 305 307 test("Updating FormattingRules page...", 306 mysql_query("insert into ".$config[ "table_prefix"]."pages set tag = 'FormattingRules', body = '======Wikka Formatting Guide======\n\n<<**Note:** Anything between 2 sets of double-quotes is not formatted.<<::c::\nOnce you have read through this, test your formatting skills in the SandBox.\n----\n===1. Text Formatting===\n\n~##\"\"**I\'m bold**\"\"##\n~**I\'m bold **\n\n~##\"\"//I\'m italic text!//\"\"##\n~//I\'m italic text!//\n\n~##\"\"And I\'m __underlined__!\"\"##\n~And I\'m __underlined__!\n\n~##\"\"##monospace text##\"\"##\n~##monospace text##\n\n~##\"\"\'\'highlight text\'\'\"\"## (using 2 single-quotes)\n~\'\'highlight text\'\'\n\n~##\"\"++Strike through text++\"\"##\n~++Strike through text++\n\n~##\"\"Press #%ANY KEY#%\"\"##\n~Press #%ANY KEY#%\n\n~##\"\"@@Center text@@\"\"##\n~@@Center text@@\n\n===2. Headers===\n\nUse between five ##=## (for the biggest header) and two ##=## (for the smallest header) on both sides of a text to render it as a header.\n\n~##\"\"====== Really big header ======\"\"##\n~====== Really big header ======\n \n~##\"\"===== Rather big header =====\"\"##\n~===== Rather big header =====\n\n~##\"\"==== Medium header ====\"\"##\n~==== Medium header ====\n\n~##\"\"=== Not-so-big header ===\"\"##\n~=== Not-so-big header ===\n\n~##\"\"== Smallish header ==\"\"##\n~== Smallish header ==\n\n===3. Horizontal separator===\n~##\"\"----\"\"##\n----\n\n===4. Forced line break===\n~##\"\"---\"\"##\n---\n\n===5. Lists and indents===\n\nYou can indent text using a **~**, a **tab** or **4 spaces** (which will auto-convert into a tab).\n\n##\"\"~This text is indented<br />~~This text is double-indented<br /> This text is also indented\"\"##\n\n~This text is indented\n~~This text is double-indented\n This text is also indented\n\nTo create bulleted/ordered lists, use the following markup (you can always use 4 spaces instead of a ##**~**##):\n\n**Bulleted lists**\n##\"\"~- Line one\"\"##\n##\"\"~- Line two\"\"##\n\n- Line one\n- Line two\n\n**Numbered lists**\n##\"\"~1) Line one\"\"##\n##\"\"~1) Line two\"\"##\n\n1) Line one\n1) Line two\n\n**Ordered lists using uppercase characters**\n##\"\"~A) Line one\"\"##\n##\"\"~A) Line two\"\"##\n\nA) Line one\nA) Line two\n\n**Ordered lists using lowercase characters**\n##\"\"~a) Line one\"\"##\n##\"\"~a) Line two\"\"##\n\na) Line one\na) Line two\n\n**Ordered lists using roman numerals**\n##\"\"~I) Line one\"\"##\n##\"\"~I) Line two\"\"##\n\n I) Line one\nI) Line two\n\n**Ordered lists using lowercase roman numerals**\n##\"\"~i) Line one\"\"##\n##\"\"~i) Line two\"\"##\n\n i) Line one\ni) Line two\n\n===6. Inline comments===\n\nTo format some text as an inline comment, use an indent ( **~**, a **tab** or **4 spaces**) followed by a **\"\"&\"\"**.\n\n**Example:**\n\n##\"\"~& Comment\"\"##\n##\"\"~~& Subcomment\"\"##\n##\"\"~~~& Subsubcomment\"\"##\n\n~& Comment\n~~& Subcomment\n~~~& Subsubcomment\n\n===7. Images===\n\nTo place images on a Wiki page, you can use the ##image## action.\n\n**Example:**\n\n~##\"\"{{image class=\"center\" alt=\"DVD logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\"\"##\n~{{image class=\"center\" alt=\"dvd logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\n\nLinks can be external, or internal Wiki links. You don\'t need to enter a link at all, and in that case just an image will be inserted. You can use the optional classes ##left## and ##right## to float images left and right. You don\'t need to use all those attributes, only ##url## is required while ##alt## is recommended for accessibility.\n\n===8. Links===\n\nTo create a **link to a wiki page** you can use any of the following options: ---\n~1) type a ##\"\"WikiName\"\"##: --- --- ##\"\"FormattingRules\"\"## --- FormattingRules --- ---\n~1) add a forced link surrounding the page name by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[SandBox Test your formatting skills]]\"\"## --- [[SandBox Test your formatting skills]] --- --- ##\"\"[[SandBox 沙箱]]\"\"## --- [[SandBox 沙箱]] --- ---\n~1) add an image with a link (see instructions above).\n\nTo **link to external pages**, you can do any of the following: ---\n~1) type a URL inside the page: --- --- ##\"\"http://www.example.com\"\"## --- http://www.example.com --- --- \n~1) add a forced link surrounding the URL by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[http://example.com/jenna/ Jenna\'s Home Page]]\"\"## --- [[http://example.com/jenna/ Jenna\'s Home Page]] --- --- ##\"\"[[mail@example.com Write me!]]\"\"## --- [[mail@example.com Write me!]] --- ---\n~1) add an image with a link (see instructions above);\n~1) add an interwiki link (browse the [[InterWiki list of available interwiki tags]]): --- --- ##\"\"WikiPedia:WikkaWiki\"\"## --- WikiPedia:WikkaWiki --- --- ##\"\"Google:CSS\"\"## --- Google:CSS --- --- ##\"\"Thesaurus:Happy\"\"## --- Thesaurus:Happy --- ---\n\n===9. Tables===\n\nTo create a table, you can use the ##table## action.\n\n**Example:**\n\n~##\"\"{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\"\"##\n\n~{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\n\nNote that ##\"\"###\"\"## must be used to indicate an empty cell.\nComplex tables can also be created by embedding HTML code in a wiki page (see instructions below).\n\n===10. Colored Text===\n\nColored text can be created using the ##color## action:\n\n**Example:**\n\n~##\"\"{{color c=\"blue\" text=\"This is a test.\"}}\"\"##\n~{{color c=\"blue\" text=\"This is a test.\"}}\n\nYou can also use hex values:\n\n**Example:**\n\n~##\"\"{{color hex=\"#DD0000\" text=\"This is another test.\"}}\"\"##\n~{{color hex=\"#DD0000\" text=\"This is another test.\"}}\n\nAlternatively, you can specify a foreground and background color using the ##fg## and ##bg## parameters (they accept both named and hex values):\n\n**Examples:**\n\n~##\"\"{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\n\n~##\"\"{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\n\n\n===11. Floats===\n\nTo create a **left floated box**, use two ##<## characters before and after the block.\n\n**Example:**\n\n~##\"\"<<Some text in a left-floated box hanging around<< Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n<<Some text in a left-floated box hanging around<<Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c::To create a **right floated box**, use two ##>## characters before and after the block.\n\n**Example:**\n\n~##\"\">>Some text in a right-floated box hanging around>> Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n >>Some text in a right-floated box hanging around>>Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c:: Use ##\"\"::c::\"\"## to clear floated blocks.\n\n===12. Code formatters===\n\nYou can easily embed code blocks in a wiki page using a simple markup. Anything within a code block is displayed literally. \nTo create a **generic code block** you can use the following markup:\n\n~##\"\"%% This is a code block %%\"\"##. \n\n%% This is a code block %%\n\nTo create a **code block with syntax highlighting**, you need to specify a //code formatter// (see below for a list of available code formatters). \n\n~##\"\"%%(\"\"{{color c=\"red\" text=\"php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nYou can also specify an optional //starting line// number.\n\n~##\"\"%%(php;\"\"{{color c=\"red\" text=\"15\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nIf you specify a //filename//, this will be used for downloading the code.\n\n~##\"\"%%(php;15;\"\"{{color c=\"red\" text=\"test.php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15;test.php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\n**List of available code formatters:**\n{{table columns=\"6\" cellpadding=\"1\" cells=\"LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;Actionscript;actionscript;ADA;ada;Apache Log;apache;AppleScript; applescript;ASM;asm;ASP;asp;AutoIT;autoit;Bash;bash;BlitzBasic;blitzbasic;BNF;bnf;C;c;C for Macs;c_mac;c#;csharp;C++;cpp;C++ (QT extensions);cpp-qt;CAD DCL;caddcl;CadLisp;cadlisp;CFDG;cfdg;ColdFusion;cfm; CSS;css;D;d;Delphi;delphi;Diff-Output;diff;DIV; div;DOS;dos;Eiffel;eiffel;Fortran;fortran;FreeBasic;freebasic;GML;gml;Groovy;groovy;HTML;html4strict;INI;ini;IO;io;Inno Script;inno;Java 5;java5;Java;java;Javascript;javascript;LaTeX;latex;Lisp;lisp;Lua;lua;Matlab;matlab;Microchip Assembler;mpasm;Microsoft Registry;reg;mIRC;mirc;MySQL;mysql;NSIS;nsis;Objective C;objc;OpenOffice BASIC;oobas;Objective Caml;ocaml;Objective Caml (brief);ocaml-brief;Oracle 8;oracle8;Pascal;pascal;Perl;perl;PHP;php;PHP (brief);php-brief;PL/SQL;plsql;Python;phyton;Q(uick)BASIC;qbasic;robots.txt;robots;Ruby;ruby;SAS;sas;Scheme;scheme;sdlBasic;sdlbasic;SmallTalk;smalltalk;Smarty;smarty;SQL;sql;TCL/iTCL;tcl;T-SQL;tsql;Text;text;thinBasic;thinbasic;Unoidl;idl;VB.NET;vbnet;VHDL;vhdl;Visual BASIC;vb;Visual Fox Pro;visualfoxpro;WinBatch;winbatch;XML;xml;ZiLOG Z80;z80\"}}\n\n===13. Mindmaps===\n\nWikka has native support for [[Wikka:FreeMind mindmaps]]. There are two options for embedding a mindmap in a wiki page.\n\n**Option 1:** Upload a \"\"FreeMind\"\" file to a webserver, and then place a link to it on a wikka page:\n ##\"\"http://yourdomain.com/freemind/freemind.mm\"\"##\nNo special formatting is necessary.\n\n**Option 2:** Paste the \"\"FreeMind\"\" data directly into a wikka page:\n~- Open a \"\"FreeMind\"\" file with a text editor.\n~- Select all, and copy the data.\n~- Browse to your Wikka site and paste the Freemind data into a page. \n\n===14. Embedded HTML===\n\nYou can easily paste HTML in a wiki page by wrapping it into two sets of doublequotes. \n\n~##""[html code]""##\n\n**Examples:**\n\n~##""y = x<sup>n+1</sup>""##\n~\"\"y = x<sup>n+1</sup>\"\"\n\n~##""<acronym title=\"Cascade Style Sheet\">CSS</acronym>""##\n~\"\"<acronym title=\"Cascade Style Sheet\">CSS</acronym>\"\"\n\nBy default, some HTML tags are removed by the \"\"SafeHTML\"\" parser to protect against potentially dangerous code. The list of tags that are stripped can be found on the Wikka:SafeHTML page.\n\nIt is possible to allow //all// HTML tags to be used, see Wikka:UsingHTML for more information.\n\n----\nCategoryWiki', owner = '(Public)', note='".$upgrade_note."', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0);308 mysql_query("insert into ".$config['table_prefix']."pages set tag = 'FormattingRules', body = '======Wikka Formatting Guide======\n\n<<**Note:** Anything between 2 sets of double-quotes is not formatted.<<::c::\nOnce you have read through this, test your formatting skills in the SandBox.\n----\n===1. Text Formatting===\n\n~##\"\"**I\'m bold**\"\"##\n~**I\'m bold **\n\n~##\"\"//I\'m italic text!//\"\"##\n~//I\'m italic text!//\n\n~##\"\"And I\'m __underlined__!\"\"##\n~And I\'m __underlined__!\n\n~##\"\"##monospace text##\"\"##\n~##monospace text##\n\n~##\"\"\'\'highlight text\'\'\"\"## (using 2 single-quotes)\n~\'\'highlight text\'\'\n\n~##\"\"++Strike through text++\"\"##\n~++Strike through text++\n\n~##\"\"Press #%ANY KEY#%\"\"##\n~Press #%ANY KEY#%\n\n~##\"\"@@Center text@@\"\"##\n~@@Center text@@\n\n===2. Headers===\n\nUse between five ##=## (for the biggest header) and two ##=## (for the smallest header) on both sides of a text to render it as a header.\n\n~##\"\"====== Really big header ======\"\"##\n~====== Really big header ======\n \n~##\"\"===== Rather big header =====\"\"##\n~===== Rather big header =====\n\n~##\"\"==== Medium header ====\"\"##\n~==== Medium header ====\n\n~##\"\"=== Not-so-big header ===\"\"##\n~=== Not-so-big header ===\n\n~##\"\"== Smallish header ==\"\"##\n~== Smallish header ==\n\n===3. Horizontal separator===\n~##\"\"----\"\"##\n----\n\n===4. Forced line break===\n~##\"\"---\"\"##\n---\n\n===5. Lists and indents===\n\nYou can indent text using a **~**, a **tab** or **4 spaces** (which will auto-convert into a tab).\n\n##\"\"~This text is indented<br />~~This text is double-indented<br /> This text is also indented\"\"##\n\n~This text is indented\n~~This text is double-indented\n This text is also indented\n\nTo create bulleted/ordered lists, use the following markup (you can always use 4 spaces instead of a ##**~**##):\n\n**Bulleted lists**\n##\"\"~- Line one\"\"##\n##\"\"~- Line two\"\"##\n\n- Line one\n- Line two\n\n**Numbered lists**\n##\"\"~1) Line one\"\"##\n##\"\"~1) Line two\"\"##\n\n1) Line one\n1) Line two\n\n**Ordered lists using uppercase characters**\n##\"\"~A) Line one\"\"##\n##\"\"~A) Line two\"\"##\n\nA) Line one\nA) Line two\n\n**Ordered lists using lowercase characters**\n##\"\"~a) Line one\"\"##\n##\"\"~a) Line two\"\"##\n\na) Line one\na) Line two\n\n**Ordered lists using roman numerals**\n##\"\"~I) Line one\"\"##\n##\"\"~I) Line two\"\"##\n\n I) Line one\nI) Line two\n\n**Ordered lists using lowercase roman numerals**\n##\"\"~i) Line one\"\"##\n##\"\"~i) Line two\"\"##\n\n i) Line one\ni) Line two\n\n===6. Inline comments===\n\nTo format some text as an inline comment, use an indent ( **~**, a **tab** or **4 spaces**) followed by a **\"\"&\"\"**.\n\n**Example:**\n\n##\"\"~& Comment\"\"##\n##\"\"~~& Subcomment\"\"##\n##\"\"~~~& Subsubcomment\"\"##\n\n~& Comment\n~~& Subcomment\n~~~& Subsubcomment\n\n===7. Images===\n\nTo place images on a Wiki page, you can use the ##image## action.\n\n**Example:**\n\n~##\"\"{{image class=\"center\" alt=\"DVD logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\"\"##\n~{{image class=\"center\" alt=\"dvd logo\" title=\"An Image Link\" url=\"images/dvdvideo.gif\" link=\"RecentChanges\"}}\n\nLinks can be external, or internal Wiki links. You don\'t need to enter a link at all, and in that case just an image will be inserted. You can use the optional classes ##left## and ##right## to float images left and right. You don\'t need to use all those attributes, only ##url## is required while ##alt## is recommended for accessibility.\n\n===8. Links===\n\nTo create a **link to a wiki page** you can use any of the following options: ---\n~1) type a ##\"\"WikiName\"\"##: --- --- ##\"\"FormattingRules\"\"## --- FormattingRules --- ---\n~1) add a forced link surrounding the page name by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[SandBox Test your formatting skills]]\"\"## --- [[SandBox Test your formatting skills]] --- --- ##\"\"[[SandBox 沙箱]]\"\"## --- [[SandBox 沙箱]] --- ---\n~1) add an image with a link (see instructions above).\n\nTo **link to external pages**, you can do any of the following: ---\n~1) type a URL inside the page: --- --- ##\"\"http://www.example.com\"\"## --- http://www.example.com --- --- \n~1) add a forced link surrounding the URL by ##\"\"[[\"\"## and ##\"\"]]\"\"## (everything after the first space will be shown as description): --- --- ##\"\"[[http://example.com/jenna/ Jenna\'s Home Page]]\"\"## --- [[http://example.com/jenna/ Jenna\'s Home Page]] --- --- ##\"\"[[mail@example.com Write me!]]\"\"## --- [[mail@example.com Write me!]] --- ---\n~1) add an image with a link (see instructions above);\n~1) add an interwiki link (browse the [[InterWiki list of available interwiki tags]]): --- --- ##\"\"WikiPedia:WikkaWiki\"\"## --- WikiPedia:WikkaWiki --- --- ##\"\"Google:CSS\"\"## --- Google:CSS --- --- ##\"\"Thesaurus:Happy\"\"## --- Thesaurus:Happy --- ---\n\n===9. Tables===\n\nTo create a table, you can use the ##table## action.\n\n**Example:**\n\n~##\"\"{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\"\"##\n\n~{{table columns=\"3\" cellpadding=\"1\" cells=\"BIG;GREEN;FROGS;yes;yes;no;no;no;###\"}}\n\nNote that ##\"\"###\"\"## must be used to indicate an empty cell.\nComplex tables can also be created by embedding HTML code in a wiki page (see instructions below).\n\n===10. Colored Text===\n\nColored text can be created using the ##color## action:\n\n**Example:**\n\n~##\"\"{{color c=\"blue\" text=\"This is a test.\"}}\"\"##\n~{{color c=\"blue\" text=\"This is a test.\"}}\n\nYou can also use hex values:\n\n**Example:**\n\n~##\"\"{{color hex=\"#DD0000\" text=\"This is another test.\"}}\"\"##\n~{{color hex=\"#DD0000\" text=\"This is another test.\"}}\n\nAlternatively, you can specify a foreground and background color using the ##fg## and ##bg## parameters (they accept both named and hex values):\n\n**Examples:**\n\n~##\"\"{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"#FF0000\" bg=\"#000000\" text=\"This is colored text on colored background\"}}\n\n~##\"\"{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\"\"##\n~{{color fg=\"lightgreen\" bg=\"black\" text=\"This is colored text on colored background\"}}\n\n\n===11. Floats===\n\nTo create a **left floated box**, use two ##<## characters before and after the block.\n\n**Example:**\n\n~##\"\"<<Some text in a left-floated box hanging around<< Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n<<Some text in a left-floated box hanging around<<Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c::To create a **right floated box**, use two ##>## characters before and after the block.\n\n**Example:**\n\n~##\"\">>Some text in a right-floated box hanging around>> Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\"\"##\n\n >>Some text in a right-floated box hanging around>>Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler. Some more text as a filler.\n\n::c:: Use ##\"\"::c::\"\"## to clear floated blocks.\n\n===12. Code formatters===\n\nYou can easily embed code blocks in a wiki page using a simple markup. Anything within a code block is displayed literally. \nTo create a **generic code block** you can use the following markup:\n\n~##\"\"%% This is a code block %%\"\"##. \n\n%% This is a code block %%\n\nTo create a **code block with syntax highlighting**, you need to specify a //code formatter// (see below for a list of available code formatters). \n\n~##\"\"%%(\"\"{{color c=\"red\" text=\"php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nYou can also specify an optional //starting line// number.\n\n~##\"\"%%(php;\"\"{{color c=\"red\" text=\"15\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\nIf you specify a //filename//, this will be used for downloading the code.\n\n~##\"\"%%(php;15;\"\"{{color c=\"red\" text=\"test.php\"}}\"\")<br /><?php<br />echo \"Hello, World!\";<br />?><br />%%\"\"##\n\n%%(php;15;test.php)\n<?php\necho \"Hello, World!\";\n?>\n%%\n\n**List of available code formatters:**\n{{table columns=\"6\" cellpadding=\"1\" cells=\"LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;LANGUAGE;FORMATTER;Actionscript;actionscript;ADA;ada;Apache Log;apache;AppleScript; applescript;ASM;asm;ASP;asp;AutoIT;autoit;Bash;bash;BlitzBasic;blitzbasic;BNF;bnf;C;c;C for Macs;c_mac;c#;csharp;C++;cpp;C++ (QT extensions);cpp-qt;CAD DCL;caddcl;CadLisp;cadlisp;CFDG;cfdg;ColdFusion;cfm; CSS;css;D;d;Delphi;delphi;Diff-Output;diff;DIV; div;DOS;dos;Eiffel;eiffel;Fortran;fortran;FreeBasic;freebasic;GML;gml;Groovy;groovy;HTML;html4strict;INI;ini;IO;io;Inno Script;inno;Java 5;java5;Java;java;Javascript;javascript;LaTeX;latex;Lisp;lisp;Lua;lua;Matlab;matlab;Microchip Assembler;mpasm;Microsoft Registry;reg;mIRC;mirc;MySQL;mysql;NSIS;nsis;Objective C;objc;OpenOffice BASIC;oobas;Objective Caml;ocaml;Objective Caml (brief);ocaml-brief;Oracle 8;oracle8;Pascal;pascal;Perl;perl;PHP;php;PHP (brief);php-brief;PL/SQL;plsql;Python;phyton;Q(uick)BASIC;qbasic;robots.txt;robots;Ruby;ruby;SAS;sas;Scheme;scheme;sdlBasic;sdlbasic;SmallTalk;smalltalk;Smarty;smarty;SQL;sql;TCL/iTCL;tcl;T-SQL;tsql;Text;text;thinBasic;thinbasic;Unoidl;idl;VB.NET;vbnet;VHDL;vhdl;Visual BASIC;vb;Visual Fox Pro;visualfoxpro;WinBatch;winbatch;XML;xml;ZiLOG Z80;z80\"}}\n\n===13. Mindmaps===\n\nWikka has native support for [[Wikka:FreeMind mindmaps]]. There are two options for embedding a mindmap in a wiki page.\n\n**Option 1:** Upload a \"\"FreeMind\"\" file to a webserver, and then place a link to it on a wikka page:\n ##\"\"http://yourdomain.com/freemind/freemind.mm\"\"##\nNo special formatting is necessary.\n\n**Option 2:** Paste the \"\"FreeMind\"\" data directly into a wikka page:\n~- Open a \"\"FreeMind\"\" file with a text editor.\n~- Select all, and copy the data.\n~- Browse to your Wikka site and paste the Freemind data into a page. \n\n===14. Embedded HTML===\n\nYou can easily paste HTML in a wiki page by wrapping it into two sets of doublequotes. \n\n~##""[html code]""##\n\n**Examples:**\n\n~##""y = x<sup>n+1</sup>""##\n~\"\"y = x<sup>n+1</sup>\"\"\n\n~##""<acronym title=\"Cascade Style Sheet\">CSS</acronym>""##\n~\"\"<acronym title=\"Cascade Style Sheet\">CSS</acronym>\"\"\n\nBy default, some HTML tags are removed by the \"\"SafeHTML\"\" parser to protect against potentially dangerous code. The list of tags that are stripped can be found on the Wikka:SafeHTML page.\n\nIt is possible to allow //all// HTML tags to be used, see Wikka:UsingHTML for more information.\n\n----\nCategoryWiki', owner = '(Public)', note='".$upgrade_note."', user = 'WikkaInstaller', time = now(), latest = 'Y'", $dblink), "Already done? OK!", 0); 307 309 break; 308 310 case "1.1.6.3":