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>";
}
Exemple #2
0
							<br />

							<?php 
do_action('profile_personal_options', $current_user);
do_action('show_user_profile', $current_user);
?>

							<table class="form-table" id="userphoto">
								<tr>
									<th><label for="user_login">&nbsp;</label></th>
									<td><?php 
if (function_exists('userphoto_exists')) {
    ?>
<p class='image'><?php 
    if (userphoto_exists($current_user->ID)) {
        userphoto_thumbnail($current_user->ID);
    } else {
        echo get_avatar($current_user->user_email, 96);
    }
    ?>
<br /><?php 
    _e('Thumbnail', APP_TD);
    ?>
</p><?php 
}
?>
</td>
								</tr>
							</table>
Exemple #3
0
 private function _displayAuthor($args, $instance)
 {
     global $authordata;
     extract($args);
     // extract arguments
     if ((is_single() || is_page()) && $authordata->ID) {
         if ($instance['seq'] == 1) {
             echo $before_widget;
             echo $before_title . $instance['title'] . $after_title;
         }
         echo '<div id="author-spotlight">';
         echo '<div id="author-profile">';
         //Display author name
         echo '<h2>' . get_the_author_firstname() . ' ' . get_the_author_lastname() . '</h2>';
         //Display the social icons
         $socialDiv = "";
         $iconCount = 0;
         $style = "height:12px";
         foreach ($this->_getIconsAsArray() as $key => $data) {
             $print_img = false;
             $social_url = get_the_author_meta($key, $authordata->ID);
             //The Website or Homepahge URL should be read from Author-Data
             if ($data['img_title'] == 'Homepage' && $authordata->user_url) {
                 $socialDiv .= '<a href="' . $authordata->user_url . '" target="_blank" title="' . $data['img_title'] . '">';
                 $print_img = true;
             } else {
                 if ($social_url != "") {
                     $socialDiv .= '<a href="' . $social_url . '" target="_blank" title="' . $data['img_title'] . '">';
                     $print_img = true;
                 }
             }
             //If the URL is available & the Icon is enabled from Widget Admin, display it
             if ($print_img && $instance[$key]) {
                 $socialDiv .= '<img src="' . $data['img_src'] . '" title="' . $data['img_title'] . '" alt="' . $data['img_title'] . '" /></a>';
                 ++$iconCount;
             }
         }
         if ($iconCount <= 0) {
             $style = "display:none;";
         } else {
             if ($iconCount / 2 >= 6) {
                 $style = "height: 36px";
             }
         }
         printf('<div id="social-icons" style="%s">', $style);
         echo $socialDiv;
         echo "</div><!--#social-icons-->";
         //Display User photo OR the Gravatar
         if (function_exists('userphoto_exists') && userphoto_exists($authordata)) {
             userphoto_thumbnail($authordata);
         } else {
             echo get_avatar($authordata->ID, 96);
         }
         //Display author profile, with link to full profile
         $author_posts_link = get_author_posts_url($authordata->ID, $authordata->user_nicename);
         echo '<div id="author-description">';
         echo $this->_getSnippet(get_the_author_description(), $instance['charlimit'], '...') . '&nbsp;<i><a href="' . $author_posts_link . '" title="Read full Profile">' . $instance['readfulltext'] . '</a></i>';
         echo "</div><!--#author-description-->";
         echo '<div id="author-link"><a href="' . $author_posts_link . '" title="More articles by this author">' . $instance['moretext'] . '</a></div>';
         echo "</div><!--#author-profile-->";
         echo "</div><!--#author-spotlight-->";
         if ($instance['isLast']) {
             echo $after_widget;
         }
     }
 }
<?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);
?>
Exemple #5
0
    	<div class="container">
            <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 
        the_content();
        ?>

<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>
Exemple #7
0
		<?php 
$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 {
    ?>
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 
}