From fbaca4b74237c80c380d6ccf2bdddeec5ad4f013 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 25 Jun 2012 20:55:27 -0700 Subject: [PATCH] event summary/title --- boot.php | 2 +- database.sql | 10 +++++++++- include/bbcode.php | 1 + include/event.php | 16 ++++++++++++++-- mod/events.php | 14 +++++++++++--- update.php | 11 ++++++++++- view/event_form.tpl | 4 ++++ view/theme/diabook/jot.tpl | 2 +- view/theme/duepuntozero/style.css | 7 +++++++ 9 files changed, 58 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index 024ef0c054..47e5b8600f 100644 --- a/boot.php +++ b/boot.php @@ -12,7 +12,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '3.0.1385' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1150 ); +define ( 'DB_UPDATE_VERSION', 1151 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 8178ffa866..b3b8c3a060 100644 --- a/database.sql +++ b/database.sql @@ -254,6 +254,7 @@ CREATE TABLE IF NOT EXISTS `event` ( `edited` datetime NOT NULL, `start` datetime NOT NULL, `finish` datetime NOT NULL, + `summary` text NOT NULL, `desc` text NOT NULL, `location` text NOT NULL, `type` char(255) NOT NULL, @@ -263,7 +264,14 @@ CREATE TABLE IF NOT EXISTS `event` ( `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, `deny_gid` mediumtext NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + KEY `uid` ( `uid` ), + KEY `cid` ( `cid` ), + KEY `uri` ( `uri` ), + KEY `type` ( `type` ), + KEY `start` ( `start` ), + KEY `finish` ( `finish` ), + KEY `adjust` ( `adjust` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/include/bbcode.php b/include/bbcode.php index e219d53836..effdd0be89 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -301,6 +301,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if(x($ev,'desc') && x($ev,'start')) { $sub = format_event_html($ev); + $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text); $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",$sub,$Text); $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",'',$Text); $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text); diff --git a/include/event.php b/include/event.php index 866ae8c3f0..8aef0a2636 100644 --- a/include/event.php +++ b/include/event.php @@ -12,6 +12,9 @@ function format_event_html($ev) { $o = '
' . "\r\n"; + + $o .= '

' . bbcode($ev['summary']) . '

' . "\r\n"; + $o .= '

' . bbcode($ev['desc']) . '

' . "\r\n"; $o .= '

' . t('Starts:') . ' get_baseurl().'/events/event/'.$rr['id'],t('Edit event'),'','') : null); - - list($title, $_trash) = explode(" $eid, '$cid' => $cid, '$uri' => $uri, + '$title' => t('Event details'), '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat), @@ -422,6 +428,8 @@ function events_content(&$a) { '$d_orig' => $d_orig, '$l_text' => t('Location:'), '$l_orig' => $l_orig, + '$t_text' => t('Title:'), + '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)), diff --git a/update.php b/update.php index eeb8b07b15..b8e247f57c 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@

+
$t_text
+ + +
$d_text
diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl index 79151aeedb..1d94cb6d3c 100755 --- a/view/theme/diabook/jot.tpl +++ b/view/theme/diabook/jot.tpl @@ -70,7 +70,7 @@
$acl -
+
$emailcc
$jotnets diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index ea3a2da9c6..41c747045e 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2424,6 +2424,13 @@ aside input[type='text'] { .vevent { border: 1px solid #CCCCCC; } + +.vevent .event-summary { + margin-left: 10px; + margin-right: 10px; + font-weight: bold; +} + .vevent .event-description, .vevent .event-location { margin-left: 10px; margin-right: 10px;