Extension talk:DynamicTabs

Please report new issues at the bug tracker: http://code.google.com/p/micke/issues/list

suggestion to hide new tabs from users
Hi, I tried your current extension and realized that when I create a new tab (internal link) it cannot bei hidden from a user even when I add the tabs descriptor to hideUser-section

I suggest a simple solution, which already works within my testwiki fine:

I relocated the code section for intLinks (if-block) within DynamicTabs line 72 on top of the function dynamicTabs just before the hideUser -if-block (line 37). The problem was that the function first reads which tab to hide and then it creates the new tab, so from my point of view the order was wrong. So I just switched the order. My example: I created a new tab ToDos (which points to a page with some todo-items) which should only be seen by sysops not by anyone else and it works. --Pianorob 16:07, 26 June 2009 (UTC)
 * Thanks for your suggestion, I'll look in to it when I have some more time (currently on vacation). It definitly looks like the way to go. MiCkE 18:23, 26 June 2009 (UTC)
 * Come to think of it, if you post the code (or a link to it) I could put it up on googlecode more speedily. MiCkE 08:05, 27 June 2009 (UTC)
 * I changed the code per this suggestion when I fixed the bug below, so it works properly in v 0.3.MiCkE 09:26, 9 July 2009 (UTC)

Hi Micke: this is the code part I modified to my needs, you see I also included some user groups, so that this new tab can only be seen by them, not by normal logged-in users: --Pianorob 13:52, 13 July 2009 (UTC)


 * Yupp, this is pretty much what I fixed in the last revision, although I moved up all the loops, not just the intLinks. MiCkE 18:06, 13 July 2009 (UTC)

Small issue with DPL
For some reason, I was getting this error at the top of a page when DPL was used on a page while DynamicTabs was enabled:

Notice: Undefined offset: 0 in /homepages/39/d204873744/htdocs/wiki/wiki/extensions/DynamicTabs/DynamicTabs.php on line 36

There didn't seem to be any problem with DynamicTabs not working, but since I couldn't figure out how to hide the error, I just commented out lines 36 through 84 in DynamicTabs.php and it went away. DynamicTabs still appears to function correctly. DPL was returning articles from a category. The error went away when I removed the DPL section, and returned when I added the DPL section. I use DPL on other pages without any problem. Any clue what could have caused this? What do these lines do exactly? --PicklePower 02:46, 9 July 2009 (UTC)
 * Line 36-84 displays the "namespace-tabs" and tabs with arbitrary external and internal links. After doing some googleing it seems that the error has something to do with the foreach-loops and the array of tabs. Could you please post the contents of your MediaWiki:DynamicTabs here below? MiCkE 08:22, 9 July 2009 (UTC)
 * Never mind, I was able to reproduce the bug and I fixed it so it works in my test wiki with the trunk version of DPL. I'd be greatful if you would download the new code and confirm that it works. MiCkE 09:26, 9 July 2009 (UTC)

Just a little request
How could I realize the "hide-edit" tab while showing "new-section" tab based on different groups or namespaces? Is it possible to manage custom groups? Or different namespaces? --Federicodip 20:13, 8 August 2009 (UTC)