diff --git a/admin/manage_knowledgebase.php b/admin/manage_knowledgebase.php index 40deb7e4..61c7c0fc 100644 --- a/admin/manage_knowledgebase.php +++ b/admin/manage_knowledgebase.php @@ -492,35 +492,6 @@ if (!isset($_SESSION['hide']['new_article'])) - - - - - -
- -
- - - - -
- - - -
- -

 

-
  -

- -

-
- -
-
-
-
  • - - - - - -
    -
    - + +
    +
    + -
    -
    -
    -

    -
    - -
    - -
    - -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    -
    - -

    -
    -
    - -

    + ?> +
    +
    + +
    +
    +

    + +

    +
    + +
    -
    -
    -
    -
    - - -
    - - +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + +

    +
    +
    + +

    +
    +
    +
    +
    +
    + + +
    + + +
    +
    +
    -
    - + +
    -
    + - - - - - - +
    + +
    +
    +

    + +

    +
    + +
    +
    +
    + + + + + + + + + + + - - + $j=1; - '.$hesklang['kb_no_dart'].'   '.$hesklang['kb_i_art2'].'

    '; - } - else - { - ?> - - -

    »

    - -
    -
     
    - - - - - - - + + + + + + + +
       
    . + + +
    + +
    + +
    +
    - $tmp = $i ? 'White' : 'Blue'; - $style = 'class="option'.$tmp.'OFF" onmouseover="this.className=\'option'.$tmp.'ON\'" onmouseout="this.className=\'option'.$tmp.'OFF\'"'; - $i = $i ? 0 : 1; - - $type = $hesklang['kb_draft']; - ?> - - . - - - - <?php echo $hesklang['viewart']; ?> /> - - <?php echo $hesklang['delete']; ?> />  - - - -
    -  '; @@ -751,116 +729,120 @@ function list_private() { /* Print main manage users page */ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); - ?> - - - - + $res = hesk_dbQuery("SELECT * FROM `". hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `type`='1' " . (count($private_categories) ? " OR `catid` IN('" . implode("','", $private_categories) . "') " : '') . " ORDER BY `catid` ASC, `id` ASC"); + $num = hesk_dbNumRows($res); + ?> +
    + +
    +
    +

    + +

    +
    + +
    +
    +
    + '.$hesklang['kb_no_part'].'

    '; + } + else + { + ?> + + + + + + + + + + + + + + - - - - '.$hesklang['kb_no_part'].'   '.$hesklang['kb_i_art2'].'

    '; - } - else - { - ?> - - -

    »

    - -
    -
     
    - - - - - - - - - - - ' . mfh_get_stars(hesk_round_to_half($article['rating'])*10) . ' (' . $article['votes'] . ')'; + //$rat = ''; + } + else + { + $rat = ''; + } - if ($hesk_settings['kb_rating']) - { - $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated']; - $rat = ''; - } - else - { - $rat = ''; - } + ?> + + + + + + + + + +
       
    '.$alt.' ('.$article['votes'].') '.$alt.' ('.$article['votes'].')
    . + + +  
    + +
    + +
    +
    - ?> - - . - - - - - - <?php echo $hesklang['viewart']; ?> /> - - <?php echo $hesklang['delete']; ?> />  - - - -
    -  '; @@ -1664,47 +1646,40 @@ function manage_category() { require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); ?> - - - +
    + - - - - - -

    :

    - - -  
    - - -
    - -
    -
    -
    -
    -
    + if ( ! isset($_SESSION['hide']['article_list'])): + ?> +
    + +
    +
    +
    +

    + +

    +
    + +
    +
    +
    + onsubmit="Javascript:return hesk_deleteIfSelected('dodelete','')">
    + data-error="" required>
    @@ -1751,161 +1726,166 @@ function manage_category() {
    -
    - -
    - '.$hesklang['kb_no_art'].'   '.$hesklang['kb_i_art2'].'

    '; - } - else - { - /* Get number of sticky articles */ - $res2 = hesk_dbQuery("SELECT COUNT(*) FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' AND `sticky` = '1' "); - $num_sticky = hesk_dbResult($res2); - - $num_nosticky = $num - $num_sticky; - - ?> -

    '.$hesklang['kb_i_art2'].''; ?>

    -
    - - - - - - - - - - - - - ' . $hesklang['kb_private'] . ''; - break; - case '2': - $type = '' . $hesklang['kb_draft'] . ''; - break; - default: - $type = '' . $hesklang['kb_published'] . ''; - } - - if ($hesk_settings['kb_rating']) - { - $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated']; - $rat = ''; - } - else - { - $rat = ''; - } - - ?> - - - - - - - - - -
       
    '.$alt.' ('.$article['votes'].')
    . - 1) - { - if ($k == 1) - { - ?> - - + +
    +
    +
    +

    + '.$this_cat['name']).''; ?> +

    +
    + +
    +
    +
    - - - '.$hesklang['kb_no_art'].'

    '; } else { - ?> - - - 1 || $num_nosticky > 1 ) - { - echo ' '; - } - ?> - - - -  
    + /* Get number of sticky articles */ + $res2 = hesk_dbQuery("SELECT COUNT(*) FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='{$catid}' AND `sticky` = '1' "); + $num_sticky = hesk_dbResult($res2); + + $num_nosticky = $num - $num_sticky; - + ?> + + + + + + + + + + + + + + - + while ($article=hesk_dbFetchAssoc($result)) + { - ' . $hesklang['kb_private'] . ''; + break; + case '2': + $type = '' . $hesklang['kb_draft'] . ''; + break; + default: + $type = '' . $hesklang['kb_published'] . ''; + } + + if ($hesk_settings['kb_rating']) + { + $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated']; + $rat = ''; + } + else + { + $rat = ''; + } + + ?> + + + + + + + + + +
       
    ' . mfh_get_stars(hesk_round_to_half($article['rating']*10)) . ' (' . $article['votes'] . ')
    . + 1) + { + if ($k == 1) + { + ?> + + + + + + + + + 1 || $num_nosticky > 1 ) + { + echo ' '; + } + ?> + + + +  
    - echo ' 
     '; + +
    + +
    +
    +
    + +
    + .messages-menu > .dropdown-menu >li .menu > li > a, .sidebar-menu, .main-sidebar .user-panel, .sidebar-menu > li.header{ white-space: normal; +} + +.icon-link { + font-size: 16px; !important; } \ No newline at end of file diff --git a/inc/common.inc.php b/inc/common.inc.php index 2d84e024..d930433f 100644 --- a/inc/common.inc.php +++ b/inc/common.inc.php @@ -1885,4 +1885,27 @@ function mfh_bytesToUnits($size) { $quotient = $size / $bytes_in_megabyte; return intval($quotient); +} + +/** + * Returns the star markup based on the rating provided. Filled in stars are orange, empty stars are gray. + */ +function mfh_get_stars($rating) { + $int_value = intval($rating); + $has_half = $int_value === $rating; + + $markup = ''; + for ($i = 0; $i < $int_value; $i++) { + $markup .= ''; + } + + if ($has_half) { + $markup .= ''; + } + + for ($i = 0; $i < 5 - $int_value; $i++) { + $markup .= ''; + } + + return $markup; } \ No newline at end of file diff --git a/language/en/text.php b/language/en/text.php index 8c8f1cb6..7e2922bc 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -29,6 +29,7 @@ $hesklang['deleted_user_title_case'] = 'Deleted User'; $hesklang['main_navigation_uppercase'] = 'MAIN NAVIGATION'; $hesklang['x_system_warnings'] = '%s System %s'; // %s: Number of warnings, $s: "Warning" or "Warnings", depending on # $hesklang['warnings_title_case'] = 'Warnings'; +$hesklang['articles_in_category_x'] = 'Articles in Category %s'; // %s: category name // ADDED OR MODIFIED IN Mods for HESK 2.6.0 $hesklang['search_logs'] = 'Search Logs';