]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
feeds options added to the profile
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 5 Apr 2010 13:23:37 +0000 (13:23 +0000)
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 5 Apr 2010 13:23:37 +0000 (13:23 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5617 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/profile/profile_lib.php
mod/profile/views/default/profile/profile_contents/feeds.php [new file with mode: 0644]
mod/profile/views/default/profile/profile_navigation.php

index 993985279559c7244c14c625ca97bbeee31d596d..b38286e1e29a99d3b238afa4b2583a0de2bafa01 100644 (file)
@@ -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 (file)
index 0000000..bff9ea1
--- /dev/null
@@ -0,0 +1,20 @@
+<?php\r
+/**\r
+ * Elgg profile feeds page\r
+ */\r
+\r
+//$twitter_username = $vars['entity']->twitter;\r
+$page_owner = page_owner();\r
+$feeds = elgg_get_entities(array('types' => 'object', 'subtypes' => 'aggregator_feed_url', 'owner_guids' => $page_owner));\r
+\r
+// if the twitter username is empty, then do not show\r
+?>\r
+<div id="profile_content">\r
+<?php\r
+if($feeds){\r
+       echo elgg_view('aggregator/profile',array('feeds'=>$feeds));\r
+}else{\r
+       echo "This user has not added any feeds.";\r
+}\r
+?>\r
+</div>
\ No newline at end of file
index 1c2c782c7467e678359e81aa100710d2b09769e0..a08cd847ddfacb95b5ffc53512de7f6850ca69c8 100755 (executable)
@@ -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){
        ?>