diff --git a/admin/admin_settings.php b/admin/admin_settings.php index b39c1385..ec46f3d7 100644 --- a/admin/admin_settings.php +++ b/admin/admin_settings.php @@ -954,6 +954,32 @@ if ( defined('HESK_DEMO') ) +
+ +
+ +
+ +
+ +
+
diff --git a/admin/admin_settings_save.php b/admin/admin_settings_save.php index a987e284..597fff54 100644 --- a/admin/admin_settings_save.php +++ b/admin/admin_settings_save.php @@ -496,6 +496,14 @@ for ($i=1;$i<=20;$i++) $set['hesk_version'] = $hesk_settings['hesk_version']; +// Process quick help sections +hesk_dbConnect(); +hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` SET `show` = '0'"); +$postArray = hesk_POST_array('quick_help_sections'); +foreach ($postArray as $value) { + hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` SET `show` = '1' WHERE `id` = '".intval($value)."'"); +} + // Save the modsForHesk_settings.inc.php file $set['rtl'] = empty($_POST['rtl']) ? 0 : 1; $set['show-icons'] = empty($_POST['show-icons']) ? 0 : 1; diff --git a/index.php b/index.php index bdc5fbc6..b91cf814 100644 --- a/index.php +++ b/index.php @@ -42,6 +42,7 @@ require(HESK_PATH . 'inc/common.inc.php'); // Are we in maintenance mode? hesk_check_maintenance(); +hesk_load_database_functions(); // Are we in "Knowledgebase only" mode? hesk_check_kb_only(); @@ -166,7 +167,17 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat']) +
+
@@ -175,7 +186,8 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
-
+ +
+ +
 
+ @@ -1069,7 +1082,6 @@ function print_start() } // Connect to database - hesk_load_database_functions(); hesk_dbConnect(); /* Print header */ @@ -1243,7 +1255,6 @@ function forgot_tid() require(HESK_PATH . 'inc/email_functions.inc.php'); /* Get ticket(s) from database */ - hesk_load_database_functions(); hesk_dbConnect(); $email = hesk_validateEmail( hesk_POST('email'), 'ERR' ,0) or hesk_process_messages($hesklang['enter_valid_email'],'ticket.php?remind=1'); diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php index 93e3e9de..ca8e1d3e 100644 --- a/install/mods-for-hesk/sql/installSql.php +++ b/install/mods-for-hesk/sql/installSql.php @@ -540,4 +540,40 @@ function execute232Scripts() { hesk_dbConnect(); executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.3.2' WHERE `Key` = 'modsForHeskVersion'"); } -// END Version 2.3.2 \ No newline at end of file +// END Version 2.3.2 + +// BEGIN Version 2.4.0 +function execute240Scripts() { + global $hesk_settings; + + hesk_dbConnect(); + executeQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."quick_help_sections` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + `location` VARCHAR(100) NOT NULL, + `show` ENUM('0','1') NOT NULL + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"); + + executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`) + VALUES ('create_ticket', '1')"); + executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`) + VALUES ('view_ticket_form', '1')"); + executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`) + VALUES ('view_ticket', '1')"); + executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`) + VALUES ('knowledgebase', '1')"); +} + +function execute240FileUpdate() { + $file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php'); + + //-- Only add the additional settings if they aren't already there. + if (strpos($file, '$modsForHesk_settings[\'category_order_column\']') === false) + { + $file .= ' + + //-- Column to sort categories by. Can be either \'name\' or \'cat_order\' +$modsForHesk_settings[\'category_order_column\'] = \'cat_order\';'; + } + + return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file); +} \ No newline at end of file diff --git a/knowledgebase.php b/knowledgebase.php index 8404b903..7fd2d310 100644 --- a/knowledgebase.php +++ b/knowledgebase.php @@ -155,7 +155,16 @@ function hesk_kb_header($kb_link) {
  • +
    +
    @@ -166,7 +175,8 @@ function hesk_kb_header($kb_link) {
    -
    + +
     
    '; + } +} ?> diff --git a/language/en/text.php b/language/en/text.php index 98f8ef26..a934805c 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -27,6 +27,11 @@ $hesklang['sort_alphabetically'] = 'Sort alphabetically'; $hesklang['category_sort'] = 'Category Sorting'; $hesklang['category_sort_help'] = 'Determines if categories shown on the manage categories page and all dropdowns are sorted by the user-defined order (default), or sorted alphabetically.'; +$hesklang['quick_help_sections'] = 'Quick Help Sections'; +$hesklang['quick_help_sections_help'] = 'Check the checkbox to show the "Quick Help" sections on the left-hand side, or uncheck to not show.'; +$hesklang['create_ticket'] = 'Create ticket'; +$hesklang['view_ticket_form'] = 'View ticket form'; +$hesklang['knowledgebase'] = 'Knowledgebase section'; // ADDED OR MODIFIED IN Mods for HESK 2.3.0 $hesklang['sm_icon'] = 'Icon'; diff --git a/ticket.php b/ticket.php index 81abf9fc..2ba4df15 100644 --- a/ticket.php +++ b/ticket.php @@ -217,7 +217,16 @@ require_once(HESK_PATH . 'inc/header.inc.php');
  • +
    +
    @@ -226,7 +235,8 @@ require_once(HESK_PATH . 'inc/header.inc.php');
    -
    + +
  • - + +
    +
    @@ -470,7 +490,8 @@ function print_form()
    -
    + +