aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/views')
-rw-r--r--mod/profile/views/default/profile/profile_content.php13
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/activity.php48
-rw-r--r--mod/profile/views/default/profile/profile_contents/commentwall.php9
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/details.php87
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/friends.php15
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/twitter.php10
-rw-r--r--mod/profile/views/default/profile/sidebar.php (renamed from mod/profile/views/default/profile/profile_contents/sidebar.php)0
7 files changed, 91 insertions, 91 deletions
diff --git a/mod/profile/views/default/profile/profile_content.php b/mod/profile/views/default/profile/profile_content.php
new file mode 100644
index 000000000..4fb43e7c9
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_content.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Wrapper for profile content
+ *
+ * @uses string $vars['content'] - Profile body
+ */
+
+$content = elgg_get_array_value('content', $vars, '');
+
+?>
+<div id="profile_content">
+ <?php echo $content; ?>
+</div> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/activity.php b/mod/profile/views/default/profile/profile_contents/activity.php
index 588ed89d1..ccd2a3915 100755
--- a/mod/profile/views/default/profile/profile_contents/activity.php
+++ b/mod/profile/views/default/profile/profile_contents/activity.php
@@ -2,29 +2,31 @@
/**
* 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;
-?>
-<div id="profile_content">
- <?php
- 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');
- }
+$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 "Riverdashboard not loaded";
+ echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,false);
+ echo elgg_view('riverdashboard/js');
}
- ?>
-</div>
+} else {
+ // @todo this should not be here.
+ echo "Riverdashboard not loaded";
+} \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/commentwall.php b/mod/profile/views/default/profile/profile_contents/commentwall.php
index f3a2adb1c..7e8a1d97d 100644
--- a/mod/profile/views/default/profile/profile_contents/commentwall.php
+++ b/mod/profile/views/default/profile/profile_contents/commentwall.php
@@ -2,12 +2,9 @@
/**
* Elgg profile comment wall
*/
-?>
-<div id="profile_content">
-<?php
-if(isloggedin()){
+
+if (isloggedin()) {
echo elgg_view("profile/commentwall/commentwalladd");
}
+
echo elgg_view("profile/commentwall/commentwall", array('annotation' => $vars['comments']));
-?>
-</div> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/details.php b/mod/profile/views/default/profile/profile_contents/details.php
index d040cef75..6a214557d 100755
--- a/mod/profile/views/default/profile/profile_contents/details.php
+++ b/mod/profile/views/default/profile/profile_contents/details.php
@@ -3,54 +3,47 @@
* Elgg user display (details)
* @uses $vars['entity'] The user entity
*/
-?>
-<div id="profile_content">
-<?php
- // Simple XFN
- $rel = "";
- if (page_owner() == $vars['entity']->guid)
- $rel = 'me';
- else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
- $rel = 'friend';
- $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
- }
- }
- }
-?>
-<?php
- if (!get_plugin_setting('user_defined_fields', 'profile')) {
-?>
-<?php
- 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>";
+// Simple XFN
+$rel = "";
+if (page_owner() == $vars['entity']->guid) {
+ $rel = 'me';
+} else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) {
+ $rel = 'friend';
+}
+
+$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
}
- ?>
-<?php } ?>
- <?php
}
+ }
+}
- echo "</div>"; \ No newline at end of file
+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>";
+ }
+ }
+} \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/friends.php b/mod/profile/views/default/profile/profile_contents/friends.php
index a097f3830..9195629e5 100755
--- a/mod/profile/views/default/profile/profile_contents/friends.php
+++ b/mod/profile/views/default/profile/profile_contents/friends.php
@@ -3,13 +3,10 @@
* Profile friends
**/
-$friends = list_entities_from_relationship('friend',$vars['entity']->getGUID(),false,'user','',0,10,false);
-if(!$friends)
- $friends = "<p>This user has not made any friends yet.</p>";
+$friends = list_entities_from_relationship('friend', $vars['entity']->getGUID(), FALSE, 'user', '', 0, 10, FALSE);
-?>
-<div id="profile_content">
- <?php
- echo $friends;
- ?>
-</div> \ No newline at end of file
+if(!$friends) {
+ $friends = '<p>' . elgg_echo('profile:no_friends') . '</p>';
+}
+
+echo $friends; \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/twitter.php b/mod/profile/views/default/profile/profile_contents/twitter.php
index f9b6f5d54..06a0551d4 100755
--- a/mod/profile/views/default/profile/profile_contents/twitter.php
+++ b/mod/profile/views/default/profile/profile_contents/twitter.php
@@ -8,12 +8,10 @@ $twitter_username = $vars['entity']->twitter;
// if the twitter username is empty, then do not show
if($twitter_username){
?>
-<div id="profile_content">
- <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>
-</div>
+<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
diff --git a/mod/profile/views/default/profile/profile_contents/sidebar.php b/mod/profile/views/default/profile/sidebar.php
index 43e3d1087..43e3d1087 100644
--- a/mod/profile/views/default/profile/profile_contents/sidebar.php
+++ b/mod/profile/views/default/profile/sidebar.php