Beispiel #1
0
         $comment->print_summary($link, 700, true);
         echo "\n";
     }
     echo "</ol>\n";
 }
 if ($link->date < $globals['now'] - $globals['time_enabled_comments'] || $link->comments >= $globals['max_comments']) {
     // Comments already closed
     if ($tab_option == 1) {
         do_comment_pages($link->comments, $current_page);
     }
     echo '<div class="commentform warn">' . "\n";
     echo _('comentarios cerrados') . "\n";
     echo '</div>' . "\n";
 } elseif ($current_user->authenticated && ($current_user->user_karma > $globals['min_karma_for_comments'] || $current_user->user_id == $link->author)) {
     // User can comment
     print_comment_form();
     if ($tab_option == 1) {
         do_comment_pages($link->comments, $current_page);
     }
 } else {
     // Not enough karma or anonymous user
     if ($tab_option == 1) {
         do_comment_pages($link->comments, $current_page);
     }
     if ($current_user->authenticated && $current_user->user_karma <= $globals['min_karma_for_comments']) {
         echo '<div class="commentform warn">' . "\n";
         echo _('No tienes el mínimo karma requerido') . " (" . $globals['min_karma_for_comments'] . ") " . _('para comentar') . ": " . $current_user->user_karma . "\n";
         echo '</div>' . "\n";
     } elseif (!$globals['bot']) {
         echo '<div class="commentform warn">' . "\n";
         echo '<a href="' . $globals['base_url'] . 'login.php?return=' . $_SERVER['REQUEST_URI'] . '">' . _('Autentifícate si deseas escribir') . '</a> ' . _('comentarios') . '. ' . _('O crea tu cuenta') . ' <a href="' . $globals['base_url'] . 'register.php">aquí</a>' . "\n";
Beispiel #2
0
            $comment->id = $dbcomment->comment_id;
            $cached_comments[$dbcomment->comment_id] = $dbcomment;
            $comment->read();
            $comment->hideedit = 'yes';
            $main_smarty->assign('the_comment', $comment->print_summary($link, true));
            $link->thecomment = $comment->quickread();
            $main_smarty->assign('TheComment', $comment->quickread());
        }
    } else {
        $current_user->owncomment = "NO";
        echo $main_smarty->get_config_vars("PLIGG_Visual_EditComment_NotYours") . '<br/><br/>';
        echo $main_smarty->get_config_vars("PLIGG_Visual_EditComment_Click") . '<a href = "' . getmyurl('story', sanitize($_GET['id'], 3)) . '">' . $main_smarty->get_config_vars("PLIGG_Visual_EditComment_Here") . '</a> ' . $main_smarty->get_config_vars("PLIGG_Visual_EditComment_ToReturn") . '<br/><br/>';
    }
    if ($current_user->authenticated) {
        if ($current_user->owncomment == "YES") {
            $main_smarty->assign('comment_form', print_comment_form(true));
        }
        if ($current_user->user_level == "admin" or $current_user->user_level == "god") {
            $main_smarty->assign('removed_link', '<a href="#" onclick=(document.getElementById("comment").value="' . $main_smarty->get_config_vars("PLIGG_Visual_EditComment_Removed") . '")>' . $main_smarty->get_config_vars("PLIGG_Visual_EditComment_Removed") . '</a>');
        }
    }
    // misc smarty
    $main_smarty->assign('Spell_Checker', Spell_Checker);
    // pagename
    define('pagename', 'edit');
    $main_smarty->assign('pagename', pagename);
    // show the template
    $main_smarty->assign('tpl_center', $the_template . '/edit_comment_center');
    $main_smarty->display($the_template . '/pligg.tpl');
}
// display comment for for editing