Mailing List Archive

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
Re: New tab [ In reply to ]
> On May 16, 2017, at 12:16 PM, ?????? ?????? <?ahikamel@gmail.com?> 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: wenlin@wenlin.com 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
Re: New tab [ In reply to ]
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 <tangmu@wenlin.com> wrote:
>
>
>> On May 16, 2017, at 12:16 PM, ?????? ?????? <?ahikamel@gmail.com?> 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: wenlin@wenlin.com 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: wenlin@wenlin.com 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
Re: New tab [ In reply to ]
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
Re: new tab [ In reply to ]
On 2021-12-06 12:13, ????? ????? wrote:
> Hi.
> I added a new tab which I called 'draft'.
> I entered the setting:
> $wgExtraNamespaces[NS_FOO] = "draft";
>
> and now I want it to appear next to the 'discussion' tab.
> How can I do it?

Try using https://www.mediawiki.org/wiki/Extension:NamespaceRelations

--
Bartosz Dziewo?ski
_______________________________________________
MediaWiki-l mailing list -- mediawiki-l@lists.wikimedia.org
To unsubscribe send an email to mediawiki-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/