Looking for a media player scipt - block that will do this!

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Looking for a media player scipt - block that will do this!
gamefowlworld
CZ Super Newbie
gamefowlworld has been a member for over 18 year's 18 Year Member
Gender: Male
Website:
Status: Offline
Joined: Jun 17, 2005
0.01 posts per day
Posts: 35
Points: 1,392
   
I came across a block script for nuke that puts a media player on my homepage as a block but here is the problem. My video viles etc are in a folder in my root called gamefowlworld.com/uploads

Is there anyone here that can look at this and see what can be written in to make this pull from there instead of from mysql?
Or does anyone know of a script that would work with what I am trying to do. I would like a block script for media player that I can put my own video clips into a folder in my directory and then let persons choose what files they wish to plat etc. A drop down menu with a desripition would even be better.
But I did find this even though right now I cant get it to work in nuke platinum.

Here is the code.

<?php

/************************************************************************/
/* */
/* Video Player for Direct Upload Nuke 1.0 */
/* Copyright (c) 2005 by Anthony Stewart [ Register or login to view links on this board. ] */
/* http://www.ParentalSkills.org */
/* */
/************************************************************************/

if (eregi("block-Modules.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.html");
die();
}
//$content.="<strong>Select file</strong><br>";

$content.="<form action=\"$PHP_SELF#vid\" name=\"videos\" method=\"post\">
<a name=\"vid\">
<select name=\"videos\" size=\"1\">";

$get_videos=mysql_query("SELECT * FROM nuke_downloads_downloads WHERE title LIKE '%.wmv%' OR title LIKE '%.wma%' OR title LIKE '%.avi%' OR title LIKE '%.wav%' OR title LIKE '%.mpg%' OR title LIKE '%.mpg%' OR title LIKE '%.mp3%' OR title LIKE '%.midi%' OR title LIKE '%.aiff%' OR title LIKE '%.au%' OR title LIKE '%.mov%' ORDER BY title ASC");
while($video_array=mysql_fetch_array($get_videos)) {
$content.="<option value=\"$video_array[title]\">$video_array[title]</option>";
}

$content.="
</select>
<select name=\"player\" size=\"1\">
<option value=\"w\">Windows Media Player</option>
<option value=\"q\">Quicktime Player</option>
</select>
<input type=\"Submit\" name=\"Submit\" value=\"Play this video\" /><p>";

$get_info = mysql_fetch_array(mysql_query("SELECT * FROM nuke_downloads_downloads WHERE title LIKE '%$_REQUEST[videos]%'"));

$content.="<table border=\"0\">
<tr>
<td colspan=\"2\"><strong>Now playing:</strong></td>
</tr>
<tr>
<td>File name:</td><td><strong>$get_info[title]</strong></td>
</tr>
<tr>
<td>Submitted by:</td><td><strong>$get_info[submitter]</strong></td>
</tr>
<tr>
<td>Description:</td><td><strong>$get_info[description]</strong></td>
</tr>
</table>
";
if(isset($_REQUEST[Submit])){ $play_now = "true"; } else { $play_now="false"; }
if($_REQUEST[player]=="w" || (!isset($_REQUEST[player]))) {
$content.="<div align=\"center\">
<p><OBJECT ID=\"mediaPlayer\" maxwidth=320 CLASSID=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" CODEBASE=\"http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" STANDBY=\"Loading Microsoft Windows Media Player components...\" TYPE=\"application/x-oleobject\">
<PARAM NAME=\"fileName\" VALUE=\"uploads/".$_REQUEST[videos]."\">
<PARAM NAME=\"animationatStart\" VALUE=\"true\">
<PARAM NAME=\"transparentatStart\" VALUE=\"true\">
<PARAM NAME=\"autoStart\" VALUE=\"$play_now\">
<PARAM NAME=\"showControls\" VALUE=\"true\">
</OBJECT></p>
</div>";
} else {
$content.="<div align=\"center\">
<p><object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" maxwidth=\"320\" standby=\"Data is loading...\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">
<param name=\"src\" value=\"uploads/".$_REQUEST[videos]."\">
<param name=\"autoplay\" value=\"$play_now\">
<param name=\"controller\" value=\"true\">
<embed src=\"uploads/".$_REQUEST[videos]."\" maxwidth=\"320\" scale=\"1\" autoplay=\"$play_now\" controller=\"true\" type=\"video/quicktime\" pluginspage=\"http://www.apple.com/quicktime/download/\">
</embed>
</object><p>";
}
$content.="To upload your own videos click <a href=\"downloads-AddDownload.html\"><strong>here</strong></a>.<p>";
$content.="Your video or audio file must be less than 1MB in size and in one of the following formats: .wmv, .wma, .avi, .wav, .mp3, .midi, .aiff, .au., or QuickTime's .mov";
$content.="<center><a href=\"http://www.parentalskills.org\" target=\"_new\">&copy; [ Register or login to view links on this board. ]
?>


