Thomas, Arjun a écrit :
Has anyone implemented a breadcrumbs feature in the
new version of mediawiki??
one possibility :
download the php and css code at
http://wiki.ljackson.us/MediaWiki_BreadCrumbs
put the css code in skins/monobook/main.css
put the php code in extensions/kwBreadCrumbs.php
open skins/monobook.php and add (just after <div id="content">)
<div><?php echo kwBreadCrumbs() ?></div>
open LocalSettings.php and add : include("extensions/kwBreadCrumbs.php");
open kwBreadCrumbs.php and change :
$ts = mktime();
$now = gmdate("YmdHis", $ts + 120);
$ns = $wgTitle->getNamespace();
$ti = wfStrencode($wgTitle->getDBkey());
$sql = "UPDATE page SET page_touched='$now' WHERE page_namespace=$ns AND
page_title='$ti'";
wfQuery($sql, DB_WRITE, "kwBreadCrumbsNoCache");
to
$dbr =& wfGetDB( DB_SLAVE );
$ts = mktime();
$now = gmdate("YmdHis", $ts + 120);
$ns = $wgTitle->getNamespace();
$ti = $dbr->addQuotes($wgTitle->getDBkey());
$sql = "UPDATE page SET page_touched='$now' WHERE page_namespace=$ns AND
page_title='$ti'";
$res = $dbr->doQuery( $sql );
don't know if it's "correct" (clean and safe), but it works with 1.9
Alexis