diff options
author | Friendika <info@friendika.com> | 2011-10-17 14:52:03 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-17 14:52:03 -0700 |
commit | 278433eac75639052686f70e98621466d6c44df3 (patch) | |
tree | ac9d4dbe9d6a64636143d9a6eb8e591245129143 /include/bb2diaspora.php | |
parent | b820dfa31fd0fead82f238f18c965dcdbf5f672d (diff) | |
download | volse-hubzilla-278433eac75639052686f70e98621466d6c44df3.tar.gz volse-hubzilla-278433eac75639052686f70e98621466d6c44df3.tar.bz2 volse-hubzilla-278433eac75639052686f70e98621466d6c44df3.zip |
origin flag handling, and bug #137 - provide timezone conversion for events posted across to Diaspora
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index c72c78445..bdf278213 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -11,12 +11,7 @@ function diaspora2bb($s) { $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s); $s = Markdown($s); $s = html2bbcode($s); - -// $s = preg_replace('/\[url=(.+?)\<em\>(.+?)\]/ism','[url=$1_$2]',$s); -// $s = preg_replace('/\[url=(.+?)\<\/em\>(.+?)\]/ism','[url=$1_$2]',$s); - return $s; - } @@ -185,6 +180,8 @@ function bb2diaspora($Text,$preserve_nl = false) { function format_event_diaspora($ev) { + $a = get_app(); + if(! ((is_array($ev)) && count($ev))) return ''; @@ -194,20 +191,20 @@ function format_event_diaspora($ev) { $o .= '**' . bb2diaspora($ev['desc']) . '**' . "\n"; - $o .= t('Starts:') . ' ' + $o .= t('Starts:') . ' ' . '[' . (($ev['adjust']) ? day_translate(datetime_convert('UTC', 'UTC', $ev['start'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $ev['start'] , $bd_format))) - . "\n"; + . '](' . $a->get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n"; if(! $ev['nofinish']) - $o .= t('Finishes:') . ' ' + $o .= t('Finishes:') . ' ' . '[' . (($ev['adjust']) ? day_translate(datetime_convert('UTC', 'UTC', $ev['finish'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $ev['finish'] , $bd_format ))) - . "\n"; + . '](' . $a->get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['finish'])) . ")\n"; if(strlen($ev['location'])) $o .= t('Location:') . bb2diaspora($ev['location']) |