And here is is as a block using nuke tools

<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-Block_Creator.php",$PHP_SELF)) {
Header("Location: index.html");
die();
}
$content = "<?php";
$content .= "/************************************************************************/";
$content .= "* */";
$content .= "* Video Player for Direct Upload Nuke 1.0 */";
$content .= "* Copyright (c) 2005 by Anthony Stewart [ Register or login to view links on this board. ] */";
$content .= "* http://www.ParentalSkills.org */";
$content .= "* */";
$content .= "************************************************************************/";
$content .= "if (eregi(\"block-Modules.php\", $_SERVER['PHP_SELF'])) {";
$content .= " Header(\"Location: index.html\");";
$content .= " die();";
$content .= "";
$content .= "/$content.=\"<strong>Select file</strong><br>\";";
$content .= "$content.=\"<form action=\\\"$PHP_SELF#vid\\\" name=\\\"videos\\\" method=\\\"post\\\">";
$content .= "a name=\\\"vid\\\">";
$content .= "select name=\\\"videos\\\" size=\\\"1\\\">\";";
$content .= "$get_videos=mysql_query(\"SELECT * FROM nuke_downloads_downloads WHERE title LIKE '%.wmv%' OR title LIKE '%.wma%' OR title LIKE '%.avi%' OR title LIKE '%.wav%' OR title LIKE '%.mpg%' OR title LIKE '%.mpg%' OR title LIKE '%.mp3%' OR title LIKE '%.midi%' OR title LIKE '%.aiff%' OR title LIKE '%.au%' OR title LIKE '%.mov%' ORDER BY title ASC\");";
$content .= "hile($video_array=mysql_fetch_array($get_videos)) {";
$content .= "content.=\"<option value=\\\"$video_array[title]\\\">$video_array[title]</option>\";";
$content .= "";
$content .= "$content.=\"";
$content .= "/select>";
$content .= "select name=\\\"player\\\" size=\\\"1\\\">";
$content .= "option value=\\\"w\\\">Windows Media Player</option>";
$content .= "option value=\\\"q\\\">Quicktime Player</option>";
$content .= "/select>";
$content .= "input type=\\\"Submit\\\" name=\\\"Submit\\\" value=\\\"Play this video\\\" /><p>\";";
$content .= "$get_info = mysql_fetch_array(mysql_query(\"SELECT * FROM nuke_downloads_downloads WHERE title LIKE '%$_REQUEST[videos]%'\"));";
$content .= "$content.=\"<table border=\\\"0\\\">";
$content .= " <tr>";
$content .= " <td colspan=\\\"2\\\"><strong>Now playing:</strong></td>";
$content .= " </tr>";
$content .= " <tr>";
$content .= " <td>File name:</td><td><strong>$get_info[title]</strong></td>";
$content .= " </tr>";
$content .= " <tr>";
$content .= " <td>Submitted by:</td><td><strong>$get_info[submitter]</strong></td>";
$content .= " </tr>";
$content .= " <tr>";
$content .= " <td>Description:</td><td><strong>$get_info[description]</strong></td>";
$content .= " </tr>";
$content .= " </table>";
$content .= " \";";
$content .= "f(isset($_REQUEST[Submit])){ $play_now = \"true\"; } else { $play_now=\"false\"; }";
$content .= "f($_REQUEST[player]==\"w\" || (!isset($_REQUEST[player]))) {";
$content .= "content.=\"<div align=\\\"center\\\">";
$content .= " <p><OBJECT ID=\\\"mediaPlayer\\\" maxwidth=320 CLASSID=\\\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\\\" CODEBASE=\\\"http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\\\" STANDBY=\\\"Loading Microsoft Windows Media Player components...\\\" TYPE=\\\"application/x-oleobject\\\">";
$content .= "PARAM NAME=\\\"fileName\\\" VALUE=\\\"uploads/\".$_REQUEST[videos].\"\\\">";
$content .= "PARAM NAME=\\\"animationatStart\\\" VALUE=\\\"true\\\">";
$content .= "PARAM NAME=\\\"transparentatStart\\\" VALUE=\\\"true\\\">";
$content .= "PARAM NAME=\\\"autoStart\\\" VALUE=\\\"$play_now\\\">";
$content .= "PARAM NAME=\\\"showControls\\\" VALUE=\\\"true\\\">";
$content .= "/OBJECT></p>";
$content .= "/div>\";";
$content .= " else {";
$content .= "content.=\"<div align=\\\"center\\\">";
$content .= "p><object classid=\\\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\\\" maxwidth=\\\"320\\\" standby=\\\"Data is loading...\\\" codebase=\\\"http://www.apple.com/qtactivex/qtplugin.cab\\\">";
$content .= "param name=\\\"src\\\" value=\\\"uploads/\".$_REQUEST[videos].\"\\\">";
$content .= "param name=\\\"autoplay\\\" value=\\\"$play_now\\\">";
$content .= "param name=\\\"controller\\\" value=\\\"true\\\">";
$content .= "embed src=\\\"uploads/\".$_REQUEST[videos].\"\\\" maxwidth=\\\"320\\\" scale=\\\"1\\\" autoplay=\\\"$play_now\\\" controller=\\\"true\\\" type=\\\"video/quicktime\\\" pluginspage=\\\"http://www.apple.com/quicktime/download/\\\">";
$content .= "/embed>";
$content .= "/object><p>\";";
$content .= "";
$content .= "content.=\"To upload your own videos click <a href=\\\"downloads-AddDownload.html\\\"><strong>here</strong></a>.<p>\";";
$content .= "content.=\"Your video or audio file must be less than 1MB in size and in one of the following formats: .wmv, .wma, .avi, .wav, .mp3, .midi, .aiff, .au., or QuickTime's .mov\";";
$content .= "content.=\"<center><a href=\\\"http://www.parentalskills.org\\\" target=\\\"_new\\\">&copy; [ Register or login to view links on this board. ]
$content .= ">";
?>



