diff options
Diffstat (limited to 'mod')
| -rw-r--r-- | mod/profile/profile_lib.php | 3 | ||||
| -rw-r--r-- | mod/profile/views/default/profile/profile_contents/feeds.php | 20 | ||||
| -rwxr-xr-x | mod/profile/views/default/profile/profile_navigation.php | 11 | 
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){  	?>  | 
