Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthordanhill
    • CommentTimeAug 19th 2009 edited
     
    This workaround makes it so you can place your opentape mixtape in a frame on any page and keep it hidden until a link is clicked. Once the link is clicked, your mixtape "opens up" vertically and displays all of your tracks.

    Furthermore, your admin panel will display directly on your website within this frame.

    Here is an example: http://nujeru.com

    Here's how it works:

    First, download the source files here: http://nujeru.com/opentape/opentape_js_accordion_v1.1.zip

    Place the "js" folder in the same directory as the opentape folder on the server where your mixtape is located.

    Include the javascript files on the page where you want the mixtape to be located:

    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js"></script>
    <script type="text/javascript" src="js/opentape_accordion.js"></script>

    Place the following code where you want the mixtape to be displayed on the same page:

    <div id="mixtape" style="display:none;">
    <iframe id="myframe" name="myframe" width="100%" frameborder="0" scrolling="no" src="opentape/index.php"></iframe>
    </div>

    Place the following script in the <head> section of your page:

    <script type="text/javascript">
    function resizeFrameTo(count){
    var frameSize = count*70+150;
    document.getElementById('myframe').height=frameSize+'px';
    }
    </script>

    Place the following in the <body> tag of the mixtape.php page located at opentape/code/mixtape.php:

    onload="parent.resizeFrameTo(<? echo count($songlist_struct) ?>)"

    Finally, the link.

    Place this link anywhere on the page to toggle the mixtape accordion up or down:

    <a href="javascript:toggleMixtape()">Toggle Mixtape</a>

    Enjoy.