示例#1
0
function sa_author_info_card($curauth)
{
    $user = $curauth->ID;
    ob_start();
    if (userphoto_exists($user)) {
        userphoto($user);
    } else {
        echo get_avatar($user, 96);
    }
    $author_photo = ob_get_contents();
    ob_end_clean();
    return "" . "<div>{$author_photo}</div>" . "<div>" . "     <ul>" . "         <li>Homepage: <a href={$curauth->user_url}>{$curauth->user_url}</a></li>" . "         <li>{$curauth->user_description}</li>" . "     </ul>" . "</div>" . "</br>";
}
示例#2
0
function random_groups()
{
    global $wpdb;
    $authors = get_users('orderby=post_count&order=desc&number=4&role=contributor');
    foreach ($authors as $author) {
        echo "<li class=\"guest-entry\">";
        echo '<div><h3>';
        echo "<a href=\"" . get_bloginfo('url') . "/?author=";
        echo $author->ID;
        echo "\">";
        the_author_meta('display_name', $author->ID);
        echo "</a>";
        echo "</h3>";
        echo "<a href=\"" . get_bloginfo('url') . "/?author=";
        echo $author->ID;
        echo "\">";
        echo userphoto($author->ID);
        echo "</a></div>";
        echo "</li>";
    }
}
示例#3
0
		
		<?php 
$contributorUsers = get_users_with_role('contributor');
?>
		
		<div>
			<h2 class="staffHeadline contrib">Contributors</h2>
			<ul class="writers">
	         <?php 
foreach ($contributorUsers as $contributor_id) {
    $user_info = get_userdata($contributor_id);
    echo "<li>";
    echo "<a href=\"" . get_bloginfo('url') . "/?author=";
    echo $user_info->ID;
    echo "\">";
    echo userphoto($user_info->ID);
    echo "</a>";
    echo '<div class="authorName">';
    echo "<a href=\"" . get_bloginfo('url') . "/?author=";
    echo $user_info->ID;
    echo "\">" . $user_info->display_name;
    echo "</a>";
    echo "</div>";
    echo "<p class='nickname'><em>" . $user_info->nickname;
    echo "</em></p>";
    echo "</li>\n";
}
?>
	         </ul>
		</div>	
		<div class="clear"></div>
<?php

$user = isset($_GET['author_name']) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
$show_bio = get_the_author_meta('sfhiv_show_bio', $author);
if (!$show_bio) {
    header('Location: /');
}
get_header();
if (userphoto_exists($user)) {
    ?>
<div class="sidebar photo">
<?php 
    userphoto($user);
    ?>
</div>
<?php 
}
?>
<div id="primary">
	<div id="content" role="main">
			<article id="user-<?php 
echo $author;
?>
" class="member">
				<header>
					<h1 class="entry-title"><?php 
echo get_the_author_meta('user_firstname', $author);
?>
 <?php 
echo get_the_author_meta('user_lastname', $author);
?>
示例#5
0
            <h1><?php 
    echo $global_title;
    ?>
</h1>
            <?php 
    echo $subtitle ? '<span>' . $subtitle . '</span>' : '';
    ?>
        </div>
    </div><!--blog-heading-->
