This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathauthor.php
172 lines (97 loc) · 2.9 KB
/
author.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?php
/*
Template Name: Author
*/
// get author info
if ( isset( $_GET['author_name'] ) ) {
$my_author = get_userdatabylogin( $author_name );
} else {
$my_author = get_userdata(intval($author));
}
// init url (because it can be 'http://' -> doh!)
$authorURL = '';
// do we have an URL for this user?
if ( $my_author->user_url != '' AND $my_author->user_url != 'http://' ) {
// set url
$authorURL = $my_author->user_url;
}
get_header();
?>
<!-- author.php -->
<div id="wrapper">
<div id="main_wrapper" class="clearfix">
<div id="page_wrapper">
<div id="content" class="clearfix">
<div class="post">
<?php if ( $my_author->display_name != '' ) { ?>
<h2 class="post_title">About <?php echo $my_author->display_name; ?></h2>
<?php } else { ?>
<h2 class="post_title">About <?php echo $my_author->nickname; ?></h2>
<?php } ?>
<p><?php echo get_avatar( $my_author->user_email, $size='128' ); ?></p>
<dl>
<?php
/*
?>
<dt>Gravatar</dt>
<dd><?php echo get_avatar( $my_author->user_email, $size='128' ); ?></dd>
// get full name
$my_name = cp_get_full_name( $my_author->first_name, $my_author->last_name );
if ( $my_name != '' ) { ?>
<dt>Name</dt>
<dd><?php echo $my_name; ?></dd>
<?php } ?>
<?php if ( $my_author->display_name != '' ) { ?>
<dt>Display Name</dt>
<dd><?php echo $my_author->display_name; ?></dd>
<?php } ?>
<?php
*/
if ( $my_author->description != '' ) { ?>
<dt>Profile</dt>
<dd><?php echo nl2br( $my_author->description ); ?></dd>
<?php } ?>
<?php if ( $authorURL != '' ) { ?>
<dt>Website</dt>
<dd><a href="<?php echo $my_author->user_url; ?>"><?php echo $my_author->user_url; ?></a></dd>
<?php } ?>
<?php if ( $my_author->user_email != '' ) { ?>
<dt>Email</dt>
<dd><a href="mailto:<?php echo $my_author->user_email; ?>"><?php echo $my_author->user_email; ?></a></dd>
<?php } ?>
<?php if ( $my_author->yim != '' ) { ?>
<dt>Yahoo IM</dt>
<dd><?php echo $my_author->yim; ?></dd>
<?php } ?>
<?php if ( $my_author->aim != '' ) { ?>
<dt>AIM</dt>
<dd><?php echo $my_author->aim; ?></dd>
<?php } ?>
<?php if ( $my_author->jabber != '' ) { ?>
<dt>Jabber / Google Talk</dt>
<dd><?php echo $my_author->jabber; ?></dd>
<?php } ?>
</dl>
<?php if ( $my_author->display_name != '' ) { ?>
<h3>Posts by <?php echo $my_author->display_name; ?></h3>
<?php } else { ?>
<h3>Posts by <?php echo $my_author->nickname; ?></h3>
<?php } ?>
<ul>
<!-- The Loop -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a> on <?php the_time('l, F jS, Y'); ?>
</li>
<?php endwhile; else: ?>
<p><?php _e( 'No posts by this author.','commentpress-theme' ); ?></p>
<?php endif; ?>
<!-- End Loop -->
</ul>
</div><!-- /post -->
</div><!-- /content -->
</div><!-- /page_wrapper -->
</div><!-- /main_wrapper -->
</div><!-- /wrapper -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>