Wikka Mod 041

Type: Feature Addition

Credit

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.
 
All  #  A  #  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

C
CachingRSS [CachingRSS] . . . . Owner: DreckFehler
CalcInfo [CalcInfo] . . . . Owner: JfDelesse
CaleB [CaleB] . . . . Owner: CaleB
CalendarActionInfo [CalendarActionInfo] . . . . Owner: JavaWoman
CalendarLinkAction [CalendarLinkAction] . . . . Owner: MasinAlDujaili
CalendarLinkActionInfo [CalendarLinkActionInfo] . . . . Owner: MasinAlDujaili
CallsignLookupAction [CallsignLookupAction] . . . . Owner: BrianKoontz
CamelCase [CamelCase] . . . . Owner: DarTar
CanadianWeather [CanadianWeather] . . . . Owner: GmBowen
CaptnRuss [CaptnRuss] . . . . Owner: CaptnRuss
CategorizationByLinks [CategorizationByLinks] . . . . Owner: DotMG
CategoryActionInfo [CategoryActionInfo] . . . . Owner: NilsLindenberg
CategoryCategory [CategoryCategory]
CategoryComparison [CategoryComparison] . . . . Owner: DarTar
CategoryDeleteMe [CategoryDeleteMe] . . . . Owner: DarTar
CategoryDevelopment [CategoryDevelopment]
CategoryDevelopment3rdParty [CategoryDevelopment3rdParty] . . . . Owner: JavaWoman
CategoryDevelopmentActions [CategoryDevelopmentActions] . . . . Owner: JavaWoman
CategoryDevelopmentAdmin [CategoryDevelopmentAdmin] . . . . Owner: JavaWoman
CategoryDevelopmentAntiSpam [CategoryDevelopmentAntiSpam] . . . . Owner: JavaWoman
CategoryDevelopmentArchitecture [CategoryDevelopmentArchitecture] . . . . Owner: JavaWoman
CategoryDevelopmentArchive [CategoryDevelopmentArchive] . . . . Owner: JavaWoman
CategoryDevelopmentCore [CategoryDevelopmentCore] . . . . Owner: JavaWoman
CategoryDevelopmentDiscussion [CategoryDevelopmentDiscussion] . . . . Owner: JavaWoman
CategoryDevelopmentDocumentation [CategoryDevelopmentDocumentation] . . . . Owner: JavaWoman
CategoryDevelopmentFormatters [CategoryDevelopmentFormatters] . . . . Owner: JavaWoman
CategoryDevelopmentHandlers [CategoryDevelopmentHandlers] . . . . Owner: JavaWoman
CategoryDevelopmentI18n [CategoryDevelopmentI18n] . . . . Owner: JavaWoman
CategoryDevelopmentMarkup [CategoryDevelopmentMarkup] . . . . Owner: JavaWoman
CategoryDevelopmentSecurity [CategoryDevelopmentSecurity] . . . . Owner: JavaWoman
CategoryDevelopmentSuggestions [CategoryDevelopmentSuggestions] . . . . Owner: JavaWoman
CategoryDevelopmentSyndication [CategoryDevelopmentSyndication] . . . . Owner: DarTar
CategoryDevelopmentTest [CategoryDevelopmentTest] . . . . Owner: JavaWoman
CategoryDevelopmentUserAccount [CategoryDevelopmentUserAccount] . . . . Owner: JavaWoman
CategoryDocumentation [CategoryDocumentation]
CategoryDocumentationDE [CategoryDocumentationDE] . . . . Owner: NilsLindenberg
CategoryDocumentationES [CategoryDocumentationES] . . . . Owner: YanB
CategoryDocumentationFR [CategoryDocumentationFR] . . . . Owner: PivWan
CategoryFreeMind [CategoryFreeMind] . . . . Owner: DarTar
CategoryHowto [CategoryHowto] . . . . Owner: JavaWoman
CategoryLayout [CategoryLayout] . . . . Owner: DarTar
CategoryMigratedMain [CategoryMigratedMain] . . . . Owner: BrianKoontz
CategoryPatternInfoFR [CategoryPatternInfoFR] . . . . Owner: DotMG
CategoryReference [CategoryReference] . . . . Owner: DarTar
CategoryRegex [CategoryRegex] . . . . Owner: DarTar
CategorySpanish [CategorySpanish] . . . . Owner: PedroM
CategoryStyle [CategoryStyle] . . . . Owner: WillyPs
CategorySupport [CategorySupport] . . . . Owner: MonstoBrukes
CategorySystemOverhaul [CategorySystemOverhaul] . . . . Owner: JsnX
CategoryTemplate [CategoryTemplate] . . . . Owner: JavaWoman
CategoryTree [CategoryTree] . . . . Owner: LeOn
CategoryTroubleshooting [CategoryTroubleshooting] . . . . Owner: JavaWoman
CategoryURModules [CategoryURModules] . . . . Owner: BrianKoontz
CategoryUserContributions [CategoryUserContributions] . . . . Owner: NilsLindenberg
CategoryUsers [CategoryUsers]
CategoryVisualDocumentation [CategoryVisualDocumentation] . . . . Owner: JavaWoman
CategoryVisualDocumentationES [CategoryVisualDocumentationES] . . . . Owner: YanB
CategoryWelcome [CategoryWelcome] . . . . Owner: DarTar
CategoryWiki [CategoryWiki]
CategoryWikka [CategoryWikka]
CategoryWikkaArchitecture [CategoryWikkaArchitecture] . . . . Owner: JavaWoman
CategoryWikkaCase [CategoryWikkaCase] . . . . Owner: BrianKoontz
CategoryWorkaround [CategoryWorkaround] . . . . Owner: JavaWoman
CatIvan [CatIvan] . . . . Owner: CatIvan
ChangesClip [ChangesClip] . . . . Owner: IntElf
ChangesClipFooter [ChangesClipFooter] . . . . Owner: WillyPs
ChangesTeaser [ChangesTeaser] . . . . Owner: DavePreston
CharlesQin [CharlesQin] . . . . Owner: CharlesQin
CharlotteFischer [CharlotteFischer] . . . . Owner: CharlotteFischer
CharsetNotSupportedWorkaround [CharsetNotSupportedWorkaround] . . . . Owner: JavaWoman
ChartStyling [ChartStyling] . . . . Owner: DarTar
Chat1 [Chat1] . . . . Owner: GmBowen
ChecklinksAction [Checklinks Action] . . . . Owner: DomBonj
ChecklinksActionInfo [ChecklinksActionInfo] . . . . Owner: DomBonj
ChewBakka [ChewBakka] . . . . Owner: ChewBakka
ChiWaWa [ChiWaWa] . . . . Owner: ChiWaWa
ChriS [ChriS] . . . . Owner: ChriS
ChrisB [ChrisB] . . . . Owner: ChrisB
ChrisBuechler [ChrisBuechler] . . . . Owner: ChrisBuechler
ChrisCase [ChrisCase] . . . . Owner: ChrisCase
ChrisH [ChrisH] . . . . Owner: ChrisH
ChrisSpada [ChrisSpada] . . . . Owner: ChrisSpada
ChristianBarthelemy [ChristianBarthelemy] . . . . Owner: ChristianBarthelemy
ChristinaMarcet [ChristinaMarcet] . . . . Owner: ChristinaMarcet
ChristopherAllen [ChristopherAllen] . . . . Owner: ChristopherAllen
ChristopherHerbert [ChristopherHerbert] . . . . Owner: ChristopherHerbert
ChuckPheatt [ChuckPheatt] . . . . Owner: ChuckPheatt
CIABotNotifier [CIABotNotifier] . . . . Owner: BrianKoontz
CimNine [CimNine] . . . . Owner: CimNine
CitiWiki [CitiWiki] . . . . Owner: BrianKoontz
CKeditor4Wikka [CKeditor4Wikka] . . . . Owner: MaiGre
CloneACLs [CloneACLs] . . . . Owner: BrianKoontz
CloneAction [CloneAction] . . . . Owner: ChristianBarthelemy
CloneHandler [CloneHandler] . . . . Owner: ChristianBarthelemy
CloneHandlerInfo [CloneHandlerInfo] . . . . Owner: DarTar
CloneHandlerInfoFR [CloneHandlerInfoFR] . . . . Owner: PivWan
CodeAtBrilaps [CodeAtBrilaps] . . . . Owner: CodeAtBrilaps
CodeContributions [User-contributed extensions for WikkaWiki]
CodeExportdb [CodeExportdb] . . . . Owner: SergiO
CodingGuidelinesHowto [CodingGuidelinesHowto] . . . . Owner: DarTar
CodingGuidelinesTextConstants [CodingGuidelinesTextConstants] . . . . Owner: JavaWoman
ColinI [ColinI] . . . . Owner: ColinI
CollegeTeachingwithWikka [CollegeTeachingwithWikka] . . . . Owner: DewJoy
ColorAction [ColorAction] . . . . Owner: NilsLindenberg
ColorActionInfo [ColorActionInfo] . . . . Owner: NilsLindenberg
CommentPageInfo [CommentPageInfo]
CommentsClipFooter [CommentsClipFooter] . . . . Owner: WillyPs
CommentsFormatting [CommentsFormatting] . . . . Owner: NilsLindenberg
CommerceQuest [CommerceQuest] . . . . Owner: BenMatt
CommunityNotes [CommunityNotes]
CompatibilityCode [CompatibilityCode] . . . . Owner: JavaWoman
CompetencesDetecs [CompetencesDetecs] . . . . Owner: AlainPluquet
ConfigurationOptions [ConfigurationOptions] . . . . Owner: RichardTerry
ConfigurationOptionsFR [ConfigurationOptionsFR] . . . . Owner: PivWan
ConsistentKnowledgeModel [ConsistentKnowledgeModel] . . . . Owner: MarkHissinkMuller
ContinuousRefactoring [ContinuousRefactoring] . . . . Owner: MarkHissinkMuller
ControledLinks [ControledLinks] . . . . Owner: DreckFehler
ConvertingToAndFromWikkaMarkup [ConvertingToAndFromWikkaMarkup] . . . . Owner: BrianKoontz
CoreD [CoreD] . . . . Owner: CoreD
CoriSchlegel [CoriSchlegel] . . . . Owner: CoriSchlegel
CreateNewDB [CreateNewDB] . . . . Owner: DocXoc
CreateNewPage [CreateNewPage]
CreateNewPageES [CreateNewPageES] . . . . Owner: YanB
CreateNewPageFR [CreateNewPageFR] . . . . Owner: PivWan
Credits [Credits] . . . . Owner: MichaelElsdoerfer
CreditsPage [Credits Page]
CriTeria [CriTeria] . . . . Owner: OtTo
CrossAndFlame [CrossAndFlame] . . . . Owner: CrossAndFlame
CryDust [CryDust] . . . . Owner: CryDust
CrystalHawk [CrystalHawk] . . . . Owner: CrystalHawk
CrystalWoW [CrystalWoW] . . . . Owner: CrystalHawk
CsillagKristof [CsillagKristof] . . . . Owner: CsillagKristof
CustomCSS [CustomCSS] . . . . Owner: DennyShimkoski
CustomPageTitleTag [CustomPageTitleTag] . . . . Owner: TomEk
CyberFresh [CyberFresh] . . . . Owner: CyberFresh
CyClope [CyClope] . . . . Owner: CyClope
CyneBeald [CyneBeald] . . . . Owner: CyneBeald
CynthiaBlue [CynthiaBlue] . . . . Owner: CynthiaBlue



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>");
}
?>
There are 5 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki