]> git.mxchange.org Git - friendica.git/blobdiff - mod/events.php
quattro: add "view in context" link in search results
[friendica.git] / mod / events.php
old mode 100644 (file)
new mode 100755 (executable)
index 5bc9807..5da8f17
@@ -112,17 +112,7 @@ function events_content(&$a) {
 
        $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 .= profile_tabs($a, True);   
 
        $o .= '<h2>' . t('Events') . '</h2>';
 
@@ -238,6 +228,9 @@ function events_content(&$a) {
                                if($d !== $last_date)
                                        $o .= '<hr /><a name="link-' . $j . '" ><div class="event-list-date">' . $d . '</div></a>';
                                $last_date = $d;
+                               if($rr['author-name']) {
+                                       $o .= '<a href="' . $rr['author-link'] . '" ><img src="' . $rr['author-avatar'] . '" height="32" width="32" />' . $rr['author-name'] . '</a>';
+                               }
                                $o .= format_event_html($rr);
                                $o .= ((! $rr['cid']) ? '<a href="' . $a->get_baseurl() . '/events/event/' . $rr['id'] . '" title="' . t('Edit event') . '" class="edit-event-link icon pencil"></a>' : '');
                                if($rr['plink'])
@@ -286,9 +279,9 @@ function events_content(&$a) {
                $sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
                $fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
 
-               $tz = ((x($orig_event) && $orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
-
+               $tz = date_default_timezone_get();
+               if(x($orig_event))
+                       $tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
 
                $syear = datetime_convert('UTC', $tz, $sdt, 'Y');
                $smonth = datetime_convert('UTC', $tz, $sdt, 'm');