Forum:Template preloads

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Forums: Yew Grove > Template preloads
Archive
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 12 November 2012 by A proofreader.

As it stands, the current options for preloading templates... suck. MediaWiki:Newarticletext loads in monobook or oasis' visual mode (which isn't the most comprehensive list in the world). To attempt to preload Template:Infobox Item using the tool in the oasis editing sidebar will give you {{Infobox Item}} with no hint as to what the possible parameters are. Newarticletext's preloads work much better, but the list is extremely limited and hasn't been updated for a number of months, probably due to the limited use of monobook and visual. Not to mention what it would look like if it actually contained all the infoboxes we use.

However, it is a much different story on [[w:c:starwars|Wookieepedia]]. If you were to attempt to edit a page there you would discover a whole plethora of templates you could load complete with relevant parameters. If that doesn't quite cut it for you, you can load a custom page of your choosing. In Oasis the preloads are below the standard summaries, the same in Monobook. For those who don't use Monobook, MediaWiki:Newarticletext is currently above the editing area, although I imagine it is a fairly simple task to move the preload list to where the current options are.

To get this feature ourselves we would need to create Template:Stdpreloads (which I've created to see if I can test this out here prior to writing this) along with a preload subpage for every template that would be found on this list. I'm more than willing to do this myself should this pass. So far I've made a list of templates that might be useful while editing (see below) including infoboxes, image licenses and citation templates and had a go at grouping them. The groups could use a little more work, but you get the gist of what can be done here. Would we want to have a short explanation of what should go in each field?

{{Template
|parameter=<!--explanation-->
|parameter=}}

As a side note, when the template is loaded everything on the page is loaded. That includes any categories in noinclude tags, so please do not categorise the preload templates. Perhaps we can include a note at the top of Special:Uncategorizedtemplates asking editors not to categorise these templates, although I'm not sure if such a MediaWiki page exists for this. The Mol Man has found a way to categorise these templates through the parent template. See below for the for more details.

Template List

Whilst there are probably far more templates here than those likely to be used, due to the unpredictable way RuneScape updates are released I would be surprised if at some point during the next couple of months every one of these templates was used. Either way, should the need arise the list is very easy to edit.

General
Quest
Combat
  • Template:Infobox Aura
Money making guide
  • Mmgtable
  • [[Template:Mmgtable/4hourly|Mmgtable/4hourly]]
  • [[Template:Mmgtable/alt|Mmgtable/alt]]
  • [[Template:Mmgtable/daily|Mmgtable/daily]]

{{hidden|show=collapsed|Beta| * [[Template:Infobox Ability|Infobox Ability]] * [[Template:Infobox Bonuses Beta|Infobox Bonuses Beta]] * [[Template:Infobox Monster Beta|Infobox Monster Beta]] * [[Template:Infotable Bonuses header Beta|Infotable Bonuses header Beta]]}}

Location
Farming
Citing
Image licenses
Miscellaneous

Trying it yourself

If you want to see how it works here you can import User:Cåm/fillPreloads.js into your [[Special:MyPage/common.js|common.js]] and User:Cåm/customPreload.js into your wikia.js (if you don't use Oasis, don't worry about the second import). If this passes the scripts will go in the [[MediaWiki:Common.js|Common.js]] and [[MediaWiki:Wikia.js|Wikia.js]] respectively. For the moment there are only 2 template preloads available, both relating to quest pages.

Note - As of creation of this forum User:Cåm/fillPreloads.js was missing a line of code. It should now be working correctly. cqm 22:32 • 23/10/2012 (UTC) (UTC)

Discussion

Support - as nom cqm 09:49 • 23/10/2012 (UTC) (UTC)

Comment - As monobook user, I find the preload templates rather handy. They do need the be brought up-to-date and some more widely used templates need to be added to the list, so we agree on that. The list mentioned above is waaay too extensive however. For example, Infobox dungeon should be added to the list. Infobox deity shouldn't, as we don't particularly get new gods on a daily basis. I was thinking, if technically possible, about a tabber above the editing space carrying the preload templates. I.e. a tab for infoboxes, a tab for less used infoboxes, a tab for equipment bonuses etc. User_talk:Fswe1 Fswe1 Brassica Prime symbol.png 17:45, October 23, 2012 (UTC)

Infobox Deity has been removed (probably just an oversight when I was making the list. Infobox dungeon was/is present under Location. I'm not sure about how easy a tabber would be to fit in Oasis. It's probably easier just to group the templates under relevant header. General and Miscellaneous are there purely because I couldn't think of a better way to categorise the ones below them. cqm 22:49 • 23/10/2012 (UTC) (UTC)

Support - Having a list of templates really helps. This will act just like the might Q's templates script, but having it with all the preloads will really help, especially when making new pages, so you don't have to search the wiki for all those templates you need. Hunter cape (t).png Sentra246Blue hallowe'en mask.png 07:53, October 24, 2012 (UTC)

Support! - Cool script! This will be really helpful, especially when making new pages and you don't know all the parameters off by heart :D. Also, you forgot Template:Inventory license in your list @@@. HaidroH rune.pngEagle feather 3.pngCandle (blood red).png 1XqyDNM.png Crystal triskelion fragment 3.pngHazelmere's signet ring.png 08:46, October 24, 2012 (UTC)

Support - The only problem I had was with on RS:UNCAT but since that got fixed, I have no problem with this. Blaze_fire.png12.png 18:56, October 24, 2012 (UTC)

Yup. Just use
{{PreloadPage}}
{{#ifeq:{{NAMESPACE}}|Template|{{#ifeq:{{lc:{{#sub:{{PAGENAME}}|-7}}}}|preload|[[Category:Preload templates]]}}}} on the parent template and it will automatically categorise its preload subpage(s), including ones that are subpages of subpages and blahdablahda. Also, on a less important note: I support. MolMan 19:05, October 24, 2012 (UTC)

Can you <del> that "don't categorised" point now? :P I guess once the outcome of this thread is more foreseeable, we can just paste that code posted above into a {{PreloadPage}} template to be put on the parent templates. MolMan 19:08, October 24, 2012 (UTC)

meh, I made the template now. MolMan 01:28, October 26, 2012 (UTC)

Support - I really like this. It'll help users flesh out full infoboxes more easily, if the parameters are kept in sync with the preloads. Smile

 a proofreader ▸ 

01:31, October 26, 2012 (UTC)

Support - Great idea. — Jr Mime (talk) 23:42, November 1, 2012 (UTC)

Q - Stdpreloads. Is that meant to be a MediaWiki page? (It seems more appropriate as one). MolMan 18:05, November 2, 2012 (UTC)

I imagine the script can be adapted to use a MediaWiki page, but I'd rather keep it in the Template namespace, at least until we're happy with it's contents. I'm not so worried about someone messing it up - it's easy to add something new and just as easy to fix it just in case someone messes up.
Vandalism is another issue though. Whilst I think it unlikely someone is going to stumble across such a page, sooner or later it's going to happen. So for the time being I'd like to see it semi-protected, same for the preload subpages, and if there are issues then increase the level of said protection on Stdpreloads. There are many editors here who are more than capable of maintaining it and I don't see the need to lengthen the process if they think something should be added. cqm 00:57, 3 Nov 2012 (UTC) (UTC)
Ah, that makes sense. MolMan 01:00, November 3, 2012 (UTC)

Closed - There is consensus to have the templates named in the template list section of this thread as standard preloads beside (in Oasis) or below (in Monobook) page edit boxes.

To implement the proposal, I have copied Cåm's script files to [[MediaWiki:Common.js/preload.js]] and [[MediaWiki:Wikia.js/preload.js]]. Currently the template preloads are listed in Template:Stdpreloads and the templates that have a preload are categorised as such by Template:PreloadPage. When enough templates have been added to Template:Stdpreloads, the page will be moved to the MediaWiki namespace as appropriate. The template policy can also be amended to include information about preloads site-wide.

 a proofreader ▸ 

23:04, November 12, 2012 (UTC)