From: Steve Sutton Date: Thu, 12 Jan 2017 18:16:33 +0000 (-0500) Subject: Add ticket url to detail page. X-Git-Tag: v1.6.3^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=56e828a1a3cccc3e9701be40a18eab7ee2d045cc;p=WP-Plugins%2Fglm-member-db-events.git Add ticket url to detail page. Adding the ticket url to the event detail pages. --- diff --git a/index.php b/index.php index d9dd61e..5ce88fc 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.2 + * Version: 1.6.3 * 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.2 + * @version 1.6.3 */ /* @@ -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.2'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.3'); 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 b1853de..e6714a2 100644 --- a/models/front/events/baseAction.php +++ b/models/front/events/baseAction.php @@ -423,6 +423,11 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents $event['url'] = 'http://' . $event['url']; } } + if ( $event['ticket_url'] ) { + if ( !preg_match( '/^http:|https:/', $event['ticket_url'] ) ) { + $event['ticket_url'] = 'http://' . $event['ticket_url']; + } + } $event['dates'] = $this->getEventDate( strtotime( $event['starting_date'] ), strtotime( $event['ending_date'] ), diff --git a/views/front/events/beerWeekDetail.html b/views/front/events/beerWeekDetail.html index d61afb5..b041a91 100644 --- a/views/front/events/beerWeekDetail.html +++ b/views/front/events/beerWeekDetail.html @@ -93,6 +93,9 @@ {if $event.free.value}
Cost: FREE
{/if} + {if $event.ticket_url} +
Tickets: {$event.ticket_url}
+ {/if}
Contact & More Info
{if $event.url}{$event.url}
{/if} diff --git a/views/front/events/detail.html b/views/front/events/detail.html index 367a107..7d62176 100644 --- a/views/front/events/detail.html +++ b/views/front/events/detail.html @@ -93,6 +93,9 @@ {if $event.free.value}
Cost: FREE
{/if} + {if $event.ticket_url} +
Tickets: {$event.ticket_url}
+ {/if}
Contact & More Info
{if $event.url}{$event.url}
{/if}