Extension talk:BreadCrumbs (Kimon)

No output
If i install your extention, there is no output from the wiki anymore. if i download any wikipage with wget, index.html is just empty. any ideas? I run mediawiki 1.11.2 --87.165.92.192 09:05, 1 April 2009 (UTC)

I wasn't able to get any breadcrumbs in MediaWiki 1.11. nothing happens at all. I created the php and css-file and included it in LocalSettings.php. Is there something that I'm missing? 213.47.3.128 23:21, 23 November 2007 (UTC)
 * Did you enable the breadcrumbs in your user preferences? --Kimon 15:03, 24 November 2007 (UTC)

Position Breadcrumbs on the Page (Insertion Point, part 2)
So I could see it better, I used this css to move it to the top and position it in the subtag area (the space under the Article Title). That's the reason for the -5.em. I also increased the count. Now when multiple lines wrap, everything pushes down correctly. This is a terrific extension!

position: relative; top: -.5em; width:100%; border: none; padding-bottom: 4px; }
 * 1) BreadCrumbsTrail {

Differences with Extension:BreadCrumbs
Is there any difference between this and the other Breadcrumbs extension? By any chance do you have any plans of storing the statistics in a database for further scrutiny? SellFone 13:42, 3 December 2007 (UTC)
 * There are a few differences:


 * 1) There are 2 files to maintain
 * 2) The breadcrumbs show up at the bottom (though this can be done via the CSS of the other one)
 * 3) The display of breadcrumbs is a user enabled option thereby displaying it only to users that want it
 * 4) Duplicate entries are removed
 * 5) If the user returns to a previously visited page, the breadcrumbs get trimmed back to that.
 * As for a database table to track this information... that's a good idea, I'll give it some thought.
 * I hope I've answered your questions --Kimon 18:15, 3 December 2007 (UTC)

Nothing happens on Mediawiki 1.7.1. [SOLVED]
I followed your installation instructions. The Special:Version page confirms that the extension is installed. I looked in the "misc" tab in "user preferences" but cannot find any "t/f" flag there. Can you confirm that your extension is not supposed to work with Mediawiki 1.7.1? If so; any plans on making it work for 1.7.1 too? I would be very happy if you have. Debian Etch uses 1.7.1. Todu 01:31, 6 December 2007 (UTC)


 * It looks like the hook UserToggles was introduced in 1.8.0. But, I believe I have a work-around. You can comment out/remove the snippet


 * It should work but, since I don't have a 1.7.1 installation to test, I cannot confirm. The drawback is that it will force it on all users.
 * Let me know please so that I can make an entry in the extension's description. --Kimon 03:03, 6 December 2007 (UTC)
 * It worked when I commented out your suggested snippet. However when I visit a page that I have already visited, that page does not contain the breadcrumbs. I have created 8 test pages that all link to each other. It didn't help revisiting the first test page after I've visited the eighth test page. I thought that might have emptied the breadcrubs cache somehow but it didn't. Todu 13:37, 6 December 2007 (UTC)
 * Hmmm.... So, your path is Page1->Page2->Page3->Page4->Page5->Page6->Page7->Page8->Page1 ?
 * Yes it is. Todu 14:48, 6 December 2007 (UTC)
 * If that's correct, then do you see the breadcrumbs when you are visiting all the pages except when you visit Page1 for a second time?
 * Or, when you get to Page1 again, it resets and you only see Page1? --Kimon 14:12, 6 December 2007 (UTC)
 * I see them always as long as every page I visit is a first visit since I installed the extension. It never resets. Any time I visit a page I have already visited any time since the installation of the extension, any sign of the existence of the extension disappears. The breadcrumbs reappear as soon as I visit a page that I have not visited since the installation of the extension. Todu 14:48, 6 December 2007 (UTC)
 * I guess I'll have to check it when I get home on your site. --Kimon 17:35, 6 December 2007 (UTC)


 * I've created a temporary GNU/Debian Etch (4.0) installation for you on one of my servers, if you want to experiment with a 1.7.1 installation. You can email me so I can give you your root password. And for all the crackers out there: Don't bother emailing me before Kimon does. I'll wipe the server as soon as Kimon is finished with his testing. I could replace the Linux installation with any of these distributions if you would prefer a non-Debian one (it only takes about 2 minutes to make a fresh one):

Newer distributions: Arch Linux 2007.08 Centos 5.0 Debian 4.0 Fedora Core 8 Gentoo 2007.0 OpenSUSE 10.3 Slackware 12.0 Ubuntu 7.10

Older Distributions: CentOS 4.0 (RHEL) Fedora Core 6 Gentoo 2006.1 Mandrake 9.1 Slackware 10 Ubuntu 6.06 Ubuntu 7.04
 * Todu 14:11, 6 December 2007 (UTC)
 * Thanks! --Kimon 14:13, 6 December 2007 (UTC)

I'm not home so I cannot read my home email. But I logged in to our server to check progress (less .bash_history) and noticed we ran out of disk space. So I rebooted, increased from 512 to 1024 MB and finished your apt-get install mysql-server and did a apt-get dist-upgrade too. So now you should be able to proceed with the next steps. /Tommy
 * Done - check it out --Kimon 21:36, 8 December 2007 (UTC)
 * You're the man! It works perfectly on the test server now. I'm just on my way home from work now and will contact you again when I arrived. What did you change to make it work? /Tommy
 * the issue was with caching. It appears that $wgTitle->invalidateCache; and $wgUser->invalidateCache; don't work on 1.7.1 so I modified the LocalSettings.php caching to: from
 * The drawback is that caching is invalidated for all users. --Kimon 22:09, 8 December 2007 (UTC)
 * I changed the line you mentioned above and can confirm that your extension now works on my real Mediawiki 1.7.1 installation aswell. Thank you! Todu 23:24, 8 December 2007 (UTC) (Tommy)
 * You may also want to change the line

