Extension:BreadCrumbs

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
BreadCrumbs

Release status: stable

Implementation User interface
Description Shows the users path through the wiki.
Author(s) Tony Boyles, Manuel Schneider
Last version 0.3.3 (2012-09-24)
MediaWiki > 1.9
Database changes no
License GPL v2.0
Download
README
CHANGELOG
Parameters

$wgDefaultUserOptions['breadcrumbs-delimiter']
$wgDefaultUserOptions['breadcrumbs-numberofcrumbs']
$wgDefaultUserOptions['breadcrumbs-showcrumbs']
$wgDefaultUserOptions['breadcrumbs-namespaces']
$wgDefaultUserOptions['breadcrumbs-filter-duplicates']
$wgDefaultUserOptions['breadcrumbs-ignore-refreshes']
$wgBreadCrumbsShowAnons
$wgBreadCrumbsAllowUPOs

Hooks used
ArticleViewHeader

OutputPageParserOutput
User

Check usage and version matrix


The BreadCrumbs extension shows the users path through the wiki.

This extension creates breadcrumbs in the traditional "How did I get here?" sense; use Extension:BreadCrumbs2 for breadcrumbs in the recently popular category-based "Where am I?" sense.

Contents

Download [edit]

Download a snapshot from gerrit.

Installation [edit]

Installation follows the usual process:

  1. Get the files by the instructions above, be sure they're in your $IP/extensions/BreadCrumbs/ directory.
  2. Modify your LocalSettings.php file. To do so, add
    require_once("$IP/extensions/BreadCrumbs/BreadCrumbs.php");
    into your wiki's LocalSettings.php
  3. (Optional) Set any Configuration defaults in the LocalSettings file. For example, if I wanted not to allow users to set preferences for breadcrumbs, I would add
    $wgBreadCrumbsAllowUPOs = false;
    below the line we added in Step 2.
  4. Installation can now be verified through Special:Version.

Options [edit]

By default the following options are set by this extension:

$wgDefaultUserOptions['breadcrumbs-showcrumbs'] = true; # Set of the breadcrumbs should be shown or not
$wgBreadCrumbsAllowUPOs = true; # Allow users to edit their BreadCrumbs preferences
$wgBreadCrumbsShowAnons = true; # Show breadcrumbs to anonymous users
$wgDefaultUserOptions['breadcrumbs-preceding-text'] = ''; # Text to appear before breadcrumbs
$wgDefaultUserOptions['breadcrumbs-delimiter'] = '>'; # Set the delimiter between breadcrumbs
$wgDefaultUserOptions['breadcrumbs-numberofcrumbs'] = 5; # Set the number of breadcrumbs to be shown
$wgDefaultUserOptions['breadcrumbs-namespaces'] = true; # Show namespaces in breadcrumbs
$wgDefaultUserOptions['breadcrumbs-filter-duplicates'] = false; # Exclude a page from the breadcrumbs if it's already in the list once.
$wgDefaultUserOptions['breadcrumbs-ignore-refreshes'] = true; # Do not add a page to the breadcrumbs twice in a row

You may change each one of these parameters by including it with your specified value into your LocalSettings.php below the initialisation of this extension.

You can also configure the styling of the breadcrumbs by editing your MediaWiki:Common.css page. For example, if you wanted to shrink the size of the breadcrumbs text from the default 0.8em to 0.5em, you should add this to MediaWiki:Common.css:

div#breadcrumbs {
  font-size:0.5em;
}

As the Common.css page warns, you should perform a browser cache-clearing refresh in order to see the changes!

Development [edit]

If you'd like to help develop it, you should clone a copy with git. Navigate to your $IP/extensions/ directory in shell and type:

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/BreadCrumbs.git

The next big step in the development of this Extension is storage of BreadCrumbs in the Database. If you have any thoughts on the matter, please drop a line on the Discussion Page.

Thanks [edit]

This extension is being maintained by Tony Boyles through a project of Milcord llc.

Are you using this Extension? [edit]

If you're using BreadCrumbs on a public wiki, let us know! Please drop your link on this page.

See also [edit]