aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 13:23:37 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 13:23:37 +0000
commit8b83d3826376ccd989ac1669f025af4fabd15364 (patch)
tree9695258b7784ec1d6589fe6d315c032a6d9db4bf /mod
parent2245e8d952a0aa7f5ccb75ebda9e6b0afe09e70d (diff)
downloadelgg-8b83d3826376ccd989ac1669f025af4fabd15364.tar.gz
elgg-8b83d3826376ccd989ac1669f025af4fabd15364.tar.bz2
feeds options added to the profile
git-svn-id: http://code.elgg.org/elgg/trunk@5617 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/profile/profile_lib.php3
-rw-r--r--mod/profile/views/default/profile/profile_contents/feeds.php20
-rwxr-xr-xmod/profile/views/default/profile/profile_navigation.php11
3 files changed, 33 insertions, 1 deletions
diff --git a/mod/profile/profile_lib.php b/mod/profile/profile_lib.php
index 993985279..b38286e1e 100644
--- a/mod/profile/profile_lib.php
+++ b/mod/profile/profile_lib.php
@@ -29,6 +29,9 @@ function profile_get_user_profile_html($user, $section = 'activity') {
case 'twitter':
$body .= elgg_view('profile/profile_contents/twitter', $view_options);
break;
+ case 'feeds':
+ $body .= elgg_view('profile/profile_contents/feeds', $view_options);
+ break;
case 'commentwall':
$comments = $user->getAnnotations('commentwall', 200, 0, 'desc');
$body .= elgg_view('profile/profile_contents/commentwall', array("entity" => $user, "comments" => $comments));
diff --git a/mod/profile/views/default/profile/profile_contents/feeds.php b/mod/profile/views/default/profile/profile_contents/feeds.php
new file mode 100644
index 000000000..bff9ea1ea
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/feeds.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Elgg profile feeds page
+ */
+
+//$twitter_username = $vars['entity']->twitter;
+$page_owner = page_owner();
+$feeds = elgg_get_entities(array('types' => 'object', 'subtypes' => 'aggregator_feed_url', 'owner_guids' => $page_owner));
+
+// if the twitter username is empty, then do not show
+?>
+<div id="profile_content">
+<?php
+if($feeds){
+ echo elgg_view('aggregator/profile',array('feeds'=>$feeds));
+}else{
+ echo "This user has not added any feeds.";
+}
+?>
+</div> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/profile_navigation.php
index 1c2c782c7..a08cd847d 100755
--- a/mod/profile/views/default/profile/profile_navigation.php
+++ b/mod/profile/views/default/profile/profile_navigation.php
@@ -30,7 +30,10 @@ switch($section){
case 'commentwall':
$commentwall = 'class="selected"';
break;
-
+ case 'feeds':
+ $feeds = 'class="selected"';
+ break;
+
case 'activity':
default:
$activity = 'class="selected"';
@@ -45,6 +48,12 @@ switch($section){
<li <?php echo $friends; ?>><a href="<?php echo $url . 'friends'; ?>">Friends</a></li>
<li <?php echo $commentwall; ?>><a href="<?php echo $url . 'commentwall'; ?>">Comment Wall</a></li>
<?php
+ //check to see if the aggregator plugin is enabled
+ if(is_plugin_enabled('aggregator')){
+ ?>
+ <li <?php echo $feeds; ?>><a href="<?php echo $url . 'feeds'; ?>">Feeds</a></li>
+ <?php
+ }
//check to see if the twitter username is set
if($vars['entity']->twitter){
?>