to --Kimon 23:46, 8 December 2007 (UTC) The above is because apparently $wgOut->addLink is not available in 1.7.1 --Kimon 23:48, 8 December 2007 (UTC)

Found an (off by one?) bug
Try this path:

Bread crumbs: Test > Test2 > Test3 > Test4 > Test5

and then click on Test4 again. You will see that "Test" disappears. I think you have an off by one error somewhere.Todu 02:09, 9 December 2007 (UTC)


 * Also, can I disable the shrinking of the breadcrumb list all together? And make the list appear on top of the pages instead of on the bottom? I would want the list to not change in any way in case I revisit a page that is currently on the list. Todu 02:09, 9 December 2007 (UTC)


 * Try changing this:

to
 * Then to change the position, just change

to
 * --Kimon 02:18, 9 December 2007 (UTC)


 * I found this to be placing the text correctly:


 * Your suggestion to remove "bottom:0" caused it to write the breadcrumb list onto the page title. Maybe it is different in different browsers? I use Firefox, you?
 * And regarding the shrinking list; Now it does not shrink, which is good. But it keeps growing beyond five entries. Todu 03:00, 9 December 2007 (UTC)
 * You can try using the "top:XX" (replace XX with whatever number you want). Try messing with it until you place it in the right spot.
 * As for going beyond 5 entries, I thought that's what you wanted. You can restore the code you removed above but leave this part commented out:


 * If you want to increase beyond 5 entries, increase the value of the parameter $wgBreadCrumbsCount. --Kimon 11:03, 9 December 2007 (UTC)
 * Now everything seems to work perfect except for when I hit F5 to refresh the current page. In that case the breadcrumb trail grows beyond five entries. Todu 14:27, 9 December 2007 (UTC)
 * Do you (or anyone) have a fix for the "refresh bug"? Todu 18:48, 12 December 2007 (UTC)

BreadCrumbs insertion point
What would need to be modified in order to get the breadcrumbs to show up in the page subtitle field? This is something being done in the "BreadCrumbs2" extension, but the breadcrumbs themselves aren't constructed the same way as this extension does (which I prefer). The hope is to find a way of getting Kimon's breadcrumbs placed in the subtitle area (so they don't cover anything else, and give a nice tight positioning against the page name at the top of the page). Pfurrie 23:36, 20 December 2007 (UTC)


 * I'm sure that can happen by messing around with the CSS. Though I'm not an expert on it, I'll give it a try. --Kimon 13:32, 10 January 2008 (UTC)


 * I had this same problem but I was able to set it up so it is at the top, all you need to do is change 1 line of code in the css.

position:top; left: 2px; bottom:0; width:99%;

this seemed to work just fine for me.

Enabling by default
moved from my talk page

Hi Kimon! Your breadcrumb extension is great. Is there a way to make it a default user preference so that all visitors automatically see it? --unsigned by 72.130.221.70 on 2008-01-10 03:16


 * You can set
 * in your LocalSettings.php file. --Kimon 13:41, 10 January 2008 (UTC)


 * Doesn't work. No such variable in php file --94.210.70.111 21:35, 2 June 2009 (UTC)

Disable on Main Page
How would I disable this for the main page?

Extensions/BreadCrumbs/BreadCrumbs.css shows up in the breadcrums
I've installed your extension on a few MediaWiki's now to test it and I get this error:

When I click a few pages it gives the url of BreadCrums.css as a breadcrum like this:
 * I go from main page to the client portal is gives:
 * Bread crumbs: Main Page > Extensions/BreadCrumbs/BreadCrumbs.css > Portal:Clients
 * Then i click current events and the breadcrums show up like this:
 * Bread crumbs: Main Page > Extensions/BreadCrumbs/BreadCrumbs.css > Current events

So does not add a breadcrumb it replaces the one that is already there as if I am comming from the main page. Any idea how i can fix this?

Thx B--41.240.74.249 10:10, 14 January 2008 (UTC)

Solved
I also had the same problem and modified the BreadCrumbFunctions.php file. I added a line, below line 25, that simply checks the page title and if it contains BreadCrumbs.css, to return from the function. Below, I've listed line 25 which was already there, and line 26 is the line I added. 25: if( isset( $_SESSION['BreadCrumbs'] ) ) $m_BreadCrumbs = $_SESSION['BreadCrumbs']; 26: if (preg_match('/Extensions\/BreadCrumbs\/BreadCrumbs.css/', $wgTitle->getPrefixedText)) return true;

--mike DOT rosile AT gmail DOT com

How to integrate BreadCrumbs
I am a mediaWiki greenhorn and I have a more basic question about the breadcrumb extension: How do I get BreadCrumbs to show up? I installed the extension as described... and what then? How do I include Breadcrumbs into my pages? Should they just show up automatically or do I have to add some html/php code to every page....

May be you could give a sample code. Thx!!


 * - Look at the very top of this page, or read the section titled "Enabling by default"

How to remove the Bread crombs name
for all others that might be interested, i just removed the 'Bread crumbs' name that is visible at default. Just delete "Bread crumbs" text in the trail line in BreadCrumbs.php

See a working example at my website klusopedia.nl

Disabling Breadcrumbs per user
Hi, Is there a way to disable breadcrumb feature based on logged in user's preferences (or generally by default)? I do not have breadcrumb in Default User Options but it's still showing to all users. Now, I want it to be user based. Please help. Thanks a lot.

Hide bread crumbs in print view
With the styles suggested on the extension page, the bread crumbs show up in the print view which doesn't make much sense. I modified the CSS like this to to hide them there: