-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathauthor.php
131 lines (80 loc) · 3.88 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
<?php
//header("Location: ".get_settings('home')."/wp-allauthors.php");
//if(isset($_GET['author_name'])){$curauth = get_userdatabylogin($author_name);
if(isset($_GET['author_name'])){$curauth = get_userdatabylogin($_GET['author_name']);
}else {
$curauth = get_userdata(intval($author));
}
get_header();
//echo $curauth->ID;
?>
<div id="content">
<div id="contentleft">
<!---------------------- This sets the $curauth variable ------------------------
-->
<?php
dprint_r($curauth);
?>
<TABLE>
<TR>
<TD><?php echo get_avatar( $curauth->user_email, '80' ); ?></TD>
<TD valign="top"><h1 style="color:#000; padding:0px;margin:0px"><?php echo $curauth->user_firstname;?> <?php echo $curauth->user_lastname;?> </h1>(<a href="<?php echo $curauth->user_url;?>"><?php echo $curauth->display_name;?></a>)
<?php echo $curauth->user_description; ?> <br>Added <strong><?php echo author__post_count($curauth->ID);?></strong> sessions so far.
</TD>
</TR>
</TABLE>
<br />
<!-------------------------------author ends-------------------------------------
-->
<?php
if($curauth->user_login != 'mixdevWWWWWWW'){ //nothing man nothing =D leave it
$postsatt = $wpdb->get_results("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = 'user_attending' AND meta_value = '$curauth->user_login'");
if(isset($postsatt)){
echo "<h1 style=\"color:#999\">$curauth->display_name is Attending ".count($postsatt)." sessions:</h1>";
//$qarr = implode(", ",$postatt);
//$postZatt = $wpdb->get_results("SELECT * from $wpdb->posts W
//print_r($postsatt);
foreach($postsatt as $attpost)
{
$my_id = $attpost->post_id;
$ph = get_post($my_id);
$post_permalink = get_permalink( $my_id );
echo "<h2 class=\"postinfoh2\">",++$dumpooooooooo,") <a href=\"$post_permalink\" rel=\"bookmark\">$ph->post_title</a></h2>";
//echo "<h2 class=\"postinfoh2\">",++$dumpooooooooo,") <a href=\"http://barcampbangalore.org/bcb8/$ph->post_name\" rel=\"bookmark\">$ph->post_title</a></h2>";
// echo "<div class=\"postinfoarchive\"> <img src=\"http://www.gravatar.com/avatar/4defdd90c9fc636fbaa76493962438e7?s=16&d=wavatar&r=G\" class='avatar avatar-16' height='16' width='16' /> <a href=\"http://barcampbangalore.org/author/kakashi_\">kakashi_</a> | <a href=\"http://barcampbangalore.org/bcb8/machine-translation-of-indian-languages-and-challenges#respond\" title=\"Comment on Machine Translation of Indian Languages and Challenges\">Leave a Comment</a> | Filed Under <a href=\"http://barcampbangalore.org/event/bcb8\" title=\"View all posts in BCB8\" rel=\"category tag\">BCB8</a>, <a href=\"http://barcampbangalore.org/event/bcb8/themed\" title=\"View all posts in theme session\" rel=\"category tag\">theme session</a> </div><div style=\"clear:both\"></div>";
}//foreach
echo "<div style=\"clear:both\"></div><p>";
}
}
//if(!$curauth->ID)
{
echo "<h1 style=\"color:#999\">$curauth->display_name is Presenting the following sessions: </h1>";
if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php //the_content(__('Read more'));?><div style="clear:both;"></div>
<div class="postinfo">
Filed Under <?php the_category(', ') ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?> <?php edit_post_link('(Edit)', '', ''); ?>
</div>
<!--
<?php trackback_rdf(); ?>
-->
<?php endwhile; else: ?>
<p><?php _e(''); ?></p><?php endif; ?>
<?php posts_nav_link(' — ', __('« go back'), __('keep looking »')); ?>
<!--
<p><?php //posts_nav_link(' — ', __('← Previous Page'), __('Next Page →')); ?></p>
-->
</div>
<?php
}
//else
{
?>
<?php
}
?>
<?php include(TEMPLATEPATH."/l_author_sidebar.php");?>
<?php include(TEMPLATEPATH."/r_sidebar.php");?>
</div>
<!-- The main column ends -->
<?php get_footer(); ?>