Beispiel #1
0
 function getComments($cat_id, $art_id)
 {
     $cat_id = (int) $cat_id;
     $art_id = (int) $art_id;
     if (empty($this->container)) {
         $this->last_error = __('No section selected!');
         return false;
     }
     if ($this->container !== '#root' && $this->container !== '#hidden') {
         if (!($category = $this->getCategory($cat_id))) {
             return false;
         }
         $art_prefix = ARTICLES_PATH . $this->container . '/' . $cat_id . '/' . $art_id . '/';
     } else {
         $art_prefix = ARTICLES_PATH . $this->container . '/' . $art_id . '/';
     }
     //New api.comments - 2011 used
     return get_last_messages(null, true, false, $art_prefix . 'comments');
 }
Beispiel #2
0
 function countComments($filename)
 {
     if (empty($this->indexes['main'][$filename]) || !is_file(GALLERY_IMAGES_DIR . $filename)) {
         return false;
     }
     if (true) {
         return count(get_last_messages(null, false, false, GALLERY_COMMENTS_DIR . $filename . '.dat'));
     }
     return false;
 }
Beispiel #3
0
*/
if (isset($_POST['mcdelete']) && $system->checkForRight('MINICHAT')) {
    post_remove($_POST['mcdelete'], RCMS_MC_DEFAULT_FILE);
    rcms_redirect('');
}
/*
* Minichat post form
*/
$result = '';
if (LOGGED_IN || $minichat_config['allow_guests_post']) {
    /*
    * BB-codes editor in minichat — for really kamikaze
    */
    if (!empty($minichat_config['editor'])) {
        $result .= rcms_show_bbcode_panel('minichat.mctext') . '<br />';
    }
    $result .= rcms_parse_module_template('minichat-form.tpl', array('allow_guests_enter_name' => $minichat_config['allow_guests_enter_name']));
}
/*
* Minichat comments
*/
$list = get_last_messages($minichat_config['messages_to_show'], true, false, RCMS_MC_DEFAULT_FILE, 'minichat.ini');
foreach ($list as $id => $message) {
    $message['id'] = $id;
    $result .= rcms_parse_module_template('minichat-mesg.tpl', $message);
}
/*
* Show all
*/
$result = '<div style="overflow-x: hidden; overflow-y: auto; width: 100%">' . $result . '</div>';
show_window(__('Minichat'), $result, 'center');