source: trunk/www.guidonia.net/wp/wp-content/plugins/fbconnect/community.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 1.7 KB
Line 
1<?php
2/**
3 * @author: Javier Reyes Gomez (http://www.sociable.es)
4 * @date: 05/10/2008
5 * @license: GPLv2
6 */
7
8get_header();
9?>
10
11 <div class="fbnarrowcolumn narrowcolumn">
12
13<?php
14
15 $fb_user = fb_get_loggedin_user();
16 if(isset($fb_user) && $fb_user!=""){
17 $users = WPfbConnect_Logic::get_connected_friends($fb_user);
18 echo "<h2>".__('Community friends', 'fbconnect')."</h2>\n";
19 echo "<div class=\"fbconnect_userpics2\">\n";
20 foreach($users as $user){
21 echo "<div><a style=\"border: 2px solid #d5d6d7;\" onclick=\"location.href='./?fbconnect_action=myhome&fbuserid=".$user["uid"]."';\" href=\"./?fbconnect_action=myhome&fbuserid=".$user["uid"]."\"><fb:profile-pic uid=\"".$user["uid"]."\" size=\"square\" linked=\"false\"></fb:profile-pic></a></div>\n";
22 }
23 echo "</div>\n";
24 }else{
25
26 }
27?>
28
29<?php
30 $users_count = WPfbConnect_Logic::get_count_users();
31 echo "<h2>".__('Community', 'fbconnect')." (".$users_count." ".__('members', 'fbconnect').")</h2>";
32
33 $pos = 0;
34 if (isset ($_REQUEST["pos"])){
35 $pos= (int)$_REQUEST["pos"];
36 }
37 $viewusers = 50;
38 $users = WPfbConnect_Logic::get_lastusers_fbconnect($viewusers,$pos);
39
40 echo "<div class=\"fbconnect_userpics2\">";
41 foreach($users as $user){
42 echo get_avatar( $user->ID,50 );
43 }
44 echo "</div>";
45
46 if ($pos>=$viewusers){
47 echo '<a href="'.get_option('siteurl').'/?fbconnect_action=community&pos='.($pos-$viewusers).'">&laquo; '.__('Previous page', 'fbconnect').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';
48 }
49 if (($pos+$viewusers)<$users_count){
50 echo '<a href="'.get_option('siteurl').'/?fbconnect_action=community&pos='.($pos+$viewusers).'"> '.__('Next page', 'fbconnect').' &raquo;</a>';
51 }
52
53?>
54
55</div>
56
57
58<?php get_footer(); ?>
Note: See TracBrowser for help on using the repository browser.