Jump to content

Welcome to the Redwall Wiki, your communal Redwall and Brian Jacques information resource! Free registration eliminates the ads!

Talk:Webring

Add topic
From the Redwall Wiki Clone, your Redwall news and information resource.
Revision as of 20:02, 3 February 2009 by imported>LordTBT
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Instructions for hacking in a webring navbox onto Webring

[edit]

1

[edit]

Create the WebRing code on a valid html file somewhere on the internet. This could be a semi-secure website that you own or have web space on. Ideally it would be on wikia somewhere, like http://redwall.wikia.com/webring.htm, if you can convince Jason to create such.

<script type="text/javascript"
src="http://ss.webring.com/navbar?f=j;y=redwallwiki;u=defurl"></script>
<noscript><center><table bgcolor=gray cellspacing=0 border=2 bordercolor=red>
<tr><td><table cellpadding=2 cellspacing=0 border=0><tr><td align=center>
<font face=arial size=-1>This site is a member of WebRing. 
To browse visit <a href="http://ss.webring.com/navbar?f=l;y=redwallwiki;u=defurl">
here</a>.</font></td></tr></table></td></tr></table></center></noscript>
Done by JasonR

2

[edit]

Edit MediaWiki:Monobook.js and add the following code:

function webringInit()
{
    if((document.getElementById('WebRing'))&&(document.title.indexOf("Webring - ") == 0)) {
        var wrnav ='<iframe src="http://redwall.wikia.com/webring.htm" height="75" width="350" align="middle"></iframe>';
        var wr=document.createElement('div');
        wr.innerHTML=wrnav;
        var wrmarker=document.getElementById('WebRing');
        wrmarker.parentNode.insertBefore(wr,wrmarker);
    }
}

window.addEventListener('load', webringInit, false);
Note that the src link in the second line should point to the exact location of the external html.

3

[edit]

Place <br id="WebRing" /> somewhere onto Webring. Note that the script will only activate if the page title matches "Webring" and this BR tag is somewhere on the page. Note also that at the top of Webring currently is such a tag in a table (that centers it) that I placed for testing purposes.

Done

Notes

[edit]
  • This may not work in all browsers, but seems to work in Mozilla fine.
  • It is possible to write the html directly to the page, eg var wrnav ='<script type="text/javascript" src="http://ss.webring.com/navbar?f=j;y=redwallwiki;u=defurl"></script>';. However, on some versions of mozilla this screws up and blanks the page execpt for the webring navbox.
  • The page should probably be protected, and any other content put in an editable transclusion like Webring/content (with {{:Webring/content}}).

--Splarka (talk) 09:50, 21 June 2006 (UTC)