aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-23 04:10:12 -0700
committerFriendika <info@friendika.com>2011-06-23 04:10:12 -0700
commitfa778e0040df784c9eec5392731473e58fbfa0be (patch)
tree485529ec20593a502012b3f948c0d79c86a50333 /mod
parent96857389ac6a9ab11f0543da5b0af3895dfccfaf (diff)
parente7737d2ea46d18f6098885b9a5aa0fc9eef34d90 (diff)
downloadvolse-hubzilla-fa778e0040df784c9eec5392731473e58fbfa0be.tar.gz
volse-hubzilla-fa778e0040df784c9eec5392731473e58fbfa0be.tar.bz2
volse-hubzilla-fa778e0040df784c9eec5392731473e58fbfa0be.zip
Merge pull request #126 from fabrixxm/dispy
Dispy
Diffstat (limited to 'mod')
-rw-r--r--mod/events.php17
-rw-r--r--mod/notes.php14
-rw-r--r--mod/photos.php34
-rw-r--r--mod/profile.php5
4 files changed, 58 insertions, 12 deletions
diff --git a/mod/events.php b/mod/events.php
index 156b464ba..642da3cb7 100644
--- a/mod/events.php
+++ b/mod/events.php
@@ -103,8 +103,23 @@ function events_content(&$a) {
return;
}
+ $o ="";
+ // tabs
+ $tpl = get_markup_template('profile_tabs.tpl');
+ $o .= replace_macros($tpl,array(
+ '$url' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
+ '$phototab' => $a->get_baseurl() . '/photos/' . $a->user['nickname'],
+ '$status' => t('Status'),
+ '$profile' => t('Profile'),
+ '$photos' => t('Photos'),
+ '$events' => t('Events') ,
+ '$notes' => t('Personal Notes'),
+ '$activetab' => "events",
+ ));
+
$o .= '<h2>' . t('Events') . '</h2>';
+
$mode = 'view';
$y = 0;
$m = 0;
@@ -318,4 +333,4 @@ function events_content(&$a) {
return $o;
}
-} \ No newline at end of file
+}
diff --git a/mod/notes.php b/mod/notes.php
index 0f980ff67..9f1a4662d 100644
--- a/mod/notes.php
+++ b/mod/notes.php
@@ -36,6 +36,20 @@ function notes_content(&$a) {
$contact = $a->contact;
$is_owner = true;
+
+ $o ="";
+ // tabs
+ $tpl = get_markup_template('profile_tabs.tpl');
+ $o .= replace_macros($tpl,array(
+ '$url' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
+ '$phototab' => $a->get_baseurl() . '/photos/' . $a->user['nickname'],
+ '$status' => t('Status'),
+ '$profile' => t('Profile'),
+ '$photos' => t('Photos'),
+ '$events' => t('Events') ,
+ '$notes' => t('Personal Notes'),
+ '$activetab' => "notes",
+ ));
$o .= '<h3>' . t('Personal Notes') . '</h3>';
diff --git a/mod/photos.php b/mod/photos.php
index e52f67008..bbdb8b7e9 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -80,15 +80,15 @@ EOT;
function photos_post(&$a) {
-logger('mod/photos.php: photos_post(): begin' , 'LOGGER_DEBUG');
+ logger('mod/photos.php: photos_post(): begin' , 'LOGGER_DEBUG');
-foreach($_REQUEST AS $key => $val) {
- logger('mod/photos.php: photos_post(): $_REQUEST key: ' . $key . ' val: ' . $val , 'LOGGER_DEBUG');
-}
+ foreach($_REQUEST AS $key => $val) {
+ logger('mod/photos.php: photos_post(): $_REQUEST key: ' . $key . ' val: ' . $val , 'LOGGER_DEBUG');
+ }
-foreach($_FILES AS $key => $val) {
- logger('mod/photos.php: photos_post(): $_FILES key: ' . $key . ' val: ' . $val , 'LOGGER_DEBUG');
-}
+ foreach($_FILES AS $key => $val) {
+ logger('mod/photos.php: photos_post(): $_FILES key: ' . $key . ' val: ' . $val , 'LOGGER_DEBUG');
+ }
$can_post = false;
$visitor = 0;
@@ -836,6 +836,22 @@ function photos_content(&$a) {
);
}
+ $o = "";
+
+ // tabs
+ $tpl = get_markup_template('profile_tabs.tpl');
+ $_is_owner = (local_user() && (local_user() == $owner_uid));
+ $o .= replace_macros($tpl,array(
+ '$url' => $a->get_baseurl() . '/profile/' .$a->data['user']['nickname'],
+ '$phototab' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
+ '$status' => t('Status'),
+ '$profile' => t('Profile'),
+ '$photos' => t('Photos'),
+ '$events' => (($_is_owner) ? t('Events') : ''),
+ '$notes' => (($_is_owner) ? t('Personal Notes') : ''),
+ '$activetab' => "photos",
+ ));
+
//
// dispatch request
//
@@ -968,7 +984,7 @@ function photos_content(&$a) {
- $o = '';
+ //$o = '';
// fetch image, item containing image, then comments
$ph = q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'
@@ -1319,7 +1335,7 @@ function photos_content(&$a) {
}
// Default - show recent photos with upload link (if applicable)
- $o = '';
+ //$o = '';
$r = q("SELECT `resource-id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s'
$sql_extra GROUP BY `resource-id`",
diff --git a/mod/profile.php b/mod/profile.php
index 587ac6288..f2dd7f4df 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -116,8 +116,9 @@ function profile_content(&$a, $update = 0) {
'$status' => t('Status'),
'$profile' => t('Profile'),
'$photos' => t('Photos'),
- '$events' => (($is_owner) ? '<a href="events" id="profile-tab-events-link" class="profile-tabs" >' . t('Events') . '</a>' : ''),
- '$notes' => (($is_owner) ? '<a href="notes" id="profile-tab-notes-link" class="profile-tabs" >' . t('Personal Notes') . '</a>' : '')
+ '$events' => (($is_owner) ? t('Events') : ''),
+ '$notes' => (($is_owner) ? t('Personal Notes') : ''),
+ '$activetab' => $tab,
));