Support » Plugin: MP3-jPlayer » found how to change hardcoded margin and border of playlistplayer

  • Resolved Deskslider


    Hi, hunted my ass off to fix this, and found it, so I thought I’d share. Please respond if it helps you… Let’s help eachother use this kickass player if Simon is held up a bit right now.
    This is quite intermediate level and you need to be able to understand code somewhat. It can give you a helpful pointer if you need it though.

    I wanted to have my playlist player on the right of text, but text would touch it on the left of player. Also I wanted a litte grey outline to go with the pic on my site that also have that. And shorten the underborder. Firebug will give you ‘’ which means its inline coded, in this case in the php code. Geeezzz, bummer. Solving it involved editing in several places:
    in the player admin settings under playlist player options setting above and below player options to 3px (I think I override it later but just to be sure)
    Then, at the top of this particular page, in wordpress text edit mode added (adjust this to your own particular page /post path with Firebug, using copy CSS path):
    <style> div#wrapper section#main.fullwidth div.article-inner section.entry div.wrap-MI
    float: right;
    border: 1px solid #F0F0F0;

    Float is to make my paragraph text go to the left of the player. Oh, put player shortcode first, then text.

    Finally, the kicker:
    in mp3j_main.php line 799 change to
    } else if ( $pos == “rel-R” ) {
    $floater = “position:relative; padding:” . ” 3px ” . ” 3px ” . ” 3px ” . ” 3px; margin:-1px 0px 0px 17px;”;

    This overrides fetching the margin and padding from the database settings. Your situation can be different, this only works for short code option rel-R but if you can understand code a little bit, now you know where to look or go, I hope.
    Finally, here’s my shortcode:

    [mp3-jplayer tracks=”http://pathtomp3/Verhaalbass.mp3,
    ” width=”165px” pos=”rel-R” list=”y” vol=”73″ ]

    webtext myarticle blablabla follows here…

    For a while the result can be seen in action on

    Jay van Bruggen

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author simon.ward


    Hi Jay,
    re. the hard coded margins – you didn’t really need to do this.

    You can set the player to float using pos="left" or pos="right" in the shortcode, and set the ‘Inner margin’ option on the player settings page (under ‘Playlist player Options’) as needed.

    To get a border around a player then you’d probably want to not float it and wrap it in a div that is floated instead eg:

    <div style="float:right; border:1px solid #ccc; padding:2px; margin-left:30px;">
    [mp3-jplayer etc...]

    then set the margins to 0px on the settings page.

    Hope that helps.

    Thanks Simon,
    In the situation I was in then, it didn’t work, or I messed up, I don’t know. But indeed you’re method is much more elegant and I’ve seen it work now in a fresh test install, so I’ll use that from now on.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘found how to change hardcoded margin and border of playlistplayer’ is closed to new replies.