* *** 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'].')/([^/]*)$'] ) ) {
});
}
+*/
/*
* Event Detail Page Canonical URL Fix
<th>Recurring Event:</th>
<td width="90%">
<input id="recurringEvent_{$r.id}" data-id="{$r.id}" type="checkbox" name="Recur{$r.id}_recurring" class="recurring-checkbox recurrence-input" {if $r.recurring.value} checked{/if}>
- Setup a detailed schedule.
+ Setup a detailed schedule.<br>Leave this un-checked for events that occur<br>every day from Start Date to End Date.
</td>
</tr>
</table>
</th>
</tr>
<tbody id="recurringExclude_{$r.id}"{if !$r.recurring.value} class="glm-hidden"{/if}>
+ <tr><td colspan="2"><h2 style="text-align: center;">Recurring Schedule for Event</h2></td></tr>
+ <tr><td colspan="2">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.</td></tr>
+ <tr><td colspan="2"> </td></tr>
<tr>
<th>Months</th>
<td>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
+ <tr><td colspan="2"><hr width="50%"></td></tr>
+ <tr><td colspan="2"><h2 style="text-align: center;">Add Specific Dates that Don't Fit Schedule Above</h2></td></tr>
+ <tr><td colspan="2">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.</td></tr>
+ <tr><td colspan="2"> </td></tr>
<tr>
<th>Select with Calendar</th>
<td>
<tbody id="recurrence_{ newRecurID }">
<tr><td colspan="2"><hr></td></tr>
<tr>
- <td>
+ <td style="width: 2%;">
<input type="hidden" name="recurID[{ newRecurID }]" value="{ newRecurID }">
{if $haveEvent}
<input type="hidden" name="{ newRecurID }_event" value="{$event.fieldData.id}"> <!-- required to have event id with prefix -->
<input id="recurSchedName_{ newRecurID }" data-id="{ newRecurID }" type="text" name="{ newRecurID }_name" value="" class="glm-form-text-input-small recurrence-input">
</td>
</tr>
+ <tr><td colspan="2"> </td></tr>
<tr>
<th class="glm-notice">New Schedule</th>
<th> </th>
</tr>
<tr class="not-all-day-{ newRecurID }">
<th>Start Time:</th>
- <td>
+ <td style="white-space: nowrap;">
<input data-id="{ newRecurID }" type="text" name="{ newRecurID }_start_time" value="{$newRecurrence.fieldData.start_time.time}" class="glm-form-text-input-veryshort glm-time-input recurrence-input">
<input data-id="{ newRecurID }" type="checkbox" name="{ newRecurID }_start_time_only" class="start-time-only-checkbox recurrence-input"> Start time only
</td>
</tr>
<tr>
<th>Recurring Event:</th>
- <td width="90%">
+ <td width="90%" style="white-space: nowrap;">
<input id="recurringEvent_{ newRecurID }" data-id="{ newRecurID }" type="checkbox" name="{ newRecurID }_recurring" class="recurring-checkbox recurrence-input">
- Setup a detailed schedule;
+ Setup a detailed schedule.<br>Leave this un-checked for events that occur<br>every day from Start Date to End Date.
</td>
</tr>
</table>
- </td>
- <td>
- <table width="100%">
-
+ </td>
+ <td style="width: 80%">
+ <table width="100%" style="margin-left: 2em;">
<tr>
<th></th>
<th>
</th>
</tr>
<tbody id="recurringExclude_{ newRecurID }" class="glm-hidden">
+ <tr><td colspan="2"><h2 style="text-align: center;">Recurring Schedule for Event</h2></td></tr>
+ <tr><td colspan="2">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.</td></tr>
+ <tr><td colspan="2"> </td></tr>
<tr>
<th>Months</th>
<td>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
- <tr>
+ <tr><td colspan="2"><hr width="50%"></td></tr>
+ <tr><td colspan="2"><h2 style="text-align: center;">Add Specific Dates that Don't Fit Schedule Above</h2></td></tr>
+ <tr><td colspan="2">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.</td></tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr>
<th>Select with Calendar</th>
<td>
<div data-id="{ newRecurID }" class="button glm-button-small glm-set-none recur-calendar">Show Calendar</div>