User talk:Barre/MediaWiki/Extensions/kw bread crumbs: Difference between revisions
mNo edit summary |
No edit summary |
||
Line 65: | Line 65: | ||
[[User:Xangelusx|Xangelusx]] 13:10, 1 Jun 2005 (EDT) | [[User:Xangelusx|Xangelusx]] 13:10, 1 Jun 2005 (EDT) | ||
---- | |||
Successfully installed it on MediaWiki 1.4rc1! Thank you for upgrading code and thank you [[User:Xangelusx|Xangelusx]] for the modification. Even [[User:Laner|Laner]]'s portion works too. I placed | |||
<nowiki><div><?php echo kwBreadCrumbsTAL() ?></div></nowiki> | |||
at line 71 of MonoBook.php | |||
[[User:Jctong|Jctong]] 21:20, 8 Jun 2005 (EDT) |
Revision as of 01:20, 9 June 2005
Hey thanks Sebastien for you help with the trail, however your positioning description was a little confusing.
So I have saved the file kwBreadCrumbs.php into extensions folder and and entered include("extensions/kwBreadCrumbs.php"); into LocalSettings.php.
I want the trail to run along the top of the page like in your Wiki system. I have set $on_top_hack = 1; What does "use the tag anywhere in the page " mean?
Thanks in advance, really neat little idea. Also just in case you were wondering my wiki will not be going public. Its just a research project for university.
Ali.
It seems this extension was written in mind for the 1.3 series. I got the "Anywhere in the layout" part working for the 1.4 series. You need to add:
<div><?php echo kwBreadCrumbsTAL() ?></div>
into: <wikibasedir>/skins/MonoBook.php
This of course will limit this option to monobook, but i'm sure you could add it to your other skins as well.
Laner 16:28, 25 Apr 2005 (EDT)
Has anyone gotten this to work for mediawiki 1.4rc1? I've spent some time to try to get this working but I keep getting "database error" and "internal error". there's no place on the net that talks about this, i've scoured every last webpage for a month already :(
Then I noticed that the version of this wiki:
MediaWiki (http://wikipedia.sf.net/): 1.3.0beta4 PHP (http://www.php.net/): 4.3.8-9 (apache) MySQL (http://www.mysql.com/): 4.0.20-log
while mine is:
MediaWiki (http://wikipedia.sf.net/): 1.4rc1 PHP (http://www.php.net/): 4.3.9 (apache2handler) MySQL (http://www.mysql.com/): 3.23.58
this has got to be the reason why it isnt working for me...
Jctong 18:22, 26 Apr 2005 (EDT)
You guys are right, I did not test this extension for 1.4 yet. I will try soon.
I updated this extension and the documentation so that it can work with MediaWiki 1.4. Sadly, the on_top_hack option that made it easy to put the trace on top of the page does not work with 1.4 anymore, so you will have (as one user noticed already) to directly call the extension from the template code. See doc. Hope this helps. Note that as of today, this web site is still running 1.3. It will be upgraded by our sysadmin to 1.4 soon, at which point the examples may not be working properly until I notice the upgrade ;)
It appears that you have not taken into account a database table prefix that may have been set by the user. This can be overcome by replacing line 429 in the kwBreadCrumbs.php file with the following:
Find:
$sql = "UPDATE cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'";
Replace With:
if ( $options ) { $db =& wfGetDB( DB_MASTER ); } else { $db =& wfGetDB( DB_SLAVE ); } $cur = $db->tableName( 'cur' ); $sql = "UPDATE $cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'";
Xangelusx 13:10, 1 Jun 2005 (EDT)
Successfully installed it on MediaWiki 1.4rc1! Thank you for upgrading code and thank you Xangelusx for the modification. Even Laner's portion works too. I placed <div><?php echo kwBreadCrumbsTAL() ?></div> at line 71 of MonoBook.php
Jctong 21:20, 8 Jun 2005 (EDT)