User blog:Lost Labyrinth/Gadgets walkthrough

From The Sims Wiki, a collaborative database for The Sims series
Jump to navigation Jump to search

Hello,

As you may know, we had the Gadgets extension installed on The Sims Wiki as a result of this forum. As this may probably seem like something from another planet for a lot of you, both users and admins, I've decided to make a walkthrough on this.

What are Gadgets?[edit source]

Gadgets are simply tools used to aid the wiki. They can consist of JavaScript or CSS stylesheets. They work in a similar way to whatever we put in MediaWiki:Wikia.css or MediaWiki:Wikia.js. Having this extension for script utilisation allows for numerous advantages:

  • Allows certain scripts to be made optional, including those that are only meant for personal use based on Wikia's TOS.
  • Adds more flexibility in getting scripts to work (we can disable scripts by user group if we wanted).
  • Easier to update scripts used by a large number of users.
  • Eases distribution of scripts. Users only have to make a few clicks rather than importing an entire page of code for one thing.

How do I utilise gadgets?[edit source]

For users[edit source]

Enabling a gadget is actually very easy. All you have to do is go to your personal preferences, click on the Gadgets tab, select whatever you want and click the Save button. Then everything should be working straight out of the box. Simples.

For admins[edit source]

Enabling a gadget is the same process as it is for any other user. However, admins can write gadgets and it isn't as daunting as one might think.

Firstly, go to MediaWiki:Gadgets-definition. Then under the appropriate header, you'd write the name of the gadget and the appropriate script file. For example: *GadgetNameHere|mygadget.js

From this point on, you have a few pages to edit. Fortunately, Special:Gadgets exists. As the page names are merely system files, this Special page will make it easier to edit header titles, gadget descriptions and tells you where to write the actual script based on the specified definitions. Under the header, the first redlink saying "Edit" is the description file that determines how it'll be presented on the Preferences page. The second redlink to the specified JS/CSS page is where the script goes.

The section title on the Preferences page will be listed as something like <section-Interface> for what's meant to be the Interface section until you merely write the word "Interface" (or however you want it to appear) on MediaWiki:Gadget-section-Interface. Replace Interface with your desired section name.

This may sound like a lot but in reality, it isn't really. These are just the basics. You can read on some of the more advanced stuff at the Gadgets extension page on MediaWiki.org.

Helpful links[edit source]

Summing up[edit source]

So to finish off, the Gadgets system isn't as daunting as you might think on first impression. If anybody has any questions about Gadgets or any comments then please don't hesitate to comment them on this blog.

Did this walkthrough blog help you at all?
Please vote below.
0
0
There were 0 votes since the poll was created on 19:53, 19 January 2020.
poll-id 5F193B0C87C394D1CFF08A84A65B8246

Hope this all made sense! Lost Labyrinth (c)(b) 01:07, September 9, 2013 (UTC)