diff --git a/inc/knowledgebase_functions.inc.php b/inc/knowledgebase_functions.inc.php
index 2e2ab031..683f66f8 100644
--- a/inc/knowledgebase_functions.inc.php
+++ b/inc/knowledgebase_functions.inc.php
@@ -99,7 +99,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
- '.$article['subject'].'
+ '.$article['subject'].'
|
';
if ($hesk_settings['kb_views']) {
@@ -246,10 +254,18 @@ function hesk_kbLatestArticles($how_many, $index = 1)
$colspan = $hesk_settings['kb_date'] ? '' : 'colspan="2"';
while ($article = hesk_dbFetchAssoc($res))
{
+ $icon = 'fa fa-file';
+ $style = '';
+
+ if ($article['sticky']) {
+ $icon = 'glyphicon glyphicon-pushpin';
+ $style = 'style="color: #FF0000"';
+ }
+
echo '
- '.$article['subject'].'
+ '.$article['subject'].'
| ';
if ($hesk_settings['kb_date']) {
echo '' . hesk_date($article['dt'], true) . ' | ';
diff --git a/knowledgebase.php b/knowledgebase.php
index 1fc2308a..8404b903 100644
--- a/knowledgebase.php
+++ b/knowledgebase.php
@@ -486,15 +486,22 @@ function hesk_show_kb_category($catid, $is_search = 0) {
/* 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) );
+ $res = hesk_dbQuery("SELECT `id`,`subject`, `sticky` 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))
{
+ $icon = 'glyphicon glyphicon-file';
+ $style = '';
+ if ($art['sticky'])
+ {
+ $icon = 'glyphicon glyphicon-pushpin';
+ $style = 'style="color: #FF0000"';
+ }
echo '
-
-
- '.$art['subject'].' |
-
';
+
+
+ '.$art['subject'].' |
+
';
if ($num == $hesk_settings['kb_numshow'])
{
@@ -553,7 +560,7 @@ function hesk_show_kb_category($catid, $is_search = 0) {
'.$hesklang['noac'].' | ';
@@ -562,8 +569,18 @@ function hesk_show_kb_category($catid, $is_search = 0) {
{
while ($article = hesk_dbFetchAssoc($res))
{
+ $icon = 'fa fa-file';
+ $color = '';
+ $style = '';
+
$txt = hesk_kbArticleContentPreview($article['content']);
+ if ($article['sticky'])
+ {
+ $icon = 'glyphicon glyphicon-pushpin';
+ $style = 'style="color: #FF0000"';
+ }
+
if ($hesk_settings['kb_rating'])
{
$alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated'];
@@ -577,7 +594,7 @@ function hesk_show_kb_category($catid, $is_search = 0) {
echo '
-
+
'.$article['subject'].'
'.$txt.'
|