From 40365374457dc7ecb2be37bf34d459674a81d921 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 20 Mar 2017 14:26:31 -0400 Subject: [PATCH] Update the detail page for description and search. Removing search form from detail page. Fix the output issue with the description. Use wpautop function instead of the nl2br. Fix bug in ical feed. --- index.php | 6 +++--- models/front/events/baseAction.php | 5 ++++- views/front/events/detail.html | 2 +- views/front/events/searchForm.html | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 551b0e0..3e5c09a 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database Events * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 1.6.27 + * Version: 1.6.28 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -20,7 +20,7 @@ * @package glmMembersDatabaseEventsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.6.27 + * @version 1.6.28 */ /* @@ -38,7 +38,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.27'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.28'); define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.1'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/events/baseAction.php b/models/front/events/baseAction.php index 4412949..0463c3e 100644 --- a/models/front/events/baseAction.php +++ b/models/front/events/baseAction.php @@ -414,7 +414,7 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents * @access public * @return array The event */ - public function getModelEventData( $eventId, $fromDate ) + public function getModelEventData( $eventId ) { $this->postAddTimes = true; $this->postAddLocations = true; @@ -424,6 +424,9 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents $event['url'] = 'http://' . $event['url']; } } + if ( $event['descr'] ) { + $event['descr'] = wpautop( $event['descr'] ); + } if ( $event['ticket_url'] ) { if ( !preg_match( '/^http:|https:/', $event['ticket_url'] ) ) { $event['ticket_url'] = 'http://' . $event['ticket_url']; diff --git a/views/front/events/detail.html b/views/front/events/detail.html index 9bec1ce..33f2090 100644 --- a/views/front/events/detail.html +++ b/views/front/events/detail.html @@ -160,7 +160,7 @@
-

{$event.descr|nl2br}

+

{$event.descr}

diff --git a/views/front/events/searchForm.html b/views/front/events/searchForm.html index 7997209..07b0492 100644 --- a/views/front/events/searchForm.html +++ b/views/front/events/searchForm.html @@ -1,6 +1,7 @@ +{if !$eventId}

Find An Event

@@ -69,6 +70,20 @@
+{else} +
+ {if !$eventId} + + {else} + {/if} + + + + + + +
+{/if}