Discussioni MediaWiki:Gadget-LiveRC 1x.js/InserisciTemplate.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 176:
:PS: Note that there are new italian translations needed [[:fr:Discussion_MediaWiki:Gadget-LiveRC.js/i18n/it.js|here]].
::Done '''''<span style="font-size:medium;font-family:Comic Sans MS">[[Utente:Jalo|<span style="color:#BB0011">J</span>]][[Discussioni utente:Jalo|<span style="font-size:small;color:#DD2233">alo</span>]]</span>''''' 18:29, 10 ago 2014 (CEST)
== New management system for installed extensions ==
{{ping|Jalo}}
Hello,
I'm about to create a new system to manage the installed LiveRC extensions.
What does the actual system :
# get the /LiveRCparam.js last oldid,
# get the /LiveRCparam.js (last oldid) wikitext
# parse the wikitext, searching the line beginning with <code>//EXTENSIONS SETUP :</code>
# set an "installed" item in <code>lrcExtensions</code> or <code>Custom_lrcExtensions</code> to true if found, or false if not found
The new system will be based on the <code>LiveRC_Config["InstalledLiveRCExtensions"]</code> global variable:
# each extension (if installed and loaded) add an item to the Array
# LiveRC search the Array and set an "installed" item in <code>lrcExtensions</code> and/or <code>Custom_lrcExtensions</code> to true if its name is found, or false if not
As you can see, this way, two ajax requests will be saved, so it will be far better for LiveRC launching.
I already [//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js&diff=107189645&oldid=107189107 set the <tt><nowiki>LiveRC_Config["InstalledLiveRCExtensions"]</nowiki></tt> global variable], to prevent errors due to adding an item in a non-existent Array. Now, I need that all extensions add an item with their name to this Array.
So I need that you edit [[MediaWiki:Gadget-LiveRC_1x.js/InserisciTemplate.js]] to add the code below just after the '''<code>if (typeof(lrcHooks)!="undefined")</code>''' test :
<source lang=javascript>
LiveRC_Config["InstalledLiveRCExtensions"].push("InserisciTemplate");
</source>
Please, warn me when it's done, so that I could start the main code update.
Thank you
[[Utente:Dr Brains|Dr Brains]] ([[Discussioni utente:Dr Brains|msg]]) 01:57, 6 set 2014 (CEST)
|