diff options
author | Friendika <info@friendika.com> | 2011-10-14 00:20:37 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-14 00:20:37 -0700 |
commit | af6ab381000346f487d1b5b07623510640dd7ee5 (patch) | |
tree | 4cbe000aa2f095a01a7439bb07d793b2fc04b364 /boot.php | |
parent | 05e26e489580c82d0db237771d159aed287c5f9b (diff) | |
download | volse-hubzilla-af6ab381000346f487d1b5b07623510640dd7ee5.tar.gz volse-hubzilla-af6ab381000346f487d1b5b07623510640dd7ee5.tar.bz2 volse-hubzilla-af6ab381000346f487d1b5b07623510640dd7ee5.zip |
diaspora birthday notifications
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -10,7 +10,7 @@ require_once('include/nav.php'); define ( 'FRIENDIKA_PLATFORM', 'Free Friendika'); define ( 'FRIENDIKA_VERSION', '2.3.1133' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); -define ( 'DB_UPDATE_VERSION', 1095 ); +define ( 'DB_UPDATE_VERSION', 1096 ); define ( 'EOL', "<br />\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -974,6 +974,7 @@ function get_birthdays() { return $o; $bd_format = t('g A l F d') ; // 8 AM Friday January 18 + $bd_short = t('F d'); $r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event` LEFT JOIN `contact` ON `contact`.`id` = `event`.`cid` @@ -993,7 +994,7 @@ function get_birthdays() { if($total) { $o .= '<div id="birthday-notice" class="birthday-notice fakelink" onclick=openClose(\'birthday-wrapper\'); >' . t('Birthday Reminders') . ' ' . '(' . $total . ')' . '</div>'; $o .= '<div id="birthday-wrapper" style="display: none;" ><div id="birthday-title">' . t('Birthdays this week:') . '</div>'; - $o .= '<div id="birthday-adjust">' . t("\x28Adjusted for local time\x29") . '</div>'; +// $o .= '<div id="birthday-adjust">' . t("\x28Adjusted for local time\x29") . '</div>'; $o .= '<div id="birthday-title-end"></div>'; foreach($r as $rr) { @@ -1001,10 +1002,16 @@ function get_birthdays() { continue; $now = strtotime('now'); $today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false); + $sparkle = ''; + $url = $rr['url']; + if($rr['network'] === NETWORK_DFRN) { + $sparkle = " sparkle"; + $url = $a->get_baseurl() . '/redir/' . $rr['cid']; + } - $o .= '<div class="birthday-list" id="birthday-' . $rr['eid'] . '"><a class="sparkle" target="redir" href="' - . $a->get_baseurl() . '/redir/' . $rr['cid'] . '">' . $rr['name'] . '</a> ' - . day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '') + $o .= '<div class="birthday-list" id="birthday-' . $rr['eid'] . '"><a class="birthday-link$sparkle" target="redir" href="' + . $url . '">' . $rr['name'] . '</a> ' + . day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . t('[today]') : '') . '</div>' ; } $o .= '</div></div>'; |