Back to top Reply with quote
#2   re: Looking for a media player scipt - block that will do th
tigakor
CZ Newbie
tigakor has been a member for over 19 year's 19 Year Member
australia.gif
Gender: Male
Website:
Status: Offline
Joined: Feb 17, 2005
0.00 posts per day
Posts: 4
Points: 189
   
Can't really help you except for some suggestions

Why not just create a table in mysql, with a field for song name a field with the location for the file...

this way you can keep your music where it is and just link to it through mysql?

OK so probably not the best solution but a solution icon_rolleyes.gif



edited to add:... whoops read your post before reply ... you don't want mysql solution icon_redface.gif



For your drop down selection problem have a look here, it may give you an idea [ Register or login to view links on this board. ]



Back to top Reply with quote
#3   re: Looking for a media player scipt - block that will do th
gamefowlworld
CZ Super Newbie
gamefowlworld has been a member for over 18 year's 18 Year Member
Gender: Male
Website:
Status: Offline
Joined: Jun 17, 2005
0.01 posts per day
Posts: 35
Points: 1,392
   
I will take a look at that and see what it says.
I have always had a problem with my downloads on my site they dont transfer over when people submit new ones etc. I got someone to help me redo the site and paid them and we still have the same problem. He said its because I have my nuke files inside a folder like

mysite.com/nuke

Everythinng else workd fine. People can download my files perfectly fine but they can not download media files. There is almost always an error.

My donwloads section has become a big headache. So I ventured into this to try to improve the result by just playing them on a player rather than offering them as download that wont work.

This is the purpose for wanting to stay away from sql with the media player.



Back to top Reply with quote
#4   re: Looking for a media player scipt - block that will do th
tigakor
CZ Newbie
tigakor has been a member for over 19 year's 19 Year Member
australia.gif
Gender: Male
Website:
Status: Offline
Joined: Feb 17, 2005
0.00 posts per day
Posts: 4
Points: 189
   
Kay... I got two more links to try....
[ Register or login to view links on this board. ]
[ Register or login to view links on this board. ]



Might help??



Back to top Reply with quote
#5   re: Looking for a media player scipt - block that will do th
jeff21up
CZ Newbie
jeff21up has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jun 18, 2005
0.00 posts per day
Posts: 6
Points: 1,011
   
I have a Movie Player on my site
Pm me for web address It is excellent
Jeff



Back to top Reply with quote
#6   re: Looking for a media player scipt - block that will do th
DAMIAN
CZ Active Member
 Codezwiz Site Donator
DAMIAN has been a member for over 19 year's 19 Year Member
usa.gif mississippi.gif
Occupation: Net Junkie
Age: 58
Gender: Male
Fav. Sports Team: steelers
Website:
Status: Offline
Joined: Aug 08, 2004
0.02 posts per day
Posts: 177
Points: 9,848
   
If that doesnt work try [ Register or login to view links on this board.] They have a media player that streams video, and mp3's plus it allows for downloads and can be setup into an existing folder of vids.
DAMIAN



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum