Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 139d58a5 authored by runemaster's avatar runemaster

Added a do_extra thinger for the Nightshade theme instead of checking

for the theme name.
parent 41b375bc
......@@ -15,6 +15,7 @@ var do_topnav = true;
var do_leftnav = true;
var do_rightnav = true;
var do_footer = true;
var do_extra = false;
/* Read in current users selected theme if it exists */
if(file_exists(prefs_dir +format("%04d.html_prefs",user.number))) {
......@@ -33,6 +34,7 @@ do_topnav = Themes[CurrTheme].do_topnav;
do_leftnav = Themes[CurrTheme].do_leftnav;
do_rightnav = Themes[CurrTheme].do_rightnav;
do_footer = Themes[CurrTheme].do_footer;
do_extra = Themes[CurrTheme].do_extra;
template.image_dir = Themes[CurrTheme].image_dir;
if(http_request.query.force_ssjs_theme != undefined) {
......
......@@ -23,7 +23,7 @@
template.leftnav=new Array;
if(CurrTheme=="NightShade") {
if(do_extra) {
if(user.number==0 || user.security.restrictions&UFLAG_G)
template.leftnav.push({html: '<li><a href="/login.ssjs">Login</a></li><li><a href="/newuser.ssjs">New User</a></li>' });
......
......@@ -55,7 +55,7 @@ if(this.web_root_dir!=undefined && file_exists(web_root_dir + template.image_dir
/* System Stats */
if(CurrTheme=="NightShade") {
if(do_extra) {
total=time()-system.uptime;
days = Math.floor(total/(24*60*60));
......
......@@ -12,7 +12,7 @@ template.author_avatar = '';
/* file corresponding to the page you want to overide the */
/* default display type for the theme */
if(CurrTheme=="NightShade") {
if(do_extra) {
do_leftnav=false;
do_rightnav=false;
}
......
......@@ -16,6 +16,7 @@ Themes["Default"].do_topnav=true;
Themes["Default"].do_leftnav=true;
Themes["Default"].do_rightnav=false;
Themes["Default"].do_footer=true;
Themes["Default"].do_extra=false;
Themes["NightShade"]=new Object;
Themes["NightShade"].desc="NightShade";
......@@ -27,3 +28,5 @@ Themes["NightShade"].do_topnav=true;
Themes["NightShade"].do_leftnav=true;
Themes["NightShade"].do_rightnav=true;
Themes["NightShade"].do_footer=true;
Themes["NightShade"].do_extra=true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment