Fixed the new releases posterwall, was missing a call to posterwall.css. Changed the nntmux template a bit, added icons for imdb, couchpotato and imdb.

This commit is contained in:
Darko
2014-11-10 15:01:49 +01:00
parent 13d4a18578
commit dfa38147ef
5 changed files with 132 additions and 47 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
require_once(WWW_DIR."/lib/book.php");
require_once(WWW_DIR."/lib/category.php");
$b = new Book;
if (!$users->isLoggedIn())
$page->show403();
$category = Category::CAT_BOOK_EBOOK;
$page->smarty->assign('category', $category);
$browsecount = $b->getBookCount();
$offset = (isset($_REQUEST["offset"]) && ctype_digit($_REQUEST['offset'])) ? $_REQUEST["offset"] : 0;
$ordering = $b->getBookOrdering();
$orderby = isset($_REQUEST["ob"]) && in_array($_REQUEST['ob'], $ordering) ? $_REQUEST["ob"] : '';
$results = $b->getBookRange($offset, ITEMS_PER_COVER_PAGE, $orderby);
$title = (isset($_REQUEST['title']) && !empty($_REQUEST['title'])) ? stripslashes($_REQUEST['title']) : '';
$page->smarty->assign('title', $title);
$author = (isset($_REQUEST['author']) && !empty($_REQUEST['author'])) ? stripslashes($_REQUEST['author']) : '';
$page->smarty->assign('author', $author);
$browseby_link = '?title='.$title.'&amp;author='.$author;
$page->smarty->assign('pagertotalitems',$browsecount);
$page->smarty->assign('pageroffset',$offset);
$page->smarty->assign('pageritemsperpage',ITEMS_PER_COVER_PAGE);
$page->smarty->assign('pagerquerybase', WWW_TOP."/books".$browseby_link."&amp;ob=".$orderby."&amp;offset=");
$page->smarty->assign('pagerquerysuffix', "#results");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
foreach($ordering as $ordertype)
$page->smarty->assign('orderby'.$ordertype, WWW_TOP."/books".$browseby_link."&amp;ob=".$ordertype."&amp;offset=0");
$page->smarty->assign('results',$results);
$page->meta_title = "Browse Books";
$page->meta_keywords = "browse,nzb,ebooks,books,e-books";
$page->meta_description = "Browse for Books";
$page->content = $page->smarty->fetch('books.tpl');
$page->render();
+6
View File
@@ -19,6 +19,12 @@ $category = (isset($_GET["imdb"]) ? -1 : Category::CAT_PARENT_MOVIE);
if (isset($_REQUEST["t"]) && array_key_exists($_REQUEST['t'], $mtmp))
$category = $_REQUEST["t"] + 0;
$user = $users->getById($users->currentUserId());
$cpapi = $user['cp_api'];
$cpurl = $user['cp_url'];
$page->smarty->assign('cpapi', $cpapi);
$page->smarty->assign('cpurl', $cpurl);
$catarray = array();
if ($category != -1) $catarray[] = $category;
@@ -8,32 +8,48 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="keywords" content="{$page->meta_keywords}{if $page->meta_keywords != "" && $site->metakeywords != ""},{/if}{$site->metakeywords}" />
<meta name="description" content="{$page->meta_description}{if $page->meta_description != "" && $site->metadescription != ""} - {/if}{$site->metadescription}" />
<meta name="description" content="{$page->meta_description}{if $page->meta_description != "" && $site->metadescription != ""} - {/if}{$site->metadescription}" />
<meta name="application-name" content="newznab-{$site->version}" />
<title>{$page->meta_title}{if $page->meta_title != "" && $site->metatitle != ""} - {/if}{$site->metatitle}</title>
{if $loggedin=="true"} <link rel="alternate" type="application/rss+xml" title="{$site->title} Full Rss Feed" href="{$smarty.const.WWW_TOP}/rss?t=0&amp;dl=1&amp;i={$userdata.ID}&amp;r={$userdata.rsstoken}" />{/if}
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css" rel="stylesheet" media="screen">
<link href="{$smarty.const.WWW_TOP}/templates/nntmux/styles/posterwall.css" rel="stylesheet" type="text/css" media="screen" />
<link href="{$smarty.const.WWW_TOP}/templates/nntmux/styles/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="{$smarty.const.WWW_TOP}/templates/nntmux/styles/jquery.qtip.css" rel="stylesheet" type="text/css" media="screen" />
{if $site->google_adsense_acc != ''} <link href="http://www.google.com/cse/api/branding.css" rel="stylesheet" type="text/css" media="screen" />
{/if}
<!-- Manual Adjustment for Search input fields on browse pages. -->
<style>
select { min-width: 120px ; width: auto; }
input { width: 180px; }
</style>
<link rel="shortcut icon" type="image/ico" href="{$smarty.const.WWW_TOP}/templates/nntmux/images/favicon.ico"/>
<link rel="search" type="application/opensearchdescription+xml" href="{$smarty.const.WWW_TOP}/opensearch" title="{$site->title|escape}" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
{literal}<script>window.jQuery || document.write('<script src="{/literal}{$smarty.const.WWW_TOP}{literal}/templates/nntmux/scripts/jquery-1.9.1.js"><\/script>')</script>{/literal}
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
{literal}<script>window.jQuery || document.write('<script src="{/literal}{$smarty.const.WWW_TOP}{literal}/templates/nntmux/scripts/bootstrap.min.js"><\/script>')</script>{/literal}
<script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/jquery.autosize-min.js"></script>
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/jquery.autosize-min.js"></script>
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/jquery.qtip2.js"></script>
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/utils.js"></script>
<script type="text/javascript" src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/sorttable.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script>window.html5 || document.write('<script src="{$smarty.const.WWW_TOP}/templates/nntmux/scripts/html5shiv.js"><\/script>')</script>
<![endif]-->
<script type="text/javascript">
/* <![CDATA[ */
/* <![CDATA[ */
var WWW_TOP = "{$smarty.const.WWW_TOP}";
var SERVERROOT = "{$serverroot}";
var UID = "{if $loggedin=="true"}{$userdata.ID}{else}{/if}";
var RSSTOKEN = "{if $loggedin=="true"}{$userdata.rsstoken}{else}{/if}";
/* ]]> */
/* ]]> */
</script>
{$page->head}
</head>
@@ -55,21 +71,21 @@
<h1><a href="{$smarty.const.WWW_TOP}{$site->home_link}">{$site->title}</a></h1>
<p><em>{$site->strapline}</em></p>
{$site->adheader}
{$site->adheader}
</div>
<hr />
<div id="header">
<div id="menu">
<div id="menu">
{if $loggedin=="true"}
{$header_menu}
{/if}
</div>
</div>
</div>
<div id="page">
<div id="content">
@@ -77,20 +93,20 @@
</div>
<div id="sidebar">
<ul>
<ul>
{$main_menu}
{$article_menu}
{$useful_menu}
{$recentposts_menu}
{if $site->google_adsense_acc != '' && $site->google_adsense_search != ''}
{literal}
<li>
<h2>Search for {/literal}{$site->term_plural}{literal}</h2>
<h2>Search for {/literal}{$site->term_plural}{literal}</h2>
<div style="padding-left:20px;">
<div class="cse-branding-bottom" style="background-color:#FFFFFF;color:#000000">
<div class="cse-branding-form">
@@ -111,10 +127,10 @@
</div>
</div>
</div>
</li>
</li>
{/literal}
{/if}
<li>
<a title="Sickbeard - The ultimate usenet PVR" href="http://www.sickbeard.com/"><img class="menupic" alt="Sickbeard - The ultimate usenet PVR" src="{$smarty.const.WWW_TOP}/templates/nntmux/images/sickbeard.png" /></a>
</li>
@@ -129,13 +145,13 @@
</li>
</ul>
</div>
<div style="clear: both;text-align:right;">
<a class="w3validator" href="http://validator.w3.org/check?uri=referer">
<img src="{$smarty.const.WWW_TOP}/templates/nntmux/images/valid-xhtml10.png" alt="Valid XHTML 1.0 Transitional" height="31" width="88" />
</a>
</a>
</div>
</div>
<div class="footer">
@@ -147,7 +163,7 @@
{if $site->google_analytics_acc != ''}
{literal}
<script type="text/javascript">
/* <![CDATA[ */
/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{/literal}{$site->google_analytics_acc}{literal}']);
_gaq.push(['_trackPageview']);
@@ -158,7 +174,7 @@
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
/* ]]> */
/* ]]> */
</script>
{/literal}
@@ -168,6 +184,6 @@
<input type="hidden" name="UID" value="{$userdata.ID}" />
<input type="hidden" name="RSSTOKEN" value="{$userdata.rsstoken}" />
{/if}
</body>
</html>
@@ -93,41 +93,52 @@
<tr class="{cycle values=",alt"}">
<td class="mid">
<div class="movcover">
<a target="_blank" href="{$site->dereferrer_link}http://www.imdb.com/title/tt{$result.imdbID}/"
name="name{$result.imdbID}" title="View movie info" class="modal_imdb" rel="movie">
<img class="shadow"
src="{$smarty.const.WWW_TOP}/covers/movies/{if $result.cover == 1}{$result.imdbID}-cover.jpg{else}no-cover.jpg{/if}"
width="120" border="0" alt="{$result.title|escape:"htmlall"}"/>
</a>
<a
target="_blank"
href="{$smarty.const.WWW_TOP}/movies/?imdb={$result.imdbID}"
name="name{$result.imdbID}"
title="View movie info"
class="modal_imdb thumbnail" rel="movie"
><img
class="shadow" style="margin: 3px 0;"
src="{$smarty.const.WWW_TOP}/covers/movies/{if $result.cover == 1}{$result.imdbID}-cover.jpg{else}no-cover.jpg{/if}"
width="120" border="0" alt="{$result.title|escape:"htmlall"}"
></a>
<div class="movextra">
<a href="#" name="name{$result.imdbID}" title="View movie info" class="rndbtn modal_imdb"
rel="movie">Cover</a>
{if $result.trailer != ""}<a href="#" name="name{$result.imdbID}" title="View movie trailer" class="rndbtn modal_imdbtrailer" rel="trailer">Trailer</a>{/if}
<a class="rndbtn badge badge-trakt" target="_blank"
href="{$site->dereferrer_link}http://trakt.tv/search/imdb?q=tt{$result.imdbID}/"
name="trakt{$result.imdbID}" title="View trakt page">Trakt</a>
<a class="rndbtn" target="_blank"
href="{$site->dereferrer_link}http://www.imdb.com/title/tt{$result.imdbID}/"
name="imdb{$result.imdbID}" title="View imdb page">Imdb</a>
<a
target="_blank"
href="{$site->dereferrer_link}http://trakt.tv/search/imdb?q=tt{$result.imdbid}/"
name="trakt{$result.imdbid}"
title="View trakt page"
><img src="{$smarty.const.WWW_TOP}/templates/nntmux/images/icons/trakt.png"></a>
{if $cpurl != '' && $cpapi != ''}
<a
class="rndbtn sendtocouch" target="blackhole"
class="sendtocouch"
target="blackhole"
href="javascript:;"
rel="{$cpurl}/api/{$cpapi}/movie.add/?identifier=tt{$result.imdbID}&title={$result.title}"
name="CP{$result.imdbID}" title="Add to CouchPotato">
Couch
</a>
name="CP{$result.imdbID}"
title="Add to CouchPotato"
><img src="{$smarty.const.WWW_TOP}/templates/nntmux/images/icons/couch.png"></a>
{/if}
<a
target="_blank"
href="{$site->dereferrer_link}http://www.imdb.com/title/tt{$result.imdbID}/"
name="imdb{$result.imdbID}"
title="View imdb page"><img src="{$smarty.const.WWW_TOP}/templates/nntmux/images/icons/imdb.png"></a>
</div>
</div>
</td>
<td colspan="3" class="left">
<h2><a title="View Movie"
href="{$smarty.const.WWW_TOP}/movies/?imdb={$result.imdbID}">{$result.title|escape:"htmlall"}</a>
<h2><a title="{$result.title|stripslashes|escape:"htmlall"}"
href="{$smarty.const.WWW_TOP}/movies/?imdb={$result.imdbid}">{$result.title|stripslashes|escape:"htmlall"}</a>
(<a class="title" title="{$result.year}"
href="{$smarty.const.WWW_TOP}/movies?year={$result.year}">{$result.year}</a>) {if $result.rating != ''}{$result.rating}/10{/if}
</h2>
{foreach from=$result.languages item=movielanguage}
{release_flag($movielanguage, browse)}
{/foreach}</h2>
{if $result.tagline != ''}<b>{$result.tagline}</b><br/>{/if}
{if $result.plot != ''}{$result.plot}<br/><br/>{/if}
{if $result.genre != ''}<b>Genre:</b>{$result.genre}<br/>{/if}
@@ -122,6 +122,10 @@
name="CP{$release.imdbID}" title="Add to CouchPotato">
CouchPotato
</a>
<br><strong>Subtitle Search:</strong>
<br><a target="_blank" href="http://www.opensubtitles.org/search/sublanguageid-all/moviename-{$movie.title|replace:" ":"+"}"title="Opensubtitles">OpenSubtitles</a> <a target="_blank" href="http://www.subtitleseeker.com/search/MOVIE_TITLES/{$movie.title}"title="SubtitleSeeker">SubtitleSeeker</a>
<span class="label label-default">
</div>
</td>
</tr>