Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Dplayer
Dplayer
0
This discussion has been closed.
Comments
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.
I'm not sure which is breaking which at the moment.
Posted: Saturday, 24 March 2007 at 3:00PM (AEDT)
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'); } ?>
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)
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.
echo '<script type="text/javascript" src="'. $this->Context->Configuration['WEB_ROOT'] .'extensions/Dplayer/player.js"></script>';
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)
Notice: Trying to get property of non-object in /forum/extensions/Dplayer/default.php on line 20
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
Apparently the standard supplied .htaccess file needs fixing...
Friendly URLs breaks stuff
Posted: Tuesday, 27 March 2007 at 7:45PM
<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
An then there's friendly URLs throwing a spanner in the works.
Posted: Tuesday, 27 March 2007 at 8:26PM
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'); }