Browse Source

Closes #83 now use Mods for Hesk instead of NuMods

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
64f6be511c
  1. 56
      admin/admin_settings.php
  2. 46
      admin/admin_settings_save.php
  3. 24
      css/hesk_newStyle.php
  4. 24
      css/hesk_newStyleRTL.php
  5. 10
      inc/header.inc.php
  6. 10
      inc/headerAdmin.inc.php
  7. 4
      install/index.php
  8. 2
      install/install_functions.inc.php
  9. 11
      install/updateModsForHesk.php
  10. 18
      language/en/text.php
  11. 4
      maintenance.php
  12. 26
      modsForHesk_settings.inc.php
  13. 26
      nuMods_settings.inc.php
  14. 4
      print.php

56
admin/admin_settings.php

@ -42,7 +42,7 @@ if (is_dir(HESK_PATH . 'install')) {die('Please delete the <b>install</b> folder
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
// Save the default language for the settings page before choosing user's preferred one
$hesk_settings['language_default'] = $hesk_settings['language'];
@ -142,10 +142,10 @@ if ( defined('HESK_DEMO') )
</td></tr>
<tr>
<td class="text-right">
<?php echo $hesklang['nuModsVersion']; ?>:
<?php echo $hesklang['mods_for_hesk_version']; ?>:
</td>
<td style="padding-left: 10px">
<?php echo $nuMods_settings['version']; ?>
<?php echo $modsForHesk_settings['version']; ?>
</td>
</tr>
<tr><td class="text-right">
@ -472,11 +472,11 @@ if ( defined('HESK_DEMO') )
<li><a href="#email" data-toggle="tab"><?php echo $hesklang['tab_6']; ?></a></li>
<li><a href="#misc" data-toggle="tab"><?php echo $hesklang['tab_5']; ?></a></li>
<li class="dropdown">
<a href="#" id="nuModsDropdown" class="dropdown-toggle" data-toggle="dropdown">
<?php echo $hesklang['numods']; ?><span class="caret"></span>
<a href="#" id="modsForHeskDropdown" class="dropdown-toggle" data-toggle="dropdown">
<?php echo $hesklang['mods_for_hesk']; ?><span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="nuModsDropdown">
<li><a href="#numods-general" data-toggle="tab"><?php echo $hesklang['tab_1']; ?></a></li>
<ul class="dropdown-menu" role="menu" aria-labelledby="modsForHeskDropdown">
<li><a href="#mods-for-hesk-general" data-toggle="tab"><?php echo $hesklang['tab_1']; ?></a></li>
<li><a href="#statuses" data-toggle="tab"><?php echo $hesklang['statuses']; ?></a></li>
<li><a href="#colors" data-toggle="tab"><?php echo $hesklang['uiColors']; ?></a></li>
<li><a href="#ipEmailBans" data-toggle="tab"><?php echo $hesklang['ip_email_bans']; ?></a></li>
@ -1783,8 +1783,8 @@ if ( defined('HESK_DEMO') )
</div>
</div>
</div>
<!-- NuMods: General Settings -->
<div class="tab-pane fade in" id="numods-general">
<!-- Mods For Hesk: General Settings -->
<div class="tab-pane fade in" id="mods-for-hesk-general">
<h6 style="font-weight: bold"><?php echo $hesklang['gs']; ?></h6>
<div class="footerWithBorder blankSpace"></div>
<div class="form-group">
@ -1797,7 +1797,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="rtl" name="rtl" type="checkbox" <?php if ($nuMods_settings['rtl']) {echo 'checked' ;} ?>> <?php echo $hesklang['display_rtl']; ?>
<input id="rtl" name="rtl" type="checkbox" <?php if ($modsForHesk_settings['rtl']) {echo 'checked' ;} ?>> <?php echo $hesklang['display_rtl']; ?>
</label>
</div>
</div>
@ -1812,7 +1812,7 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="show-icons" name="show-icons" type="checkbox" <?php if ($nuMods_settings['show_icons']) {echo 'checked';} ?>> <?php echo $hesklang['show_icons_navigation']; ?>
<input id="show-icons" name="show-icons" type="checkbox" <?php if ($modsForHesk_settings['show_icons']) {echo 'checked';} ?>> <?php echo $hesklang['show_icons_navigation']; ?>
</label>
</div>
</div>
@ -1826,13 +1826,13 @@ if ( defined('HESK_DEMO') )
<div class="col-sm-8 col-xs-12">
<div class="checkbox">
<label>
<input id="maintenance-mode" name="maintenance-mode" type="checkbox" <?php if ($nuMods_settings['maintenance_mode']) {echo 'checked';} ?>> <?php echo $hesklang['enable_maintenance']; ?>
<input id="maintenance-mode" name="maintenance-mode" type="checkbox" <?php if ($modsForHesk_settings['maintenance_mode']) {echo 'checked';} ?>> <?php echo $hesklang['enable_maintenance']; ?>
</label>
</div>
</div>
</div>
</div>
<!-- NuMods: Statuses -->
<!-- Mods For Hesk: Statuses -->
<div class="tab-pane fade in" id="statuses">
<h6 style="font-weight: bold"><?php echo $hesklang['basicProperties']; ?></h6>
<div class="footerWithBorder blankSpace"></div>
@ -2007,7 +2007,7 @@ if ( defined('HESK_DEMO') )
</div>
</div>
</div>
<!-- NuMods: Color settings -->
<!-- Mods For Hesk: Color settings -->
<div class="tab-pane fade in" id="colors">
<h6 style="font-weight: bold"><?php echo $hesklang['uiColors']; ?></h6>
<div class="footerWithBorder blankSpace"></div>
@ -2020,7 +2020,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarBackgroundColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarBackgroundColor" name="navbarBackgroundColor" class="form-control" value="<?php echo $nuMods_settings['navbarBackgroundColor']; ?>">
<input type="text" id="navbarBackgroundColor" name="navbarBackgroundColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarBackgroundColor']; ?>">
</div>
</div>
</div>
@ -2032,7 +2032,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarBrandColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarBrandColor" name="navbarBrandColor" class="form-control" value="<?php echo $nuMods_settings['navbarBrandColor']; ?>">
<input type="text" id="navbarBrandColor" name="navbarBrandColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarBrandColor']; ?>">
</div>
</div>
</div>
@ -2046,7 +2046,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarBrandHoverColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarBrandHoverColor" name="navbarBrandHoverColor" class="form-control" value="<?php echo $nuMods_settings['navbarBrandHoverColor']; ?>">
<input type="text" id="navbarBrandHoverColor" name="navbarBrandHoverColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarBrandHoverColor']; ?>">
</div>
</div>
</div>
@ -2058,7 +2058,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemTextColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemTextColor" name="navbarItemTextColor" class="form-control" value="<?php echo $nuMods_settings['navbarItemTextColor']; ?>">
<input type="text" id="navbarItemTextColor" name="navbarItemTextColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemTextColor']; ?>">
</div>
</div>
</div>
@ -2072,7 +2072,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemTextHoverColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemTextHoverColor" name="navbarItemTextHoverColor" class="form-control" value="<?php echo $nuMods_settings['navbarItemTextHoverColor']; ?>">
<input type="text" id="navbarItemTextHoverColor" name="navbarItemTextHoverColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemTextHoverColor']; ?>">
</div>
</div>
</div>
@ -2084,7 +2084,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemTextSelectedColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemTextSelectedColor" name="navbarItemTextSelectedColor" class="form-control" value="<?php echo $nuMods_settings['navbarItemTextSelectedColor']; ?>">
<input type="text" id="navbarItemTextSelectedColor" name="navbarItemTextSelectedColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemTextSelectedColor']; ?>">
</div>
</div>
</div>
@ -2098,7 +2098,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['navbarItemSelectedBackgroundColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="navbarItemSelectedBackgroundColor" name="navbarItemSelectedBackgroundColor" class="form-control" value="<?php echo $nuMods_settings['navbarItemSelectedBackgroundColor']; ?>">
<input type="text" id="navbarItemSelectedBackgroundColor" name="navbarItemSelectedBackgroundColor" class="form-control" value="<?php echo $modsForHesk_settings['navbarItemSelectedBackgroundColor']; ?>">
</div>
</div>
</div>
@ -2110,7 +2110,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['dropdownItemTextColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="dropdownItemTextColor" name="dropdownItemTextColor" class="form-control" value="<?php echo $nuMods_settings['dropdownItemTextColor']; ?>">
<input type="text" id="dropdownItemTextColor" name="dropdownItemTextColor" class="form-control" value="<?php echo $modsForHesk_settings['dropdownItemTextColor']; ?>">
</div>
</div>
</div>
@ -2124,7 +2124,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['dropdownItemTextHoverColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="dropdownItemTextHoverColor" name="dropdownItemTextHoverColor" class="form-control" value="<?php echo $nuMods_settings['dropdownItemTextHoverColor']; ?>">
<input type="text" id="dropdownItemTextHoverColor" name="dropdownItemTextHoverColor" class="form-control" value="<?php echo $modsForHesk_settings['dropdownItemTextHoverColor']; ?>">
</div>
</div>
</div>
@ -2136,7 +2136,7 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['questionMarkColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="questionMarkColor" name="questionMarkColor" class="form-control" value="<?php echo $nuMods_settings['questionMarkColor']; ?>">
<input type="text" id="questionMarkColor" name="questionMarkColor" class="form-control" value="<?php echo $modsForHesk_settings['questionMarkColor']; ?>">
</div>
</div>
</div>
@ -2150,13 +2150,13 @@ if ( defined('HESK_DEMO') )
data-content="<?php echo $hesklang['dropdownItemTextHoverBackgroundColorHelp']; ?>"></i>
</label>
<div class="col-sm-5 col-xs-12">
<input type="text" id="dropdownItemTextHoverBackgroundColor" name="dropdownItemTextHoverBackgroundColor" class="form-control" value="<?php echo $nuMods_settings['dropdownItemTextHoverBackgroundColor']; ?>">
<input type="text" id="dropdownItemTextHoverBackgroundColor" name="dropdownItemTextHoverBackgroundColor" class="form-control" value="<?php echo $modsForHesk_settings['dropdownItemTextHoverBackgroundColor']; ?>">
</div>
</div>
</div>
</div>
</div>
<!-- NuMods: IP/Email Bans -->
<!-- Mods For Hesk: IP/Email Bans -->
<div class="tab-pane fade in" id="ipEmailBans">
<h6 style="font-weight: bold"><?php echo $hesklang['ip_bans']; ?></h6>
<div class="footerWithBorder blankSpace"></div>
@ -2332,7 +2332,7 @@ function hesk_cacheLatestVersion($latest)
function hesk_testLanguage($return_options = 0)
{
global $hesk_settings, $hesklang, $nuMods_settings;
global $hesk_settings, $hesklang, $modsForHesk_settings;
/* Get a list of valid emails */
include_once(HESK_PATH . 'inc/email_functions.inc.php');
@ -2489,7 +2489,7 @@ function hesk_testLanguage($return_options = 0)
background:#fff;
color: black;
font : 68.8%/1.5 Verdana, Geneva, Arial, Helvetica, sans-serif;
text-align: <?php if ($nuMods_settings['rtl']) { echo 'right'; } else { echo 'left'; } ?>;
text-align: <?php if ($modsForHesk_settings['rtl']) { echo 'right'; } else { echo 'left'; } ?>;
}
p

46
admin/admin_settings_save.php

@ -37,7 +37,7 @@ define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/email_functions.inc.php');
@ -534,8 +534,8 @@ if (!empty($_POST['addEmail'])) {
$set['hesk_version'] = $hesk_settings['hesk_version'];
// Save the nuMods_settings.inc.php file
$set['nuMods_version'] = $nuMods_settings['version'];
// Save the modsForHesk_settings.inc.php file
$set['modsForHesk_version'] = $modsForHesk_settings['version'];
$set['rtl'] = empty($_POST['rtl']) ? 0 : 1;
$set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1;
$set['maintenance-mode'] = empty($_POST['maintenance-mode']) ? 0 : 1;
@ -550,37 +550,37 @@ $set['dropdownItemTextColor'] = hesk_input(hesk_POST('dropdownItemTextColor'));
$set['dropdownItemTextHoverColor'] = hesk_input(hesk_POST('dropdownItemTextHoverColor'));
$set['questionMarkColor'] = hesk_input(hesk_POST('questionMarkColor'));
$set['dropdownItemTextHoverBackgroundColor'] = hesk_input(hesk_POST('dropdownItemTextHoverBackgroundColor'));
$nuMods_file_content='<?php
//-- NuMods Theme Color Settings
$nuMods_settings[\'navbarBackgroundColor\'] = \''.$set['navbarBackgroundColor'].'\';
$nuMods_settings[\'navbarBrandColor\'] = \''.$set['navbarBrandColor'].'\';
$nuMods_settings[\'navbarBrandHoverColor\'] = \''.$set['navbarBrandHoverColor'].'\';
$nuMods_settings[\'navbarItemTextColor\'] = \''.$set['navbarItemTextColor'].'\';
$nuMods_settings[\'navbarItemTextHoverColor\'] = \''.$set['navbarItemTextHoverColor'].'\';
$nuMods_settings[\'navbarItemTextSelectedColor\'] = \''.$set['navbarItemTextSelectedColor'].'\';
$nuMods_settings[\'navbarItemSelectedBackgroundColor\'] = \''.$set['navbarItemSelectedBackgroundColor'].'\';
$nuMods_settings[\'dropdownItemTextColor\'] = \''.$set['dropdownItemTextColor'].'\';
$nuMods_settings[\'dropdownItemTextHoverColor\'] = \''.$set['dropdownItemTextHoverColor'].'\';
$nuMods_settings[\'dropdownItemTextHoverBackgroundColor\'] = \''.$set['dropdownItemTextHoverBackgroundColor'].'\';
$nuMods_settings[\'questionMarkColor\'] = \''.$set['questionMarkColor'].'\';
$modsForHesk_file_content='<?php
//-- Mods For Hesk Theme Color Settings
$modsForHesk_settings[\'navbarBackgroundColor\'] = \''.$set['navbarBackgroundColor'].'\';
$modsForHesk_settings[\'navbarBrandColor\'] = \''.$set['navbarBrandColor'].'\';
$modsForHesk_settings[\'navbarBrandHoverColor\'] = \''.$set['navbarBrandHoverColor'].'\';
$modsForHesk_settings[\'navbarItemTextColor\'] = \''.$set['navbarItemTextColor'].'\';
$modsForHesk_settings[\'navbarItemTextHoverColor\'] = \''.$set['navbarItemTextHoverColor'].'\';
$modsForHesk_settings[\'navbarItemTextSelectedColor\'] = \''.$set['navbarItemTextSelectedColor'].'\';
$modsForHesk_settings[\'navbarItemSelectedBackgroundColor\'] = \''.$set['navbarItemSelectedBackgroundColor'].'\';
$modsForHesk_settings[\'dropdownItemTextColor\'] = \''.$set['dropdownItemTextColor'].'\';
$modsForHesk_settings[\'dropdownItemTextHoverColor\'] = \''.$set['dropdownItemTextHoverColor'].'\';
$modsForHesk_settings[\'dropdownItemTextHoverBackgroundColor\'] = \''.$set['dropdownItemTextHoverBackgroundColor'].'\';
$modsForHesk_settings[\'questionMarkColor\'] = \''.$set['questionMarkColor'].'\';
//-- Set this to 1 for right-to-left text.
$nuMods_settings[\'rtl\'] = '.$set['rtl'].';
$modsForHesk_settings[\'rtl\'] = '.$set['rtl'].';
//-- Set this to 1 to show icons next to navigation menu items
$nuMods_settings[\'show_icons\'] = '.$set['show-icons'].';
$modsForHesk_settings[\'show_icons\'] = '.$set['show-icons'].';
//-- Set this to 1 to enable maintenance mode
$nuMods_settings[\'maintenance_mode\'] = '.$set['maintenance-mode'].';
$modsForHesk_settings[\'maintenance_mode\'] = '.$set['maintenance-mode'].';
/* DO NOT EDIT ANYTHING BELOW THIS LINE */
$nuMods_settings[\'version\']= \''.$set['nuMods_version'].'\';';
$modsForHesk_settings[\'version\']= \''.$set['modsForHesk_version'].'\';';
// Write the file
if ( ! file_put_contents(HESK_PATH . 'nuMods_settings.inc.php', $nuMods_file_content) )
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
{
hesk_error($hesklang['err_nuMods_settings']);
hesk_error($hesklang['err_modsForHesk_settings']);
}

24
css/hesk_newStyle.php

@ -1,21 +1,21 @@
<?php
header("Content-type: text/css; charset: UTF-8");
require_once('../nuMods_settings.inc.php');
require_once('../modsForHesk_settings.inc.php');
$navbarBackgroundColor = $nuMods_settings['navbarBackgroundColor'];
$navbarBrandColor = $nuMods_settings['navbarBrandColor'];
$navbarBrandHoverColor = $nuMods_settings['navbarBrandHoverColor'];
$navbarBackgroundColor = $modsForHesk_settings['navbarBackgroundColor'];
$navbarBrandColor = $modsForHesk_settings['navbarBrandColor'];
$navbarBrandHoverColor = $modsForHesk_settings['navbarBrandHoverColor'];
$navbarItemTextColor = $nuMods_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $nuMods_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $nuMods_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $nuMods_settings['navbarItemSelectedBackgroundColor'];
$navbarItemTextColor = $modsForHesk_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $modsForHesk_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $modsForHesk_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $modsForHesk_settings['navbarItemSelectedBackgroundColor'];
$dropdownItemTextColor = $nuMods_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $nuMods_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $nuMods_settings['dropdownItemTextHoverBackgroundColor'];
$dropdownItemTextColor = $modsForHesk_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $modsForHesk_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $modsForHesk_settings['dropdownItemTextHoverBackgroundColor'];
$questionMarkColor = $nuMods_settings['questionMarkColor'];
$questionMarkColor = $modsForHesk_settings['questionMarkColor'];
?>
.nu-rtlFloatLeft {

24
css/hesk_newStyleRTL.php

@ -1,21 +1,21 @@
<?php
header("Content-type: text/css; charset: UTF-8");
require_once('../nuMods_settings.inc.php');
require_once('../modsForHesk_settings.inc.php');
$navbarBackgroundColor = $nuMods_settings['navbarBackgroundColor'];
$navbarBrandColor = $nuMods_settings['navbarBrandColor'];
$navbarBrandHoverColor = $nuMods_settings['navbarBrandHoverColor'];
$navbarBackgroundColor = $modsForHesk_settings['navbarBackgroundColor'];
$navbarBrandColor = $modsForHesk_settings['navbarBrandColor'];
$navbarBrandHoverColor = $modsForHesk_settings['navbarBrandHoverColor'];
$navbarItemTextColor = $nuMods_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $nuMods_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $nuMods_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $nuMods_settings['navbarItemSelectedBackgroundColor'];
$navbarItemTextColor = $modsForHesk_settings['navbarItemTextColor'];
$navbarItemTextHoverColor = $modsForHesk_settings['navbarItemTextHoverColor'];
$navbarItemTextSelectedColor = $modsForHesk_settings['navbarItemTextSelectedColor'];
$navbarItemSelectedBackgroundColor = $modsForHesk_settings['navbarItemSelectedBackgroundColor'];
$dropdownItemTextColor = $nuMods_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $nuMods_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $nuMods_settings['dropdownItemTextHoverBackgroundColor'];
$dropdownItemTextColor = $modsForHesk_settings['dropdownItemTextColor'];
$dropdownItemTextHoverColor = $modsForHesk_settings['dropdownItemTextHoverColor'];
$dropdownItemTextHoverBackgroundColor = $modsForHesk_settings['dropdownItemTextHoverBackgroundColor'];
$questionMarkColor = $nuMods_settings['questionMarkColor'];
$questionMarkColor = $modsForHesk_settings['questionMarkColor'];
?>
.nu-rtlFloatLeft {

10
inc/header.inc.php

@ -34,9 +34,9 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
// Check to see if we're in maintenance mode before sending anything to the DOM
if ($nuMods_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE') && !defined('ON_LOGIN_PAGE')) {
if ($modsForHesk_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE') && !defined('ON_LOGIN_PAGE')) {
header('Location: '.HESK_PATH.'maintenance.php');
}
?>
@ -46,14 +46,14 @@ if ($nuMods_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE') && !
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<?php if ($nuMods_settings['rtl']) { ?>
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25RTL.css" type="text/css" rel="stylesheet" />
<?php } else { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25.css" type="text/css" rel="stylesheet" />
<?php } ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css" type="text/css" rel="stylesheet" />
<?php if ($nuMods_settings['rtl']) { ?>
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php" type="text/css" rel="stylesheet" />
<?php } else { ?>
@ -136,7 +136,7 @@ if ($nuMods_settings['maintenance_mode'] && !defined('ON_MAINTENANCE_PAGE') && !
<?php
include(HESK_PATH . 'header.txt');
$iconDisplay = 'style="display: none"';
if ($nuMods_settings['show_icons']) {
if ($modsForHesk_settings['show_icons']) {
$iconDisplay = '';
}
?>

10
inc/headerAdmin.inc.php

@ -34,7 +34,7 @@
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@ -42,14 +42,14 @@ require(HESK_PATH . 'nuMods_settings.inc.php');
<title><?php echo (isset($hesk_settings['tmp_title']) ? $hesk_settings['tmp_title'] : $hesk_settings['hesk_title']); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<?php if ($nuMods_settings['rtl']) { ?>
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25RTL.css" type="text/css" rel="stylesheet" />
<?php } else { ?>
<link href="<?php echo HESK_PATH; ?>hesk_style_v25.css" type="text/css" rel="stylesheet" />
<?php } ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/bootstrap-theme.css" type="text/css" rel="stylesheet" />
<?php if ($nuMods_settings['rtl']) { ?>
<?php if ($modsForHesk_settings['rtl']) { ?>
<link href="<?php echo HESK_PATH; ?>css/bootstrap-rtl.min.css" type="text/css" rel="stylesheet" />
<link href="<?php echo HESK_PATH; ?>css/hesk_newStyleRTL.php" type="text/css" rel="stylesheet" />
<?php } else { ?>
@ -59,7 +59,7 @@ require(HESK_PATH . 'nuMods_settings.inc.php');
<link rel="stylesheet" href="<?php echo HESK_PATH; ?>css/octicons.css" type="text/css">
<script src="<?php echo HESK_PATH; ?>js/jquery-1.10.2.min.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>hesk_javascript_v25.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/nuMods-javascript.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/modsForHesk-javascript.js"></script>
<script language="Javascript" type="text/javascript" src="<?php echo HESK_PATH; ?>js/bootstrap.min.js"></script>
<?php
@ -132,7 +132,7 @@ require(HESK_PATH . 'nuMods_settings.inc.php');
<?php
include(HESK_PATH . 'header.txt');
$iconDisplay = 'style="display: none"';
if ($nuMods_settings['show_icons']) {
if ($modsForHesk_settings['show_icons']) {
$iconDisplay = '';
}
?>

4
install/index.php

@ -54,8 +54,8 @@ hesk_iHeader();
<a class="btn btn-default btn-lg" href="update.php?" role="button">Upgrade</a>
<p><br/>Upgrade existing HESK installation to version <?php echo HESK_NEW_VERSION; ?></p>
<br/><br/>
<a class="btn btn-default btn-lg" href="updateNuMods.php?update=0" role="button">Install / Upgrade NuMods</a>
<p><br/>Install or upgrade existing NuMods installation to version <?php echo NUMODS_NEW_VERSION; ?></p>
<a class="btn btn-default btn-lg" href="updateModsForHesk.php" role="button">Install / Upgrade Mods for Hesk</a>
<p><br/>Install or upgrade existing Mods for Hesk installation to version <?php echo MODS_FOR_HESK_NEW_VERSION; ?></p>
</div>
<?php

2
install/install_functions.inc.php

@ -37,7 +37,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');}
// We will be installing this HESK version:
define('HESK_NEW_VERSION','2.5.5');
define('NUMODS_NEW_VERSION','1.5.0');
define('MODS_FOR_HESK_NEW_VERSION','1.5.0');
// Other required files and settings
define('INSTALL',1);

11
install/updateNuMods.php → install/updateModsForHesk.php

@ -3,20 +3,18 @@ define('IN_SCRIPT',1);
define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
$showInstructions = 'block';
?>
<html>
<head>
<title>NuMods 1.5.0 Install / Upgrade</title>
<title>Mods For Hesk 1.5.0 Install / Upgrade</title>
</head>
<body>
<div style="display: <?php echo $showInstructions; ?>">
<h1>Update NuMods from v1.4.1 to v1.5.0</h1>
<h1>Update Mods For Hesk from v1.4.1 to v1.5.0</h1>
<p><a href="updateTo1-5-0.php">Update here</a>. <b>Do not use the installation below!</b> </p>
<h1>Update NuMods from v1.2.4 - v1.3.0 to v1.5.0</h1>
<h1>Update Mods For Hesk from v1.2.4 - v1.3.0 to v1.5.0</h1>
<p>If you attempted the v1.4.0 installation and it failed, use <a href="updateTo1-4-1.php?ar=true">this update link</a>. Do not use the link below!</p>
<p><a href="updateTo1-4-1.php">Update here</a>. <b>Do not use the installation below!</b></p>
<h1>Install NuMods v1.5.0 <b>for the first time</b></h1>
<h1>Install Mods For Hesk v1.5.0 <b>for the first time</b></h1>
<h4><i>If you have not yet installed/updated HESK, please do so first before continuing; otherwise installation will <b>fail</b>!</i></h4>
<br/>
<p>Please verify the database information below. Additionally, ensure that the database user has CREATE and ALTER permissions.</p>
@ -27,6 +25,5 @@ $showInstructions = 'block';
<p><b>Database Prefix: </b><?php echo $hesk_settings['db_pfix']; ?></p>
<a href="freshInstall.php">Proceed with installation</a>
<p>By proceeding, you agree to the terms of the <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International License.</a></p>
</div>
</body>
</html>

18
language/en/text.php

@ -35,8 +35,11 @@ $hesklang['add_row'] = 'Add row';
$hesklang['addnote'] = 'Add note';
$hesklang['no_noteID'] = 'No Note ID';
$hesklang['note_id_not_found'] = 'Note ID not found';
$hesklang['mods_for_hesk'] = 'Mods for Hesk';
$hesklang['err_modsForHesk_settings'] = 'Can\'t open file <b>modsForHesk_settings.inc.php</b> for writing. Please CHMOD this file to 666 (rw-rw-rw-)';
$hesklang['mods_for_hesk_version'] = 'Mods for Hesk Version';
// ADDED OR MODIFIED IN NuMods 1.5.0
// ADDED OR MODIFIED IN Mods For Hesk 1.5.0
$hesklang['ticket_auto_refresh'] = 'Ticket Table Auto-Refresh:';
$hesklang['display_rtl'] = 'Display site right-to-left';
$hesklang['show_icons_navigation'] = 'Show icons on navigation bar';
@ -54,8 +57,7 @@ $hesklang['notify_customer_email_text'] = 'Don\'t send email notifications of re
$hesklang['cant_edit_admin'] = 'You cannot edit the God Admin (User ID = 1)';
$hesklang['notifications_disabled_info'] = 'Changing notifications settings has been disabled by your administrator.';
// ADDED OR MODIFIED IN NuMods 1.4.0
$hesklang['numods'] = 'NuMods';
// ADDED OR MODIFIED IN Mods For Hesk 1.4.0
$hesklang['navbarBackgroundColor'] = 'Navbar Background Color';
$hesklang['navbarBackgroundColorHelp'] = 'The main color of the top navigation bar. This applies to both the client and staff-side.';
$hesklang['navbarBrandColor'] = 'Navbar Brand Color';
@ -85,7 +87,6 @@ $hesklang['showIcons'] = 'Show Icons';
$hesklang['showIconsHelp'] = 'Check this box to show icons next to navigation bar items';
$hesklang['maintenanceMode'] = 'Maintenance Mode';
$hesklang['maintenanceModeHelp'] = 'Check this box to put the Help Desk in maintenance mode. Staff can still log into the backend, but the front end will be inaccessible.';
$hesklang['err_nuMods_settings'] = 'Can\'t open file <b>nuMods_settings.inc.php</b> for writing. Please CHMOD this file to 666 (rw-rw-rw-)';
$hesklang['ip_to'] = 'To';
$hesklang['ip_bans'] = 'IP Bans';
$hesklang['email_bans'] = 'Email Bans';
@ -105,14 +106,14 @@ $hesklang['relationship_deleted'] = 'Parent/Child relationship deleted.';
$hesklang['autorefresh'] = 'Autorefresh:';
$hesklang['autorefresh_restrictions'] = 'Enter value in milliseconds. Value must be greater than 1000 to use this feature. No fractional values.';
// ADDED OR MODIFIED IN NuMods 1.3.0
// ADDED OR MODIFIED IN Mods For Hesk 1.3.0
$hesklang['show_filters'] = 'Show Column Filters';
$hesklang['hide_filters'] = 'Hide Column Filters';
// ADDED OR MODIFIED IN NuMods 1.2.2
// ADDED OR MODIFIED IN Mods For Hesk 1.2.2
$hesklang['changeLanguage'] = 'Change language to';
// ADDED OR MODIFIED IN NuMods 1.2
// ADDED OR MODIFIED IN Mods For Hesk 1.2
$hesklang['statuses'] = 'Statuses';
$hesklang['basicProperties'] = 'Basic Properties';
$hesklang['shortNameKey'] = 'Short Name Key';
@ -130,7 +131,6 @@ $hesklang['isStaffClosedOptionMsg'] = 'When a staff member clicks the "Close tic
$hesklang['isStaffReopenedStatusMsg'] = 'When a staff member clicks the "Open ticket" link, change the status to';
$hesklang['isDefaultStaffReplyStatusMsg'] = 'When a staff member replies to a ticket, change the status to';
$hesklang['lockedTicketStatusMsg'] = 'When a ticket is locked, change the status to';
$hesklang['nuModsVersion'] = 'NuMods Version';
$hesklang['shortNameRequired'] = 'Short Name Key is required.';
$hesklang['longNameRequired'] = 'Long Name Key is required.';
$hesklang['textColorRequired'] = 'Text Color is required.';
@ -146,7 +146,7 @@ $hesklang['resolved']='Resolved'; // Ticket has been RESOLVED
$hesklang['quick_help_ticket']='Here is the information on your ticket. You can add a reply to this ticket, close it, or re-open the ticket if applicable.';
// ADDED OR MODIFIED IN HESK UI
// ADDED OR MODIFIED IN Mods For Hesk pre-1.2
$hesklang['search_the_knowledgebase'] = 'Search the Knowledgebase';
$hesklang['view_ticket_nav']='View Ticket';
$hesklang['quick_help']='Quick Help';

4
maintenance.php

@ -5,10 +5,10 @@ define('ON_MAINTENANCE_PAGE', 1);
// Get all the required files and functions
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require_once(HESK_PATH . 'inc/header.inc.php');
if (!$nuMods_settings['maintenance_mode']) {
if (!$modsForHesk_settings['maintenance_mode']) {
//-- The user refreshed the maintenance page, but maintenance mode is off. Redirect them back to the index page.
header('Location: '.HESK_PATH);
}

26
modsForHesk_settings.inc.php

@ -0,0 +1,26 @@
<?php
//-- Mods For Hesk Theme Color Settings
$modsForHesk_settings['navbarBackgroundColor'] = '#414a5c';
$modsForHesk_settings['navbarBrandColor'] = '#d4dee7';
$modsForHesk_settings['navbarBrandHoverColor'] = '#ffffff';
$modsForHesk_settings['navbarItemTextColor'] = '#d4dee7';
$modsForHesk_settings['navbarItemTextHoverColor'] = '#ffffff';
$modsForHesk_settings['navbarItemTextSelectedColor'] = '#ffffff';
$modsForHesk_settings['navbarItemSelectedBackgroundColor'] = '#2d3646';
$modsForHesk_settings['dropdownItemTextColor'] = '#333333';
$modsForHesk_settings['dropdownItemTextHoverColor'] = '#262626';
$modsForHesk_settings['dropdownItemTextHoverBackgroundColor'] = '#f5f5f5';
$modsForHesk_settings['questionMarkColor'] = '#000000';
//-- Set this to 1 for right-to-left text.
$modsForHesk_settings['rtl'] = 0;
//-- Set this to 1 to show icons next to navigation menu items
$modsForHesk_settings['show_icons'] = 0;
//-- Set this to 1 to enable maintenance mode
$modsForHesk_settings['maintenance_mode'] = 0;
/* DO NOT EDIT ANYTHING BELOW THIS LINE */
$modsForHesk_settings['version']= '1.5.0';

26
nuMods_settings.inc.php

@ -1,26 +0,0 @@
<?php
//-- NuMods Theme Color Settings
$nuMods_settings['navbarBackgroundColor'] = '#414a5c';
$nuMods_settings['navbarBrandColor'] = '#d4dee7';
$nuMods_settings['navbarBrandHoverColor'] = '#ffffff';
$nuMods_settings['navbarItemTextColor'] = '#d4dee7';
$nuMods_settings['navbarItemTextHoverColor'] = '#ffffff';
$nuMods_settings['navbarItemTextSelectedColor'] = '#ffffff';
$nuMods_settings['navbarItemSelectedBackgroundColor'] = '#2d3646';
$nuMods_settings['dropdownItemTextColor'] = '#333333';
$nuMods_settings['dropdownItemTextHoverColor'] = '#262626';
$nuMods_settings['dropdownItemTextHoverBackgroundColor'] = '#f5f5f5';
$nuMods_settings['questionMarkColor'] = '#000000';
//-- Set this to 1 for right-to-left text.
$nuMods_settings['rtl'] = 0;
//-- Set this to 1 to show icons next to navigation menu items
$nuMods_settings['show_icons'] = 0;
//-- Set this to 1 to enable maintenance mode
$nuMods_settings['maintenance_mode'] = 0;
/* DO NOT EDIT ANYTHING BELOW THIS LINE */
$nuMods_settings['version']= '1.5.0';

4
print.php

@ -37,7 +37,7 @@ define('HESK_PATH','./');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'nuMods_settings.inc.php');
require(HESK_PATH . 'modsForHesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
hesk_load_database_functions();
@ -111,7 +111,7 @@ hr
background-color: #9e9e9e;
height: 1px;
width: 100%;
text-align: <?php if ($nuMods_settings['rtl']) {echo 'right';} else {echo 'left';} ?>;
text-align: <?php if ($modsForHesk_settings['rtl']) {echo 'right';} else {echo 'left';} ?>;
}
</style>
</head>

Loading…
Cancel
Save