• I managed to get a “nowplaying” plugin working with my site (http://www.camiam.org)
    The problem is that I can’t get the output centered on the sidebar. I’ve tried for 2+ hours and decided I’d better post before 2 hours becomes 4.

    The aforementioned output is just below the red text on the sidebar.

    Here’s the pertinent code:

    Sidebar.php followed by the .js file:

    <div id="sidebar">
    <ul>
    <<<snip>>>

    _______________________________

    <P><center><font color=red><i><B> If you had headphones plugged into my computer we'd both be listening to:</B></i></font></center></P>
    <P>
    <P>
    <script><!--
    p_playing_width=187;
    p_div_width=500;
    p_playing_height=35;
    p_playing_border=0;
    p_text_color="purple";
    p_border_color="GREEN";
    p_bg_color="";
    p_font_color="0066ff";
    tokenID="cnSsExqjwovpEAXJYhzf";
    //-->
    </script>
    <script type="text/javascript"
    src="http://www.camiam.org/nowplaying.js"></script&gt;

    <<<snip>>>

    And the .js file:

    /*
    * Playing.js for Winamp Nowplaying2Web Plugin
    * xiaoyisheng@gmail.com
    * See http://www.blueforge.net/playing for details
    * version 0.1 2005/11/15
    */

    var w=window;
    var d=document;

    function quoted(str) {
    return (str != null) ? ‘”‘ + str + ‘”‘ : ‘””‘;
    }

    p_playing_url=’http://www.blueforge.net/playing/my.php’+
    ‘?width=’+w.p_playing_width+
    ‘&height=’+w.p_playing_height+
    ‘&fontcolor=’+w.p_font_color+
    ‘&bgcolor=’+w.p_bg_color+
    ‘&bordercolor=’+w.p_border_color+
    ‘&border=’+w.p_playing_border+
    ‘&tokenID=’+w.tokenID
    ;
    if (w.p_div_width)
    p_playing_url+=’&divwidth=’+w.p_div_width;

    d.write(‘ <iframe allowtransparency=”true” background-color=”transparent” name=”now_playing_frame” vspace=”0″ hspace=”0″ width=”‘+w.p_playing_width+
    ‘” height=”‘+w.p_playing_height+
    ‘” frameborder=”‘+w.p_playing_border+
    ‘” marginwidth=”0″ marginheight=”0″ allowtransparency=”true”‘+
    ‘ scrolling=”no” src=’+quoted(p_playing_url)+’></iframe>’);
    `

    I moved the .js file to my site so I could edit it but my tinkering provided no progress.

    Sincere thanks in advance,

    -Cam

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Center javascript output on sidebar?’ is closed to new replies.