Page 1 of 1

[GuMaxDD 1.5.2] add custom tab

Posted: March 11th, 2012, 2:48 pm
by plalemand
Hi

I'm using GuMaxDD 1.5.2 with much success. This is a great job !

I need to add two new action tab and I followed this tuto : http://www.mediawiki.org/wiki/Thread:Pr ... ector_Skin
I put the code is MediaWiki:Common.js and a new tab well appears on all other (classic) template but not in yours.
How can I fix that ?

Thanks
Pat

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 12th, 2012, 7:44 pm
by Paul
That is customized according to specific skin, you need to modify the GuMaxDD.php to make it work.

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 12th, 2012, 7:50 pm
by plalemand
Hi

Yes this was my approach but modifications I've done doesn't work.

I replace the code in function "contentActionBox", between the "foreach" with the one existing in modern template (who works well) and the tab doesn't appears. I think that there is something elsewere.

Thanks.

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 12th, 2012, 10:52 pm
by Paul
Try to view html source after your modification, you will see what's wrong with your modification...

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 13th, 2012, 8:20 am
by plalemand
Hi

I tried but it seems that the new tab is not is the array used in contentActionBox and I don't know why. The new tab doesn't appears in the html source (in case of it could be hidden).

I have another plugin who creates an entry is "side menu" (the "top menu" in your template) and I already fix a problem in customBox function by restore the "print $cont;".

So, I can make some few modifications but I have my limit. That's why I need your help.

Thanks in advance.

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 14th, 2012, 8:30 pm
by Paul
I can only help you what you need to look for, but you have to make/fix the logic by yourself.

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 15th, 2012, 12:50 pm
by plalemand
Hi Paul,
If my new tab well appears in all other "classic" templates and not in GuMaxDD, could we consider that is a bug ?

To easily test that, just add few lines in MediaWiki:Common.js
// Add a link to the actions menu to Special:Log for this page.
addPortletLink( 'p-cactions', wgArticlePath.replace( '$1', 'Special:Log?page=' + encodeURIComponent(wgPageName) ), 'Logs');
}

I think this kind of thing could be usefull for everyone.

Thanks in advance for your help

Re: [GuMaxDD 1.5.2] add custom tab

Posted: March 15th, 2012, 11:48 pm
by Paul
I'm not sure how that extension works, it could be coded to accommodate build-in skins, but not the custom skin...

You might like to check something like this "wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );" as well...