Gadget - Tunngle Live List

Tunngle is free virtual private network (VPN) software and allows any interested parties to extend their local area network (LAN) to include computers at remote locations around the world. It is a secure network but behaves like a LAN when it comes to hosting and joining multi-player games that support a local network style of game play. Your LAN party options are no longer limited to the one room or building. In this way it functions very much like Hamachi.
 * see www.tunngle.net for more information

At www.tunngle.net/network-browser you can see a live list of Tunngle channels and the number of users in each channel. That list can be sorted and filtered seven ways from Sunday for those who care to play with it.

It seems like a good idea to have a more succinct version of this available to Wikia's community of wikis. Although Gaming wikis may seem like the primary benefactors there is no reason why other Wikia communities should not take advantage of this easy* to setup and use VPN technology.
 * You can request a dedicated channel via this forum thread: request-a-new-network-gamechannel

The so-called Tunngle Live List rendered below are based on live data retrieved from www.tunngle.net and will update each time the page is refreshed. demo

The list is not interactive because it is expected that each wiki will care only for one group of channels. As demonstrated here the list may be enabled or disabled via each user's personal preferences.


 * The international Tunngle client is due to be released on 11-Dec-2009 so unless you can read and understand a German user interface, you'd be well advised to wait until then to download and test drive Tunngle software.

How to .. embed a Tunngle Live List in a wiki page
There are two methods. One that uses the custom WikiPage widget MediaWiki:Widget-tunnglelivelist and the other which does not.

Embed the widget using &lt;widget&gt; tags
This is the simplest method and recommended. Simply use this markup,  to render as follows: WikiPage

Not using the widget
The minimum wiki markup is  however a suggested wiki markup is  only because the user is then presented with a handy link to the Gadgets tag within their personal preferences. They may enable or disable this JavaScript as needed.
 * Why do this?: The additional page load time is noticeable especially if the user has already filtered advertisements from loading.

The second piece of markup above renders as:

on/off

If no table appears above then:
 * 1) click the on/off link (at far right)
 * 2) tick the check box for Tunngle Live List (it may appear as tunnglelivelist until you save preferences the first time - then it should update)
 * 3) click [Save] at the bottom of that preferences page
 * 4) return to Project:Sandbox and press Ctrl+F5 to purge the browser's cache only if necessary


 * Do I have to remember all of that markup? : No. If you just visit MediaWiki:Widget-tunnglelivelist and view the source wikimarkup code then you'll be able to copy and paste it to whichever wiki article you are creating.

Hopefully you will agree that the WikiPage widget approach is more convenient. If you've forgotten how to get that widget into your Monaco sidebar or your Special:WidgetDashboard then review Help:Widgets to refresh your memory.

Samples rendered for each of the standard Monaco skins
The gallery below lets you see, for each of the standard Monaco skins available at Wikia, just how this gadget-in-widget renders in the sidebar.
 * Notes
 * 1)   and   are two standard/default class names used Wikia-wide for color styles so as to match the colors used in other parts of the Monaco skin
 * 2) * This choice can optionally be specified right alongside the  class name used in code block displayed in the next section.
 * 3) The Gaming skin is the only skin with a light-on-dark color scheme. That skin benefits from a light-on-dark tunngle logo as shown. The URLs to the most up to date full-size images with transparent backgrounds can be located via:
 * 4) * w:c:vsk:File:Tunngle_black.png
 * 5) * w:c:vsk:File:Tunngle_glow.png
 * 6) * w:c:vsk:File:Tunngle_grey.png
 * 7) * w:c:vsk:File:Tunngle_white.png
 * 8) * These are &copy; tunngle.net and permission has been granted to use them at any tunngle fan site.
 * 9) There is one skin whose default color scheme seems to be flawed - Brick color2. The fix (see the very last image in this gallery) is a simple one-liner in your wiki's MediaWiki:Monaco.css message. viz.


 * Do I need to use a gadget?:No you don't. Choose to do so only if you want to allow any user who does not wish to be bothered by the additional load time to easily disable the feature via their Special:Preferences.
 * Of course you could copy the JS code into your wiki's MediaWiki:Monaco.js (or MediaWiki:Common.js) and the CSS code into MediaWiki:Monaco.css and the code will run for every visitor to your wiki. You will still need to use the minimum required wiki markup code somewhere on your target wiki page to let the code take effect. If that code is in the sidebar then keep in mind that it will refresh the list on every new page load.


 * Do I need to use a widget?: No you don't. It happens to be a convenient way for the Live List to be dragged and dropped into either the Monaco sidebar or the Special:WidgetDashboard. As noted in an earlier section, embedding a widget using a pair of  tags is also the most convenient.
 * Any wiki article that has a pair of  tags will cause the list to be rendered at that specific location on that page.

JavaScript

 * To specify color1 or color2 themes: Edit the line: "); ... Of course you can remove the second of the two class names altogether if you wish. A table will still be created from dynamic data if you accidentally delete the   class name however you should not expect the cascading style sheet (CSS) in the next section to yield the same sidebar widget that you see in the gallery above.


 * To tailor the list to a game other than Virtual Skipper: Edit the line:

