The Menu
Every menu item goes onto its own line. Within that line you can use whitespace however you like. This is what the line needs to look like:
The Level
The "Level" says in what part of the menu you want the item. Use one, two or three asteriks:
Example |
* Menu A
** Submenu A 1
** Submenu A 2
*** Subsubmenu A 2 I
*** Subsubmenu A 2 II
** Submenu A 3
* Menu B
** Submenu B 1
|
The Title
is just regular text. The Title - just like the Level - is necessary. You can leave out the Link, if you feel that makes sense, but not the Title.
The Link
You have a bunch of options for specifying links. Feel free to use any and all of them!
* Wikimarks = Wikimarks Wiki | wiki link |
* Wikimarks = w:c:wikimarks:Wikimarks_Wiki | interwiki link |
* Wikimarks = http://wikimarks.wikia.com/wiki/Wikimarks_Wiki | absolute URL |
* Wikimarks = /wiki/Wikimarks_Wiki | relative URL |
* Wikimarks = javascript:location.href="/wiki/Wikimarks_Wiki" | javascript URL |
Wiki Links
Those are the regular links that you find on pretty much every page of every wiki. You simply use the article name. If the page isn't in the article namespace, you add that bit:
ArticleName | User:UserName | File:Image.png | Help:Contents | etc. |
Wiki links are uncomplicated and short. There's one little snag though: They always point to the wiki you're currently on. Since the Wikim*rks will be shown on absolutely every wiki, you should use wiki links only for files that do exist everywhere. The Special Pages e.g. have identical page names on every wiki:
Special:WikiActivity | Special:Search | Special:MyPage | Special:Upload | etc. |
A full list of special pages can be seen here.
The (standard) MediaWiki: files also exist on every wiki. There are a number of templates that can be found pretty much everywhere. The Shared Help is omnipresent as well. And so are the entry pages of certain namespaces like Blog:Recent_posts or Forum:Index.
Interwiki Links
So what if you want to link to a page on a specific wiki? Use an interwiki link! They're just as simple as regular wiki links. All you need to do is add the interwiki name in front of the page name.
Community Central takes the cake for having the easiest of all interwiki names: w: That's it. Just w:. So w:Special:WikiActivity links to the WikiActivity page at Community Central.
All other Wikia wikis have a composite name: w:c:<<subdomain>>: Let's look a few examples:
w:c:lostpedia: | Mainpage of lostpedia.wikia.com (Lost Encyclopedia) |
w:c:aion:accessories | "Accessories" page at aion.wikia.com (Aion Wiki) |
w:c:guildwars:Category:Items | Category "Items" at guildwars.wikia.com (Guild Wars wiki) |
Interwiki links that point out of Wikia are possible as well btw. Here are a few examples:
Wikipedia:Interwiki_links | MetaWikipedia:Interwiki_map |
MediaWikiWiki:Manual:Interwiki | Wiktionary:interwiki |
(Click on any of them if you're inter-curious)
Absolute URLs
Believe it or not: Not everything is a wiki. And so you can use regular URLs as well. No surprises here:
http://google.com/search?q=Absolute+URLs |
Relative URLs
Relative URLs are shortened versions of absolute URLs. You leave out the "http://" part and the server and get: A link to your own wiki. How's that interesting? That's what we've got wiki links for, don't we? Well, wiki links do not allow parameters. So, suppose you want to get a listing of all templates or a listing of all MediaWiki files of the wiki you're currently on:
/wiki/Special:AllPages?namespace=10 | all templates |
/wiki/Special:AllPages?namespace=8 | all MediaWiki files |
And here: mw:Manual:Parameters_to_index.php is a list of parameters you can tinker with...
WARNING: Here's the rabbit hole! Everything below this point is advanced stuff and it will become more advanced the further down you scroll. Feel free to stop reading here and ask me or any other power user to cook something up for you! You can also go to the Recipes page for ready-made solutions you can copypaste. Not everybody is a programmer after all. Even programmers know that. Well... some of them. At least I do. Usually ;)
JavaScript Links
But you know what? Why not go hog wild and allow javascript: links? With JavaScript you can compose even more interesting stuff. There's even a small number of convenience functions for javascript: URLs:
url() | opens any link - a wiki link, an interwiki link, an absolute URL or a relative URL |
win() | does just the same, but in a new tab |
e() | is a shorthand for encodeURIComponent |
q() | adds a parameter to the URL. If the URL already has a query-string, it will be added with a & otherwise with a ? and if the URL already contains that very parameter, it will be overriden |
With these four you can build most URLs very quickly. This one e.g. shows all subpages under your user page:
javascript:url("Special:PrefixIndex/User:"+e(wgUserName)) |
This one shows the history of the current page:
javascript:url(q("/wiki/" + wgPageName, "action=history")) |
And this one opens the File Upload page, but in a new tab, not in the current one:
javascript:win("Special:Upload") |
As a special goodie, I've made it so, that you can leave out the javascript: part, if the JS string starts with url() or win():
url("Special:PrefixIndex/User:"+e(wgUserName)) |
win(q("/wiki/" + wgPageName, "action=history")) |
win("Special:Upload") |
Here's a small selection of variables you might want to play around with in your URLs:
wgServer | the server name | here: "http://wikimarks.wikia.com" |
wgNamespaceNumber | the namespace number | here: 0 (article namespace) |
wgPageName | the page name (as seen in the URL) | here: "Manual" |
wgTitle | the page title (the window/tab title) | here: "Manual", |
wgAction | what you're currently doing | while I'm writing this: "edit" |
wgArticleId | the article id | here: 2079 |
wgUserName | your user name | here: "Pecoes" (Hi! BTW :) |
wgUserLanguage | the language you've chosen | here: "en" |
wgContentLanguage | the language of the page | here: "en" |
wgCurRevisionId | the page's revision | right now: 4680 |
You're not confined to those four predefined functions, of course. Feel free to write your own. Just put them in your w:Special:MyPage/global.js where Wikim*rks can find them!
Here's a nifty one. It opens the Chat window (where available):
function chat() {
if (window.ChatEntryPoint && ChatEntryPoint.onClickChatButton) {
ChatEntryPoint.onClickChatButton(true, '/wiki/Special:Chat');
}
}
|
Copypaste it to your w:Special:MyPage/global.js, then wikim*rk it like this:
javascript:chat() |
Edit me!
Note: To edit this page, go to w:c:wikimarks:Manual