echo '<span class="roundbutton_group">';
 if ($action != 'view') {
     echo '<a href="?ctrl=items&amp;blog=' . $Blog->ID . '&amp;p=' . $Item->ID . '" class="roundbutton_text">' . get_icon('magnifier') . T_('View') . '</a>';
 }
 if (isset($GLOBALS['files_Module']) && $current_User->check_perm('files', 'view')) {
     echo '<a href="' . url_add_param($Blog->get_filemanager_link(), 'fm_mode=link_object&amp;link_type=item&amp;link_object_ID=' . $Item->ID) . '" class="roundbutton_text">' . get_icon('folder') . T_('Files') . '</a>';
 }
 if ($Blog->get_setting('allow_comments') != 'never') {
     echo '<a href="?ctrl=items&amp;blog=' . $Blog->ID . '&amp;p=' . $Item->ID . '#comments" class="roundbutton_text">';
     // TRANS: Link to comments for current post
     $comments_number = generic_ctp_number($Item->ID, 'comments', 'total');
     echo get_icon($comments_number > 0 ? 'comments' : 'nocomment');
     comments_number(T_('no comment'), T_('1 comment'), T_('%d comments'), $Item->ID);
     load_funcs('comments/_trackback.funcs.php');
     // TODO: use newer call below
     trackback_number('', ' &middot; ' . T_('1 Trackback'), ' &middot; ' . T_('%d Trackbacks'), $Item->ID);
     echo '</a>';
 }
 echo '</span>';
 echo '<span class="roundbutton_group">';
 // Display edit button if current user has the rights:
 $Item->edit_link(array('before' => ' ', 'after' => '', 'class' => 'roundbutton_text'));
 // Display copy button if current user has the rights:
 $Item->copy_link(array('before' => '', 'after' => ' ', 'text' => '#icon#', 'class' => 'roundbutton'));
 echo '</span>';
 echo '<span class="roundbutton_group">';
 // Display the moderate buttons if current user has the rights:
 $status_link_params = array('class' => 'roundbutton_text', 'redirect_to' => regenerate_url('', '&highlight=' . $Item->ID . '#item_' . $Item->ID, '', '&'));
 $Item->next_status_link($status_link_params, true);
 $Item->next_status_link($status_link_params, false);
 $next_status_in_row = $Item->get_next_status(false);
Esempio n. 2
0
while ($row = mysql_fetch_object($result)) {
    $posts_per_page = 10;
    start_b2();
    ?>
		<tr>
		<td>
			<p>
				<b><?php 
    the_time('Y/m/d @ H:i:s');
    ?>
</b> [ <a href="b2edit.php?p=<?php 
    echo $id;
    ?>
&c=1"><?php 
    comments_number('no comment', '1 comment', "% comments");
    trackback_number('', ', 1 trackback', ', % trackbacks');
    pingback_number('', ', 1 pingback', ', % pingbacks');
    ?>
</a>
				<?php 
    if ($user_level > $authordata[13] or $user_login == $authordata[1]) {
        echo " - <a href=\"b2edit.php?action=edit&post=" . $postdata["ID"];
        if ($m) {
            echo "&m={$m}";
        }
        echo "\">Edit</a>";
        echo " - <a href=\"b2edit.php?action=delete&post=" . $postdata["ID"] . "\" onclick=\"return confirm('You are about to delete this post \\'" . $row->post_title . "\\'\\n  \\'Cancel\\' to stop, \\'OK\\' to delete.')\">Delete</a> ";
    }
    ?>
				]
				<br />
function trackback_popup_link($zero = 'no trackback', $one = '1 trackback', $more = '% trackbacks', $CSSclass = '')
{
    global $id, $b2trackbackpopupfile, $b2commentsjavascript;
    global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
    echo '<a href="' . $siteurl . '/';
    if ($b2commentsjavascript) {
        echo $b2trackbackpopupfile . $querystring_start . 'p' . $querystring_equal . $id . $querystring_separator . 'tb' . $querystring_equal . '1';
        echo '" onclick="b2open(this.href); return false"';
    } else {
        // if comments_popup_script() is not in the template, display simple comment link
        trackback_link();
        echo '"';
    }
    if (!empty($CSSclass)) {
        echo ' class="' . $CSSclass . '"';
    }
    echo '>';
    trackback_number($zero, $one, $more);
    echo '</a>';
}