<?php 
} elseif (is_author()) {
    $author = get_user_by('slug', get_query_var('author_name'));
    $show_author_default = true;
    if (function_exists('userphoto_exists')) {
        if (userphoto_exists($author)) {
            userphoto($author);
            $show_author_default = false;
        }
    }
    if ($show_author_default) {
        ?>

	<div class="blog-heading  <?php 
        echo $topnav_style == 'light' ? 'heading-light' : '';
        ?>
 author-heading">
    	<div class="container">
            <div class="header-about-author">
                <div class="author-avatar">
					<?php 
        echo tm_author_avatar(false, 125);
        ?>

<div class="page-header">
	<h2>Redaksjonen</h2>
</div>

<?php 
        $redaksjonsmedlemmer = get_post_custom_values('redaksjonsmedlemmer');
        if (isset($redaksjonsmedlemmer[0])) {
            $redaksjonsmedlemmer = unserialize($redaksjonsmedlemmer[0]);
            foreach (get_users(array('include' => $redaksjonsmedlemmer, 'orderby' => 'display_name', 'order' => 'ASC')) as $key => $redaksjonsmedlem) {
                $userdata = get_userdata($redaksjonsmedlem->ID);
                echo '<div class="row">';
                echo '<div class="pull-left" style="margin: 10px;">';
                if (userphoto_exists($redaksjonsmedlem->ID)) {
                    userphoto($redaksjonsmedlem->ID, '', '', array(), get_template_directory_uri() . '/img/anon.gif');
                } else {
                    echo '<img class="img-rounded" src="' . get_template_directory_uri() . '/img/anon.gif">';
                }
                echo '</div>';
                echo '<div class="col-md-8">';
                echo "<h3>" . $userdata->display_name . "</h3>";
                echo "<p>" . $userdata->user_description . "</p>";
                echo '</div>';
                echo '</div>';
            }
        }
        ?>

<hr>
	</div>
	</div> <!-- /.row -->

<?php 
$forfatterids = get_post_custom_values('forfatterid');
if (isset($forfatterids)) {
    foreach ($forfatterids as $key => $value) {
        $userdata = get_userdata($value);
        ?>

	<div class="row author-inline-vertical-space">
	<div class="col-md-12">

		<div class="author-photo pull-left">
<?php 
        userphoto($value, '', '', array());
        ?>
		</div>

		<div class="author-name">
			<?php 
        echo $userdata->display_name;
        ?>
		</div>

		<div class="author-bio">
		<?php 
        echo $userdata->user_description;
        ?>
		</div>
	</div>
示例#8
0
$curauth = isset($_GET['author_name']) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
?>
		
		<!--MAIN-->
		<div id="main">
			
			<!--AUTHOR INFORMATION-->
			<div id="author">
				<div class="author_content">
					<h4><?php 
echo $curauth->display_name;
?>
</h4>
					<?php 
if (userphoto_exists($curauth)) {
    userphoto($curauth);
} else {
    echo '<div class="user_photo">' . get_avatar($curauth->ID, 64) . '</div>';
}
?>
					<?php 
if ($curauth->user_description != '') {
    ?>
					<p><?php 
    echo $curauth->user_description;
    ?>
</p>
					<?php 
} else {
    ?>
					<p><em>There is no information about this author.</em></p>
		<!-- <div class="profileBox <?php 
echo $curauth->user_nicename;
?>
">
					<h2>About <?php 
echo $curauth->display_name;
?>
</h2>

					<p><?php 
echo $curauth->description;
?>
</p>
					
					<?php 
userphoto($wp_query->get_queried_object());
?>
					
				</div> -->
		<?php 
if (is_category('twogirls')) {
    ?>
		       	<div class="columnistHeaderImg"><img src="<?php 
    bloginfo('url');
    ?>
/wp-content/themes/newspaper/images/twogirls.jpg"></div>
		<?php 
}
?>
	
			<?php 
示例#10
0
文件: index.php 项目: ramguiao/rcblog

					<p><?php 
    the_content('Read more...');
    ?>
</p>



				</article>



			</div> 



			<div class="content-footer"> </div>	



			<?php 
}
?>
 



				<!-- eof featured -->

示例#11
0
        ?>
"><?php 
        the_title();
        ?>
</a></h2>

        <div class="metadata">

          <ul>

            <li>

              <a href="">

                <?php 
        echo userphoto($authorID);
        ?>


              </a>

            </li>

            <li class="author">

              <?php 
        the_author_posts_link();
        ?>


            </li>
			</div>
			
<?php 
            $forfatterids = get_post_custom_values('forfatterid');
            if (isset($forfatterids)) {
                foreach ($forfatterids as $key => $value) {
                    $userdata = get_userdata($value);
                    ?>
			<div class="row">
			<div class="span2" style="margin-top: 20px;">
			<a href="/?author=<?php 
                    echo $value;
                    ?>
">
				<?php 
                    userphoto($value, '', '', array('class' => 'img-rounded hidden-phone'));
                    ?>
			</a>
			</div>
			<div class="span9" style="margin-top: 20px;">
				<h4><a href="/?author=<?php 
                    echo $value;
                    ?>
"><?php 
                    echo $userdata->display_name;
                    ?>
</a></h4>
				<?php 
                    echo $userdata->user_description;
                    ?>
				
示例#13
0
foreach ($feat_res as $feat) {
    $myrows = $wpdb->get_results("SELECT * from wp_users where ID='{$feat->author_id}'");
    foreach ($myrows as $results) {
        ?>



								<li>



									<a href="?author=<?php 
        echo $results->ID;
        ?>
"><?php 
        userphoto($results->ID);
        ?>
</a>



									<div class="username"><?php 
        echo $results->user_nicename;
        ?>
</div>



								</li>

示例#14
0
function sb_alt_author_box()
{
    $user = get_the_author_id();
    $email = get_the_author_meta($user_email, $user);
    $attributes = array('class' => 'avatar-400', 'width' => '200');
    ?>
	<div id="author-box-wrapper">
		<div class="author-box">
			<div class="author-box-img"> <?php 
    if (userphoto_exists($user)) {
        userphoto($user, '', '', $attributes);
    } else {
        echo get_avatar($user, 200);
    }
    ?>
</div>
			<div class="about-author">
				<h4><?php 
    echo get_the_author();
    ?>
</h4>
				<?php 
    if (get_the_author_meta('specialization') != '') {
        ?>
					<h5><?php 
        echo get_the_author_meta('specialization');
        echo ', ';
        echo get_the_author_meta('university');
        ?>
</h5>
					<?php 
    }
    ?>
				<p><?php 
    echo get_the_author_meta('description');
    ?>
 
			</div>
			<div class="contact-links">

				<ul class="social-links">
 
				 <?php 
    if (get_the_author_meta('facebook') != '') {
        ?>
				 <li><a href="<?php 
        echo get_the_author_meta('facebook');
        ?>
"><i class="fa fa-facebook"></i></a></li>
				 <?php 
    }
    ?>
				 
				 <?php 
    if (get_the_author_meta('twitter') != '') {
        ?>
				 <li><a href="https://twitter.com/<?php 
        echo get_the_author_meta('twitter');
        ?>
"><i class="fa fa-twitter"></i></a></li>
				 <?php 
    }
    ?>
				 
				 <?php 
    if (get_the_author_meta('googleplus') != '') {
        ?>
				 <li><a href="<?php 
        echo get_the_author_meta('googleplus');
        ?>
"><i class="fa fa-google-plus"></i></a></li>
				 <?php 
    }
    ?>
				 
				 <?php 
    if (get_the_author_meta('github') != '') {
        ?>
				 <li><a href="<?php 
        echo get_the_author_meta('github');
        ?>
"><i class="fa fa-github"></i></a></li>
				 <?php 
    }
    ?>
				 
				 <?php 
    if (get_the_author_meta('public_email') != '') {
        ?>
				 <li><a href="mailto:<?php 
        echo get_the_author_meta('public_email');
        ?>
"><i class="fa fa-envelope-o"></i></a></li>
				 <?php 
    }
    ?>
				 
				 <?php 
    if (get_the_author_meta('user_url') != '') {
        ?>
				 <li><a href="<?php 
        echo get_the_author_meta('user_url');
        ?>
"><i class="fa fa-laptop"></i> </a></li>
				 <?php 
    }
    ?>
				 
				</ul>

				<?php 
    if (is_single()) {
        ?>
					<a id="view-all-posts" href="<?php 
        echo get_author_posts_url(get_the_author_meta('ID'));
        ?>
">View all posts by <?php 
        echo get_the_author();
        ?>
</a> 
				<?php 
    }
    ?>

			</div>
		</div>
	</div>
	<?php 
}