HERE THE CODE I USE.....BUT ARE 2 THINGS I WANT TO CHANGE:
-CANCEL OR BETTER HIDE 2 ROW BEFORE VIDEO
-CANCEL THE LINE AFTER VIDEO
<html>
<head>
<style type="text/css">
<!--
* { color: white; font-family: verdana; font-size: 10pt; }
html, body { background-color: rgb(0, 0, 83); }
body { background-repeat: repeat-x; background-image:url($DPIMAGES.bgimage.jpg); }
h1.vid { text-align: center; }
a { font-size: 8pt; }
li { margin-left: 5pt; }
#code { clear: left; font-size: 6pt; text-align: right; margin-bottom: 15pt; }
.off { color: gray; }
.on { color: white; }
-->
</style>
<script type="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/*
######## Video Loader ########
@title - Video Loader
@filename - VideoLoader_1.1.1.html
@version - 1.1.1
@date - 2007-06-07
@author - xyrano
@dependencies - DVD Profiler v3+, IE.
@1.1.1 update
- Added additional Tag support (for links)
@1.1 update
- Added options for unlimited players
- Added Tag support (for verbose)
@1.0.1 update
- No video bug fixed (Thanks RossRoy)
@1.0 inital release
*/
// -------- Configuration block - Start --------
// "Player name", "Notes field attribute", "Player URL", "Player link path", "Player embed path", "Player as link"
var vid = new Array(
["Google", "googlevideo=", "http://video.google.com/", "videoplay?docid=", "googleplayer.swf?docId=", false, []],
["Video Detective", "videodetective=", "http://www.videodetective.com/", "codes/player.swf?PublishedID=", "codes/player.swf?PublishedID=", true, []],
["YouTube", "youtube=", "http://www.youtube.com/", "watch?v=", "v/", false, []],
["@"]
);
var asl = false;
var wid = 400; // a width value dividable by 25
var der = true; // Display a 'No * Available' message?
// Tags
var useTags = true;
var tagHierarchy = "9: Preferences/Video Loader/"
var tagAsLinks = tagHierarchy + "As links"; // Controlles asl from a tag
var tagVerboseOff = tagHierarchy + "Verbose off"; // Controlles der from a tag
// -------- Configuration block - End --------
var int = DP_Notes.indexOf("<videos ");
if (int != -1) {
var d = 0;
var hei = (wid / (d = (wid / 25))) * (d - 2);
// Get code(s).
// 1.1 updated
var not = "";
not = DP_Notes.substring(int, DP_Notes.indexOf("/>", int));
not = not.replace("<videos ", "");
if (not.indexOf("aslink") != -1) {
not = not.replace("aslink", "");
not = not.replace(/^\s+|\s+$/g, "");
asl = true;
}
for (rowk in vid) {
if (vid[rowk][0].length > 0 && not.indexOf(vid[rowk][1]) != -1) {
var str = not.slice(not.indexOf(vid[rowk][1]), not.legnth);
str = str.slice(0, cleanString(str, rowk));
str = str.replace(vid[rowk][1], "");
vid[rowk][6] = (str.indexOf(";") != -1) ? str.split(";"): str;
}
}
// Tags
// 1.1.1 updated
if (useTags == true) for (var i = 0; i < DP_Tags.length; i++) {
if (tagAsLinks.length != 0 && DP_Tags[i].toLowerCase() == tagAsLinks.toLowerCase()) asl = true;
if (tagVerboseOff.length != 0 && DP_Tags[i].toLowerCase() == tagVerboseOff.toLowerCase()) der = false;
}
}
// 1.1 updated
function drawIt() {
var html = "";
var i = 0;
for (row in vid) {
if (vid[row][0].length > 1)
if (vid[row][6] != undefined && vid[row][6] != "") {
html += ((asl || vid[row][5]) ? vid[row][0] + ' video link': '') + selectFactory(row);
} else {
html += (der) ? 'No ' + vid[row][0] + ' videos Available<br />': '';
i++;
}
}
if (i==3) html = "No Videos Available<br />";
document.getElementsByTagName('h1')[0].innerHTML = html;
}
// 1.1 updated
function selectFactory(row) {
var obj = vid[row][6];
var html = "";
if (asl || vid[row][5]) {
document.getElementsByTagName('h1')[0].className = 'on';
if (typeof obj == "object") {
html += "s: ";
for (i in obj) html += '<li>' + link(vid[row][2] + vid[row][3], obj[i]) + '</li>';
} else html += ": " + link(vid[row][2] + vid[row][3], obj);
html += '<br />';
} else {
if (typeof obj == "object") for (i in obj) html += embedVideoFactory(vid[row][2] + vid[row][4], obj[i]);
else html += embedVideoFactory(vid[row][2] +vid[row][4], obj);
}
return html;
}
// 1.1 updated
function embedVideoFactory(pth, str) {
var obj = splitIt(str);
var cde = getCode(obj);
var eyt ='';
eyt = '<span style="background-color: black;">';
eyt += '<div style="background-color: black; width: ' + wid + '; height: ' + ((wid / 6) * 5) + ';">';
eyt += '<object width="' + wid + '" height="' + ((wid / 6) * 5) + '">';
eyt += '<param name="movie" value="' + pth + cde + '" />';
eyt += '<param name="wmode" value="transparent" />';
eyt += '<param name="autostart" value="false" />';
eyt += '<embed src="' + pth + cde + '" type="application/x-shockwave-flash" autostart="false"';
eyt += ' wmode="transparent" width="' + wid + '" height="' + ((wid / 6) * 5) + '"></embed>';
eyt += '</object>';
eyt += '</div>';
eyt += '<div id="code" style="width: ' + wid + ';"';
eyt += ' title="' + pth + cde + '"';
eyt += ' onMouseOver="flashIt(this, true); return false;"';
eyt += ' onMouseOut="flashIt(this, false); return false;"';
eyt += ' class="off">' + ((typeof obj == "object") ? obj[0] + ': ': '') + cde + '</div>';
eyt += '</span>';
return eyt;
}
// 1.1 updated
function link(pth, str) {
var obj = splitIt(str);
var cde = getCode(obj);
var lnk = '<a href="' + pth + cde + '" target="_new" onFocus="blur(this);"';
if (typeof obj == "object") lnk += ' title="' + cde + '"';
lnk += '>';
lnk += (typeof obj == "object") ? obj[0]: obj;
lnk += '</a>';
return lnk;
}
// 1.1 new
function cleanString(str, r) {
for (row in vid) if (vid[row][0].length > 0 && r != row && str.indexOf(vid[row][1]) != -1) return str.indexOf(vid[row][1]);
return str.length;
}
// 1.1 new
function splitIt(str) { return (str.indexOf(vid[vid.length - 1][0]) != -1) ? str.split(vid[vid.length - 1][0]): str; }
function getCode(obj) { return ((typeof obj == "object") ? obj[1]: obj).replace(/^\s+|\s+$/g, ""); }
// 1.0
function flashIt(obj, bool) { obj.className = (bool) ? 'on': 'off'; }
//-->
</script>
</head>
<body onload="drawIt();" scroll="auto">
<h1 class="vid"></h1>
</body>
</html>