diff --git a/README.md b/README.md
index e1fe811fb..42c9a909a 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
I have forked jonnyboys newznab-tmux as he and the dev team have moved to another project (https://github.com/nZEDb/nZEDb). I will try as much as i can to maintain and improve these tmux scripts, where possible and needed, as they are a valuable addendum to newznab+.
Support is given on irc.synirc.net #tmux channel.
-I started adapting some of more interesting scripts from nZEDb, but they require tempering with newznab database, so use them at your own risk. Any update to nn+ db could render them useless. Scripts require PHP version > 5.3.10
+I started adapting some of more interesting scripts from nZEDb, but they require tempering with newznab database, so use them at your own risk. Any update to nn+ db could render them useless. Scripts require PHP version > 5.3.10 and Python 2.7x or newer.
There is a test folder in main tmux folder. In that folder you will find two folders, /DB/ and /copy_this/. if you are setting up tmux for the first time, import db.sql using cli (mysql -u {┤your username} -p newznab < db.sql).
1. Copy files from /test/copy_this/ folder into your newznab installation /www folder. You can now edit tmux settings in newznab admin area. This is available in default template for now.
diff --git a/test/copy_this/www/pages/details.php b/test/copy_this/www/pages/details.php
index 74bb5850c..89e557a52 100644
--- a/test/copy_this/www/pages/details.php
+++ b/test/copy_this/www/pages/details.php
@@ -125,12 +125,9 @@ if (isset($_GET["id"]))
$predbQuery = $PreDB->getByID($data["preID"]);
}
- $prehashQuery = '';
- if ($data["preID"] > 0)
- {
+
$prehash = new PreHash();
- $pre = $prehash->getForRelease($data['preID']);
- }
+ $pre = $prehash->getForRelease($data["preID"]);
$rf = new ReleaseFiles;
$releasefiles = $rf->get($data["ID"]);
diff --git a/test/copy_this/www/pages/prehash.php b/test/copy_this/www/pages/prehash.php
index 00e7d4cbb..5e73cc7a1 100644
--- a/test/copy_this/www/pages/prehash.php
+++ b/test/copy_this/www/pages/prehash.php
@@ -5,7 +5,7 @@ if (!$users->isLoggedIn()) {
$page->show403();
}
-$predb = new PreDb();
+$predb = new PreHash();
$offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_REQUEST["offset"] : 0;
diff --git a/test/copy_this/www/templates/default/scripts/utils.js b/test/copy_this/www/templates/default/scripts/utils.js
new file mode 100644
index 000000000..2d6c6c281
--- /dev/null
+++ b/test/copy_this/www/templates/default/scripts/utils.js
@@ -0,0 +1,870 @@
+
+// event bindings
+jQuery(function($){
+
+ var vortexStates = Array();
+ vortexStates[0] = 'Waiting';
+ vortexStates[1] = 'Downloading';
+ vortexStates[2] = 'Downloaded';
+ vortexStates[3] = 'Saving';
+ vortexStates[4] = 'Saved';
+ vortexStates[5] = 'Skipped';
+
+ //fix for autosizing plugin
+ $('.autosize').autosize({append: "\n"});
+
+ // browse.tpl, search.tpl -- show icons on hover
+ var orig_opac = $('table.data tr').children('td.icons').children('div.icon').css('opacity');
+ $('table.data tr').hover(
+ function(){ $(this).children('td.icons').children('div.icon').css('opacity',1); },
+ function(){ $(this).children('td.icons').children('div.icon').css('opacity',orig_opac); }
+ );
+
+ $(".forumpostsubmit").click(function(e) {
+ if ($.trim($("#addMessage").val()) == "" || $.trim($("#addSubject").val()) == "")
+ {
+ alert ("Please enter a subject and message.");
+ return false;
+ }
+ });
+
+ $(".forumreplysubmit").click(function(e) {
+ if ($.trim($("#addReply").val()) == "")
+ {
+ alert ("Please enter a message.");
+ return false;
+ }
+ });
+
+ $(".check").click(function(e) {
+ if (!$(e.target).is('input'))
+ $(this).children(".nzb_check").attr('checked', !$(this).children(".nzb_check").attr('checked'));
+ });
+
+ $(".descmore").click(function(e) {
+ $(this).prev(".descinitial").hide();
+ $(this).next(".descfull").show();
+ $(this).hide();
+ return false;
+ });
+
+ $('.nzb_check_all').change(function(){
+ if($(this).attr('checked'))
+ {
+ $('table.data tr td input:checkbox').attr('checked',$(this).attr('checked'));
+ } else {
+ $('table.data tr td input:checkbox').removeAttr('checked');
+ }
+ });
+
+ $('.nzb_check_all_season').change(function(){
+ var season = $(this).attr('name');
+ $('table.data tr td input:checkbox').each( function(i, row) {
+ if ($(row).attr('name') == season) {
+ $(row).attr('checked', !$(row).attr('checked'));
+ }
+ });
+ });
+
+ // browse.tpl, search.tpl
+ $('.icon_cart').click(function(e){
+ if ($(this).hasClass('icon_cart_clicked')) return false;
+ var guid = $(this).parent().parent().attr('id').substring(4);
+ $.post( SERVERROOT + "cart?add=" + guid, function(resp){
+ $(e.target).addClass('icon_cart_clicked').attr('title','Added to Cart');
+ createGrowl( 'Added to Cart' );
+ });
+ return false;
+ });
+
+ $('.icon_nzbvortex').click(function(event)
+ {
+ if ($(this).hasClass('icon_nzbvortex_clicked')) return false;
+ var guid = $(this).parent().parent().attr('id').substring(4);
+
+ if (guid && guid.length > 0)
+ {
+ $.ajax
+ ({
+ url: SERVERROOT + '/nzbvortex?addQueue='+ guid +'&isAjax',
+ cache: false
+ }).done(function(html)
+ {
+ var message = 'Added ' + guid + ' to queue.';
+ $(event.target).addClass('icon_nzbvortex_clicked').attr('title', message);
+ createGrowl(message);
+ }).fail(function(response)
+ {
+ alert(response.responseText);
+ });
+ }
+
+ return false;
+ });
+
+ $('a.vortex-resume').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?resume=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-pause').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?pause=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-moveup').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?moveup=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-movedown').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?movedown=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-movetop').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?movetop=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-movebottom').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?movebottom=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-trash').live('click', function(event)
+ {
+ event.preventDefault();
+ $('#vortex-overlay-' + $(this).attr('href')).show();
+ $.get(SERVERROOT + "nzbvortex?delete=" + $(this).attr('href') + '&isAjax');
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('a.vortex-filelist').live('click', function(event)
+ {
+ event.preventDefault();
+ var id = $(this).attr('href');
+ $('#vortex-overlay-' + id).show();
+
+ $.colorbox({});
+
+ $.ajax
+ ({
+ url: SERVERROOT + '/nzbvortex?filelist='+ id +'&isAjax',
+ cache: false
+ }).done(function(response)
+ {
+ $('#cboxLoadingGraphic').hide();
+ var json = $.parseJSON(response);
+ console.log(json);
+ $.each(json.files, function(k, v)
+ {
+
+ $('#cboxContent').append('' + v.fileName + ' ('+ vortexStates[v.state] +')
');
+ });
+
+ }).fail(function(response)
+ {
+ alert('Unable to retrieve filelist: ' + response.responseText);
+ });
+
+ $(this).removeAttr('href');
+ return false;
+ });
+
+ $('.icon_sab').click(function(e){ // replace with cookies?
+ if ($(this).hasClass('icon_sab_clicked')) return false;
+
+ var guid = $(this).parent().parent().attr('id').substring(4);
+ var nzburl = SERVERROOT + "sendtosab/" + guid;
+
+ $.post(nzburl, function(resp){
+ $(e.target).addClass('icon_sab_clicked').attr('title','Added to Queue');
+ createGrowl( 'Added to Queue' );
+ });
+ return false;
+ });
+ $("table.data a.modal_nfo").colorbox({ // NFO modal
+ href: function(){ return $(this).attr('href') +'&modal'; },
+ title: function(){ return $(this).parent().parent().children('a.title').text(); },
+ innerWidth:"800px", innerHeight:"90%", initialWidth:"800px", initialHeight:"90%", speed:0, opacity:0.7
+ });
+ // Screenshot modal
+ $("table.data a.modal_prev").colorbox({scrolling:false, maxWidth:"800px", maxHeight:"450px"});
+
+ $("table.data a.modal_imdb").colorbox({ // IMDB modal
+ href: function(){ return SERVERROOT + "movie/"+$(this).attr('name').substring(4)+'&modal'; },
+ title: function(){ return $(this).parent().parent().children('a.title').text(); },
+ innerWidth:"800px", innerHeight:"450px", initialWidth:"800px", initialHeight:"450px", speed:0, opacity:0.7
+ }).click(function(){
+ $('#colorbox').removeClass().addClass('cboxMovie');
+ });
+
+ $("table.data a.modal_music").colorbox({ // Music modal
+ href: function(){ return SERVERROOT + "musicmodal/"+$(this).attr('name').substring(4)+'&modal'; },
+ title: function(){ return $(this).parent().parent().children('a.title').text(); },
+ innerWidth:"800px", innerHeight:"450px", initialWidth:"800px", initialHeight:"450px", speed:0, opacity:0.7
+ }).click(function(){
+ $('#colorbox').removeClass().addClass('cboxMusic');
+ });
+ $("table.data a.modal_console").colorbox({ // Console modal
+ href: function(){ return SERVERROOT + "consolemodal/"+$(this).attr('name').substring(4)+'&modal'; },
+ title: function(){ return $(this).parent().parent().children('a.title').text(); },
+ innerWidth:"800px", innerHeight:"450px", initialWidth:"800px", initialHeight:"450px", speed:0, opacity:0.7
+ }).click(function(){
+ $('#colorbox').removeClass().addClass('cboxConsole');
+ });
+ $("table.data a.modal_book").colorbox({ // Book modal
+ href: function(){ return SERVERROOT + "bookmodal/"+$(this).attr('name').substring(4)+'&modal'; },
+ title: function(){ return $(this).parent().parent().children('a.title').text(); },
+ innerWidth:"800px", innerHeight:"450px", initialWidth:"800px", initialHeight:"450px", speed:0, opacity:0.7
+ }).click(function(){
+ $('#colorbox').removeClass().addClass('cboxBook');
+ });
+
+
+ $('#nzb_multi_operations_form').submit(function(){return false;});
+ $('input.nzb_multi_operations_download').click(function(){
+ var newFormName = 'nzbmulti' + Math.round(+new Date()/1000);
+ var newForm = $("
", {'action': SERVERROOT + 'getnzb?zip=1', 'method':'post', 'target': '_top', 'id':newFormName});
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ if ($(row).val()!="on")
+ $("", {'name':'id[]', 'value':$(row).val(), 'type':'hidden'}).appendTo(newForm);
+ });
+ newForm.appendTo($('body'));
+ $('#'+newFormName).submit();
+ });
+ $('input.nzb_multi_operations_cart').click(function(){
+ var guids = new Array();
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ var guid = $(row).val();
+ var $cartIcon = $(row).parent().parent().children('td.icons').children('.icon_cart');
+ if (guid && !$cartIcon.hasClass('icon_cart_clicked')){
+ $cartIcon.addClass('icon_cart_clicked').attr('title','Added to Cart'); // consider doing this only upon success
+ guids.push(guid);
+ createGrowl( 'Added to Cart' );
+ }
+ $(this).attr('checked', false);
+ });
+ $.post( SERVERROOT + "cart?add", { 'add': guids });
+ });
+ $('input.nzb_multi_operations_sab').click(function(){
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ var $sabIcon = $(row).parent().parent().children('td.icons').children('.icon_sab');
+ var guid = $(row).val();
+ if (guid && !$sabIcon.hasClass('icon_sab_clicked')) {
+ var nzburl = SERVERROOT + "sendtosab/" + guid;
+ $.post( nzburl, function(resp){
+ $sabIcon.addClass('icon_sab_clicked').attr('title','Added to Queue');
+ createGrowl( 'Added to Queue' );
+ });
+ }
+ $(this).attr('checked', false);
+ });
+ });
+ //front end admin functions
+ $('input.nzb_multi_operations_edit').click(function(){
+ var ids = "";
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ if ($(row).val()!="on")
+ ids += '&id[]='+$(row).val();
+ });
+ if (ids)
+ $('input.nzb_multi_operations_edit').colorbox({
+ href: function(){ return SERVERROOT + "ajax_release-admin?action=edit"+ids+"&from="+encodeURIComponent(window.location); },
+ title: 'Edit Release',
+ innerWidth:"400px", innerHeight:"250px", initialWidth:"400px", initialHeight:"250px", speed:0, opacity:0.7
+ });
+ });
+ $('input.nzb_multi_operations_delete').click(function(){
+ var ids = "";
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ if ($(row).val()!="on")
+ ids += '&id[]='+$(row).val();
+ });
+ if (ids)
+ if (confirm('Are you sure you want to delete the selected releases?')) {
+ $.post(SERVERROOT + "ajax_release-admin?action=dodelete"+ids, function(resp){
+ window.location = window.location;
+ });
+ }
+ });
+ $('input.nzb_multi_operations_rebuild').click(function(){
+ var ids = "";
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ if ($(row).val()!="on")
+ ids += '&id[]='+$(row).val();
+ });
+ if (ids)
+ if (confirm('Are you sure you want to rebuild the selected releases?')) {
+ $.post(SERVERROOT + "ajax_release-admin?action=dorebuild"+ids, function(resp){
+ window.location = window.location;
+ });
+ }
+ });
+ //cart functions
+ $('input.nzb_multi_operations_cartdelete').click(function(){
+ var ids = new Array();
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ if ($(row).val()!="on")
+ ids.push($(row).val());
+ });
+ if (ids)
+ {
+ if (confirm('Are you sure you want to delete the selected releases from your cart?')) {
+ $.post( SERVERROOT + "cart?delete", { 'delete': ids }, function(resp){
+ window.location = window.location;
+ });
+ }
+ }
+ });
+ $('input.nzb_multi_operations_cartsab').click(function(){
+ var ids = new Array();
+ $("table.data INPUT[type='checkbox']:checked").each( function(i, row) {
+ var guid = $(row).val();
+ var nzburl = SERVERROOT + "sendtosab/" + guid;
+ $.post( nzburl, function(resp){
+ createGrowl( 'Added to Queue' );
+ });
+ });
+ });
+
+
+
+ // headermenu.tpl
+ $('#headsearch')
+ .focus(function(){if(this.value == 'Enter keywords') this.value = ''; else this.select(); })
+ .blur (function(){if(this.value == '') this.value = 'Enter keywords';});
+ $('#headsearch_form').submit(function(){
+ $('#headsearch_go').trigger('click');
+ return false;
+ });
+ $('#headsearch_go').click(function(){
+ if ($('#headsearch').val() && $('#headsearch').val() != 'Enter keywords')
+ {
+
+ var sText = $('#headsearch').val();
+ var sCat = ($("#headcat").val()!=-1 ? "?t="+$("#headcat").val() : "");
+ document.location= WWW_TOP + "/search/" + sText + sCat;
+ }
+ });
+
+ // search.tpl
+ $('#search_search_button').click(function(){
+ if ($('#search').val())
+ document.location=WWW_TOP + "/search/" + $('#search').val() + ($("#search_cat").val()!=-1 ? "?t="+$("#search_cat").val() : "");
+ return false;
+ });
+
+ $('#search')
+ .focus(function(){this.select(); })
+
+ // searchraw.tpl
+ $('#searchraw_search_button').click(function(){
+ if ($('#search').val())
+ document.location=WWW_TOP + "/searchraw/" + $('#search').val();
+ return false;
+ });
+ $('#searchraw_download_selected').click(function(){
+ if ($('#dl input:checked').length)
+ $('#dl').trigger('submit');
+ return false;
+ });
+
+ // login.tpl, register.tpl, search.tpl, searchraw.tpl
+ if ($('#username').length)
+ $('#username').focus();
+ if ($('#search').length)
+ $('#search').focus();
+
+ // viewfilelist.tpl
+ $('#viewfilelist_download_selected').click(function(){
+ if ($('#fileform input:checked').length)
+ $('#fileform').trigger('submit');
+ return false;
+ });
+
+ // misc
+ $('.confirm_action').click(function(){ return confirm('Are you sure?'); });
+
+ // play audio preview
+ $('.audioprev').click(function(){
+ var a = document.getElementById($(this).next('audio').attr('ID'));
+ if (a != null) {
+ if ($(this).text() == "Listen") {
+ a.play();
+ $(this).text("Stop");
+ }
+ else {
+ a.pause();
+ a.currentTime = 0;
+ $(this).text("Listen");
+ }
+ }
+
+ a.addEventListener('ended', function () {
+ $(this).prev().text("Listen");
+ } );
+
+ return false;
+ });
+
+ // mmenu
+ $('.mmenu').click(function(){
+ document.location=$(this).children('a').attr('href');
+ return false;
+ });
+
+ // mmenu_new
+ $('.mmenu_new').click(function(){
+ window.open($(this).children('a').attr('href'));
+ return false;
+ });
+
+ // searchraw.tpl, viewfilelist.tpl -- checkbox operations
+ // selections
+ var last1, last2;
+ $(".checkbox_operations .select_all").click(function(){
+ $("table.data INPUT[type='checkbox']").attr('checked', true).trigger('change');
+ return false;
+ });
+ $(".checkbox_operations .select_none").click(function(){
+ $("table.data INPUT[type='checkbox']").attr('checked', false).trigger('change');
+ return false;
+ });
+ $(".checkbox_operations .select_invert").click(function(){
+ $("table.data INPUT[type='checkbox']").each( function() {
+ $(this).attr('checked', !$(this).attr('checked')).trigger('change');
+ });
+ return false;
+ });
+ $(".checkbox_operations .select_range").click(function(){
+ if (last1 && last2 && last1 < last2)
+ $("table.data INPUT[type='checkbox']").slice(last1,last2).attr('checked', true).trigger('change');
+ else if (last1 && last2)
+ $("table.data INPUT[type='checkbox']").slice(last2,last1).attr('checked', true).trigger('change');
+ return false;
+ });
+ $('table.data td.check INPUT[type="checkbox"]').click(function(e) {
+ // range event interaction -- see further above
+ var rowNum = $(e.target).parent().parent()[0].rowIndex ;
+ if (last1) last2 = last1;
+ last1 = rowNum;
+
+ // perform range selection
+ if (e.shiftKey && last1 && last2) {
+ if (last1 < last2)
+ $("table.data INPUT[type='checkbox']").slice(last1,last2).attr('checked', true).trigger('change');
+ else
+ $("table.data INPUT[type='checkbox']").slice(last2,last1).attr('checked', true).trigger('change');
+ }
+ });
+ $('table.data a.data_filename').click(function(e) { // click filenames to select
+ // range event interaction -- see further above
+ var rowNum = $(e.target).parent().parent()[0].rowIndex ;
+ if (last1) last2 = last1;
+ last1 = rowNum;
+
+ var $checkbox = $('table.data tr:nth-child('+(rowNum+1)+') td.selection INPUT[type="checkbox"]');
+ $checkbox.attr('checked', !$checkbox.attr('checked'));
+
+ return false;
+ });
+
+ // show/hide previews
+ $('#showmoviepreviews').click(function()
+ {
+ $('#moviepreviews').next('form').toggle('fast');
+ $('#moviepreviews').toggle('fast', function() {
+ $('#showmoviepreviews').text(($('#moviepreviews').is(":visible") ? "Hide" : "Show") + " previews");
+ });
+ return false;
+ });
+
+ // show/hide invite form
+ $('#lnkSendInvite').click(function()
+ {
+ $('#divInvite').slideToggle('fast');
+ });
+
+ // send an invite
+ $('#frmSendInvite').submit(function()
+ {
+ var inputEmailto = $("#txtInvite").val();
+ if (isValidEmailAddress(inputEmailto))
+ {
+
+ // no caching of results
+ $.ajax({
+ url : WWW_TOP + '/ajax_profile?action=1&rand=' + $.now(),
+ data : { emailto: inputEmailto},
+ dataType : "html",
+ success : function(data)
+ {
+ $("#txtInvite").val("");
+ $('#divInvite').slideToggle('fast');
+ $("#divInviteSuccess").text(data).show();
+ $("#divInviteError").hide();
+ },
+ error: function(xhr,err,e) { alert( "Error in ajax_profile: " + err ); }
+ });
+ }
+ else
+ {
+ $("#divInviteSuccess").hide();
+ $("#divInviteError").text("Invalid email").show();
+ }
+ return false;
+ });
+
+ // movie.tpl
+ $('.mlmore').click(function(){ // show more movies
+ $(this).parent().parent().hide();
+ $(this).parent().parent().parent().children(".mlextra").show();
+ return false;
+ });
+
+ // lookup tmdb for a movie
+ $('#frmMyMovieLookup').submit(function()
+ {
+ var movSearchText = $("#txtsearch").val();
+ // no caching of results
+ $.ajax({
+ url : WWW_TOP + '/ajax_mymovies?rand=' + $.now(),
+ data : { id: movSearchText},
+ dataType : "html",
+ success : function(data)
+ {
+ $("#divMovResults").html(data);
+ },
+ error: function(xhr,err,e) { alert( "Error in ajax_mymovies: " + err ); }
+ });
+
+ return false;
+ });
+
+ // season selector in TV
+ $('a[id^="seas_"]').click(function(){
+ seas = $(this).attr("ID").replace("seas_","");
+
+ $('table[class^="tb_"]').hide();
+ $('.tb_' + seas).show();
+
+ $("li", $(this).closest("ul")).removeClass("active");
+ $(this).closest("li").addClass("active");
+
+ return false;
+ });
+
+ // file list tooltip
+ $(".rarfilelist").each(function() {
+ var guid = $(this).children('img').attr('alt');
+ $(this).qtip({
+ content: {
+ title: {
+ text: 'rar archive contains...'
+ },
+ text: 'loading...',
+ ajax: {
+ url: SERVERROOT + 'ajax_rarfilelist',
+ type: 'GET',
+ data: { id: guid },
+ success: function(data, status) {
+ this.set('content.text', data);
+ }
+ }
+ },
+ position: {
+ my: 'top right',
+ at: 'bottom left'
+ },
+ style: {
+ classes: 'ui-tooltip-newznab',
+ width: { max: 500 },
+ tip: {
+ corner: 'topRight',
+ size: {
+ x: 8,
+ y : 8
+ }
+ }
+ }
+ });
+ });
+
+ // seriesinfo tooltip
+ $(".seriesinfo").each(function() {
+ var guid = $(this).attr('title');
+ $(this).qtip({
+ content: {
+ title: {
+ text: 'Episode Info'
+ },
+ text: 'loading...',
+ ajax: {
+ url: SERVERROOT + 'ajax_tvinfo',
+ type: 'GET',
+ data: { id: guid },
+ success: function(data, status) {
+ this.set('content.text', data);
+ }
+ }
+ },
+ style: {
+ classes: 'ui-tooltip-newznab'
+ }
+ });
+ });
+
+ // mediainfo tooltip
+ $(".mediainfo").each(function() {
+ var guid = $(this).attr('title');
+ $(this).qtip({
+ content: {
+ title: {
+ text: 'Extended Media Info'
+ },
+ text: 'loading...',
+ ajax: {
+ url: SERVERROOT + 'ajax_mediainfo',
+ type: 'GET',
+ data: { id: guid },
+ success: function(data, status) {
+ this.set('content.text', data);
+ }
+ }
+ },
+ style: {
+ classes: 'ui-tooltip-newznab',
+ width: { max: 500 },
+ tip: {
+ corner: 'topLeft',
+ size: {
+ x: 8,
+ y : 8
+ }
+ }
+ }
+ });
+ });
+
+ // preinfo tooltip
+ $(".preinfo").each(function() {
+ var searchname = $(this).attr('title');
+ $(this).qtip({
+ content: {
+ title: {
+ text: 'Pre Info'
+ },
+ text: 'loading...',
+ ajax: {
+ url: SERVERROOT + 'ajax_preinfo',
+ type: 'GET',
+ data: { searchname: searchname },
+ success: function(data, status) {
+ this.set('content.text', data);
+ }
+ }
+ },
+ style: {
+ classes: 'ui-tooltip-newznab'
+ }
+ });
+ });
+
+});
+
+// prehashinfo tooltip
+ $(".prehashinfo").each(function() {
+ var preID = $(this).attr('title');
+ $(this).qtip({
+ content: {
+ title: {
+ text: 'Prehash info'
+ },
+ text: 'loading...', // The text to use whilst the AJAX request is loading
+ ajax: {
+ url: SERVERROOT + 'ajax_prehashinfo', // URL to the local file
+ type: 'GET', // POST or GET
+ data: { ID: preID }, // Data to pass along with your request
+ success: function(data, status) {
+ this.set('content.text', data);
+ }
+ }
+ },
+ style: {
+ classes: 'qtip-dark qtip-shadow qtip-rounded',
+ width: { max: 500 },
+ tip: { // Now an object instead of a string
+ corner: 'topLeft', // We declare our corner within the object using the corner sub-option
+ size: {
+ x: 8, // Be careful that the x and y values refer to coordinates on screen, not height or width.
+ y : 8 // Depending on which corner your tooltip is at, x and y could mean either height or width!
+ }
+ }
+ }
+ });
+ });
+
+
+$.extend({ // http://plugins.jquery.com/project/URLEncode
+URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a-zA-Z0-9_.]*)/;
+ while(x1 && m[1]!=''){o+=m[1];x+=m[1].length;
+ }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16);
+ o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;},
+URLDecode:function(s){var o=s;var binVal,t;var r=/(%[^%]{2})/;
+ while((m=r.exec(o))!=null && m.length>1 && m[1]!=''){b=parseInt(m[1].substr(1),16);
+ t=String.fromCharCode(b);o=o.replace(m[1],t);}return o;}
+});
+
+
+function isValidEmailAddress(emailAddress)
+{
+ var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
+ return pattern.test(emailAddress);
+}
+
+function mymovie_del(imdbID, btn)
+{
+ $.ajax({
+ url : WWW_TOP + '/ajax_mymovies?rand=' + $.now(),
+ data : { del: imdbID},
+ dataType : "html",
+ success : function(data)
+ {
+ $(btn).hide();
+ $(btn).prev("a").show();
+ },
+ error: function(xhr,err,e) { }
+ });
+
+ return false;
+}
+
+function mymovie_add(imdbID, btn)
+{
+ $(btn).hide();
+ $(btn).next("a").show();
+
+ $.ajax({
+ url : WWW_TOP + '/ajax_mymovies?rand=' + $.now(),
+ data : { add: imdbID},
+ dataType : "html",
+ success : function(data)
+ {
+ },
+ error: function(xhr,err,e) { }
+ });
+
+ return false;
+}
+
+
+// qtip growl
+$(document).ready(function()
+{
+ window.createGrowl = function(tipText ) {
+
+ var target = $('.qtip.jgrowl:visible:last');
+ var tipTitle = 'Attention!';
+ var persistent = false;
+
+ $(document.body).qtip({
+ content: {
+ text: tipText,
+ title: {
+ text: tipTitle,
+ button: true
+ }
+ },
+ position: {
+ my: 'top right',
+ at: (target.length ? 'bottom' : 'top') + ' right',
+ target: target.length ? target : $(document.body),
+ adjust: { y: 5 }
+ },
+ show: {
+ event: false,
+ ready: true,
+ effect: function() { $(this).stop(0,1).fadeIn(400); },
+
+ persistent: persistent
+ },
+ hide: {
+ event: false,
+ effect: function(api) {
+ $(this).stop(0,1).fadeOut(400).queue(function() {
+ api.destroy();
+ updateGrowls();
+ })
+ }
+ },
+ style: {
+ classes: 'jgrowl ui-tooltip-newznab ui-tooltip-rounded',
+ tip: false
+ },
+ events: {
+ render: function(event, api) {
+ timer.call(api.elements.tooltip, event);
+ }
+ }
+ })
+ .removeData('qtip');
+ };
+
+ window.updateGrowls = function() {
+ var each = $('.qtip.jgrowl:not(:animated)');
+ each.each(function(i) {
+ var api = $(this).data('qtip');
+
+ api.options.position.target = !i ? $(document.body) : each.eq(i - 1);
+ api.set('position.at', (!i ? 'top' : 'bottom') + ' right');
+ });
+ };
+
+ function timer(event) {
+ var api = $(this).data('qtip'),
+ lifespan = 5000;
+
+ if(api.get('show.persistent') === true) { return; }
+
+ clearTimeout(api.timer);
+ if(event.type !== 'mouseover') {
+ api.timer = setTimeout(api.hide, lifespan);
+ }
+ }
+
+ $(document).delegate('.qtip.jgrowl', 'mouseover mouseout', timer);
+});
+
+//reset users api counts
+function resetapireq(uid, type)
+{
+ $.post( SERVERROOT + "ajax_resetusergrabs-admin?id=" + uid + "&action=" + type, function(resp){ });
+}
\ No newline at end of file
diff --git a/test/copy_this/www/templates/default/styles/style.css b/test/copy_this/www/templates/default/styles/style.css
new file mode 100644
index 000000000..ca286f7e2
--- /dev/null
+++ b/test/copy_this/www/templates/default/styles/style.css
@@ -0,0 +1,428 @@
+/* Site-wide html styles */
+body { margin: 0 auto; padding: 0; background: #FFF url(../images/menu.gif) repeat-x left top; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; color: #515151; }
+h1, h2, h3 { margin: 0; font-weight: normal; color: #485459; }
+input, select, textarea { font-family: Calibri, Arial, Helvetica, sans-serif; }
+textarea { height:50px; width:300px; }
+h1 { font-size: 44px; padding-bottom:10px; }
+h2 { padding-bottom:5px; font-size: 1.6em; }
+h3 { padding:10px 0 5px 0; }
+p, ul, ol { margin-top: 0; line-height: 240%; text-align: justify; }
+ul, ol { }
+blockquote { }
+a { color: #108120; text-decoration: none; }
+a:hover { text-decoration: underline; }
+a img { border: none; }
+img.left { float: left; margin: 7px 30px 0 0; }
+img.right { float: right; margin: 7px 0 0 30px; }
+hr { display: none; }
+input[type=text], input[type=password], textarea, select { background: #fff; background: -webkit-gradient(linear, left top, left 25, from(#fff), color-stop(4%, #f0f0f0), to(#fff)); border: 1px solid #ccc; border-bottom-color: #999; border-right-color: #999; margin: 0; padding: 4px; color: #444; font-size: 100%; outline: none; }
+
+
+
+
+
+
+/*
+page structure
+*/
+#header { width: 940px; margin: 0 auto; }
+#page { width: 940px; margin: 0 auto; padding: 50px 0px 0px 0px;}
+
+#logo { width: 940px; margin: 0 auto; height: 65px; padding-left:5px; margin-top:4px; background:url("../images/banner.jpg") no-repeat bottom left; }
+#logo h1, #logo p { display:none; margin: 0px; line-height: normal; text-transform: lowercase; font-weight: normal; color: #485459; }
+#logo p { margin-top: 2px; font-size: 13px; color: #A8A8A8; }
+#logo h1 { padding-top: 10px; font-size: 48px; }
+#logo a { color: #A8A8A8; }
+#logo .logolink { float:left; }
+#logo img { margin-top:15px; }
+#logo h1 a { color: #485459; }
+
+#statusbar { width: 940px; margin: 0 auto; text-align:right; padding:5px 10px 0 0;}
+#statusbar a { color: #515151;}
+
+#content { float: right; width: 750px;}
+#content h1 { font-size: 2.3em;}
+#content p { margin-bottom:20px;}
+
+#sidebar { float: left; width: 160px;}
+#sidebar ul {margin: 0; padding: 0; line-height: normal; list-style-type: none; text-align: left; }
+#sidebar li { margin-bottom: 30px; padding: 0 0 0 0;}
+#sidebar li ul { list-style-type: none; list-style-position:inside; margin: 0px 10px; padding: 0; margin-left: 1em;}
+#sidebar li li { background-image: url('../images/bullet.jpg'); background-repeat: no-repeat; background-position: 0.7em 1.1em; margin: 0; padding-left: .5em; padding-top: .8em;padding-bottom:10px; border-bottom: 1px solid #E9E8DD;}
+#sidebar li li a {padding: 0 0 0 20px; font-weight: normal; color: #808080;}
+#sidebar li li a:hover {color: #108120;}
+#sidebar li li:hover { cursor:pointer; background-color:#EEE; background-image: url('../images/bullet_hov.jpg');}
+
+#sidebar p { margin: 0; padding: 0px 14px;}
+#sidebar h2 { height: 30px; margin: 0 0 5px 0px; padding: 6px 0 2px 14px; font-size: 18px; font-weight: normal; color: #485459;}
+#sidebar p { line-height: 200%;}
+#sidebar a { text-align: left; text-decoration: none; font-weight: bold;}
+
+.w3validator img {margin:10px 0 10px 0;}
+.footer { width: 100%; height: 102px; margin: 0 auto; background: #E1E1E1; border-top: 5px solid #656565;}
+.footer p { margin: 0; padding: 20px 0px 0px 0px; text-align: center; line-height: normal; font-size: 0.9em; }
+.footer a {}
+
+
+
+
+
+
+/*
+browse by category top menu
+*/
+#menu { height:33px; float: left; width: 100%; background-color:#e5e5e5; }
+#menu { padding:0 4px 0 4px; margin-right:1px; border:1px #CCC solid; background-color:#e5e5e5; -moz-border-radius: 4px; -webkit-border-radius: 4px;}
+
+.menupic {padding-left:15px;}
+
+#menulink { float: left; }
+#menulink ul { list-style-type: none; padding: 0; margin: 0; }
+#menulink li { float: left; position: relative; z-index: 100; }
+#menulink a, #menulink :visited {height:32px; display: block; font-size: 0.9em; width: 70px; padding: 1px 0px 0px 5px; color: #000; background-color: #e5e5e5; text-decoration: none; text-align: left; vertical-align: middle; }
+#menulink :hover, #menulink a.selected {color:#fff; background-color: #777; }
+#menulink ul ul { visibility: hidden; position: absolute; width: 60px; height: 0; }
+#menulink ul li:hover ul, #menulink ul a:hover ul { visibility: visible; }
+#menusearchlink { padding-top:5px; float:right; }
+#menusearchlink input, #menusearchlink select { font-size: 0.9em; color:#555; }
+#menucontainer { width:940px; height:10px; }
+
+select#headcat {width:120px; float:right; margin-left:5px; height:25px;}
+select#headcat option { padding-left: 10px; }
+select#headcat option.grouping { padding-left: 5px; font-weight: bold; }
+#headsearch{float:right;height:15px;}
+
+.gobutton {display:inline;float:right;margin-left:5px;}
+.gobutton input { background:url('../images/icons/go.png') no-repeat; cursor:pointer; border: none; width:30px; height:25px; }
+
+/* menu styling for when menu is displayed in top position */
+#logo ul { list-style-type: none; float:right; margin: 0 0 10px 0; padding:0; line-height: normal; text-align: right; }
+#logo ul li h2 {display:none;}
+#logo ul li ul li {float: left; margin-left: 1em; padding-right:5px; }
+#logo ul li a {color:#333;}
+#logo ul ul {list-style-type: square;}
+
+
+
+
+
+
+
+
+/*
+data tables, most lists.
+*/
+#browsetable, #coverstable, #forumtable { margin-top: 10px; clear: both; }
+table.data { border-collapse:collapse; }
+table.data th { text-align:left; vertical-align:top; background-color:#DDD; border-color: #AAA; border-width: 1px; border-style: solid; padding:3px; font-style:bolder; text-transform:capitalize;}
+table.data td { white-space:normal; vertical-align:top; padding:5px; border-color: #AAA; border-width: 1px; border-style: solid; }
+table.data td.less { color: #888; font-size: 0.9em; white-space:nowrap; }
+table.data td.icons { white-space:nowrap; padding-left:0px; padding-right:0px; width:60px; }
+table.data td.check {cursor:pointer;}
+table.highlight tr:hover td { background-color: #e8fbe6; }
+table tr.alt { background-color: #F6F6F6; }
+table tr.new { background-color: #f6f8ff; }
+table.data em {font-weight:bolder; color:red;}
+table td.item { padding:5px 5px 2px 5px; }
+table td.static { background-color: #FFF; }
+.left { text-align:left !important;}
+.right { text-align:right !important;}
+.mid { text-align:center !important;}
+.nowrap {white-space:nowrap;}
+#detailstable { width: 70%; }
+#detailstable th { width: 70px; }
+
+table.innerdata { border-collapse:collapse;}
+table.innerdata td { padding:2px; border-left-width:0; border-bottom-width:0; border-color: #EEE; }
+table.innerdata th { padding:2px; border-style: none; background-color:#EEE;}
+
+table.input th, table.input td { text-align: left; vertical-align:top; }
+/*
+predb
+*/
+
+.prehash {
+ color:#000;
+ text-align: center;
+}
+.prehash-left {
+ text-align: left;
+}
+
+/*
+form inputs and helpers
+*/
+div.hint, div.hint a {font-size:0.9em; font-style:italic; color:#999;}
+div.hint { margin-bottom:10px;}
+input.long {width:400px; }
+input.short { width:40px; }
+input.tiny { width: 25px; }
+input.date { width:70px; }
+fieldset { margin-bottom:20px; border:1px solid #999;}
+legend { padding: 0.4em 0.6em; border:1px solid #999; font-weight:bold; text-align:left; }
+
+
+
+
+
+
+
+/*
+pager
+*/
+div.pager {display:inline;}
+div.pager a {font-weight:bold; background-color:#DDD; padding:0 3px 0px 4px; border:1px #CCC solid;}
+div.pager .current {color:#fff; font-weight:bold; background-color:#777; padding:0 4px 0px 4px; border:1px #CCC solid;}
+
+
+
+
+
+
+
+/*
+round buttoning
+*/
+.rndbtn { padding:0 4px 0 4px; margin-right:1px; border:1px #CCC solid; background-color:#EEE; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+table.highlight tr:hover .rndbtn, table tr.alt .rndbtn { background-color: #fff; }
+table.highlight tr:hover .rndbtn:hover { background-color: #DDD; }
+table.highlight tr:hover td.static { background-color: #FFF; }
+
+
+
+
+
+
+
+/*
+site wide covers and images with dropshadows
+*/
+img.shadow {padding: 5px 5px 5px 5px; background: #FFF; border:1px solid #EEE; -moz-box-shadow: 3px 6px 8px -4px #777; -webkit-box-shadow: 3px 6px 8px -4px #777; box-shadow: 3px 6px 8px -4px #777; border-collapse:separate; }
+
+
+
+
+
+
+
+/*
+mainly one-off styles used on individual pages
+*/
+#forumtable a.title { font-size: 1.4em; }
+
+pre#nfo { font-family: "Courier New", "DejaVu Sans Mono", monospace; font-size: 12px; line-height: 13px; }
+
+div.resextra { padding-top:7px; color: #555; font-size: 0.9em; height:16px; }
+div.resextra a { color: #555; text-decoration:none; }
+div.resextra div.admin { float:right; }
+div.resextra div.btns {float:left; }
+
+div.movextra { padding-top:5px; color: #888; font-size: 0.9em; }
+div.movextra td {border:0; padding:0 0 10px 0}
+div.movextra tr.mlextra {display:none;}
+
+div.movcover { width:140px; }
+div.movcover img { margin-bottom:5px;}
+
+.mediainfo, .seriesinfo, .preinfo, .prehashinfo {cursor:pointer;}
+
+a.external { background: url('../images/newwindow.png') center right no-repeat !important; padding-right:13px !important;}
+
+ol.tracklist li { line-height: 140%; }
+
+div.tvseriesheading img {float:right; margin:10px 0 10px 10px; max-width:300px;}
+div.tvseriesheading p {text-align:left;}
+
+span.descfull {display:none;}
+a.descmore { display: inline; margin: 0px; margin-left:5px;}
+
+
+div.error { padding:20px; padding-left:50px; border:1px solid #BBB; background: #FED0D0 url(../images/icons/warning.png) no-repeat top; background-position: 5px 50%; font-size:1.2em; font-weight:bold; margin-bottom:10px;}
+div.comments { padding-top:20px; }
+
+.invitesuccess {display:none; font-weight:bold; padding-left:10px; color:green;}
+.invitefailed {display:none; font-weight:bold; padding-left:10px; color:red;}
+
+div.nosearchresults {margin-left:25px; padding-top:50px;}
+div.nosearchresults ul { line-height: 150%;}
+
+span.warning { color: red; }
+
+
+/*! Newznab tooltip style */
+.ui-tooltip-newznab .ui-tooltip-titlebar,
+.ui-tooltip-newznab .ui-tooltip-content{
+ border-color: #90D93F;
+ color: #3F6219;
+}
+
+ .ui-tooltip-newznab .ui-tooltip-content{
+ background-color: #CAED9E;
+ }
+
+ .ui-tooltip-newznab .ui-tooltip-titlebar{
+ background-color: #B0DE78;
+ color:white;
+ font-size:1.2em;
+ }
+
+ .ui-tooltip-newznab .ui-state-default .ui-tooltip-icon{
+ background-position: -42px 0;
+ }
+
+table.ui-tooltip-newznab th {vertical-align:top;text-align:right;}
+ul.ui-tooltip-newznab li {text-align:left;}
+
+.rarfilelist {cursor:pointer;}
+/*.tooltiphead {background-color:#A9DB66; padding:5px;color:white; font-weight:bold; margin:-5px -10px 5px -10px;}*/
+.ui-tooltip ul {padding:0; margin:0;line-height: 160%;}
+.ui-tooltip li {list-style-type:none;}
+
+.tabs { padding: 0; list-style: none; }
+.tabs li { float: left; border: 1px solid #AAA; margin-bottom: -1px; margin-right: 5px; overflow: hidden; background: #F4F4F4; }
+.tabs li a { padding: 0 10px 0 10px; }
+.tabs li.active { background: #DDD; border-bottom: 1px solid #EEE; }
+
+
+/*
+movie, console and music modals with backdrop images.
+*/
+#movieinfo { background-position: center center; background-repeat: no-repeat; position: absolute; z-index: 2;}
+#movieinfo h1 { font-size: 32px; padding: 10px 10px 0px 20px; color: #fff; text-shadow: 0px 0px 4px #000; }
+#movieinfo h2, #movieinfo h3 { padding: 10px 20px 0px 20px; color: #fff; text-shadow: 0px 0px 4px #000; }
+#movieinfo a { color: #fff; }
+#movieinfo img.cover { margin-right: 20px; -webkit-box-shadow: 0px 0px 4px #000; -moz-box-shadow: 0px 0px 4px #000; box-shadow: 0px 0px 4px #000; border-collapse:separate;}
+#backdrop { position: absolute; width: 810px; height: 455px; left: -1px; top: 5px; background-color: #000; overflow: hidden;}
+#backdrop img { opacity:0.5; width: 100%; height: 100%;}
+
+#musicinfo { color:#FFF; min-height:435px; background-color:#7F7F7F; background-image:url('../../covers/music/backdrop.jpg'); background-repeat: repeat-x;}
+#musicinfo h1 { font-size: 32px; padding: 10px 10px 0px 20px; color: #fff; }
+#musicinfo h2, #musicinfo h3, #musicinfo p { padding: 10px 20px 0px 20px; color: #fff;}
+#musicinfo a { color: #fff; }
+#musicinfo img.cover { float:right; margin:20px 20px 0 20px; padding: 5px 5px 5px 5px; background: #FFF; border:1px solid #EEE; -moz-box-shadow: 3px 6px 8px -4px #333; -webkit-box-shadow: 3px 6px 8px -4px #333; box-shadow: 3px 6px 8px -4px #333; border-collapse:separate; }
+#musicinfo p {text-align: left; line-height: 180%;}
+
+#moviefull .pic { margin-left: 20px; float: right; }
+#moviefull {padding-bottom:20px;}
+#moviepreviews {text-align: center;}
+#moviepreviews img {max-width:600px;}
+#moviepreviews .previewtitle {margin-bottom: 20px;}
+
+
+
+/*
+icons and multioperation buttons
+*/
+input.nzb_check_all { margin-left:5px; }
+#nzb_multi_operations_form { clear: both; }
+div.nzb_multi_operations { color:#888; display:inline; float:right; text-align: right; clear: both; }
+div.nzb_multi_operations input { color:#888; background-color:#fff; border:1px solid #ddd; }
+div.nzb_multi_operations input:hover { color:#000; border:1px solid #000; cursor:pointer; }
+
+div.icon { width:16px; height:16px; background-repeat:no-repeat; cursor:pointer; position:relative; float:left; margin:2px; }
+table.data td.icons div.icon { opacity:.20; }
+div.icon_cart { background-image:url('../images/icons/cartup.png'); }
+div.icon_cart_clicked { background-image:url('../images/icons/cartdown.png'); }
+div.icon_nzb { background-image:url('../images/icons/nzbup.png'); }
+div.icon_nzb_clicked { background-image:url('../images/icons/nzbdown.png'); }
+div.icon_nzb a { text-decoration:none; padding-bottom:2px; padding-right:12px; }
+div.icon_sab { background-image:url('../images/icons/sabup.png'); }
+div.icon_sab_clicked { background-image:url('../images/icons/sabdown.png'); }
+div.icon_tvrage { background-image:url('../images/icons/tvrage.png'); }
+div.icon_check { background-image:url('../images/icons/check.png'); }
+div.icon_nzbvortex { background-image: url('../images/icons/vortex/bigsmile.png'); }
+div.icon_nzbvortex_clicked { background-image: url('../images/icons/vortex/bigsmiledown.png'); }
+
+
+
+
+
+
+/*
+ ColorBox Core Style
+ The following rules are the styles that are consistant between themes.
+ Avoid changing this area to maintain compatability with future versions of ColorBox.
+*/
+#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxOverlay{position:fixed; width:100%; height:100%;}
+#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
+#cboxContent{position:relative; overflow:visible;}
+#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0;}
+#cboxTitle{margin:0;}
+#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
+#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
+
+#cboxOverlay{background:#fff;}
+
+#colorbox{}
+ #cboxTopLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) 0 0 no-repeat;}
+ #cboxTopCenter{height:25px; background:url(../images/colorbox/border1.png) 0 -50px repeat-x;}
+ #cboxTopRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) -25px 0 no-repeat;}
+ #cboxBottomLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) 0 -25px no-repeat;}
+ #cboxBottomCenter{height:25px; background:url(../images/colorbox/border1.png) 0 -75px repeat-x;}
+ #cboxBottomRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) -25px -25px no-repeat;}
+ #cboxMiddleLeft{width:25px; background:url(../images/colorbox/border2.png) 0 0 repeat-y;}
+ #cboxMiddleRight{width:25px; background:url(../images/colorbox/border2.png) -25px 0 repeat-y;}
+ #cboxContent{background:#fff;}
+ #cboxLoadedContent{background:#fff; margin-top:32px; padding:1px; }
+ #cboxLoadingOverlay{background:#fff;}
+ #cboxTitle{position:absolute; font-size:125%; top:-2px; left:0; color:#000; }
+ #cboxCurrent{position:absolute; top:-1px; right:205px; text-indent:-9999px;}
+ #cboxSlideshow, #cboxPrevious, #cboxNext, #cboxClose{text-indent:-9999px; width:20px; height:20px; position:absolute; top:-1px; background:url(../images/colorbox/controls.png) 0 0 no-repeat;}
+ #cboxPrevious{background-position:0px 0px; right:44px;}
+ #cboxPrevious.hover{background-position:0px -25px;}
+ #cboxNext{background-position:-25px 0px; right:22px;}
+ #cboxNext.hover{background-position:-25px -25px;}
+ #cboxClose{background-position:-50px 0px; right:0;}
+ #cboxClose.hover{background-position:-50px -25px;}
+ .cboxSlideshow_on #cboxPrevious, .cboxSlideshow_off #cboxPrevious{right:66px;}
+ .cboxSlideshow_on #cboxSlideshow{background-position:-75px -25px; right:44px;}
+ .cboxSlideshow_on #cboxSlideshow.hover{background-position:-100px -25px;}
+ .cboxSlideshow_off #cboxSlideshow{background-position:-100px 0px; right:44px;}
+ .cboxSlideshow_off #cboxSlideshow.hover{background-position:-75px -25px;}
+
+/*
+ The following fixes png-transparency for IE6.
+*/
+.cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
+.cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
+.cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderTopRight.png, sizingMethod='scale');}
+.cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
+.cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
+.cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
+.cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
+.cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/colorbox/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
+
+/*
+ Use colorbox example 2 css for movieinfo popups
+*/
+.cboxMovie{}
+ .cboxMovie #cboxContent{margin-top:32px; background: transparent;}
+ .cboxMovie #cboxTopLeft{display:none;}
+ .cboxMovie #cboxTopCenter{display:none;}
+ .cboxMovie #cboxTopRight{display:none;}
+ .cboxMovie #cboxBottomLeft{display:none;}
+ .cboxMovie #cboxBottomCenter{display:none;}
+ .cboxMovie #cboxBottomRight{display:none;}
+ .cboxMovie #cboxMiddleLeft{display:none;}
+ .cboxMovie #cboxMiddleRight{display:none;}
+ .cboxMovie #cboxLoadedContent{margin-top: 5px; background:#888; padding:1px;}
+ .cboxMovie #cboxLoadingGraphic{background:url(../images/loading.gif) center center no-repeat;}
+ .cboxMovie #cboxLoadingOverlay{background:#000;}
+ .cboxMovie #cboxTitle{position:absolute; top:-22px; left:0; color:#000;}
+ .cboxMovie #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
+ .cboxMovie #cboxSlideshow, .cboxMovie #cboxPrevious, .cboxMovie #cboxNext, .cboxMovie #cboxClose{text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(../images/colorbox/controls2.png) 0 0 no-repeat;}
+ .cboxMovie #cboxPrevious{background-position:0px 0px; right:44px;}
+ .cboxMovie #cboxPrevious.hover{background-position:0px -25px;}
+ .cboxMovie #cboxNext{background-position:-25px 0px; right:22px;}
+ .cboxMovie #cboxNext.hover{background-position:-25px -25px;}
+ .cboxMovie #cboxClose{background-position:-50px 0px; right:0;}
+ .cboxMovie #cboxClose.hover{background-position:-50px -25px;}
+ .cboxMovie .cboxSlideshow_on #cboxPrevious, .cboxMovie .cboxSlideshow_off #cboxPrevious{right:66px;}
+ .cboxMovie .cboxSlideshow_on #cboxSlideshow{background-position:-75px -25px; right:44px;}
+ .cboxMovie .cboxSlideshow_on #cboxSlideshow.hover{background-position:-100px -25px;}
+ .cboxMovie .cboxSlideshow_off #cboxSlideshow{background-position:-100px 0px; right:44px;}
+ .cboxMovie .cboxSlideshow_off #cboxSlideshow.hover{background-position:-75px -25px;}
+
+
diff --git a/test/copy_this/www/templates/default/views/frontend/browse.tpl b/test/copy_this/www/templates/default/views/frontend/browse.tpl
index 65ab3f0b2..2637953da 100644
--- a/test/copy_this/www/templates/default/views/frontend/browse.tpl
+++ b/test/copy_this/www/templates/default/views/frontend/browse.tpl
@@ -61,6 +61,7 @@
{strip}
{if $result.nfoID > 0}
Nfo{/if}
{if $result.preID > 0 && $userdata.canpre == 1}
Pre'd {$result.ctime|timeago}{/if}
+ {if $result.preID > 0}
Prehash{/if}
{if $result.movieinfoID > 0}
Movie{/if}
{if $result.haspreview == 1 && $userdata.canpreview == 1}
Preview{/if}
{if $result.jpgstatus == 1 && $userdata.canpreview == 1}
Sample{/if}