Help - Search - Members - Calendar
Full Version: Please help with php question...
HTMLHelp Forums > Programming > Server-side Scripting
cowboysdude
Currently I'm working on a php script for Joomla. Right now it displays a video screen and menu to choose different videos to watch.

What I'd like it to do is just show the menu and once a selection is made have the video player popup in a greybox and play...

so far I can make it show the menu but when a video is selected it pops up but gives an error page in the popup...

below is the code... what am I doing wrong here?

CODE
<?php
//don't allow other scripts to grab and execute our file
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');
require_once (dirname(__FILE__).DS.'mod_flowplayv.css');

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript">var GB_ROOT_DIR = "modules/mod_flowplay/greybox/";</script>
<script type="text/javascript" src="modules/mod_flowplay/greybox/AJS.js"></script>
<script type="text/javascript" src="modules/mod_flowplay/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="modules/mod_flowplay/greybox/gb_scripts.js"></script>
<!-- DO NOT CHANGE THIS -->
<c:if test="true">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="<?php echo $baseurl ?>/modules/mod_flowplay/js/flowplayer-3.0.5.min.js"></script>
</c:if>

<script src="<?php echo $baseurl ?>/modules/mod_flowplay/js/flowplayer.playlist-3.0.5.pack.js"></script>


<script>
$(function() {
    
    // setup player
    $f("player", "/modules/mod_flowplay/swf/flowplayer-3.1.1.swf",{
    
        clip: {baseUrl: '<?php echo $baseurl ?>'}
        
    // playlist plugin
    }).playlist("#playlist");
    
    plugins: {
        lighttpd: {  
            url: "/modules/mod_flowplay/swf/flowplayer.pseudostreaming-3.1.1.swf"  
        }
        
        
    }
    
});

</script>


<!-- player container -->
<a id="player" class="player plain">
    <img src="modules/mod_flowplay/images/logo.png" />
</a>


<!-- the playlist. simple HTML controlled with CSS -->
<div id="playlist">
<?php

$lines = file('modules/mod_flowplay/edit/file.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach($lines as $line)
{
    list($filename, $title, $time) = explode('-', $line);
    echo "<a href='$path/$filename' rel='gb_page_center[500, 300]'> $title <br />$time";
}
?>
</div>

<!-- let the rest of the page float normally -->
<br clear="all" />

<!-- END DO NOT CHANGE THIS -->


Thanks in advance for your help!
Brian Chandler
Sorry, but it is not reasonable to expect someone else to debug your program just by gazing at it. You are changing a bit marked "Do not change this", which implies you know what you are doing -- if you are just flailing around changing bits, you need at least to ask us about the precise bit you have changed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.