diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/settings.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/settings.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,488 @@ + 'm/d/y', + 'archive' => 'm/d/y', + 'long' => 'l, F j, Y', +); + + +switch ( $_POST['action'] ) : + case 'load': + $listFields = array( + 'city' => __('City', $gcd), + 'country' => __('Country', $gcd), + 'venue' => __('Venue', $gcd), + 'eventName' => __('Event Name', $gcd), + 'date' => __('Date', $gcd), + 'time' => __('Time', $gcd), + 'shortNotes' => __('Short Notes', $gcd), + 'tickets' => __('Ticket Link', $gcd), + 'map' => __('Map Link', $gcd), + ); + + $titleFields = array( + 'city' => __('City', $gcd), + 'venue' => __('Venue', $gcd), + 'country' => __('Country', $gcd), + 'eventName' => __('Event Name', $gcd), + 'date' => __('Date', $gcd), + ); + + $defaults = array( + 'archive' => -1, + 'category' => get_option('default_category'), + 'no-upcoming' => __('Sorry, there aren’t any upcoming gigs right now. Check back soon!', $gcd), + 'no-past' => __('There aren’t any gigs here right now. Check back soon!', $gcd), + 'silk-link' => 1, + 'b4b-link' => 1, + 'rss-link' => 1, + 'gigs-table-show' => array_keys($listFields), + 'gig-title-show' => array('city', 'date'), + 'eventName-label' => __("Who", $gcd), + 'ages-list' => array(__('All Ages', $gcd), __('21+', $gcd), __('16+', $gcd)), + 'list-venue-link' => 0, + 'list-headers' => 0, + 'template' => 'basic', + 'time-12h' => 1, + 'calendar-position' => "bottom", + 'tbd-text' => __("TBD"), + 'tours-display' => 0, + 'tours-empty' => 0, + 'tours-sort' => 'date', + 'user_level' => 'level_5', + 'post-filtering' => 1, + 'admin-only-settings' => 0, + ); + + unset($defaults['gigs-table-show'][array_search('eventName', $defaults['gigs-table-show'])]); + unset($defaults['gigs-table-show'][array_search('country', $defaults['gigs-table-show'])]); + + if ( is_array($options) ) { + $options = array_merge($defaults, $options); + } else { + $options = $defaults; + } + if ( is_array($options['date']) ) { + $options['date'] = array_merge($date_defaults, $options['date']); + } else { + $options['date'] = $date_defaults; + } + + if ( (int) get_option('gig_db_version') == -1 ) { + die (__('Oops! It looks like you’re missing some or all of the tables required for this plugin. They should have been created automatically, but you can create them with the tables.sql file in the same folder as this plugin. If you have any questions, you can use the feedback form in the next tab.')); + } + ?> + +
new page first.', $gcd) ?>
+ + mysql_get_server_info() ) : ?> +
+ Warning: You are running MySQL server version . This plugin requires version 4.1 or higher to hide the future gig posts from your homepage. Your best option is to use a plugin like Advanced Category Excluder to hide the gigs using the category option below.'); ?> +
+ +
+ + +

+
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +

+ +
+ +
+ + +

+
+ + <? _e('Add', $gcd) ?> + +

+
+ +
date() function format)', $gcd) ?>
+
date() function format)', $gcd) ?>
+ +
date() function format)', $gcd) ?>
+ +
+ +
+ + +

+
+ +
+ +
+ +
+ +
+ +

+ +
+ + +
+ +

+
+ +
+ +
+ + +

+
+
+ Note: It’s ok to say "no". I’ve offered this freely with no expectations, but I’d be very grateful if you said "yes"', $gcd) ?> +
+ +
+
+ Note: The Silk Icons that I used in this plugin are licensed under the Creative Commons. You must link back to him somewhere on your site. If you link to him on another page, giving him credit, or you have replaced the icons, or you do not display any of them publicly on your site, you may turn off this link.', $gcd) ?>
+ +

+
+
+ + +
+
+ + + + + (empty($args['date-short']) ? $date_defaults['short'] : $args['date-short']), + 'archive' => (empty($args['date-archive']) ? $date_defaults['archive'] : $args['date-archive']), + 'long' => (empty($args['date-long']) ? $date_defaults['long'] : $args['date-long']), + ); + + unset($args['apply-changes'], $args['nonce'], $args['action'], $args['date-long'], $args['date-archive'], $args['date-short'], $args['long-date-format'], $args['short-date-format']); + + foreach ( $args as $key => $value ) { + if ( is_string($value) ) { + $args[$key] = stripslashes($value); + } + } + + $options = get_option('gigs-calendar'); + if ( is_array($options) ) { + $args = array_merge($options, $args); + } + if ( is_array($args['date']) ) { + $args['date'] = array_merge($args['date'], $dates); + } else { + $args['date'] = $dates; + } + + update_option('gigs-calendar', $args); + $options = get_option('gigs-calendar'); + if ( $_POST['apply-changes'] != 'no' ) { + $g = new gig(); + $g->search('future' == $_POST['apply-changes'] ? 'date >= CURDATE()' : null); + while ( $g->fetch() ) { + $g->save(false); + } + } + break; +endswitch; + +?>