WordPress.org

Ready to get started?Download WordPress

Forums

MP3-jPlayer
Works well, customizable (32 posts)

  1. lao3d
    Member
    Posted 3 years ago #

    Takes a bit of figuring out to implement, but once in place, it seems like a robust and customizable player. Probably needs an "advanced beginner" understanding of WordPress to get it up and running, but if the "Read Me" instructions are followed carefully, it works very well...

    http://wordpress.org/extend/plugins/mp3-jplayer/

  2. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    lao3d, thanks for your feedback,

    the help on using the tags was definitely lacking detail in the last release (v1.3.4), it's now being improved with better examples and explainations, and some detail on how the plugin operates. This should make things easier and less frustrating for anyone who's not so comfortable delving into theme files and will be available in a few days time.

    I'll also add some theme specific examples as i realise that some themes are trickier than others to work with (the Thesis theme for eg is not so obvious which files to drop tags into).

    The tags themselves are quite simple, they just have some optional inputs and there's a bit of subtlety to their placement. They can also interact with some of the admin settings.

    For anyone not sure where to drop the tags, try this to start off:

    1. Use an mp3j_flag() tag. Drop it anywhere in the header to start with and leave it's brackets empty.

    2. Use an mp3j_put() tag. Drop it at the top of the sidebar to start with and leave it's brackets empty.

    Having done 1 and 2 above, visit a page on your site that you know has a playlist.

    That is all you need to do to put the player in the sidebar.

    Simon

  3. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    Just to clarify the above, the correct form would be:

    <?php mp3j_flag(); ?>

    and

    <?php mp3j_put(); ?>

    As with all tags and functions that are not part of WordPress core, you should use function_exists() to check they're available, though it's not strictly necessary as long as the plugin is active!

    Simon

  4. lao3d
    Member
    Posted 3 years ago #

    Thank you, that should prove helpful!

  5. trendkiller
    Member
    Posted 3 years ago #

    Having done 1 and 2 above, visit a page on your site that you know has a playlist.

    I'm a bit new to WordPress, etc. so I apologize if this is a silly question.

    Is there a way to get a playlist on the index/blog page? I'm trying to get a player right at the top left corner of my blog page. Well, I'd like it to appear on every page in that same spot.

    I'm excited to use this player, but I am having a hard time so far. Any help is appreciated.

  6. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    that's a good question as the code above gives varying results on the blog/index page. In short yes you can play any tracks on it including the playlist connected to the index page itself if there is one (ie if you're using a static page as the blog index and you've put a playlist on it).

    If you want the playlist to be same for all pages then you just put the id number of the page that has the playlist you want to use in the put tag. so if the page id was 100 you'd write:

    mpj_put(100);

    Page id's are visible on the page/post edit screens in the address bar where it says .php?post=

    BUT for other single page/post pages on your site you'd also need to force the scripts using mp3j_addscripts() to get the player to show as if there was no playlist entered in that page's custom fields then the scripts won't be added by default like they are on the blog index (i'll prob make this possible from admin in future version). I hope that makes sense.

    fyi using the put tag with empty brackets is like using the shortcode in that the shortcode does nothing if there are no tracks in the custom fields. An empty put tag behaves the same. This means on the blog index you get the following:

    If put tag is placed before the wordpress post loop: the tag only sees the first post in the list, if there's no tracks in this post then no player will show.

    If put tag is in the loop: player show's with first post that has playlist

    If put tag is after the loop: the tag only sees last post on the list, again if no tracks then no player shows.

    Using the Modes for the put tag 'first', 'feed', or an id, give you control of the playlist. and Leaving it empty leaves it up to the player to auto add if it sees a playlist.

    Simon

  7. serf
    Member
    Posted 3 years ago #

    I am using your mp3 jplayer and am having problems when I place it in the sidebar using a Genesis theme.
    I have used your suggestions by placing mp3j_flag() in the head and <?php mp3j_put(); ?> in the sidebar.php

    The mp3 player is showing but I have a white square with the text jPlayer 1.2.0 (flash) appearing in the top left corner and my navigation bar disappears. please can you tell me how to remove this white box? Thanks.

  8. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    Hi serf, can you give me a link to the page and the browser you're using?

  9. brokenflipside
    Member
    Posted 3 years ago #

    I have been at this for days, not sure what I am missing.

    My site is here:

    test.liveworksink.com/lynzie

    the playlist is here:

    test.liveworksink.com/lynzie/index.php/music-2

    I have set the flag in the header

    and I have placed this: (in the sidebar)

    <?php if ( function_exists('mp3j_addscripts') ) { mp3j_addscripts('/wp-content/plugins/mp3-jplayer/css/mp3jplayer-green-sidebar.css'); } ?>

    <?php mp3j_put(107); ?>

    (I have also placed the code in the index.php, page.php, and video.php)In a feeble attempt to get it to work. I am lost. I am willing to provide access to everything if someone can point me in the right direction as to how to make this appear in the sidebar of each page on my site.

    mgratch@liveworksink.com

  10. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    @brokenflipside

    the mp3j_addscripts() must go in the header and it must be above the wordpress wp_head() hook, it's not possible to add the scripts from the sidebar.

    Simon

  11. brokenflipside
    Member
    Posted 3 years ago #

    That did the trick! Thanks, I am going to up-sell the crap out of your plugin. Hands Down BEST MP3 player for wordpress.

    @Simon got any other work I should be showing off to people, this is brilliant and you deserve a lot of recognition!?

  12. serf
    Member
    Posted 3 years ago #

    I am using firefox 3.6.12, and the swf file also shows in IE7 and IE8, but chrome and safari seem to be ok.

    My test site is at http://www.antiochchurch.co.uk/1index289.php/

    Hope you can help, as I am at a loss as to how to stop the browser showing the swf file in the top left corner!

    I have put <?php mp3j_flag(); ?> in the header and <?php mp3j_put(); ?> in the sidebar.

  13. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    @brokenflipside, hey thank you man, and glad you got it working.
    i'll hopefully have some other plugins coming along soon, plus there's still lots of stuff i'm looking forward to adding to this one...

    @serf, i can see another audio player plugin active on your page that uses visible flash. i'm not sure why, but the two may be confilcting when you use ff/ie. jPlayer will fall back to using flash invisibly in non html 5 browsers. If it's not needed try deactivating the other audio player, pls post back here if there's still a problem.

    Simon

  14. serf
    Member
    Posted 3 years ago #

    thanks for your reply. I have deactivated the other audio player but still have the swf showing in the top left corner. I thought this would be the case as this error was happening before I installed the other plugin as I was trying to find another mp3 player.

    I would much prefer to use yours though as I want people to be able to see it in iphones etc, so a html5 option is the best. Anymore ideas how to remove the swf file in the top left corner in firefox and IE?

  15. brokenflipside
    Member
    Posted 3 years ago #

    Works great with iphone. Not so much with android or WP7 devices. But I feel like those problems are specific to the mobile browsers on the devices.

    I know WP7 doesn't yet support HTML5 or Flash. I thought android did. (Well many don't have flash, but most 2.2 devices do.) Either way it works on most 2.2 android devices (epic, evo, galaxy)

    Thanks!

  16. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    @serf, is the box there when the player is the only active plugin? if yes then is it there when you switch to the default theme? If you're happy to send me a login (via contact form on my site) then i'll take a look for you.

    Simon

  17. serf
    Member
    Posted 3 years ago #

    simon

    Thanks for your reply. I think I will just use another plugin for now. Maybe if your plugin becomes a widget in the future I would use it as it would be easier for a newbie like me. Thanks anyway.

  18. jabba07
    Member
    Posted 3 years ago #

    Hi, Anyone got any ideas why i get this error message in my sidebar when I try to add the player into the template?

    =======
    Warning: shuffle() expects parameter 1 to be array, null given in /####/####/htdocs/mywebsite/wp-content/themes/arthemia/sidebar.php on line 6

    Warning: array_slice() expects parameter 1 to be array, null given in /####/####/htdocs/mywebsite/wp-content/themes/arthemia/sidebar.php on line 7
    ========

    I Can get it to work fine when in a post but I need it to display in sidebar :-(

    Thanks!! J

  19. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    This is because the array you're trying to shuffle and slice is empty.

    If you're using the code example from the readme that grabs tracks from your library, you need to make sure that there's definitely some mp3's in there, and that the slice you're going to take is not bigger than the available number of tracks in your library.

    Simon

  20. Siouxsie
    Member
    Posted 3 years ago #

    Hi, So far i like the plugin but I am adding mixes and need to add a playlist that includes track names.
    My issue is they are NOT in the library (had to ftp because of files size).
    So my question is is it possible to add the description in meta? I would like them to show up in the playlist below.

  21. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    Siouxsie,

    the plugin does not read ID3 meta from the mp3 (maybe in a future version), but you can add the titles and captions into the custom fields. However only the title appears in the drop down list and not the caption.

    A way around this is to use html br tags in the title fields to break to a new line and write the caption, that way it appears in the drop down list as well. Hope that helps.

    Simon

  22. Lori
    Member
    Posted 3 years ago #

    Hi! I've just installed the plugin and am trying to use the sidebar widget. It shows up, but not on my index page, only in the sidebar of my other blog pages. Could you give me any clues about how I can get the widget to show up in my sidebar on my main page?

    I've tried various settings on the "page filter" section of the widget, but can't get anything that works. The main site index does not have a "page ID" so I am not sure what to enter in the "include" field (putting "index" doesn't work.

    Thanks in advance for any help!

  23. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    Lori,

    firstly make sure settings option 'show player on posts index' is ticked as it will over-ride all.

    If you're using the widget in mode 1 it will look down the list of posts only (and not in the index page itself) so one of those posts needs to have tracks in order for the player to show up.

    If you want a fixed playlist for the index use a(nother) widget in mode 2 or 3, and set it's filter to Include and 'index'

    If there's still a problem in mode 2 or 3 pls let me know the theme and i'll take a look.

    Simon

  24. Lori
    Member
    Posted 3 years ago #

    Hi Simon, thanks so much! Somehow I had missed the "show player on posts index" setting. Making sure that was checked did the trick!

    Now all I need to do is widen the sidebar widget player by about 20px. I am looking at the mp3jplayer-grey-sidebar.css file -- is that where I should put the changes? Is it too much to ask for some pointers about which widths I would need to change (there are so many)?

    Thanks,
    Lori

  25. Lori
    Member
    Posted 3 years ago #

    Oops, I see already that it's not the sidebar css file, but the normal grey one that needs to be changed. But there are so many width settings to change...eek!

  26. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    Hi lori,

    i think it's easiest to go top to bottom adding (or subtracting) a fixed amount to/from all the biggest widths (between about 260 - 280px on the wide sheets) there's 10 or so to tweak.

    Then the only other things to adjust are the jp-play/stop/prev etc buttons which need their left positions adjusting by the same amount, and the jp-play-time div also left positioned.

    btw the sheets were simpler originally but since trying to get things looking ok in ie6 percentage/auto widths went out the window. Then to stop some themes mis-aligning various divs and uls i added extra declarations in. A lot of these can be removed for any one theme.

    Simon

  27. Lori
    Member
    Posted 3 years ago #

    Thanks very much for the advice, Simon! I'll give it a try and see how it goes. It's really nice of you to take the time to help out here the way you do, btw.

    Lori

  28. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    You're welcome Lori.

  29. Andreas Wagner
    Member
    Posted 3 years ago #

    hey there,
    thx for this cool and simple plugin. i was wondering if there is an easy way to compress the widget format even more. right now the fixed size is 201px and i would need it down to 190px. i've searched the css files, and found most of it, replacing the sizes 201 and 199 wiht 190. still some objects fall out of this scheme, apparently. can you give me a hint? website is http://www.discorporate-records.com
    cheers
    Andreas

  30. simon.ward
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Andreas,

    see the above post for the things to adjust when changing the width, there's some left aligned elements to change at the same time.

    The dark marks at the top of the playlist are the width of the inner-x div overlapping innerleft and innerright divs as they're all transparent png. The overlapping time/status is left position again.

    The next version is nearly done and allows width setting from admin (and shortcode/widget), will save a lot of messing around with stylesheets.

    Simon

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic