WordPress.org

Ready to get started?Download WordPress

Forums

MP3-jPlayer
[resolved] Anybody up for updating this to use jplayer 2.1? (23 posts)

  1. helgatheviking
    Member
    Posted 2 years ago #

    at this plugin's core, jplayer has been updated. id i don't hear from simon, is there anybody that'd be interested in helping me update this plugin to use the latest jplayer scripts?

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

  2. rawdolphe
    Member
    Posted 2 years ago #

    jplayer 2.1 - what kind of new "goodies" in there?

  3. helgatheviking
    Member
    Posted 2 years ago #

    check out the demos:
    http://jplayer.org/latest/demos/

    i think the playlist feature looks a lot better. but a big part of the update would be improving the script loading, (i think, i haven't actually confirmed this needs to be done) and just making sure it still works well with WP. i sent simon a message to ask whether he is still maintaining this, but haven't heard back yet.

  4. rawdolphe
    Member
    Posted 1 year ago #

    Thanks, I LOVE the button: http://jplayer.org/latest/demo-05/ but with NO background, and smaller...

    Maybe he is dead? I hope not!

  5. helgatheviking
    Member
    Posted 1 year ago #

    i did hear back so he's thankfully still alive, just busy. i like the ability to display cover art w/ the playlists w/ the new jplayer.

  6. rawdolphe
    Member
    Posted 1 year ago #

    Any news? It's 2012 already... :P

  7. Dale Medley
    Member
    Posted 1 year ago #

    I really like the way it works. I have my music linked from an s3 account wish the plugin would preload (progressively download I mean) playlists at least visually more rapidly. Fetching songs though has not been a problem though. The plugin even validate as valid xhtml. All in all I'm happy with it guess this is more of a feature request. The fact that it obscures links is great saves a lot of amateur (that's me) type headaches.

    Example Deployment:
    And while it lasts the validation link

    Really Simon Ward whoever you are thanks a lot!

  8. helgatheviking
    Member
    Posted 1 year ago #

    @dale totally agree. simon put together an awesome plugin that despite not being updated in ages, still just plain works. thank you simon!

  9. rawdolphe
    Member
    Posted 1 year ago #

    Maybe you can help me with the following?

    Put this in header.php above wp_head()

    <?php
       mp3j_addscripts();
     ?>

    In Template Tag Help I read:
    Always use if ( function_exists() ) {} to check tags exist before running them incase the plugin gets deactivated.

    What does the final php code should look like? Thank you

  10. helgatheviking
    Member
    Posted 1 year ago #

    i don't know why instructions say that any more. just add it to the wp_head hook, that way you don't have to hack header.php

    add to your functions.php

    function add_m3j(){
      mp3j_add_scripts();
    }
    add_action('wp_head','add_m3j');
  11. rawdolphe
    Member
    Posted 1 year ago #

    Thanks for this helgatheviking, I will try it later on.

    I Googled and came across this post:
    http://wordpress.org/support/topic/plugin-mp3-jplayer-works-well-customizable?replies=32#post-1810928

    What do you think about the following -- not needed anymore then?

    <?php if ( function_exists('mp3j_addscripts') ) { mp3j_addscripts('/wp-content/plugins/mp3-jplayer/css/mp3jplayer-green-sidebar.css'); } ?>
    
    <?php mp3j_put(107); ?>
  12. rawdolphe
    Member
    Posted 1 year ago #

    PS: I think there is a typo in your code -- shouldn't it be:
    mp3j_addscripts();

    Instead of:
    mp3j_add_scripts();

    ?

  13. helgatheviking
    Member
    Posted 1 year ago #

    if that is the correct function name, then yes that's what it should be. consider my code more of an example of how to add code to the header... or even more generically how to add anything to any hook.

    i don't really know what you're asking in your other reply. i'm not exactly an expert in this plugin.

  14. rawdolphe
    Member
    Posted 1 year ago #

    Thank you, your input is truly appreciated, even though your code did not work.

    All I was asking/saying, is that the doc recommended using something like: if ( function_exists() ) {} ...

    So I googled and eventually came across the example from an other thread.
    You suggested something different, and you also said that you did not know why the instructions said that anymore , I assumed and understood that in your opinion the code was dated/no needed anymore -- that's what I meant by "not needed anymore?"

    Otherwise, does the following code makes sense to you?

    if ( function_exists('mp3j_addscripts') ) {
    mp3j_addscripts(); }

    I came up with it by analysing the code I pasted from the other post.

    Thanks again

  15. helgatheviking
    Member
    Posted 1 year ago #

    it is always a good idea to check if a plugin's function exists before adding it. this prevents errors in case the plugin is deactivated. so add your code to the header in the same way that i have shown.

    i don't know what the mp3j_addscripts function does precisely so i can't say if it itself is outdated. but directly editing header.php is outdated when every theme in the repo has the wp_head hook you can attach a function to.

  16. rawdolphe
    Member
    Posted 1 year ago #

    Thank you again for your reply.

    I understand the principle of what you have explained and what it does.
    However, I am not that clued up with php. All I am able to do is copy and paste stuff really.

    So, a couple of questions, in case you know a thing or two;
    1. Where did you get the function "add_m3j" from and are you sure that it is up to date? I am interested as I did not see it mentioned in the doc.

    2. In your opinion what should I put in my functions.php then? Possibly I'd like to "merge" your code with mine above. Considering the following from the doc:

    Template Tags

    Tags have become easier since version 1.7, you can now send in shortcodes. Note: there's an admin option to ignore the tags which needs to remain unticked when you want to use them.

    Instructions: Place tag (1) in the header, place tag (2) where you want the players to be.

    (1). mp3j_addscripts( $style )

    Loads the player's javascript and CSS files into the page header, and allows you to set a stylesheet. This tag must be placed above wp_head(), and must be used to ensure scripts will be loaded for players set via template tags.

    $style can be either a URI to a stylesheet, or 'styleA', 'styleB', 'styleC', 'styleD' to use one available from admin. Defaults to current admin setting if not specified.

    (2). mp3j_put( $shortcodes )

    Adds player(s) where the tag is placed in the theme. Can use multiple times.

    $shortcodes is a string containing any player shortcodes and html

    Example

    Play 5 random library tracks on the posts index page

    Put this in header.php above wp_head()

    <?php
       mp3j_addscripts();
     ?>

    Put this in index.php

    <?php
       mp3j_put( '[mp3-jplayer tracks="FEED:LIB" pick="5"]' );
     ?>

    Always use if ( function_exists() ) {} to check tags exist before running them incase the plugin gets deactivated.

  17. helgatheviking
    Member
    Posted 1 year ago #

    add_mp3j is a function i just made up and defined on the spot. this is how you merge the function exists check w/ what i already wrote.

    function add_m3j(){
      if ( function_exists('mp3j_addscripts') ) {
        mp3j_addscripts();
      }
    }
    add_action('wp_head','add_m3j');

    a couple of tutorials i wrote for PHP beginners:
    http://www.kathyisawesome.com/446/absolute-php-basics-for-wordpress-newbs/ read the "Function Function What’s Your Function" section

    http://www.kathyisawesome.com/412/thematic-hooks-and-functions/
    read the "How To Add Any Function to any Hook" section

    but perhaps you should consider hiring someone. you'd probably save a ton of time. at this point i don't even really know what you are asking for help with, nor am i an expert in this plugin... so i unfortunately do not have the time or ability to help you through whatever problem you are having.

  18. rawdolphe
    Member
    Posted 1 year ago #

    I appreciate your message. As this is going to be a long reply, I did not want to rush things up...

    I got in touch with Simon about three weeks ago -- I did ask for a quote, and I also kindly advised him to come up with a paid version of his plugin, and/or a paid dedicated support/member section on his site. I also offered to help with graphics AND membership plugin. So far, it's the only WordPress jPlayer plugin out there -- he's got the edge -- he could make money...

    Simon asked me for a link to my website -- then I never heard from him again -- go figure... no hard feelings -- Say la V.

    As it stands, I really don't know if I am going to use his plugin on my next project -- as a developer pointed out to me last week; the plugin hasn't been updated in a year.
    The developer suggested the MediaElement.js by John Dyer.
    I prefer Simon's take, as it is more compact.

    I always donate, I have donated to various developers who are still maintaining their products and to those who support them actively (I could give you names...), including a member here called "alchymyth/the sweeper" who answered a question with no fuss a while ago.

    I also told Simon what I will donate to him IF I end up using his plugin, at the moment, I am still testing + I am uncertain of it's future...

    About hiring a developer -- as you suggested? Definitely NOT for the question I asked.

    And to answer your "question", I DO NOT have a problem per se with this plugin.

    All I asked is if one of you could make sense of what is mentioned in the documentation, in regards to if function_exists. Period.

    As it stands, I still have no definite answers, and what you suggested still doesn't add the code to the wp_head! But, I appreciate what you said, and that it is a good way of adding the code the wp_head. So far, I had to "physically" add it manually to the header. Yes would love to know how to do it your way... otherwise -- no worries, and while I can still leave without it, and I didn't know that this was possible, I am still intrigued!

    In case you are able to answer a simple question, I would appreciate it, otherwise, again -- no worries; You said that you created the function add_m3j() as an example..., and it did not exist, so, is this how functions are added in general, i.e; you make them up, or is the function supposed to exist somewhere in the plugin for it to work? If the later, it explains why your code did not work. I Googled it but cannot find the answer I am looking for.

    I have visited your website, and I like it, thank you for the links.

  19. udapud
    Member
    Posted 1 year ago #

    I would totally pay for this plugin. Its brilliant and obviously has a powerful bit of scripting at its core. However, its lack of updating is probably the cause to why it currently doesn't work on mobile devices. Well the ones I've tried.

    Shame cos I don't wanna just chuck it, cos it works perfectly everywhere else.

  20. helgatheviking
    Member
    Posted 1 year ago #

    @rawdolphe - I just tested my code and it works. The mp3j_addscripts function is added to the header, but only in themes that call wp_head();, which should be any remotely modern theme. However, the mp3j_addscripts function only adds an action hook to the header... meaning that it doesn't automatically add anything to the header itself... this seems to depend on which style you've chosen, but I can't test it further right now. At any rate, this is clearly an example of the code being outdated b/c wp_head is a perfectly fine action hook to use in the first place.

    I applaud your support of the WordPress open-source community. I only suggested you consider hiring help because you don't seem to have a strong grasp on what functions are and how to write them... I didn't mean to offend. To answer one of your questions: anytime you put function in front of a function name you are defining a function.

    function some_function(){
      echo 'some function here'; //function definition can be whatever
    }

    This is basic PHP that I covered on my site that I linked you to. Then within the WordPress framework, you can add functions to action hooks... which is the gist of the other tutorial I wrote.

    @udapud - I agree. The potential for a premium plugin is definitely there.

  21. rawdolphe
    Member
    Posted 1 year ago #

    @helgatheviking,

    Thank you for the extra info, and of course you are right, php is not my best friend ;)
    I finally had a chance to check your tutorials and it's very well explained, only thing -- I'd use flowers instead of bacon ;) Or you could have use Kevin Bacon as an example!
    I am nearly 100% vegetarian.

    As you said, the code is outdated, I am not sure about Simon's plans.
    What does Simon Say? Remember that game? lol

    Once again, I suggested to Simon a membership section/tab on his website, charging something like £10+ per member... offering updates and some support.

    I think he doesn't like money and/or he feels rich already ;) or maybe he is retired now and he enjoys fishing or stamp collecting... ! who knows?

    Back on topic, what you said about your code, most likely it is theme dependants, I have tried a bunch and some don't need anything added.

  22. helgatheviking
    Member
    Posted 1 year ago #

    @rawdolphe - LOL. Not Kevin Bacon!! Yes, I know there are plenty of people in the world who do not eat meat. But I've been using 'bacon' as my favorite code demo for a while now, what can I say.... I like it! To each his/her own.

    Last I heard from Simon, he has not abandoned the project, but well.. as we can see it hasn't seen any updates lately. I guess we are all left to draw our own conclusions (I like you stamp collecting conclusion). I think it is pretty clear there is a space in the market for a good premium audio plugin. I should look into it, but I think it might be just a touch out of my comfort zone.

  23. rawdolphe
    Member
    Posted 1 year ago #

    I'll say it again then -- stamp collecting it is. ;)

    I could do some skins..., but the css is a "biatch" I heard (that's not a rude word -- it's not even in the dictionary)!

    Did I tell you that have home made soup for breakfast?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.