This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
developer.php
83 lines (82 loc) · 2.5 KB
/
developer.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
<?php
/*
Template Name: developer
*/
get_header(); ?>
<div id="content" class="narrowcolumn" role="main">
<div id="developer_title">
<h1>Developers</h1>
</div>
<?php
if(!is_user_logged_in()){
echo '<div id="developer_join">';
echo '<h3><a href="'.get_bloginfo('url',false).'/wp-login.php?action=register">あなたもmodestに参加しましょう»</a><h3>';
echo '</div>';
}
?>
<?php
/*
ユーザ一覧のソート条件を最初に設定してください。
以下の中から選べます。
------------------------
* ID - ユーザID.
* user_login - ユーザログイン名.
* user_nicename - というのがあるみたいです。
* user_email - メールアドレス
* user_url - ユーザのURL
* user_registered - 登録日
*/
$szSort = "user_registered";
$aUsersID = $wpdb->get_col( $wpdb->prepare("SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC", $szSort ));
shuffle($aUsersID);
?>
<div id="developer_list">
<ul>
<?php
foreach ( $aUsersID as $iUserID ){
$user = get_userdata( $iUserID );
echo '<li class="developerinfo">';
echo '<table>';
echo '<a href="'. get_author_link($echo=false,$user->ID) .'"><h3>'. get_avatar( $user->ID,50 ) .' '. $user->display_name .'</h3></a>';
echo '<div id="profline"></div>';
the_author_meta( 'description' , $user->ID );
if(is_user_logged_in()){
echo '<td>';
if( $user->user_url != NULL){
echo '<tr>';
echo '<td>WebSite: </td>';
echo '<td><a href='.$user->user_url.'> ' . getPageTitle($user->user_url) . '</a></td>';
echo '</tr>';
}
if( $user->twitter_id != NULL){
echo '<tr>';
echo '<td>Twitter: </td>';
echo '<td><a href="https://twitter.com/'.$user->twitter_id.'" class="twitter-follow-button" data-show-count="false">Follow '. $user->twitter_id .'</a> <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script></td>';
echo '</tr>';
}
if( $user->facebook_id != NULL){
echo '<tr>';
echo '<td>Facebook: </td>';
echo '<td>' . $user->facebook_id . '</td>';
echo '</tr>';
}
if( $user->skype_id != NULL){
echo '<tr>';
echo '<td>Skype: </td>';
echo '<td>' . $user->skype_id . '</td>';
echo '</tr>';
}
echo '</td>';
}
echo '</table>';
echo '</li>';
/*
The strtolower and ucwords part is to be sure
the full names will all be capitalized.
*/
} // end the users loop.
?>
</ul>
</div>
</div>
<?php get_footer(); ?>