Add ticket url to detail page.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 12 Jan 2017 18:16:33 +0000 (13:16 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 12 Jan 2017 18:16:33 +0000 (13:16 -0500)
Adding the ticket url to the event detail pages.

index.php
models/front/events/baseAction.php
views/front/events/beerWeekDetail.html
views/front/events/detail.html

index d9dd61e..5ce88fc 100644 (file)
--- 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 <cscott@gaslightmedia.com>
  * @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.
index b1853de..e6714a2 100644 (file)
@@ -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'] ),
index d61afb5..b041a91 100644 (file)
@@ -93,6 +93,9 @@
                             {if $event.free.value}
                             <div id="glm-event-detail-cost"><strong>Cost: </strong>FREE</div>
                             {/if}
+                            {if $event.ticket_url}
+                            <div style="margin: 0 0 10px 20px;"><strong>Tickets: </strong><a target="_blank" href="{$event.ticket_url}">{$event.ticket_url}</a></div>
+                            {/if}
 
                             <div id="glm-event-detail-contact"><strong>Contact & More Info</strong><br>
                                 {if $event.url}<a href="{$event.url}" target="_blank">{$event.url}</a><br>{/if}
index 367a107..7d62176 100644 (file)
@@ -93,6 +93,9 @@
                             {if $event.free.value}
                             <div id="glm-event-detail-cost"><strong>Cost: </strong>FREE</div>
                             {/if}
+                            {if $event.ticket_url}
+                            <div style="margin: 0 0 10px 20px;"><strong>Tickets: </strong><a target="_blank" href="{$event.ticket_url}">{$event.ticket_url}</a></div>
+                            {/if}
 
                             <div id="glm-event-detail-contact"><strong>Contact & More Info</strong><br>
                                 {if $event.url}<a href="{$event.url}" target="_blank">{$event.url}</a><br>{/if}