Biscuits Web Ring

Web rings are part of each biscuits version. See biscuits-14v/includes/web-ring

1 How the Web Ring PHP works

  1. The web ring is IFRAME code The URL is fixed and the domain that contains the iframe is in the URL get data as ?domain=XXX Placed into webRing->homeDomain
  2. Web ring PHP is a special code conditional branch directly from the main index.php of the server. (See index.php WEB_RING_SPECIAL: label)
  3. The web ring PHP is based on a CLASS webRing() which is instantiated in an included PHP file in the biscuits-14v/includes directory The PHP class webRing() is also in the INCLUDES directory area.
  4. This web ring is hosted on our server, but we would like to help others share the actual web ring domain list and code on their own web site. Currently the simplest way to join the ring is to place some iframe code ( see below: ) onto your pages

  5. Type web-ring.qnet9.com into your browser address bar.
    Basic qnet9

    This is the address of the web ring's iframe

  6. The domains are currently set up on our server and can be shown on your pages by pasting the iframe, found below, onto your pages

2 Join the Web Ring

Submit your web site link to the webmasters and join the ring OR

Join by adding the ring to your own site.

An alternative way to join the web-ring is to add this iframe code and javascript to your own web site. The web-ring will appear when you add the iframe but your site will only appear one or two days after you paste in this javascript.

Please add this IFRAME and this JAVASCRIPT to your site such that it loads up and becomes visible on most pages. It should not become too intrusive.

3 Code to include on your site

When you add this code to your web site and start viewing pages, which contain this code, your web site should start to appear in this web ring. Please allow a day or two for your site to appear in the web ring.

START OF WEB RING IFRAME CODE

Cut and paste this code into your web page as it is

<!-- 
The content loaded into this iframe cannot be styled by your CSS 
so choose a suitable THEME and control your web ring by the URL get data posted
to the iframe content -->

<iframe src="https://bbc.co.uk" 
        class="bi-web-ring" 
        id="web-ring-iframe-id"
        frameBorder = "0" scrolling="no"
        overflow-y = "hidden" 
        onload="resizeIframe(this, 900);"
        overflow-x = "hidden"
        width="100%" height="50px" 
        style="overflow: hidden;">
    [Your browser is not configured to display frames
    Please use an up-to-date browser that is capable of displaying frames.] 
</iframe> 

<script>
    // This is the parent domain's javascript to go alongside the parent iframe
    // the Web ring code also has it's own javascript:
    // See BISCUITS/include/web-ring/web-ring.php

    function loadIframes() {
        var hostname = window.location.hostname;
        var protocol = window.location.protocol;
        var subdomain = window.location.hostname.split('.')[0];
        var referrer = document.referrer;
        var dPos = hostname.indexOf(".");
        var domainName = hostname.substr(dPos + 1, 999);

        var ETiFrames = document.getElementsByClassName('bi-web-ring');
        for (var i = 0; i < ETiFrames.length; ++i) {
            var item = ETiFrames[i];
            newSRC = 'http://web-ring.qnet9.com';
            newSRC += '?domain=' + domainName;
            newSRC += '&referrer=' + referrer;
            newSRC += '&subdomain=' + subdomain;
            newSRC += '&theme=forest'; // Change THEME to suit your prefered style
            newSRC += '&ring=east-kent-chess';     // Change "RING" to join suitable web ring by name         
            newSRC += '&protocol=' + protocol + "//";
            item.src = newSRC;
            //lert(new Error().lineNumber + " " + arguments.callee.name + ' : ' + newSRC);
        }
    }

    function resizeIframe(elem, fHeight) {
        contentID = 'web-ring-content-id';
        ///fHeight = 900;

        //fHeight = document.getElementById(contentID).offsetHeight;
        //fHeight = elem.clientHeight;
        //var iFrameID = elem.id;

        //var cont = elem.contentWindow.document.body || frame.contentDocument.body;
        //fHeight = cont.scrollHeight + "px";

        // fHeight = elem.scrollHeight + 'px';
        //lert("XXXX height set to : " + fHeight);
        //alert("XXXX clientHeight : " + fHeight + " Set in " + elem.id + " iframe ");

        elem.height = fHeight;
    }

    if (window.addEventListener) {
        window.addEventListener("message", handleMessage);
    } else {
        window.attachEvent("onmessage", handleMessage);
    }

    // Handle a message that was sent from some window.
    // @param {MessageEvent} event The MessageEvent object holding the message/data.

    function handleMessage(event) {
        //lert(new Error().lineNumber + " " + arguments.callee.name + " Received a message from " + event.origin + ".");

        // When one window sends a message, or data, to another window via
        // `parent.postMessage()`, the message (the first argument) in the
        // `parent.postMessage()` call is accessible via `event.data` here.
        var messageObject = event.data;
        contentHeight = messageObject.contentHeight;
        // Now the parent can do something with the data.

        webRingIframeElem = documentGetElementById(web - ring - iframe - id);
        resizeIframe(webRingIframeElem, contentHeight);
        //lert(new Error().lineNumber + " " + arguments.callee.name + ' => ' + contentHeight);
    }
    loadIframes();

</script>



END OF WEB RING IFRAME CODE

The results of this code on your site will be something like the view of the web ring that appears below:

Website by Ibiscuits
91 __construct Chat closed for a private lesson right now. Please come back later
40 chatEngine.php crashLeon APPLICATION : /home/leonwool/public_html/applications/leonwooldridge

Chat Settings - Obj Vars

action
error
domain
application
bigDateFormat
smallDateFormat
msgQuery
userid
myIPA
myMembership
webpage
tokenValues
profileLink/member/@username
load Object
database Object
urlMethods Object
friendsDB Object
memberDB Object
suid
tableMethods Object