CSS
The following styles were used to yield the skin swatches in the gallery above. Use this as a baseline but feel free to customize further.


 * How can I make every second row in the list use a different background color?: If the list of channels is more than 2 or 3 then this can certainly enhance readability. Although not illustrated in the gallery above, every odd numbered row has the class 'row1' while every even numbered row has the class 'row0'. Note the pair of lines at the end of the CSS listing above - they are commented out. That's where you can specify suitable alternating background colors that match your wiki's color scheme.

How to .. make the gadget
You must have a sysop/admin at your target wiki create the gadget. The MediaWiki namespace is viewable by any user but can only be edited by a sysop/admin.

on/off
 * 1) From your target wiki - use Special:Contact to send Wikia staff a request for the Gadget Extension be enabled for that wiki. (This is typically acted upon within 24 hours ... and often much sooner.)
 * 2) Visit Special:Gadgets at the wiki you are now reading and notice there are three links for the tunnglelivelist gadget.
 * 3) Visit each of those pages and copy the source code to a newly created page of the same name at your target wiki.
 * 4) * Yes, the Gadget- prefix in each MediaWiki message name is required ... it is not an option. (RTFM)
 * 5) Visit MediaWiki:Gadgets-definition and copy the bullet line item corresponding to tunnglelivelist to a MediaWiki message of the same name at your target wiki.
 * 6) * Yes, the page name prefix is Gadgets- with an "s" ... I dunno ... go figure!
 * 7) Now at your target wiki's Project:Sandbox paste the following code and save the page.
 * Minimal:
 * Suggested:

If you followed those steps then nothing should render under the Minimal heading and the only thing that should appear under Suggested is a very small on/off link at the far right.
 * That's the way it is supposed to work. i.e. Rather than requiring users to opt-out of using this gadget you invite them to opt-in.
 * Why Wikia consistently ignores this simple piece of common courtesy, we may never know!

OK so now refer to the steps described at above to enable and verify the correct display of the table within that sandbox page.

That will get the Tunngle Live List into a wiki article but what about the sidebar or the gadget dashboard? For that you need a custom WikiPage widget.

How to .. make the widget
Create the gadget before creating the widget.

You don't need a sysop to create the widget unless you plan on creating that widget in the MediaWiki namespace as has been done at the wiki you are now browsing. Whether you create the widget in the MediaWiki namespace or the Main namespace or even in a sub-folder below your personal user page you would be well advised to give this widget definition page the prefix  . This is not a requirement, just a suggestion.

You really need a custom WikiPage widget to get this Tunngle Live List displayed in your Monaco sidebar or any one of the three columns of widgets at Special:WidgetDashboard.

Once you have created the gadget creating the widget is a walk in the park!

on/off WikiPage Notice how embedding the custom WikiPage widget produces a different size table than the previous two.
 * 1) At your target wiki - create the page MediaWiki:Widget-tunnglelivelist - this becomes the custom WikiPage widget definition source page that any visitor may use if they want this feature in their sidebar or their widget dashboard.
 * 2) * Source page name is important only to the extent that as other Wikia hosted wiki's adopt this gadget-in-widget feature then as you browse to one of those other wikis the widget will appear in your sidebar or dashboard auto-magically only if all wikis adopt the same MediaWiki:Widget-tunnglelivelist name for the Source page.
 * 3) Now copy the same line of wiki markup that you pasted into the sandbox under the Suggested heading while verifying the gadget. (refer to the code block below)
 * 4) Save the page and, if need be, refresh and/or purge the browser's cache (CTRL+F) to see the rendered result.
 * 5) If you had not yet checked the appropriate box in your personal preferences then refer to the steps described at  above to enable and verify the correct display of the table at the newly created Source page for this custom WikiPage widget.
 * 6) Now return to the Project:Sandbox at your target wiki then paste and save two more lines to the markup you had pasted while verifying the gadget created earlier. viz.
 * Minimal:
 * Suggested:
 * Convenient:

Finally, if you've forgotten how to get that custom widget into your Monaco sidebar or your Special:WidgetDashboard then review Help:Widgets to refresh your memory.
 * The thumbnail at right may be all the prompting you need.
 * You may choose any Title of widget you like however Tunngle Live List '' is suggested.
 * You should copy MediaWiki:Widget-tunnglelivelist into the Source page: field.


 * Why am I seeing this failed to load message in the Tunngle Live List widget at every other wiki I visit!:Well that's because Wikia don't yet see Widgets as a high priority feature. Give them time but more importantly, give them your feedback ! The interim workaround is simple and one that will make widgets a valuable tool to use at many wikis. To learn about the interim workaround visit this user blog. Also please revisit that blog after you've tried the workaround and leave your comment to let Wikia staff know whether or not this is how you would like to see missing widgets dealt with.