diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-19 01:44:33 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-19 01:44:33 +0000 |
commit | abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c (patch) | |
tree | 2f243448b156eb97b1b27a2efa38d791c1227bc5 /mod/tabbed_profile/views/default/profile/tabs | |
parent | fea009129f49f4f8d51654ceb569aae04387077b (diff) | |
download | elgg-abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c.tar.gz elgg-abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c.tar.bz2 |
rough widget profile plugin
git-svn-id: http://code.elgg.org/elgg/trunk@7676 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/tabbed_profile/views/default/profile/tabs')
6 files changed, 126 insertions, 0 deletions
diff --git a/mod/tabbed_profile/views/default/profile/tabs/activity.php b/mod/tabbed_profile/views/default/profile/tabs/activity.php new file mode 100755 index 000000000..ccd2a3915 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/activity.php @@ -0,0 +1,32 @@ +<?php +/** + * Elgg user display (details) + * @uses $vars['entity'] The user entity + * + * @todo this needs to recieve a list of activity or HTML in $vars that's generated by a plugin hook. + * None of this logic should be here. + */ +$limit = 20; + +if (is_plugin_enabled('thewire')) { + // users last status msg, if they posted one + echo elgg_view("profile/status", array("entity" => $vars['entity'])); +} + +if (is_plugin_enabled('conversations')) { + // users last status msg, if they posted one + echo elgg_view("profile/status", array("entity" => $vars['entity'])); +} + +if (is_plugin_enabled('riverdashboard')) { + //select the correct river + if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic') { + echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,true); + } else { + echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,false); + echo elgg_view('riverdashboard/js'); + } +} else { + // @todo this should not be here. + echo "Riverdashboard not loaded"; +}
\ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/commentwall.php b/mod/tabbed_profile/views/default/profile/tabs/commentwall.php new file mode 100644 index 000000000..bf54bd7e7 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/commentwall.php @@ -0,0 +1,13 @@ +<?php +/** + * Elgg profile comment wall + */ + +$user = elgg_get_page_owner(); +$comments = $user->getAnnotations('commentwall', 200, 0, 'desc'); + +if (isloggedin()) { + echo elgg_view("profile/commentwall/commentwalladd"); +} + +echo elgg_view("profile/commentwall/commentwall", array('annotation' => $comments)); diff --git a/mod/tabbed_profile/views/default/profile/tabs/details.php b/mod/tabbed_profile/views/default/profile/tabs/details.php new file mode 100755 index 000000000..27b0f943b --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/details.php @@ -0,0 +1,41 @@ +<?php +/** + * Elgg user display (details) + * @uses $vars['entity'] The user entity + */ + +$even_odd = null; +if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0) { + foreach($vars['config']->profile as $shortname => $valtype) { + if ($shortname != "description") { + $value = $vars['entity']->$shortname; + if (!empty($value)) { + //This function controls the alternating class + $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + ?> + <p class="<?php echo $even_odd; ?>"> + <b><?php + echo elgg_echo("profile:{$shortname}"); + ?>: </b> + <?php + echo elgg_view("output/{$valtype}", array('value' => $vars['entity']->$shortname)); + ?> + </p> + <?php + } + } + } +} + +if (!get_plugin_setting('user_defined_fields', 'profile')) { + if ($vars['entity']->isBanned()) { + echo "<div class='banned_user'>"; + echo elgg_echo('profile:banned'); + echo "</div>"; + } else { + if ($vars['entity']->description) { + echo "<p class='aboutme_title'><b>" . elgg_echo("profile:aboutme") . "</b></p>"; + echo "<div class='aboutme_contents'>" . elgg_view('output/longtext', array('value' => $vars['entity']->description)) . "</div>"; + } + } +} diff --git a/mod/tabbed_profile/views/default/profile/tabs/friends.php b/mod/tabbed_profile/views/default/profile/tabs/friends.php new file mode 100755 index 000000000..9195629e5 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/friends.php @@ -0,0 +1,12 @@ +<?php +/** + * Profile friends + **/ + +$friends = list_entities_from_relationship('friend', $vars['entity']->getGUID(), FALSE, 'user', '', 0, 10, FALSE); + +if(!$friends) { + $friends = '<p>' . elgg_echo('profile:no_friends') . '</p>'; +} + +echo $friends;
\ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/groups.php b/mod/tabbed_profile/views/default/profile/tabs/groups.php new file mode 100644 index 000000000..323bb61f1 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/groups.php @@ -0,0 +1,11 @@ +<?php
+/**
+ * Profile groups
+ **/
+$groups = list_entities_from_relationship('member',$vars['entity']->getGUID(),false,'group','',0, $limit,false, false);
+
+if(!$groups) {
+ $groups = '<p>' . elgg_echo('profile:no_groups') . '</p>';
+}
+
+echo $groups;
\ No newline at end of file diff --git a/mod/tabbed_profile/views/default/profile/tabs/twitter.php b/mod/tabbed_profile/views/default/profile/tabs/twitter.php new file mode 100755 index 000000000..06a0551d4 --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tabs/twitter.php @@ -0,0 +1,17 @@ +<?php +/** + * Elgg twitter view page + */ + +$twitter_username = $vars['entity']->twitter; + +// if the twitter username is empty, then do not show +if($twitter_username){ +?> +<ul id="twitter_update_list"></ul> +<p class="visit_twitter"><a href="http://twitter.com/<?php echo $twitter_username; ?>" target="_blank"><?php echo elgg_echo("twitter:visit"); ?></a></p> +<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script> +<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $twitter_username; ?>.json?callback=twitterCallback2&count=10"></script> + +<?php +}
\ No newline at end of file |