Content deleted Content added
m Archiving 1 discussion(s) from Template talk:Documentation) (bot |
m Fixed Lint errors on this page (missing end tags) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 79:
[[Special:Contributions/90.222.250.124|90.222.250.124]] ([[User talk:90.222.250.124|talk]]) 10:40, 11 January 2013 (UTC)
:{{done}}. <big>[[User:-- -- --|<span style="color: #6633cc">'''--'''</span>]] [[User talk:-- -- --|<span style="color: #6633cc">'''--'''</span>]] [[Special:Contributions/-- -- --|<span style="color: #6633cc">'''--'''</span>]]</big> 04:38, 16 January 2013 (UTC)
{{Collapse top|title=List of interwiki links}}
Line 212:
Thank you. – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%;">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 20:42, 20 June 2013 (UTC)
:[[File:Pictogram voting question.svg|20px|link=|alt=]] '''Question:'''<!-- Template:EP --> I've just tried viewing some template doc pages when logged out - and they all look normal: there is [[:File:Template-info.png|an image]] and the heading "Template documentation" at the left, then a gap, then "[view] [edit] [history] [purge]" at right. The relevant styling is <
::The links are showing wrong (left of the heading) for me, too. Sandbox looks fine. Changing the class name to "mw-editsection" also allows to float the links right (default behavior before the MediaWiki change) instead of next to the heading with some custom CSS (also provided as Gadget here on enwiki). --[[User:Patrick87|Patrick87]] ([[User talk:Patrick87|talk]]) 21:26, 20 June 2013 (UTC)
:::{{done}} -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 21:31, 20 June 2013 (UTC)
Line 397:
:::::::I've found the Bugzilla bug - it's [[bugzilla:55525]], and has already been fixed. The fix should be live on Wikipedia on the 13th Feb, which is why it was still affecting us here. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 06:13, 7 February 2014 (UTC)
:{{od|::::::}}Good work, both to you and the developers! I did look for a bug last night, but wasn't able to find it. I was also worried we might be waiting a while for a fix; it's excellent to find it's already fixed! – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 21:05, 7 February 2014 (UTC)
== Module sandbox now shows main doc ==
[[MediaWiki:Scribunto-doc-page-show]] now uses {{tl|documentation}} which uses [[Module:Documentation]], and I think that is responsible for a new, possibly unintended, feature. In the past, viewing [[Module:Convert/sandbox]] would show [[Module:Convert/sandbox/doc]] at the top. It now shows [[Module:Convert/doc]] instead. Can it be fixed to show the main doc only if a sandbox doc page does not exist? [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:27, 7 February 2014 (UTC)
:That's an intended feature - the intention was to imitate what the {{tl|documentation}} template does in the template namespace. This was also the behaviour for sandbox modules without /doc subpages since my edit [https://en.wikipedia.org/w/index.php?title=MediaWiki:Scribunto-doc-page-does-not-exist&diff=587369069&oldid=585167583 here], and you're right, it became the behaviour for sandbox modules with documentation pages after [[MediaWiki:Scribunto-doc-page-show]] was switched to use {{tl|documentation}} [https://en.wikipedia.org/w/index.php?title=MediaWiki:Scribunto-doc-page-show&diff=593276252&oldid=585167540 here]. [[Module:Convert/sandbox/doc]] is the only place I'm aware of that does something like this - would you be able to manage with putting it in the main docs or in an edit notice instead? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 16:29, 7 February 2014 (UTC)
::Now works after [//en.wikipedia.org/w/index.php?title=MediaWiki:Scribunto-doc-page-show&diff=594413429&oldid=593276252 this edit]. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 20:01, 7 February 2014 (UTC)
:::I agree with [[User:Mr. Stradivarius|Mr. Stradivarius]]; that sandbox doc page would be better as an edit notice; it's whole content is only relevant to people editing the page. – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 21:12, 7 February 2014 (UTC)
::::Thanks WOSlinker. Not many people will want to inspect a module sandbox with no thought for editing it, and IMHO the general docs are not much help on the sandbox page. After saving an edit to the sandbox, it is useful to see the info in the sandbox doc page. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 22:12, 7 February 2014 (UTC)
:::::I don't think we should have a hack that only works for modules. If this is the desired behaviour, how about putting it into the module proper so that it will work this way for templates and other pages too? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 01:31, 8 February 2014 (UTC)
::::::Yes, I think that would be desirable. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 02:22, 8 February 2014 (UTC)
== Line 402 (protectionlevel) ==
{{Edit protected|ans=yes}}
In line 402 of Module:Documentation an lua protectionlevel function - mw.title.new("text").protectionLevels["action"], should be used instead of the parser function "protectionlevel". See also [[mw:Extension:Scribunto/Lua_reference_manual#Title_objects]], where the Lua function protectionLevels is documented.--[[User:Snaevar|Snaevar]] ([[User talk:Snaevar|talk]]) 16:56, 28 February 2014 (UTC)
* {{Ping|Mr. Stradivarius|Jackmcbarn|Anomie}} as I know you are all Lua geniuses and competent with protection level stuffs... — <span class="nowrap">{{U|[[User:Technical 13|Technical 13]]}}</span> <sup>([[User talk:Technical 13|t]] • [[Special:EmailUser/Technical 13|e]] • [[Special:Contribs/Technical 13|c]])</sup> 01:19, 13 March 2014 (UTC)
::I'll take a look at it. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 01:22, 13 March 2014 (UTC)
:::{{ping|Jackmcbarn}} I see that <code>title.protectionLevels</code> gives a table like this:
<syntaxhighlight lang="lua">
{
["edit"] = {
"sysop"
},
["move"] = {
"sysop"
}
}
</syntaxhighlight>
:::Why not just like this?
<syntaxhighlight lang="lua">
{
["edit"] = "sysop",
["move"] = "sysop"
}
</syntaxhighlight>
:::Can there be more than one protection level for each protection type? And am I always guaranteed to find the highest protection level by using <code>title.protectionLevels.edit[1]</code>? Enquiring minds need to know. :) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 02:21, 13 March 2014 (UTC)
::::For now, yes, just use [1]. In the future, an update to MediaWiki could allow multiple protection levels on the same action. (Beware that if the page is unprotected, the return value may be {}, not always { edit = {} } as you might expect. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 02:50, 13 March 2014 (UTC)
:::::Thanks, that helps a lot. I've now updated the module to use protectionLevels, so I guess we can consider this request answered. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 04:08, 13 March 2014 (UTC)
== Lua error in Module:Documentation at line 409: attempt to index local 'protectionLevels' (a nil value). ==
I've exported a few modules and templates from MediaWiki and imported them into my own wiki and as soon as I open a template (e.g. Template:Documentation, Template:Divbox, Template:Ombox), I get the following script error:
<pre>
Lua error in Module:Documentation at line 409: attempt to index local 'protectionLevels' (a nil value).
Backtrace:
(tail call): ?
Module:Documentation:409: in function "protectionTemplate"
Module:Documentation:132: ?
(tail call): ?
mw.lua:553: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:73: in function "handleCall"
MWServer.lua:266: in function "dispatch"
MWServer.lua:33: in function "execute"
mw_main.lua:7: in main chunk
[C]: ?
</pre>
I searched for hours on Google to find a solution, but no luck. Any help would be highly appreciated. [[User:Tessus|Tessus]] ([[User talk:Tessus|talk]]) 23:07, 18 March 2014 (UTC)
:This module relies on features new to MediaWiki 1.23 and/or the latest git version of [[mw:Extension:Scribunto]]. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 00:01, 19 March 2014 (UTC)
::I've fixed the module so that it won't produce a script error if protectionLevels is not present. However, if you don't have protectionLevels on your wiki you might want to use [https://en.wikipedia.org/w/index.php?title=Module:Documentation&oldid=598387866 this version] of the module which uses the <code><nowiki>{{PROTECTIONLEVEL}}</nowiki></code> parser function, as otherwise the protection icons in the top-hand-corner of the page won't work. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 00:54, 19 March 2014 (UTC)
:::Thanks, but I have no idea what you are suggesting. I have installed MediaWiki 1.22.4, I have no clue why/how I should or should not have protectionLevels on my wiki. I'm not entirely sure what I shall do now. Shall I use the old version or your fixed version? [[User:Tessus|Tessus]] ([[User talk:Tessus|talk]]) 01:06, 19 March 2014 (UTC)
::::Either upgrade your Scribunto extension to the latest version available, or use the version of the module that Mr. Stradivarius showed you. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 01:13, 19 March 2014 (UTC)
:::::I tried the latest version of Scibunto, but it didn't help. Then I tried the latest Module:Documentation and it seems to work. But I'm still missing all the images which the templates depend on. Also the background of the template documentation is green on wikipedia, white on my wiki. Well, it's not really an issue, just a difference. Do you know, if there is a way to grab all the necessary images from wikipedia (e.g. Imbox_notice.png) which are necessary for a template? [[User:Tessus|Tessus]] ([[User talk:Tessus|talk]]) 01:26, 19 March 2014 (UTC)
::::::Not sure about the images. For the green background, you also need to import [[MediaWiki:Common.css]]. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 03:22, 19 March 2014 (UTC)
:::::::Yep, did that, or at least parts of it. I guess I was not thorough enough. Thx for all your help. [[User:Tessus|Tessus]] ([[User talk:Tessus|talk]]) 05:16, 19 March 2014 (UTC)
::::::::The important class from Common.css is the <code>template-documentation</code> class. It looks like you also need to import [[MediaWiki:Common.js/IEFixes.js]] to make the <code>iezoomfix</code> class work properly, but that only matters if you are interested in supporting Internet Explorer 8. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 05:36, 19 March 2014 (UTC)
:::::::::Info for using images from Wikimedia Commons - [[mw:Manual:$wgUseInstantCommons]] and [[mw:InstantCommons]]--[[User:Lam-ang|Lam-ang]] ([[User talk:Lam-ang|talk]]) 06:03, 19 March 2014 (UTC)
::::::::::Thanks for all your help and info. [[User:Tessus|Tessus]] ([[User talk:Tessus|talk]]) 05:17, 20 March 2014 (UTC)
|