$email_md5 = md5(get_the_author_email()); $default_img = urlencode('http://use.perl.org/images/pix.gif'); ?> <div class="sleeve_main"> <div id="postpage"> <div id="main"> <ul id="postlist"> <li> <h2 class="title"> <?php the_title(); ?> </h2> <h4> <?php echo prologue_get_avatar(get_the_author_ID(), get_the_author_email(), 48); ?> <?php the_author_posts_link(); ?> <span class="meta"> <?php the_time(); ?> <em>on</em> <?php the_time('F j, Y'); ?> | <?php comments_number(__('0'), __('1'), __('%'));
function prologue_comment_noreply($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?> "> <?php echo prologue_get_avatar($comment->user_id, $comment->comment_author_email, 32); ?> <h4> <?php comment_author_link(); ?> <span class="meta"><?php comment_time(); ?> on <?php comment_date(); ?> | <a href="#comment-<?php comment_ID(); ?> ">#</a> <?php edit_comment_link(__('e'), ' | ', ''); ?> </span> </h4> <?php comment_text(); ?> <?php }
//Loads the language-file $user = get_userdata($current_user->ID); $first_name = attribute_escape($user->first_name); ?> <div id="postbox"> <form id="new_post" name="new_post" method="post" action="<?php bloginfo('url'); ?> "> <input type="hidden" name="action" value="post" /> <?php wp_nonce_field('new-post'); ?> <div class="avatar"><?php echo prologue_get_avatar($user->ID, $user->user_email, 48); ?> </div> <div class="inputarea"> <label for="posttext"><?php _e($txt['postform_greeting']); ?> , <?php echo $first_name; ?> . <?php _e($txt['postform_whatsup']); ?> </label> <div> <textarea name="posttext" id="posttext" rows="3" cols="60" tabindex="0" maxlength="140"></textarea>
<ul> <?php if (have_posts()) { $previous_user_id = 0; while (have_posts()) { the_post(); ?> <li> <?php // Don't show the avatar if the previous post was by the same user $current_user_id = get_the_author_ID(); if ($previous_user_id !== $current_user_id) { echo prologue_get_avatar($current_user_id, get_the_author_email(), 48); } $previous_user_id = $current_user_id; ?> <h4> <?php the_author_posts_link(); ?> <span class="meta"> <?php the_time("h:i:s a"); ?> on <?php the_time("F j, Y"); ?>
} // if cookie } // if post_password if ($comments) { echo "<h3>Comments</h3>\n"; echo "<ul id=\"comments\" class=\"commentlist\">\n"; foreach ($comments as $comment) { ?> <li id="comment-<?php comment_ID(); ?> "> <?php echo prologue_get_avatar($comment->user_id, $comment->comment_author_email, 32); ?> <h4> <?php comment_author_link(); ?> <span class="meta"><?php comment_time(); ?> on <?php comment_date(); ?> | <a href="#comment-<?php comment_ID(); ?> ">#</a><?php
function user_cloud() { global $wpdb; $authors = $wpdb->get_results("SELECT ID, user_nicename from {$wpdb->users} ORDER BY display_name"); $author_count = array(); foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) { $author_count[$row->post_author] = $row->count; } foreach ((array) $authors as $author) { $author = get_userdata($author->ID); echo '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), attribute_escape($author->display_name)) . '">'; echo prologue_get_avatar($author->ID, $author->user_email, 48) . "</a>"; } }
<?php get_header(); $author = isset($_GET['author_name']) ? get_userdatabylogin($author_name) : get_userdata(intval($author)); ?> <div class="sleeve_main" id="userpage"> <div id="main"> <h2> <?php echo prologue_get_avatar($author->ID, $author->email, 48); ?> <?php printf(__('Updates from %s', 'p2'), $author->user_nicename); ?> <a class="rss" href="<?php echo get_author_feed_link($author->ID); ?> ">RSS</a> </h2> <ul id="postlist"> <?php if (have_posts()) { while (have_posts()) { the_post(); require dirname(__FILE__) . '/entry.php'; } // have_posts } // have_posts ?> </ul>
function prologue_latest_posts() { $load_time = $_GET['load_time']; $frontpage = $_GET['frontpage']; $num_posts = 10; //max amount of posts to load $number_of_new_posts = 0; $prologue_query = new WP_Query('showposts=' . $num_posts . '&post_status=publish'); ob_start(); while ($prologue_query->have_posts()) { $prologue_query->the_post(); if (get_gmt_from_date(get_the_time('Y-m-d H:i:s')) <= $load_time) { continue; } $number_of_new_posts++; if ($frontpage) { ?> <li id="prologue-<?php the_ID(); ?> " class="newupdates user_id_<?php the_author_ID(); ?> "> <?php $current_user_id = get_the_author_ID(); echo prologue_get_avatar($current_user_id, get_the_author_email(), 48); ?> <?php } } $posts_html = ob_get_contents(); ob_end_clean(); if ($number_of_new_posts == 0) { echo 0; exit; } else { $json_data = array("numberofnewposts" => $number_of_new_posts, "html" => $posts_html, "lastposttime" => gmdate('Y-m-d H:i:s')); echo json_encode($json_data); } exit; }
function the_content($linklabel) { global $wpmode; global $wphaved; if ($wpmode == 'other') { echo content_for_layout(); return; } global $the_post, $request, $the_author; $e = $the_post->FirstChild('entries'); $title = $the_post->title; if (!is_microblog_theme()) { $current_user_id = get_the_author_ID(); if (function_exists('prologue_get_avatar')) { echo prologue_get_avatar($current_user_id, get_the_author_email(), 48); } } $title = render_notice($title, $the_post, $the_author); echo "<p>" . $title . "</p>"; }
function prologue_latest_posts() { $load_time = $_GET['load_time']; $frontpage = $_GET['frontpage']; $num_posts = 10; //max amount of posts to load $number_of_new_posts = 0; $prologue_query = new WP_Query('showposts=' . $num_posts . '&post_status=publish'); ob_start(); while ($prologue_query->have_posts()) { $prologue_query->the_post(); $current_user_id = get_the_author_ID(); if (get_gmt_from_date(get_the_time('Y-m-d H:i:s')) <= $load_time) { continue; } $number_of_new_posts++; if ($frontpage) { ?> <li id="prologue-<?php the_ID(); ?> " class="newupdates user_id_<?php the_author_ID(); ?> "> <?php echo prologue_get_avatar($current_user_id, get_the_author_email(), 48); ?> <h4> <?php the_author_posts_link(); ?> <span class="meta"> <?php printf(__('%s <em>on</em> %s', 'p2'), get_the_time(), get_the_time(get_option('date_format'))); ?> | <?php comments_popup_link('0', '1', '%'); ?> <span class="actions"> <a href="<?php the_permalink(); ?> " class="thepermalink"><?php _e('Permalink', 'p2'); ?> </a> <?php if (function_exists('post_reply_link')) { echo post_reply_link(array('before' => ' | ', 'reply_text' => __('Reply', 'p2'), 'add_below' => 'prologue'), get_the_id()); } ?> <?php if (current_user_can('edit_post', get_the_id())) { ?> | <a href="<?php echo get_edit_post_link(get_the_id()); ?> " class="post-edit-link" rel="<?php the_ID(); ?> "><?php _e('Edit', 'p2'); ?> </a> <?php } ?> </span> <br /> <?php tags_with_count('', __('Tags:', 'p2') . ' ', ', ', ' '); ?> </span> </h4> <div class="postcontent<?php if (current_user_can('edit_post', get_the_id())) { ?> editarea<?php } ?> " id="content-<?php the_ID(); ?> "><?php the_content(__('(More ...)', 'p2')); ?> </div> <!-- // postcontent --> <div class="bottom_of_entry"> </div> </li> <?php } } $posts_html = ob_get_contents(); ob_end_clean(); if ($number_of_new_posts == 0) { echo '0'; } else { $json_data = array("numberofnewposts" => $number_of_new_posts, "html" => $posts_html, "lastposttime" => gmdate('Y-m-d H:i:s')); echo json_encode($json_data); } exit; }