[MediaWiki-l] New tab

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] New tab

אחיקם אלירז
Hello.
I want to a add a new tab, neer the tab 'discussion', and to call it
'draft'.
There is some extensions for new tabs, but all of them made the tabs in the
page.
How can I do it? is it possible?

THanks.
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: New tab

Tom Bishop, Wenlin Institute

> On May 16, 2017, at 12:16 PM, ⁨אחיקם אלירז⁩ <⁨[hidden email]⁩> wrote:
>
> Hello.
> I want to a add a new tab, neer the tab 'discussion', and to call it
> 'draft'.
> There is some extensions for new tabs, but all of them made the tabs in the
> page.
> How can I do it? is it possible?


I'm not sure I understand your question exactly. Something like this might work in YourExtension.hooks.php:

        public static function onGetPreferences(User $user, array &$preferences)
        {
                $preferences['foo'] = array(
                        'type' => 'toggle',
                        'label' => 'foofoo',
                        'section' => "draft/sectionxyz"
                );
                return true;
        }

With this in extension.json:

        "Hooks": {
                "GetPreferences": [
                        "YourExtensionHooks::onGetPreferences"
                ]
        }

And, in en.json, items like "prefs-draft": "Draft" and "prefs-draft-sectionxyz": "Section XYZ".

Good luck!

Tom

Wenlin Institute, Inc. SPC (a Social Purpose Corporation)
文林研究所社会目的公司
Software for Learning Chinese
E-mail: [hidden email]     Web: http://www.wenlin.com
Telephone: 1-877-4-WENLIN (1-877-493-6546)




_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: New tab

Tom Bishop, Wenlin Institute
Sorry, I just realized your question wasn't about Preferences tabs. You should probably ignore my reply below.

Tom

> On May 16, 2017, at 1:20 PM, Tom Bishop, Wenlin Institute <[hidden email]> wrote:
>
>
>> On May 16, 2017, at 12:16 PM, ⁨אחיקם אלירז⁩ <⁨[hidden email]⁩> wrote:
>>
>> Hello.
>> I want to a add a new tab, neer the tab 'discussion', and to call it
>> 'draft'.
>> There is some extensions for new tabs, but all of them made the tabs in the
>> page.
>> How can I do it? is it possible?
>
>
> I'm not sure I understand your question exactly. Something like this might work in YourExtension.hooks.php:
>
> public static function onGetPreferences(User $user, array &$preferences)
> {
> $preferences['foo'] = array(
> 'type' => 'toggle',
> 'label' => 'foofoo',
> 'section' => "draft/sectionxyz"
> );
> return true;
> }
>
> With this in extension.json:
>
> "Hooks": {
> "GetPreferences": [
> "YourExtensionHooks::onGetPreferences"
> ]
> }
>
> And, in en.json, items like "prefs-draft": "Draft" and "prefs-draft-sectionxyz": "Section XYZ".
>
> Good luck!
>
> Tom
>
> Wenlin Institute, Inc. SPC (a Social Purpose Corporation)
> 文林研究所社会目的公司
> Software for Learning Chinese
> E-mail: [hidden email]     Web: http://www.wenlin.com
> Telephone: 1-877-4-WENLIN (1-877-493-6546)
> ☯
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Wenlin Institute, Inc. SPC (a Social Purpose Corporation)
文林研究所社会目的公司
Software for Learning Chinese
E-mail: [hidden email]     Web: http://www.wenlin.com
Telephone: 1-877-4-WENLIN (1-877-493-6546)




_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: New tab

Bartosz Dziewoński
In reply to this post by אחיקם אלירז
Have you tried https://www.mediawiki.org/wiki/Extension:NamespaceRelations ?

--
Bartosz Dziewoński

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l