X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fevents.php;h=27ca698307852a941b93eae88c2affe1766c29d4;hb=cfc7f8308f5e1756d1ea7b2fadd317821442d16c;hp=07231eb057745f0c8a33d874e89801e7cdf55065;hpb=dbf6ee6a0578a0b4244852b74dac549a25e6f05d;p=friendica.git
diff --git a/mod/events.php b/mod/events.php
index 07231eb057..27ca698307 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 .= '
' . t('Events') . '
';
+
$mode = 'view';
$y = 0;
$m = 0;
@@ -166,9 +181,10 @@ function events_content(&$a) {
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
-dbg(1);
- $r = q("SELECT `event`.*, `item`.`id` AS `itemid`,`item`.`plink` FROM `event` LEFT JOIN `item` ON `item`.`event-id` = `event`.`id`
+
+ $r = q("SELECT `event`.*, `item`.`id` AS `itemid`,`item`.`plink`,
+ `item`.`author-name`, `item`.`author-avatar`, `item`.`author-link` FROM `event` LEFT JOIN `item` ON `item`.`event-id` = `event`.`id`
WHERE `event`.`uid` = %d
AND (( `adjust` = 0 AND `start` >= '%s' AND `start` <= '%s' )
OR ( `adjust` = 1 AND `start` >= '%s' AND `start` <= '%s' )) ",
@@ -178,7 +194,7 @@ dbg(1);
dbesc($adjust_start),
dbesc($adjust_finish)
);
-dbg(0);
+
$links = array();
if(count($r)) {
@@ -203,10 +219,6 @@ dbg(0);
-
-
-
-
$last_date = '';
$fmt = t('l, F j');
@@ -220,7 +232,7 @@ dbg(0);
$o .= '
' . $d . '
';
$last_date = $d;
$o .= format_event_html($rr);
- $o .= '';
+ $o .= ((! $rr['cid']) ? '' : '');
if($rr['plink'])
$o .= '';
@@ -285,6 +297,12 @@ dbg(0);
$fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : 0);
$fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : 0);
+ $f = get_config('system','event_input_format');
+ if(! $f)
+ $f = 'ymd';
+
+ $dateformat = datesel_format($f);
+ $timeformat = t('hour:minute');
require_once('include/acl_selectors.php');
@@ -294,14 +312,14 @@ dbg(0);
'$cid' => $cid,
'$uri' => $uri,
'$e_text' => t('Event details'),
- '$e_desc' => t('Format is year-month-day hour:minute. Starting date and Description are required.'),
+ '$e_desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat),
'$s_text' => t('Event Starts:') . ' * ',
- '$s_dsel' => datesel('start',$syear+5,$syear,false,$syear,$smonth,$sday),
+ '$s_dsel' => datesel($f,'start',$syear+5,$syear,false,$syear,$smonth,$sday),
'$s_tsel' => timesel('start',$shour,$sminute),
'$n_text' => t('Finish date/time is not known or not relevant'),
'$n_checked' => $n_checked,
'$f_text' => t('Event Finishes:'),
- '$f_dsel' => datesel('finish',$fyear+5,$fyear,false,$fyear,$fmonth,$fday),
+ '$f_dsel' => datesel($f,'finish',$fyear+5,$fyear,false,$fyear,$fmonth,$fday),
'$f_tsel' => timesel('finish',$fhour,$fminute),
'$a_text' => t('Adjust for viewer timezone'),
'$a_checked' => $a_checked,
@@ -318,4 +336,4 @@ dbg(0);
return $o;
}
-}
\ No newline at end of file
+}