From: Chuck Scott Date: Tue, 30 Aug 2016 16:12:50 +0000 (-0400) Subject: Testing changes in frontHooks.php to correct intermittant event detail pages. X-Git-Tag: v1.3.3^2~15 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f249cbd0c07d44070f7c1b3ebab049c619ec027e;p=WP-Plugins%2Fglm-member-db-events.git Testing changes in frontHooks.php to correct intermittant event detail pages. Added commentary to event date sesection page to better describe how to use it. --- diff --git a/setup/frontHooks.php b/setup/frontHooks.php index 205dd5a..c40c2f7 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -26,6 +26,24 @@ * *** Also note that parameters will be in the context of the main front controller constructor. *** */ +// Setup rewrite for member detail pages +add_filter('rewrite_rules_array', function($rules) { + + // Check if rule is not set + if ( ! isset( $rules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$'] ) ) { + + // Add the new rule + $newrules = array(); + $newrules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$']='index.php?pagename=$matches[1]&eventslug=$matches[2]'; + return $newrules + $rules; + } + + // If already set, just return the rules unchanged. + return $rules; + +}); + +/* This code is being replace for testing by the above to avoid intermittent 404's on the detail pages. // Check if the canonical event page rewrite rule is not currently in place. $rules = get_option( 'rewrite_rules' ); if ( ! isset( $rules['('.$this->config['settings']['canonical_event_page'].')/([^/]*)$'] ) ) { @@ -44,6 +62,7 @@ if ( ! isset( $rules['('.$this->config['settings']['canonical_event_page'].')/([ }); } +*/ /* * Event Detail Page Canonical URL Fix diff --git a/views/admin/events/edit.html b/views/admin/events/edit.html index 254c8d6..ee39850 100644 --- a/views/admin/events/edit.html +++ b/views/admin/events/edit.html @@ -595,7 +595,7 @@ $('#recurCalendarDialog_' + recurID).attr('title', 'Select Dates for ' + recurName); $('#recurCalendarDialog_' + recurID).dialog({ - position: { my: 'top+75', of: '#recurSpecDates_' + recurID}, + position: { my: 'right bottom-15', at: 'left top', of: '#recurSpecDates_' + recurID}, minWidth: 600 }); // Color to change calendar cell to (in rgb so it compares to our test below) diff --git a/views/admin/events/editSchedule.html b/views/admin/events/editSchedule.html index 1974422..17a3b27 100644 --- a/views/admin/events/editSchedule.html +++ b/views/admin/events/editSchedule.html @@ -61,7 +61,7 @@ Recurring Event: - Setup a detailed schedule. + Setup a detailed schedule.
Leave this un-checked for events that occur
every day from Start Date to End Date. @@ -76,6 +76,9 @@ +

Recurring Schedule for Event

+ Use the fields below to establish a recurring monthly, weekly, or daily schedule for your event. If any event dates don't fit this recurring schedule, use the "Add Specific Dates..." section below. +   Months @@ -147,6 +150,11 @@   +
+

Add Specific Dates that Don't Fit Schedule Above

+ Use this section to enter specific additional dates that don't fit into a regular monthly, weekly or daily schedule above. + If all your dates don't fit a recurring schedule above, you may click "None" for all of the options above and select all specific dates for your event here. +   Select with Calendar @@ -195,7 +203,7 @@
- + {if $haveEvent} @@ -207,6 +215,7 @@ +   New Schedule   @@ -219,7 +228,7 @@ Start Time: - + Start time only @@ -245,16 +254,15 @@ Recurring Event: - + - Setup a detailed schedule; + Setup a detailed schedule.
Leave this un-checked for events that occur
every day from Start Date to End Date. - - - - + +
+ + + + - + + + + +
@@ -262,6 +270,9 @@

Recurring Schedule for Event

Use the fields below to establish a recurring monthly, weekly, or daily schedule for your event. If any event dates don't fit this recurring schedule, use the "Add Specific Dates..." section below.
 
Months @@ -333,7 +344,12 @@
 

Add Specific Dates that Don't Fit Schedule Above

Use this section to enter specific additional dates that don't fit into a regular monthly, weekly or daily schedule above. + If all your dates don't fit a recurring schedule above, you may click "None" for all of the options above and select all specific dates for your event here.
 
Select with Calendar
Show Calendar