How do i replace the player?
That's hard to answer...
So what i have done was create a spot where the "new player" will be, and set it above the original one in the template jwplayer...
You should now have the capabilities to use java script / html "onclick events" and are able to trace the html files down to what is loading when....
Use the "Web console"
so, hear are some help full path locations:
edit the template look Under
[files]
This is where you will add the file to load into the player (was unable to figure it out 100%...)
the template done't have the file paths set yet it is using hfs macro %item-url% which need to go the the video player...
The creator of the post is using java script to manipulate the page in doing that, i'm not a jquery / java script coder, I know quite a bit of html / php....
also in the template, you will find html code for <center> this is the spot that all the files loads to form the script and the "click event"
so i crate the player above that....
So, thus, this is as far as i can and what i'm going to go with it...
*Link has been upgraded and updated....
https://drive.google.com/file/d/0B9u5dgydfOEuc2xFdnRxbGFlS0k/view?usp=sharingDon't really have files to test the full template(the IMBM and other netflix like stuff), and this is the bare min you need to get things running
(i work in a custom location, i try to make things run anywhere, but i may put an exact location rom time to time...)
extract to the root of "c:"
path: "c:\hfs\*.*"
*Should work in any location, but untested...
Here is what i have done:
I've added the "players", but not a way to put the file to be played into it left html / hfs comments in the template!
Added RARW live template / additional html players
Added file vfs Structure in accordance to forum descriptions
Menu > html template > edit (F6)
Edit hfs.tpl to make changes to entire template
Here is a part of the test tpl unfinished...
-----------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=iso-8859-1'>
<meta name="robots" content="noindex,nofollow" />
<title>HFSFLIX %folder%</title>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Sans" />
<style type="text/css">\n%style%\n</style>
<link rel="shortcut icon" href="/template/hfsflix/favicon.ico" />
<script type="text/javascript" src="/template/hfsflix/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/template/hfsflix/2.1/jquery.min.js"></script>
</head>
<body>
<!-- Calls Potential Player Files NEED THIS -->
<script type="text/javascript" src="/template/global/topup/jquery.topup.packed.js"></script>
<script type="text/javascript" src="/template/global/live.script.js"></script>
<script type="text/javascript" src="/template/global/video-js/video.js"></script>
<script type="text/javascript" src="/template/hfsflix/jwplayer.js"></script>
<script src="/template/global/flowplayer/flowplayer-3.2.18.swf"></script>
<!-- Diable adds
must of been his jwplayer... probally don't need this -->
<style>.afs_ads{display:none !important;} .jw-captions {bottom: 0em !important;} .jw-skin-seven .jw-controlbar {width:99.9%; opacity:0.6;}</style>
<!-- UNKNOWN WHY - Not needed! assume login token acsess... probally don't need this -->
<script>jwplayer.key='dYZaZhVg8YMcuroFV8/9r+trIPGjiF5hrf264w==';</script>
<!-- HFS Macro Called defiend later at bottom... -->
%login-link%
%loggedin%
%upload-link%
<!-- HFS Flix top left path location -->
<div class=big id="titulo" style="padding-top:10px;padding-left:15px;">{.breadcrumbs|{:<a href="%bread-url%">{.if|{.%bread-name%=.}|Home|%bread-name%.}/</a>:} .}</div>
<div class=body>
<!-- New video player here -->
<!-- onclick run script at the playe location code -->
<center>
<p> I'm the new player spot, still a work in progress </p>
<object type="application/x-shockwave-flash" data="/template/global/flowplayer/flowplayer-3.2.18.swf" width="1280" height="600">
<param name="movie" value="/template/global/flowplayer/flowplayer-3.2.18.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashVars" value="config={'playlist':[{'url':'%item-url%','autoPlay':false}]}" />
</object></center>
<script>
</script>
<!-- New video player here -->
<hr style="border-color:red;">
<br />
<center>
<div id="player" class="jwplayer" tabindex="0" ></div>
<div class="playertitle" id="playertitle"></div>
<div class="poster" id="poster"></div>
</center>
<!-- JS JWPLAYER html video player -->
<center>
<div id="player" class="jwplayer" tabindex="0" ></div>
<div class="playertitle" id="playertitle"></div>
<div class="poster" id="poster"></div>
</center>
<br />
<!-- JS HFSFlix script to put files into player and add netflix video extras -->
{.comment|
NOTE: This part is complex, do not touch unless you are certain that you understand how it works!
.}
<script>
$(document).ready(function(){
$('.img-zoom').hover(function() {
$(this).addClass('transition');
}, function() {
$(this).removeClass('transition');
});
});
document.getElementById('player').style.display='none';
function player(url, title, format) {
var div = document.getElementById('playertitle');
div.innerHTML = "<div style='margin-top:30px;'></div>" + title + "<div style='margin-top:70px;margin-bottom:70px'><hr style='border-color:red;'></div>";
document.getElementById('player').style.display='block';
document.getElementById('playertitle').style.display='block';
var playerInstance = jwplayer('player');
switch(format) {
case 'video': playerwidth = 1280;
playerheight = 720;
break;
case 'audio': playerwidth = 600;
playerheight = 33;
break;
} playerInstance.setup({
file: url,
skin: {
name: "seven"
},
width: playerwidth,
height: playerheight,
autostart: true,
tracks: [{
file: url.substr(0, url.lastIndexOf(".")) + ".eng.srt",
label: "English",
kind: "captions",
"default": true,
},{
file: url.substr(0, url.lastIndexOf(".")) + ".spa.srt",
label: "Spanish",
kind: "captions"
}],
captions: {
color: '#FFFFFF',
fontSize: 20,
edgeStyle: "raised",
backgroundOpacity: 0
}
});
playerInstance.play();
}
function capitalizeEachWord(str) {
var words = str.split(" ");
var arr = Array();
for (i in words) {
temp = words
;
temp = temp.charAt(0).toUpperCase() + temp.substring(1);
arr.push(temp);
}
return arr.join(" ");
}
function urlcaratulaserie(serie) {
var base="/template/hfsflix/";
switch(serie) {
case "Better Call Saul": url="273181-g3"; break;
case "Daredevil": url="281662-g6"; break;
case "Dragon Ball Super": url="295068-g5"; break;
case "Fear the Walking Dead": url="290853-g4"; break;
case "Hardcore Pawn": url="183831-g2"; break;
case "Homeland": url="247897-g21"; break;
case "House of Cards": url="262980-g5"; break;
case "Humans": url="292124-g2"; break;
case "Manhattan": url="278468-g8"; break;
case "Minority Report": url="295680-g4"; break;
case "Mr. Robot": url="289590-g5"; break;
case "Orange Is The New Black": url="264586-g7"; break;
case "Orphan Black": url="260315-g8"; break;
case "Saint Seiya Omega": url="257997-g"; break;
case "Silicon Valley": url="277165-g5"; break;
case "South Park": url="75897-g7"; break;
case "The Walking Dead": url="153021-g43"; break;
case "True Detective": url="270633-g7"; break;
case "Under The Dome": url="264492-g4"; break;
case "Vikings": url="260449-g16"; break;
}
return base+url+".jpg";
}
function urlcaratulamovie(movie) {
movie = movie.replace(" [1080p]", "");
var moviemod = movie.substring(0,movie.length-7);
var year = movie.substring(movie.length-5,movie.length-1);
moviemod=moviemod.split(' ').join('_');
baseurl="http://s.ynet.io/assets/images/movies/";
baseurlhttps="https://s.ynet.io/assets/images/movies/";
if (moviemod==="Alien_DC") url = baseurl + "Alien_1979_Dir_Cut";
else if (moviemod==="Alien_Resurrection_DC") url = baseurl + "Alien_Resurrection_1997_Special_Edition";
else if (moviemod==="Alien_3_DC") url = baseurl + "Alien_3_1992_Special_Edition";
else if (moviemod==="Aliens_DC") url = baseurl + "Aliens_1986_Special_Edition";
else if (moviemod==="Babylon_A.D.") url = baseurl + "Babylon_A_D_EXTENDED_2008";
else if (moviemod==="Big") url = baseurl + "Big_1988_Extended";
else if (moviemod==="Blade_Runner") url = baseurlhttps + "Blade_Runner_1982";
else if (moviemod==="Darkman") url = baseurlhttps+"Darkman_1990";
else if (moviemod==="Dawn_of_the_Dead") url = baseurlhttps + "Dawn_of_the_Dead_UNRATED_2004";
else if (moviemod==="Jaws") url = baseurlhttps + "Jaws_Quadrilogy_1975";
else if (moviemod==="Paranormal_Activity_3") url = baseurlhttps + "Paranormal_Activity_3_2011_UNRATED";
else if (moviemod==="Terminator_2_Judgment_Day") url = baseurlhttps + "Terminator_2_Judgment_Day_1991_DC";
else if (moviemod==="Terminator_Salvation") url = baseurlhttps + "Terminator_Salvation_2009_DC";
else if (moviemod==="The_Hills_Have_Eyes" || moviemod==="The_Hills_Have_Eyes_II") url = baseurlhttps + "The_Hills_Have_Eyes_duology_2006";
else if (moviemod==="The_Ring" || moviemod==="The_Ring_II") url = baseurlhttps + "The_Ring_Duology_2002";
else url = baseurl + moviemod + "_" + year;
url = url + "/medium-cover.jpg";
if (moviemod==="Sharknado_3_Oh_Hell_No") url = "https://s-media-cache-ak0.pinimg.com/736x/3d/2b/dd/3d2bddc6452e663cd0e4a054df3f9a47.jpg";
return url;
}
function jsonomdbmovie(movie, year) {
baseurl="http://www.omdbapi.com/?t=";
jsonurl = baseurl + movie + "&y=" + year;
if(movie==="Alien+3+DC") jsonurl=baseurl+"Alien%C2%B3&y=1992";
if(movie==="Alien+DC") jsonurl=baseurl+"Alien&y=1979";
if(movie==="Alien+Resurrection+DC") jsonurl=baseurl+"Alien+resurrection";
if(movie==="Aliens+DC") jsonurl=baseurl+"Aliens";
if(movie==="Kick+Ass") jsonurl=baseurl+"Kick-Ass";
if(movie==="Legion") jsonurl=baseurl+"Legion";
if(movie==="Saw+UNRATED") jsonurl=baseurl+"saw";
if(movie==="Saw+II+UNRATED") jsonurl=baseurl+"saw ii";
if(movie==="Saw+III+UNRATED") jsonurl=baseurl+"saw iii";
if(movie==="Saw+IV+UNRATED") jsonurl=baseurl+"saw iv";
if(movie==="Saw+V+UNRATED") jsonurl=baseurl+"saw v";
if(movie==="Saw+VI+UNRATED") jsonurl=baseurl+"saw vi";
if(movie==="Saw+VII+UNRATED") jsonurl=baseurl+"saw 3d";
if(movie==="Sin+City+RECUT+EXTENDED+AND+UNRATED") jsonurl=baseurl+"sin city";
if(movie==="Spider_Man_Trilogy") jsonurl=baseurl+"spider-man";
jsonurl=jsonurl+"&plot=full&r=json";
return jsonurl;
}
function mostrarcaratula() {
var div = document.getElementById('poster');
var x = document.getElementsByTagName('a');
if(x[2].innerHTML === "Movies/" && x[3].innerHTML.indexOf("Filename") == -1) {
var movie = x[3].innerHTML.substring(0,x[3].innerHTML.length-8);
var year = x[3].innerHTML.substring(x[3].innerHTML.length-6,x[3].innerHTML.length-2);
document.getElementById('poster').style.display='block';
$.getJSON(jsonomdbmovie(movie.split(' ').join('+'),year), function(data) {
imdb = "<table style='float:left'><tr><td style='vertical-align:top; padding-top:9px'><a href='http://www.imdb.com/title/"+ data.imdbID + "/' target='_blank'><img style='float:left; margin-bottom:20px;' src='" + urlcaratulamovie(movie+" ("+year+")") + "' \></a></td>";
if(data.Title != undefined) {
imdb = imdb + "<td style='vertical-align:top'><div style='float:left; padding-left:20px; text-align:left;'>"
imdb = imdb + "<table><tr><td><span style='color:black; font-size:26pt'>" + data.Title + "</span>";
imdb = imdb + "<span style='color:gray'> (" + data.Year + ")</span></td></tr>";
imdb = imdb + "<tr><td><span style='color:gray'>" + data.Genre + "</span></td></tr></table><br\>";
imdb = imdb + "<table><tr><td style='padding-right:20px'>Runtime</td>" + "<td><span style='color:gray'>" + data.Runtime + "</span></td></tr>";
imdb = imdb + "<tr><td>Director</td>" + "<td><span style='color:gray'>" + data.Director + "</span></td></tr>";
imdb = imdb + "<tr><td>Actors</td>" + "<td><span style='color:gray'>" + data.Actors + "</span</td></tr>";
imdb = imdb + "<tr><td>Country</td>" + "<td><span style='color:gray'>" + data.Country + "</span></td></tr>";
imdb = imdb + "<tr><td>Rated</td>" + "<td><span style='color:gray'>" + data.Rated + "</span></td></tr></table><br/>";
imdb = imdb + "<table><tr><td>Plot</td></tr><tr><td><span style='color:dimgray'>" + data.Plot + "</span></td></tr></table><br/>";
imdb = imdb + "<table><tr><td><img src='/template/hfsflix/imdb.png'\></td><td><span style='color:gray'>" + data.imdbRating + "</span></td>";
imdb = imdb + "<td style='padding-left:20px'></td><td><img src='/template/hfsflix/metacritic.png'\></td><td><span style='color:gray'>" + data.Metascore + "</span></td></tr></table><br\>";
imdb = imdb + "</div></td>"
}
imdb = imdb + "</tr>";
div.innerHTML = imdb;
});
} else if(x[2].innerHTML === "Series/" && x[3].innerHTML.indexOf("Filename") == -1) {
var serie = x[3].innerHTML.substring(0,x[3].innerHTML.length-1);
div.innerHTML = "<img style='float:left; margin-bottom:20px;' src='" + urlcaratulaserie(serie) + "' \>";
document.getElementById('poster').style.display='block';
}
}
function listfolder(itemname, itemurl) {
if(document.getElementById('titulo').innerText === "Home/Series/") {
document.write("<a href='"+itemurl+"'><img class='img-zoom' style='float:left;' alt='"+itemname+"' src='" + urlcaratulaserie(itemname) + "' title='" + capitalizeEachWord(itemname) + "'\>");
} else if(document.getElementById('titulo').innerText === "Home/Movies/") {
document.write("<a href='"+itemurl+"'><img class='img-zoom' src='" + urlcaratulamovie(itemname) + "' alt='" + capitalizeEachWord(itemname) + "' title='"+ capitalizeEachWord(itemname) + "' \>");
} else if(document.getElementById('titulo').innerText === "Home/") {
if(itemname==="Movies") {
document.write("<table><tr><td><a href='" + itemurl + "'><div style='float:left'><img class='img-zoom' src='/template/hfsflix/home-movies-icon.png' \></div></td>");
}
if(itemname==="Series") {
document.write("<td><a href='" + itemurl + "'><div style='float:left'><img class='img-zoom' src='/template/hfsflix/home-tvshows-icon.png' \></div></td></tr>");
document.write("<tr><td><center><span class=big style='color:black'>Movies</span></center></td>");
document.write("<td><center><span class=big style='color:black'>Series</span></center></td></tr></table><br><br><br>");
}
} else {
document.write("<tr><td class=row><a href='"+itemurl+"'><div style='float:left'>");
document.write("<img align=top src='/template/hfsflix/folder_black.png'/></div>");
document.write("<div style='margin-left:43px;padding-top:7px;'><b>" + itemname + "</b></div></a>");
}
}
function listfiles(itemname) {
if(document.getElementById('titulo').innerText === "Home/Series/") {
document.write("<table>")
} else if(document.getElementById('titulo').innerText === "Home/Movies/") {
document.write("<table>");
} else if(document.getElementById('titulo').innerText === "Home/") {
document.write("<table>");
} else {
document.write("<br\><p align='center'><table cellpadding=6>");
document.write("<th><a><span class=column>Filename</span></a><th><th>");
}
}
</script>
<!-- HFS Macro Called defiend later at bottom... -->
%folder-comment%
%files%
</body>
</html>
[file]
{.switch|%item-ext%|,
|mkv|
<tr><td class=row>%new%<a href="%item-url%">
<div style="float:left"><img align=top src="/template/hfsflix/mkv.png" height="32" width="32"/></div>
<div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
<td class="row right"><a href="#" onclick=""><img src="/template/hfsflix/play_netflix.png" width=32/></a>
<!-- can't paly yet -->
|avi|
<tr><td class=row>%new%<a href="%item-url%">
<div style="float:left"><img align=top src="/template/hfsflix/movie.png" height="32" width="32"/></div>
<div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
<td class="row right"><a href="#" onclick=""><img src="/template/hfsflix/play_netflix.png" width=32/></a>
<!-- can't paly yet -->
|mp4|
<tr><td class=row>%new%<a href="%item-url%">
<div style="float:left"><img align=top src="/template/hfsflix/movie.png"/></div>
<div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
<td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','video');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
|mp3|
<tr><td class=row>%new%<a href="%item-url%">
<div style="float:left"><img align=top src="/template/hfsflix/mp3.png"/></div>
<div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
<td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','audio');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
/switch.}
-----------------