diff --git a/css/hesk_newStyle.php b/css/hesk_newStyle.php
index adda1d59..f1f1f4e1 100644
--- a/css/hesk_newStyle.php
+++ b/css/hesk_newStyle.php
@@ -394,3 +394,11 @@ button.dropdown-submit {
.plaintext-editor {
font-family: monospace;
}
+
+.table-fixed {
+ table-layout: fixed;
+}
+
+.indent-15 {
+ margin-left: 15px;
+}
\ No newline at end of file
diff --git a/css/hesk_newStyleRTL.php b/css/hesk_newStyleRTL.php
index 8d265463..aab80934 100644
--- a/css/hesk_newStyleRTL.php
+++ b/css/hesk_newStyleRTL.php
@@ -383,4 +383,16 @@ vertical-align: middle;
max-height: 80px;
max-width: 80px;
cursor: pointer;
+}
+
+.plaintext-editor {
+font-family: monospace;
+}
+
+.table-fixed {
+table-layout: fixed;
+}
+
+.indent-15 {
+margin-right: 15px;
}
\ No newline at end of file
diff --git a/inc/knowledgebase_functions.inc.php b/inc/knowledgebase_functions.inc.php
index 83669206..daf74b74 100644
--- a/inc/knowledgebase_functions.inc.php
+++ b/inc/knowledgebase_functions.inc.php
@@ -90,78 +90,70 @@ function hesk_kbTopArticles($how_many, $index = 1)
}
?>
-
-
-
-
-
-
-
- ' . $hesklang['views'] . '';
- }
- ?>
-
-
-
-
-
+
+
+
+
+
+
+ |
+ '.$hesklang['noa'].'
';
- return true;
- }
-
- /* We have some results, print them out */
- ?>
-
-
-
-
-
- |
-
- ';
- }
- ?>
-
-
+ /* Show number of views? */
+ if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
+ {
+ echo '
' . $hesklang['views'] . ' | ';
+ }
+ ?>
+
+
+
+ '.$hesklang['noa'].' | ';
+ return true;
+ }
+
+ /* We have some results, print them out */
+ $colspan = '';
+ if (!$hesk_settings['kb_views']) {
+ $colspan = 'colspan="2"';
+ }
+ while ($article = hesk_dbFetchAssoc($res))
+ {
+ echo '
+
+
+ '.$article['subject'].'
+ |
+ ';
+ if ($hesk_settings['kb_views']) {
+ echo ''.$article['views'].' | ';
+ }
+ echo '
';
+ }
+ ?>
+
+
-
-
-
-
-
-
- ' . $hesklang['dta'] . '';
- }
- ?>
-
-
-
-
-
+
+
+
+
+
+
+ ';
+ if ($hesk_settings['kb_date'])
+ {
+ echo '' . $hesklang['dta'] . ' | ';
+ }
+ }
+ ?>
+
+
+
+ '.$hesklang['noa'].'
';
- return true;
- }
-
- /* We have some results, print them out */
- ?>
-
-
-
-
-
-
- |
- ' . $article['subject'] . ' |
- ';
-
- if ($hesk_settings['kb_date'])
- {
- echo '' . hesk_date($article['dt'], true) . ' | ';
- }
-
- echo '
-
-
- |
-
- ';
- }
- ?>
-
-
+ /* If no results found end here */
+ if (hesk_dbNumRows($res) == 0)
+ {
+ $colspan = '';
+ if ($hesk_settings['kb_date']) {
+ $colspan = 'colspan="2"';
+ }
+ echo '
'.$hesklang['noa'].' | ';
+ return true;
+ }
+
+ /* We have some results, print them out */
+ $colspan = $hesk_settings['kb_date'] ? '' : 'colspan="2"';
+ while ($article = hesk_dbFetchAssoc($res))
+ {
+ echo '
+
+
+ '.$article['subject'].'
+ | ';
+ if ($hesk_settings['kb_date']) {
+ echo '' . hesk_date($article['dt'], true) . ' | ';
+ }
+ echo '
';
+ } ?>
+
+
-
-
-
+
';
require_once(HESK_PATH . 'inc/footer.inc.php');
exit();
@@ -276,8 +276,15 @@ function hesk_show_kb_article($artid)
{
hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` SET `views`=`views`+1 WHERE `id`={$artid} LIMIT 1");
}
+ if (!isset($_GET['suggest'])) {
+ $historyNumber = isset($_GET['rated']) ? '-2' : '-1';
+ $goBackText = '
+ ';
+ } else {
+ $goBackText = '';
+ }
- echo ''.$article['subject'].'
+ echo ''.$goBackText.' '.$article['subject'].'
'.$hesklang['as'].'
'
@@ -409,22 +416,7 @@ function hesk_show_kb_article($artid)
-
-
-
-
-
-
- '.$hesklang['kb_cat'].': '.$thiscat['name'].'
- '.$hesklang['back'].'
+ echo ' '.$hesklang['kb_cat'].': '.$thiscat['name'].'
';
@@ -468,153 +459,137 @@ function hesk_show_kb_category($catid, $is_search = 0) {
{
?>
-
-
-
-
+
+
+
+
+
- ';
- }
+ if ($i == 1)
+ {
+ echo '';
+ }
- echo '
-
-
- '.$cat['name'].' |
- ';
+ echo '
+
+
+ '.$cat['name'].' |
+ ';
- /* Print most popular/sticky articles */
- if ($hesk_settings['kb_numshow'] && $cat['articles'])
- {
- $res = hesk_dbQuery("SELECT `id`,`subject` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$cat['id']}' AND `type`='0' ORDER BY `sticky` DESC, `views` DESC, `art_order` ASC LIMIT " . (intval($hesk_settings['kb_numshow']) + 1) );
- $num = 1;
- while ($art = hesk_dbFetchAssoc($res))
- {
- echo '
+ /* Print most popular/sticky articles */
+ if ($hesk_settings['kb_numshow'] && $cat['articles'])
+ {
+ $res = hesk_dbQuery("SELECT `id`,`subject` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$cat['id']}' AND `type`='0' ORDER BY `sticky` DESC, `views` DESC, `art_order` ASC LIMIT " . (intval($hesk_settings['kb_numshow']) + 1) );
+ $num = 1;
+ while ($art = hesk_dbFetchAssoc($res))
+ {
+ echo '
'.$art['subject'].' |
';
- if ($num == $hesk_settings['kb_numshow'])
- {
- break;
- }
- else
- {
- $num++;
- }
- }
- if (hesk_dbNumRows($res) > $hesk_settings['kb_numshow'])
- {
- echo '» '.$hesklang['m'].' | ';
- }
- }
-
- echo '
+ if ($num == $hesk_settings['kb_numshow'])
+ {
+ break;
+ }
+ else
+ {
+ $num++;
+ }
+ }
+ if (hesk_dbNumRows($res) > $hesk_settings['kb_numshow'])
+ {
+ echo '» '.$hesklang['m'].' | ';
+ }
+ }
+
+ echo '
|
';
- if ($i == $per_col)
- {
- echo '';
- $i = 0;
- }
- $i++;
- }
- /* Finish the table if needed */
- if ($i != 1)
- {
- for ($j=1;$j<=$per_col;$j++)
- {
- echo ' | ';
- if ($i == $per_col)
- {
- echo '';
- break;
- }
- $i++;
- }
- }
-
- ?>
-
+ if ($i == $per_col)
+ {
+ echo ' |
';
+ $i = 0;
+ }
+ $i++;
+ }
+ /* Finish the table if needed */
+ if ($i != 1)
+ {
+ for ($j=1;$j<=$per_col;$j++)
+ {
+ echo ' | ';
+ if ($i == $per_col)
+ {
+ echo '';
+ break;
+ }
+ $i++;
+ }
+ }
-
- |
-
-
+ ?>
+
+
0
?>
-
-
-
-
-
-
-
-
- '.$hesklang['noac'].'';
- }
- else
- {
- echo '';
- while ($article = hesk_dbFetchAssoc($res))
- {
- $txt = hesk_kbArticleContentPreview($article['content']);
-
- if ($hesk_settings['kb_rating'])
- {
- $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated'];
- $rat = ' | ';
- }
- else
- {
- $rat = '';
- }
+
+
+
+
+
+
+ '.$hesklang['noac'].' | ';
+ }
+ else
+ {
+ while ($article = hesk_dbFetchAssoc($res))
+ {
+ $txt = hesk_kbArticleContentPreview($article['content']);
- echo '
-
-
-
-
-
- |
- '.$txt.' |
-
-
- |
- ';
- }
- echo ' ';
- }
- ?>
+ if ($hesk_settings['kb_rating'])
+ {
+ $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated'];
+ $rat = ' | ';
+ }
+ else
+ {
+ $rat = '';
+ }
-
-
-
+ echo '
+
+
+
+ '.$article['subject'].'
+
+ '.$txt.'
+ |
+ '.$rat.'
+ ';
+ }
+ }
+ ?>
+
+ |
+
diff --git a/language/en/text.php b/language/en/text.php
index 895f6f70..cfa575ca 100644
--- a/language/en/text.php
+++ b/language/en/text.php
@@ -21,6 +21,11 @@ $hesklang['_COLLATE']='utf8_unicode_ci';
// This is the email break line that will be used in email piping
$hesklang['EMAIL_HR']='------ Reply above this line ------';
+// ADDED OR MODIFIED IN Mods for HESK 2.2.1
+$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)
+$hesklang['latart_no_colon']='Latest Knowledgebase Articles'; // same as $hesklang['latart'] but without a colon (:)
+$hesklang['ac_no_colon']='Articles in this Category'; // same as $hesklang['ac'] but without a colon (:)
+
// ADDED OR MODIFIED IN Mods for HESK 2.2.0
$hesklang['email_templates'] = 'Email templates';
$hesklang['email_templates_intro'] = 'You can edit your plaintext and HTML email templates here.';