Example #1
0
 function post_anonymous_comment($params)
 {
     if (anon_comments_allowed($params['blog_xid'])) {
         debug("[post_anonymous_comment] post_xid = " . $params['post_xid']);
         $json = '{"content":"' . $params['content'] . '",' . '"name":"' . $params['name'] . '",' . '"href":"' . $params['href'] . '",' . '"email":"' . $params['email'] . '"}';
         debug("[post_anonymous_comment] json = {$json}");
         $typepad_url = get_comments_api_url($params['post_xid']);
         $response = post_text($typepad_url, $json);
         debug("[post_anonymous_comment] Response from TP Anon Comment Endpoint = {$response}");
         //function post_text ($url, $params, $decode=1) {
     } else {
         debug("Anonymous comments aren't allowed.");
     }
 }
Example #2
0
</link>
			<pubDate><?php 
    bb_post_time(array('format' => 'D, d M Y H:i:s +0000', 'localize' => false));
    ?>
</pubDate>
			<dc:creator><?php 
    post_author();
    ?>
</dc:creator>
			<guid isPermaLink="false"><?php 
    post_id();
    ?>
@<?php 
    bb_uri();
    ?>
</guid>
			<description><![CDATA[<?php 
    post_text();
    ?>
]]></description>
			<?php 
    do_action('bb_rss2_item');
    ?>
		</item>
<?php 
}
?>

	</channel>
</rss>
function bb_admin_list_posts()
{
    global $bb_posts, $bb_post;
    if (!$bb_posts) {
        ?>
<p class="no-results"><?php 
        _e('No posts found.');
        ?>
</p>
<?php 
    } else {
        ?>
<table id="posts-list" class="widefat" cellspacing="0" cellpadding="0">
<thead>
	<tr>
		<th scope="col" class="check-column"><input type="checkbox" /></th>
		<th scope="col"><?php 
        _e('Post');
        ?>
</th>
		<th scope="col"><?php 
        _e('Author');
        ?>
</th>
		<th scope="col"><?php 
        _e('Topic');
        ?>
</th>
		<th scope="col"><?php 
        _e('Date');
        ?>
</th>
	</tr>
</thead>
<tfoot>
	<tr>
		<th scope="col" class="check-column"><input type="checkbox" /></th>
		<th scope="col"><?php 
        _e('Post');
        ?>
</th>
		<th scope="col"><?php 
        _e('Author');
        ?>
</th>
		<th scope="col"><?php 
        _e('Topic');
        ?>
</th>
		<th scope="col"><?php 
        _e('Date');
        ?>
</th>
	</tr>
</tfoot>
<tbody>
<?php 
        foreach ($bb_posts as $bb_post) {
            ?>
	<tr id="post-<?php 
            post_id();
            ?>
"<?php 
            alt_class('post', post_del_class());
            ?>
>
		<td class="check-column"><input type="checkbox" name="post[]" value="<?php 
            post_id();
            ?>
" /></td>
		<td class="post">
			<?php 
            post_text();
            ?>
			<div>
				<span class="row-actions">
					<a href="<?php 
            echo esc_url(get_post_link());
            ?>
"><?php 
            _e('View');
            ?>
</a>
<?php 
            bb_post_admin(array('before_each' => ' | ', 'each' => array('undelete' => array('before' => ' ')), 'last_each' => array('before' => ' | ')));
            ?>
				</span>&nbsp;
			</div>
		</td>

		<td class="author">
			<?php 
            if (get_post_author_id()) {
                ?>

				<a href="<?php 
                user_profile_link(get_post_author_id());
                ?>
">
					<?php 
                post_author_avatar('16');
                ?>
					<?php 
                post_author();
                ?>
				</a>

			<?php 
            } else {
                ?>

				<span>
					<?php 
                post_author_avatar('16');
                ?>
					<?php 
                post_author();
                ?>
				</span>

			<?php 
            }
            ?>
		</td>

		<td class="topic">
			<a href="<?php 
            topic_link($bb_post->topic_id);
            ?>
"><?php 
            topic_title($bb_post->topic_id);
            ?>
</a>
		</td>
		
		<td class="date">
<?php 
            if (bb_get_post_time('U') < time() - 86400) {
                bb_post_time('Y/m/d\\<\\b\\r \\/\\>H:i:s');
            } else {
                printf(__('%s ago'), bb_get_post_time('since'));
            }
            ?>
		</td>
	</tr>
<?php 
        }
        ?>
</tbody>
</table>
<?php 
    }
}
Example #4
0
function post_excerpt()
{
    global $blog;
    if (selectedPost() == postSlug() || selectedPost() == postId()) {
        return post_text();
    } else {
        $post = call_anchor("blogPostModify", array('original' => $blog['post'], 'modified' => textOutput($blog['post'])));
        $pieces = explode("{more}", $post['modified']);
        return $pieces[0];
    }
}
Example #5
0
function mass_edit_list_posts()
{
    global $bb_posts, $bb_post;
    if ($bb_posts) {
        foreach ($bb_posts as $bb_post) {
            ?>
	<li<?php 
            alt_class('post');
            ?>
>
		<div class="threadauthor">
			<p><strong><?php 
            poster_id_link();
            ?>
</strong><br />
				<small><?php 
            poster_id_type();
            ?>
</small></p>
		</div>
		<div class="threadpost">
			<div class="post"><?php 
            post_text();
            ?>
</div>
			<div class="poststuff">
				<?php 
            printf(__('Posted: %1$s in <a href="%2$s">%3$s</a>'), bb_get_post_time(), get_topic_link($bb_post->topic_id), get_topic_title($bb_post->topic_id));
            ?>
 IP: <?php 
            post_ip_link();
            ?>
 <?php 
            post_edit_link();
            ?>
 <?php 
            post_delete_link();
            ?>
</div>
			</div>
	</li><?php 
        }
    }
}