bbcode help for a form
Posted: 26 May 2010, 01:25
I have a separate page for a divx generator, and want to add the form part into posts, this is a link to the generator - Link
Here is the code for the submit and video pages
submit.php
video.php
I would like to have this part as a bbcode to add to posts
then when they add a link and press submit, it will take them straight to the video.php page, like it does when on the submit.php page.
Tried just adding the form part of it, but doesn't work, press submit and just refreshes the page, thanks for any help with this one
Here is the code for the submit and video pages
submit.php
Code: Select all
<html>
<head><link rel="stylesheet" type="text/css" href="muplayerstyle.css" />
<title>Horror-Addicts DivX Generator</title>
</head><center><body>
<br>
<img src="images/divxgeneratorbanner.png">
<br><br><br>
<p><font color="red" font size="4"><b>Add any link ending in .avi/.divx/.mkv from ANY host <br>
and it will be played through the divx player in a new page</b></font></p>
<form action="video.php" method="get">
<font color="red"><b>Add Your Link: </b></font><input name="link" id="link" size="70" type="text">
<br><br>
<input name="submit" id="submit" value="Submit" type="submit">
</form>
<br>
<p><font color="red" font size="5"><b><u>Banner Links to HD and Divx Horror Forums on Horror-Addicts.com</u></b></font></p>
<a href="http://horror-addicts.com/viewforum.php?f=244" target="_blank"><img src="images/banners/HDhorror.png" border="0"></a>
<br><br>
<a href="http://horror-addicts.com/viewforum.php?f=8" target="_blank"><img src="images/banners/Newreleasesha.png" border="0"></a> <a href="http://horror-addicts.com/viewforum.php?f=14" target="_blank"><img src="images/banners/movies20082006.png" border="0"></a>
<br><br>
<a href="http://horror-addicts.com/viewforum.php?f=19" target="_blank"><img src="images/banners/movies20052000.png" border="0"></a> <a href="http://horror-addicts.com/viewforum.php?f=23" target="_blank"><img src="images/banners/movie90s.png" border="0"></a>
<br><br>
<a href="http://horror-addicts.com/viewforum.php?f=27" target="_blank"><img src="images/banners/movies80s.png" border="0"></a> <a href="http://horror-addicts.com/viewforum.php?f=31" target="_blank"><img src="images/banners/movie79-ha.png" border="0"></a>
<br><br>
<a href="http://horror-addicts.com/viewforum.php?f=60" target="_blank"><img src="images/banners/asianhorha.png" border="0"></a> <a href="http://horror-addicts.com/viewforum.php?f=39" target="_blank"><img src="images/banners/boxsetsha.png" border="0"></a>
<br><br>
<p align="bottom"> <a href="http://www.horror-addicts.com/">Horror-Addicts - Get Ready to Scream!!! (2009-2010)</a></p>
</body></center>
</html>
Code: Select all
<html>
<head><link rel="stylesheet" type="text/css" href="muplayerstyle.css" />
<title>Horror-Addicts DivX Generator</title>
</head>
<center><body>
<br>
<img src="images/divxgeneratorbanner.png">
<br><br>
<p><b><font size="4" font color="red">Press play button to watch your video</font></b></p>
<div>
<object id='ie_plugin' classid='clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616' width='700' height='400' codebase='http://go.divx.com/plugin/DivXBrowserPlugin.cab'>
<param name='type' value='video/divx' />
<param name='pluginspage' value='http://go.divx.com/plugin/download/' />
<param name="src" value= "<?php echo $_GET['link']; ?>" />
<param name='custommode' value='none' />
<param name='autoPlay' value='false' />
<param name='bannerEnabled' value='false' />
<param name="movieTitle" value=""
<param name='timeCallback' value='myTimeCallback' />
<param name='statusCallback' value='myDivXPlugin.statusCallbackSink' />
<param name='bufferCallback' value='myBufferCallback' />
<param name='downloadCallback' value='myDownloadCallback' />
<param name='previewImage' value='http://horror-addicts.com/images/divxgeneratorplayer.png' />
<embed id='np_plugin' width='700' height='400'
type='video/divx'
pluginspage='http://go.divx.com/plugin/download/'
src="<?php echo $_GET['link']; ?>" autoPlay='false'
bannerEnabled='false'
movieTitle=""
previewImage='http://horror-addicts.com/images/divxgeneratorplayer.png'
timeCallback='myTimeCallback'
statusCallback='myDivXPlugin.statusCallbackSink'
bufferCallback='myBufferCallback'
downloadCallback='myDownloadCallback'>
</embed>
</object>
</div><div><label id="currentStatus"></label> <label id="currentDownload"></label> <label id="totalDownload"></label> <label id="downloadSpeed"></label></div>
<script type="text/javascript">
var plugin;
if(navigator.userAgent.indexOf('MSIE') != -1)
{
plugin = document.getElementById('ie_plugin');
}
else
{
plugin = document.getElementById('np_plugin');
}
//--------------------
function myTimeCallback(current)
{
//document.getElementById('currentTime').innerHTML = current;
}
function myBufferCallback(current,total)
{
//document.getElementById('currentBuffer').innerHTML = current;
//document.getElementById('totalBuffer').innerHTML = total;
}
var lastKB = 0;
var curSpeed = 0;
function myDownloadCallback(current,total)
{
curSpeed = Math.round((current - lastKB) / 1000);
document.getElementById('currentDownload').innerHTML = Math.round(current / 100000)/10;
document.getElementById('totalDownload').innerHTML = ' of ' + Math.round(total / 100000)/10 + ' MB ';
document.getElementById('downloadSpeed').innerHTML = '(' + curSpeed + 'KB/s)';
lastKB = current;
}
var BScounter = 0;
function DivXPluginSinks()
{
this.statusCallbackSink = function(status)
{
var s = parseInt(status);
switch(s)
{
case 0: //
document.getElementById('currentStatus').innerHTML = 'Initialized';
break;
case 1: //
document.getElementById('currentStatus').innerHTML = 'Video Opened';
//confirmLeave = true;
break;
case 2: // VIDEO_END
document.getElementById('currentStatus').innerHTML = 'End of Video';
//confirmLeave = false;
break;
case 3: //
document.getElementById('currentStatus').innerHTML = 'Shut Done';
break;
// case 4: //
// document.getElementById('currentStatus').innerHTML = 'Embedded Start';
// break;
// case 5: //
// document.getElementById('currentStatus').innerHTML = 'Embedded End';
// break;
// case 6: //
// document.getElementById('currentStatus').innerHTML = 'Windowed Start';
// break;
// case 7: //
// document.getElementById('currentStatus').innerHTML = 'Windowed End';
// break;
// case 8: //
// document.getElementById('currentStatus').innerHTML = 'Fullscreen';
// break;
// case 9: //
// document.getElementById('currentStatus').innerHTML = 'Exit Fullscreen';
// break;
case 10: // STATUS_PLAYING
document.getElementById('currentStatus').innerHTML = '';
break;
case 11: // STATUS_PAUSED
document.getElementById('currentStatus').innerHTML = '';
break;
case 12: // STATUS_FF
document.getElementById('currentStatus').innerHTML = '';
break;
case 13: // STATUS_RW
document.getElementById('currentStatus').innerHTML = '';
break;
case 14: // STATUS_STOPPED
document.getElementById('currentStatus').innerHTML = '';
break;
case 15: //
BScounter++;
document.getElementById('currentStatus').innerHTML = 'Connect Attempt #'+BScounter;
break;
case 16: //
document.getElementById('currentStatus').innerHTML = 'Buffering Stop';
break;
case 17: //
document.getElementById('currentStatus').innerHTML = 'Download Start';
break;
case 18: //
document.getElementById('currentStatus').innerHTML = 'Download Failed';
break;
case 19: //
document.getElementById('currentStatus').innerHTML = 'Download Done';
var playlink = '';
var playlink = playlink.replace("**^fugggin_quatahaba^*","'");
if (document.getElementById('totalDownload').innerHTML == '')
plugin.Open(playlink);
break;
}
}
}
myDivXPlugin = new DivXPluginSinks()
</script>
<br>
<a href="http://www.horror-addicts.com/submit.php"><font size="4"><b><u>Click to submit another file to divx generator</u></b></font></a><br><br>
<p align="bottom"> <a href="http://www.horror-addicts.com/">Horror-Addicts - Get Ready to Scream!!! (2009-2010)</a></p>
</body></center>
then when they add a link and press submit, it will take them straight to the video.php page, like it does when on the submit.php page.
Tried just adding the form part of it, but doesn't work, press submit and just refreshes the page, thanks for any help with this one