Not signed in (Sign In)

Categories

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

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorWanderer
    • CommentTimeMar 6th 2007 edited
     # 1
    This gadget does one simple thing!
    It turns plain links to mp3 files into an icon which, when clicked, will play the sound.
    v1.0.2 - Includes contextual link to the .js file
    v1.0.1 - Includes Dinoboff's improved link to the .js file
    v1.0.0 - Uses new pathfinder function to linked files.
    • CommentAuthordejitaru
    • CommentTimeMar 6th 2007
     # 2
    awesome been waiting for something like this for a while tanx.
    •  
      CommentAuthoremsef
    • CommentTimeMar 22nd 2007 edited
     # 3
    Has anybody been able to get this to work?

    edit: ah, I found the problem - all the links to files in the extensions folder do not work.

    fo fix - manually change all links to extensions/Dplayer/player.js to absolute links. there's probably a better way but that'll do for now.
  1.  # 4
    Might be worth implementing the new pathfinder function wanderer?
    •  
      CommentAuthoremsef
    • CommentTimeMar 22nd 2007
     # 5
    This is incompatible with Comment Links.

    I'm not sure which is breaking which at the moment.
  2.  # 6
    Uploaded version 1.0 of Dplayer.
    •  
      CommentAuthorWanderer
    • CommentTimeMar 23rd 2007
     # 7
    Version 1.0 Uses new pathfinder function to linked files to overcome emsef's issue.

    Posted: Saturday, 24 March 2007 at 3:00PM (AEDT)

    •  
      CommentAuthoremsef
    • CommentTimeMar 24th 2007 edited
     # 8
    This is still half broken for me.

    Where default.php wrrites out the <script> tag is still a bad path.

    I use this version of default.php:
    <?php
    /*
    Extension Name: Dplayer
    Extension Url: http://lussumo.com/addons/
    Description: Turns plain links to mp3 files into playable icons.
    Version: 0.0.1
    Author: Wanderer - Joe Debono
    Author Url: http://www.debono.com.au/forum/
    */


    if (in_array($Context->SelfUrl, array('index.php', 'categories.php', 'comments.php', 'post.php'))) {

    class debplayer extends Control {
    function debplayer(&$Context) {
    $this->Name = 'debplayer';
    }

    function Render() {
    //echo '<script type="text/javascript" src="extensions/Dplayer/player.js"></script>'; //commented out
    }
    }

    $debplayer = new debplayer($Context);
    $Page->AddRenderControl($debplayer, $Configuration['CONTROL_POSITION_FOOT'] - 5);

    // new line below
    $Head->AddScript('extensions/Dplayer/player.js');
    }
    ?>
    •  
      CommentAuthorWanderer
    • CommentTimeMar 24th 2007
     # 9
    Well mate, that does not work for ME!

    It adds the link to the script too early before the page fully loads and it does not find the links to work on.

    Posted: Sunday, 25 March 2007 at 9:45AM (AEDT)

    •  
      CommentAuthoremsef
    • CommentTimeMar 26th 2007 edited
     # 10
    Wanderer, I'm not looking for a fight - I'm just telling you that I am having problems with your script.

    If you'd rather not use the $Head-> method then please address the fact the Render() function is injecting a relative path that won't work in every installation. Most crucially a "default" installation.

    Also, there are ways other than the onload event or adding the script at the bottom of a page to get an event to fire when the DOM is ready or the page has rendered. You might want to look into these.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 26th 2007 edited
     # 11
    Replace line 20 with:echo '<script type="text/javascript" src="'. $this->Context->Configuration['WEB_ROOT'] .'extensions/Dplayer/player.js"></script>';
    •  
      CommentAuthorWanderer
    • CommentTimeMar 26th 2007
     # 12
    Hey emsef mate, I wasn't picking a fight, and my installation is as "default" as it can be as far as I know.

    I have implemented guru Dinoboff's method, it works for me, but then all the others (except yours) worked too.

    Version 1.0.1 coming up...

    Posted: Tuesday, 27 March 2007 at 12:08AM (AEDT)

  3.  # 13
    Version number changed from 1.0 to 1.0.1.
  4.  # 14
    Uploaded version 1.0.1 of Dplayer.
    •  
      CommentAuthoremsef
    • CommentTimeMar 27th 2007 edited
     # 15
    This is still broken. Wanderer, are you testing this before you upload it each time?

    Notice: Trying to get property of non-object in
    /forum/extensions/Dplayer/default.php on line 20
    •  
      CommentAuthorWanderer
    • CommentTimeMar 27th 2007
     # 16
    Yes of course I test, it always works for me.
    Line 20 is Dinoboff's fix, it worked for me but then it wasn't broken for me.

    I don't understand what could be so different, I even installed Friendly URLs to test it with, works a treat.

    Sorry about the hassles, just fix it for your set-up (make the paths absolute), nothing in the actual player script has changed, the problem seems to be the path to the files in the extensions/Dplayer folder.

    Posted: Tuesday, 27 March 2007 at 7:14PM

    •  
      CommentAuthoremsef
    • CommentTimeMar 27th 2007
     # 17
    I have done and I'll stop bugging you about it :)
    •  
      CommentAuthorWanderer
    • CommentTimeMar 27th 2007
     # 18
    Are you using Friendly URLs?

    Apparently the standard supplied .htaccess file needs fixing...

    Friendly URLs breaks stuff

    Posted: Tuesday, 27 March 2007 at 7:45PM

  5.  # 19
    doesn't Vanilla by default use relative paths
    <script type="text/javascript" src="/vanilla/js/global.js"></script>
    <script type="text/javascript" src="/vanilla/js/vanilla.js"></script>
    <script type="text/javascript" src="/vanilla/js/ajax.js"></script>
    <script type="text/javascript" src="/vanilla/js/ac.js"></script>


    all relative paths
    •  
      CommentAuthorWanderer
    • CommentTimeMar 27th 2007
     # 20
    Yeah that's what I thought, apparently some people have gremlins that cause havoc.
    An then there's friendly URLs throwing a spanner in the works.

    Posted: Tuesday, 27 March 2007 at 8:26PM

    •  
      CommentAuthorDinoboff
    • CommentTimeMar 27th 2007 edited
     # 21
    Sorry, I didn't checked if the there was a Context property. Fixed with the following code:if (in_array($Context->SelfUrl, array('index.php', 'categories.php', 'comments.php', 'post.php'))) {

    class debplayer extends Control {
    var $Context;
    function debplayer(&$Context) {
    $this->Name = 'debplayer';
    $this->Context = &$Context;
    }

    function Render() {
    echo '<script type="text/javascript" src="'. $this->Context->Configuration['WEB_ROOT'] .'extensions/Dplayer/player.js"></script>';
    }
    }

    $debplayer = new debplayer($Context);
    $Page->AddRenderControl($debplayer, $Configuration['CONTROL_POSITION_FOOT'] - 5);

    // new line below
    $Head->AddScript('extensions/Dplayer/player.js');
    }
    •  
      CommentAuthorWanderer
    • CommentTimeMar 27th 2007
     # 22
    So Dinoboff, it adds the player.js twice?

    Once in the head section and again at the end of the body section?

    Posted: Wednesday, 28 March 2007 at 10:19AM

    •  
      CommentAuthorDinoboff
    • CommentTimeMar 27th 2007 edited
     # 23
    No, there is only one render control instance, that will render just before the footer.
    <?php
    /*
    Extension Name: Dplayer
    Extension Url: http://lussumo.com/addons/
    Description: Turns plain links to mp3 files into playable icons.
    Version: 0.0.1
    Author: Wanderer - Joe Debono
    Author Url: http://www.debono.com.au/forum/
    */
    if (in_array($Context->SelfUrl, array('index.php', 'categories.php', 'comments.php', 'post.php'))) {

    class debplayer extends Control {
    var $Context;
    function debplayer(&$Context) {
    $this->Name = 'debplayer';
    $this->Context = &$Context;
    }

    function Render() {
    echo '<script type="text/javascript" src="'. $this->Context->Configuration['WEB_ROOT'] .'extensions/Dplayer/player.js"></script>';
    }
    }

    $debplayer = new debplayer($Context);
    $Page->AddRenderControl($debplayer, $Configuration['CONTROL_POSITION_FOOT'] - 5);

    }

    ?>
    •  
      CommentAuthorWanderer
    • CommentTimeMar 27th 2007
     # 24
    I beg to differ mate, it, gets added in the head and in the body sections.

    What confuses me is that the head reference is relative and the body reference is absolute, they both work for me, but others say the relative method does not work.

    The other consideration, due to the way the script works, is that it must load after the page load is complete.

    I took out $Head->AddScript('extensions/Dplayer/player.js'); so it only loaded at the end of the body section and it worked.

    Then I took out the function Render() and put back $Head->AddScript('extensions/Dplayer/player.js'); and although the .js file was added to the head correctly, the script failed to activate because the page had not loaded yet.

    Posted: Wednesday, 28 March 2007 at 11:15AM

    •  
      CommentAuthorDinoboff
    • CommentTimeMar 27th 2007 edited
     # 25
    I overlooked the details again and missed it.

    ps: I edited it and took it off
    •  
      CommentAuthorWanderer
    • CommentTimeMar 27th 2007
     # 26
    We are going around in circles. pic
    Now we are back to the current version 1.0.1 which emsef says causes this error...

    Notice: Trying to get property of non-object in
    /forum/extensions/Dplayer/default.php on line 20

    Posted: Wednesday, 28 March 2007 at 12:07PM

    •  
      CommentAuthorDinoboff
    • CommentTimeMar 27th 2007
     # 27
    ...
    class debplayer extends Control {
    var $Context;

    function debplayer(&$Context) {
    ...
    $this->Context = &$Context;
    }
    function Render() {
    ... $this->Context->Configuration['WEB_ROOT'] ...
    }
    }
    $debplayer = new debplayer($Context);


    $this->Context->Configuration is defined
  6.  # 28
    Uploaded version 1.0.2 of Dplayer.
    •  
      CommentAuthorWanderer
    • CommentTimeMar 29th 2007
     # 29
    v1.0.2 - Includes contextual link to the .js file

    This should address issues to it not being found.

    Posted: Friday, 30 March 2007 at 12:47PM

    •  
      CommentAuthoremsef
    • CommentTimeMar 30th 2007
     # 30
    Hoorah! Works immediately on install, no messing around. :)

    Thanks for everybody's effort on this one.
    •  
      CommentAuthorWanderer
    • CommentTimeMar 30th 2007
     # 31
    *bows* --- *Elvis Voice* Thank you very much! pic

    Posted: Friday, 30 March 2007 at 7:46PM

    • CommentAuthorscythoior
    • CommentTimeMar 31st 2007
     # 32
    I have problems with version 1.0.2 in Firefox, the play-icon is simply not displayed. In IE6 and Opera everything is ok. It's a problem only in my forum, since the demosite (mentioned in the howto.txt) displays it correctly in Firefox.

    http://audioten.scythoior.com/comments.php?DiscussionID=14&page=1#Item_3
    (You have to log in on audioten.scythoior.com first in order to see the discussion.
    Login: "wartung(scy)", Password: "bluehead")

    Any ideas?
    •  
      CommentAuthorWanderer
    • CommentTimeApr 1st 2007
     # 33
    OK, I can confirm your test works on Safari and it does not in Mac Firefox 2.0.0.3.
    I don't understand because it works for me on all browsers.

    The .js file is found but something is stopping the script from firing.

    Maybe one of the many errors the page generates...

    Warning: Error in parsing value for property 'display'. Declaration dropped.
    Source File: http://audioten.scythoior.com/themes/vanilla/styles/green/vanilla.css
    Line: 1528

    Warning: Error in parsing value for property 'display'. Declaration dropped.
    Source File: http://audioten.scythoior.com/themes/vanilla/styles/green/vanilla.print.css
    Line: 1069

    Error: $ is not defined
    Source File: http://audioten.scythoior.com/yshout/js/jquery.js
    Line: 14

    Warning: Unknown property 'filter'. Declaration dropped.
    Source File: http://audioten.scythoior.com/yshout/css/yshout.css
    Line: 169

    Error: document.forms.frmPostDiscussion has no properties
    Source File: http://audioten.scythoior.com/extensions/Quicktags/quicktags.js
    Line: 321

    Posted: Sunday, 1 April 2007 at 3:26PM

    • CommentAuthorscythoior
    • CommentTimeApr 1st 2007
     # 34
    ok, so there's no problem with the player add-on.
    i guess i have to live for a while with that problem, cause the vanilla green style hasn't been updated to match vanilla 1.1.x criteria and, as i just decided to start learning css/xhtml and so on it will take a good while til i'll be able to do fixes myself ;-)
    • CommentAuthorvaniller
    • CommentTimeJul 16th 2007
     # 35
    It will be great, if this extention will be playing mp3 files added as atttachements to post, like imagess in inlineImages ext. What do you think ?
    •  
      CommentAuthorWanderer
    • CommentTimeJul 16th 2007
     # 36
    Yup, that would be great. All you need is the URL to the mp3 file and it will work.

    Posted: Tuesday, 17 July 2007 at 7:53AM

    • CommentAuthorvaniller
    • CommentTimeJul 17th 2007
     # 37
    But the problem is that attachement extention doesen't create direct url to file, but something like this :
    http://mysite.com/discussions/?PostBackAction=Download&AttachmentID=6
    and Dplayer doesen't recognize is it .mp3 or different file type.
    •  
      CommentAuthorWanderer
    • CommentTimeJul 17th 2007
     # 38
    Surely though, the mp3 file has a URL you can point to?

    In any case Dplayer is complete as it meets my original needs and no further development is planned.

    Feel free to use it to develop your own if you wish.

    Posted: Tuesday, 17 July 2007 at 8:14PM

    •  
      CommentAuthor[-Stash-]
    • CommentTimeJul 17th 2007
     # 39
    This is a good point - perhaps MSB would be willing to add this "Attachments compatibility" to JQMedia (although it may require Jazzman changing something in Attachments I'd imagine).
    •  
      CommentAuthormonstr
    • CommentTimeNov 19th 2007
     # 40
    there is also some stuff with a .swf in the code. can i use the flash version instead of that image stuff?
    •  
      CommentAuthorWanderer
    • CommentTimeNov 19th 2007
     # 41
    The .swf is the Flash engine that drives it, a mini Flash application actually.
    The images are required for the interface, make your own if you like, that's why they are external to the .swf

    Posted: Tuesday, 20 November 2007 at 6:04AM

    • CommentAuthordrixie
    • CommentTimeFeb 9th 2008
     # 42
    I love this extension but I need a bit of help.

    Please, tell me how I can get it to work on my main site. I want my visitors to start listening to cool music right from when they hit the forum till when they join the community.
    •  
      CommentAuthorWanderer
    • CommentTimeFeb 9th 2008
     # 43
    Could you elaborate on which bit doesn't work?
    Did you read the instructions?

    Posted: Sunday, 10 February 2008 at 9:35AM

    • CommentAuthordrixie
    • CommentTimeFeb 9th 2008
     # 44
    you got me wrong. Its working fine on the lussumo forum.

    I just want it to work on my plain html website. How do I modify it?

    Thanks.
    •  
      CommentAuthorWanderer
    • CommentTimeFeb 10th 2008
     # 45
    OK, just put this in the head section...

    <script type="text/javascript" src="http://path.to/wherever/Dplayer/player.js"></script>

    If it does not work there put it as the last thing in the body section.

    Once the page can access the script use something like this anywhere on the page...

    <a href="http://wherever.the.sound/file/is/sound.mp3">
Add your comments
    Username Password
  • Format comments as