Wikka Mod 041
Type: Feature AdditionCredit
Mark Kasper and GmBowen (main credit for the idea and initial code)AHerdOfTurtles (for helping me see that this is a cool idea)
Jason Tourtelotte (major refinement to the code -- almost a complete rewrite)
Description
This modification adds the ability to show an index listing of pages that start with a certain letter. There is also an alphabetical heading at the top of each listing. Just click a letter to see pages that start with that letter.
For example:
Usage:
{{pageindex letter="d"}}
Outcome:
Page Index
This is an alphabetical list of pages you can read on this server.
G
GamblingPedia [GamblingPedia] . . . . Owner: GamblingPedia
GctTodayTomorrow [GctTodayTomorrow] . . . . Owner: GctTodayTomorrow
GeneralWikkaConfiguration [GeneralWikkaConfiguration] . . . . Owner: MasinAlDujaili
GenerateUniqueId [GenerateUniqueId] . . . . Owner: JavaWoman
GeorgePetsagourakis [GeorgePetsagourakis] . . . . Owner: GeorgePetsagourakis
GerdAmi [GerdAmi] . . . . Owner: GerdAmi
GerdAmiMenu [GerdAmiMenu] . . . . Owner: GerdAmi
GermanTranslation [GermanTranslation] . . . . Owner: NilsLindenberg
GeSHi [GeSHi] . . . . Owner: DarTar
GibriS [GibriS] . . . . Owner: GibriS
GideonKiers [GideonKiers] . . . . Owner: GideonKiers
GigaClon [GigaClon] . . . . Owner: GigaClon
GiorgosKontopoulos [GiorgosKontopoulos] . . . . Owner: GiorgosKontopoulos
GlenCoulthard [GlenCoulthard] . . . . Owner: GlenCoulthard
GlennJackman [GlennJackman] . . . . Owner: GlennJackman
GlossoLalie [GlossoLalie] . . . . Owner: GlossoLalie
GmBowen [GmBowen] . . . . Owner: GmBowen
GmBowenAdminPageControlTool [GmBowenAdminPageControlTool] . . . . Owner: GmBowen
GmBowenCalendar [GmBowenCalendar] . . . . Owner: GmBowen
GmBowenCounter [GmBowenCounter] . . . . Owner: GmBowen
GmBowenRecentEditCheck [GmBowenRecentEditCheck] . . . . Owner: GmBowen
GmBowenSpellchecker [GmBowenSpellchecker] . . . . Owner: GmBowen
GmBowenUnitConverter [GmBowenUnitConverter] . . . . Owner: GmBowen
GmBowenWikkaAsPIM [GmBowenWikkaAsPIM] . . . . Owner: GmBowen
GoNorvin [GoNorvin] . . . . Owner: GoNorvin
GoogleForm1 [GoogleForm1] . . . . Owner: MiKolar
GoogleFormActionInfo [GoogleFormActionInfo] . . . . Owner: NilsLindenberg
GoogleMap [GoogleMap] . . . . Owner: NilsLindenberg
GoogleSitemap [GoogleSitemap] . . . . Owner: BarkerJr
GoogleSitemapHandler [GoogleSitemapHandler] . . . . Owner: DarTar
GoogleVideo [Embed GoogleVideo] . . . . Owner: MytWm
GooseBumps4All [GooseBumps4All] . . . . Owner: GooseBumps4All
GordonMcLean [GordonMcLean] . . . . Owner: GordonMcLean
GrabCodeHandler [GrabCodeHandler] . . . . Owner: DarTar
GraphMaker [GraphMaker] . . . . Owner: GmBowen
GraphvizFormatter [GraphvizFormatter] . . . . Owner: TamKienDuong
GregorLindner [GregorLindner] . . . . Owner: GregorLindner
GregRice [GregRice] . . . . Owner: GregRice
GroupManagement [GroupManagement] . . . . Owner: DreckFehler
Code
[26/9/04] actions/pageindex.php file after this mod:
<?php if ($pages = $this->LoadAllPages()) { if (isset($_REQUEST["letter"])) $requested_letter = $_REQUEST["letter"]; else $requested_letter = ''; if (!$requested_letter && isset($letter)) $requested_letter = strtoupper($letter); $cached_username = $this->GetUserName(); $user_owns_pages = false; $link = $this->href("", "", "letter="); $index_header = "<strong><a href='$link'>All </a></strong> \n"; $index_output = ""; $current_character = ""; $character_changed = false; foreach ($pages as $page) { $page_owner = $page["owner"]; // $this->CachePage($page); $firstChar = strtoupper($page["tag"][0]); if (!preg_match("/[A-Za-z]/", $firstChar)) $firstChar = "#"; if ($firstChar != $current_character) { $index_header .= "<strong><a href='$link$firstChar'>$firstChar</a></strong> \n"; $current_character = $firstChar; $character_changed = true; } if ($requested_letter == '' || $firstChar == $requested_letter) { if ($character_changed) { $index_output .= "<br />\n<strong>$firstChar</strong><br />\n"; $character_changed = false; } $index_output .= $this->Link($page["tag"]); if ($cached_username == $page_owner) { $index_output .= "*"; $user_owns_pages = true; } elseif ($page_owner != '(Public)' && $page_owner != '') { $index_output .= " . . . . Owner: ".$page_owner; } $index_output .= "<br />\n"; } } $index_header .= "<br />"; if ($user_owns_pages) $index_output .= "<br />\n* Indicates a page that you own.<br />\n"; print $index_header.$index_output; } else { print("<em>No pages found.</em>"); } ?>