diff options
author | friendica <info@friendica.com> | 2012-06-25 20:55:27 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-06-25 20:55:27 -0700 |
commit | fbaca4b74237c80c380d6ccf2bdddeec5ad4f013 (patch) | |
tree | ca1ca05c84f8bd17acab9749b674d3b23fdcd2a5 /include/event.php | |
parent | 53f0aee82d61b7d61fb2271eb7f41cacc2eaf8f3 (diff) | |
download | volse-hubzilla-fbaca4b74237c80c380d6ccf2bdddeec5ad4f013.tar.gz volse-hubzilla-fbaca4b74237c80c380d6ccf2bdddeec5ad4f013.tar.bz2 volse-hubzilla-fbaca4b74237c80c380d6ccf2bdddeec5ad4f013.zip |
event summary/title
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php index 866ae8c3f..8aef0a263 100644 --- a/include/event.php +++ b/include/event.php @@ -12,6 +12,9 @@ function format_event_html($ev) { $o = '<div class="vevent">' . "\r\n"; + + $o .= '<p class="summary event-summary">' . bbcode($ev['summary']) . '</p>' . "\r\n"; + $o .= '<p class="description event-description">' . bbcode($ev['desc']) . '</p>' . "\r\n"; $o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="' @@ -114,6 +117,9 @@ function format_event_bbcode($ev) { $o = ''; + if($ev['summary']) + $o .= '[event-summary]' . $ev['summary'] . '[/event-summary]'; + if($ev['desc']) $o .= '[event-description]' . $ev['desc'] . '[/event-description]'; @@ -148,6 +154,9 @@ function bbtoevent($s) { $ev = array(); $match = ''; + if(preg_match("/\[event\-summary\](.*?)\[\/event\-summary\]/is",$s,$match)) + $ev['summary'] = $match[1]; + $match = ''; if(preg_match("/\[event\-description\](.*?)\[\/event\-description\]/is",$s,$match)) $ev['desc'] = $match[1]; $match = ''; @@ -244,6 +253,7 @@ function event_store($arr) { `edited` = '%s', `start` = '%s', `finish` = '%s', + `summary` = '%s', `desc` = '%s', `location` = '%s', `type` = '%s', @@ -258,6 +268,7 @@ function event_store($arr) { dbesc($arr['edited']), dbesc($arr['start']), dbesc($arr['finish']), + dbesc($arr['summary']), dbesc($arr['desc']), dbesc($arr['location']), dbesc($arr['type']), @@ -306,9 +317,9 @@ function event_store($arr) { // New event. Store it. - $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`desc`,`location`,`type`, + $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`summary`, `desc`,`location`,`type`, `adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ", + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ", intval($arr['uid']), intval($arr['cid']), dbesc($arr['uri']), @@ -316,6 +327,7 @@ function event_store($arr) { dbesc($arr['edited']), dbesc($arr['start']), dbesc($arr['finish']), + dbesc($arr['summary']), dbesc($arr['desc']), dbesc($arr['location']), dbesc($arr['type']), |