Skip to content

Commit

Permalink
user import fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfcarr committed Jul 30, 2017
1 parent 2cc4caa commit 5baf889
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 28 deletions.
7 changes: 6 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 3.0
Tested up to: 4.8
Stable tag: 4.7
Stable tag: 4.7.1

Schedule events, send invitations, track RSVPs, and collect PayPal payments.

Expand Down Expand Up @@ -115,6 +115,11 @@ For basic usage, you can also have a look at the [plugin homepage](http://www.rs

== Changelog ==

= 4.7.1 =

* Fix to rsvpmaker_upcoming display so doesn't show "No events listed" when future events out of date range
* Meeting durations of 10-55 minutes now supported in dropdown; 15 minute increments after 1 hour

= 4.7 =

* Fix conflict with Jetpack
Expand Down
20 changes: 16 additions & 4 deletions rsvpmaker-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,11 @@ function rsvpmaker_date_option($datevar = NULL, $index = NULL, $jquery_date = NU
$dparts = explode('.',$diff);
$dh = (int) $dparts[0];
$decimal = (isset($dparts[1]) ) ? (int) $dparts[1] : 0;
$dminutes = round((('0.'.$decimal) * 60));
}
else
{
$dh = $decimal = NULL;
$dminutes = $dh = $decimal = NULL;
}
for($h = 0; $h < 24; $h++) {

Expand All @@ -321,12 +322,24 @@ function rsvpmaker_date_option($datevar = NULL, $index = NULL, $jquery_date = NU
<option value="<?php echo $h;?>" <?php if(($h == $dh) && ($decimal == 0) ) echo ' selected="selected" '; ?> ><?php echo $h.' '.__('hours','rsvpmaker');?></option>
<?php
}
if($h == 0)
{ // 5 minute increments for the first hour
for($i = 10; $i < 60; $i+=5)
{
?>
<option value="<?php echo $h;?>:<? echo $i; ?>" <?php if(($h == $dh) && ($dminutes == $i) ) echo ' selected="selected" '; ?> ><?php echo $h;?>:<?php echo $i; ?></option>
<?php
}
}
else
{
?>
<option value="<?php echo $h;?>:15" <?php if(($h == $dh) && ($decimal == 25) ) echo ' selected="selected" '; ?> ><?php echo $h;?>:15</option>
<option value="<?php echo $h;?>:30" <?php if(($h == $dh) && ($decimal == 5) ) echo ' selected="selected" '; ?> ><?php echo $h;?>:30</option>

<option value="<?php echo $h;?>:45" <?php if(($h == $dh) && ($decimal == 75) ) echo ' selected="selected" '; ?> ><?php echo $h;?>:45</option>
<?php } ;?>
<?php
}
} ;?>
</select>
<br />
</td>
Expand Down Expand Up @@ -1097,7 +1110,6 @@ function multiple() {

<?php _e('Minutes','rsvpmaker'); ?>: <select name="recur_minutes[<?php echo $i;?>]">
<option value="00">00</option>
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
Expand Down
14 changes: 10 additions & 4 deletions rsvpmaker-display.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,23 +364,27 @@ function form($instance) {
add_action('widgets_init', create_function('', 'return register_widget("RSVPTypeWidget");'));


function get_next_events_link( $label = '' ) {
function get_next_events_link( $label = '', $no_events = '' ) {
global $last_time;
global $wpdb;

$sql = "SELECT post_id from $wpdb->postmeta JOIN $wpdb->posts ON $wpdb->postmeta.post_id = $wpdb->posts.ID WHERE meta_key='_rsvp_dates' AND meta_value > '".date("Y-m-d H:i:s",$last_time)."' AND post_status='publish' ";

$at_least_one = $wpdb->get_var($sql);
if(!$at_least_one)
{
if(!empty($no_events))
echo '<p class="no_events">'.$no_events.'</p>';
return;
}

$link = get_rsvpmaker_archive_link();
$link .= (strpos($link,'?')) ? "&" : '?';
$link .= 'cd='.date('d',$last_time).'&cm='.date('m',$last_time).'&cy='.date('Y',$last_time);
$attr = apply_filters( 'next_posts_link_attributes', '' );
$link = '<a href="' . $link ."\" $attr>" . $label . ' &raquo;</a>';
if(isset($link))
echo "<p>$link</p>";
echo "<p class=\"more_events\">$link</p>";
}

function rsvpmaker_select($select) {
Expand Down Expand Up @@ -508,6 +512,8 @@ function rsvpmaker_upcoming ($atts)
global $startday;
global $rsvp_options;
global $datelimit;
global $last_time;
$last_time = time();
$listings = '';
$showbutton = true;

Expand Down Expand Up @@ -647,11 +653,11 @@ function rsvpmaker_upcoming ($atts)
endwhile;
?>
<p><?php
if(!(isset($atts['one']) && $atts['one']))
if(isset($atts['one']) && $atts['one'])
get_next_events_link(__('More Events','rsvpmaker'));
}
else
echo "<p>$no_events</p>\n";
get_next_events_link(__('More Events','rsvpmaker'),$no_events);
echo '</div><!-- end rsvpmaker_upcoming -->';

$wp_query = $backup;
Expand Down
36 changes: 18 additions & 18 deletions rsvpmaker-plugabble.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,15 @@ function template_schedule($template) {

<?php _e("Minutes",'rsvpmaker'); ?>: <select id="minutes" name="sked[minutes]">
<?php
$displayminutes = '
<option value="'.$minutes.'">'.$minutes.'</option>
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
</select> - ';
echo $displayminutes;

echo __('Duration','rsvpmaker');?> *<?php echo $duration; ?>* <select name="<?php echo $prefix; ?>sked[duration]">
echo '<option value="'.$minutes.'">'.$minutes.'</option>';
for($i = 0; $i < 60; $i++)
{
$zpad = ($i < 10) ? '0' : '';
printf('<option value="%s%d">%s%d</option>',$zpad,$i,$zpad,$i);
}
?>
</select>
<?php echo __('Duration','rsvpmaker');?> <select name="sked[duration]">
<option value=""><?php echo __('Not set (optional)','rsvpmaker');?></option>
<option value="allday" <?php if(isset($duration) && ($duration == 'allday')) echo ' selected="selected" '; ?>><?php echo __("All day/don't show time in headline",'rsvpmaker');?></option>
<?php
Expand All @@ -299,14 +298,15 @@ function template_schedule($template) {
$hlabel = 'hours';
printf('<option value="%s" selected="selected">%s %s</option>',$duration, $duration, $hlabel);
}
for($h = 1; $h < 24; $h++) {
;?>
<option value="<?php echo $h;?>" ><?php echo $h;?> hours</option>
<option value="<?php echo $h;?>:15" ><?php echo $h;?>:15</option>
<option value="<?php echo $h;?>:30" ><?php echo $h;?>:30</option>

<option value="<?php echo $h;?>:45" ><?php echo $h;?>:45</option>
<?php } ;?>
for($h = 0; $h < 24; $h++) {
$increment = ($h) ? 15 : 5;
if($h)
echo '<option value="'.$h.'" >'.$h.' hours</option>';
for($i = 0; $i < 60; $i += $increment)
if($i >= 10)
printf('<option value="%s:%s" >%s:%s</option>',$h,$i,$h,$i);
}
?>
</select>
<br />
<em><?php if(isset($debug)) echo $debug;
Expand Down
2 changes: 1 addition & 1 deletion rsvpmaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin URI: http://www.rsvpmaker.com
Description: Schedule events, send invitations to your mailing list and track RSVPs. You get all your familiar WordPress editing tools with extra options for setting dates and RSVP options. PayPal payments can be added with a little extra configuration. Email invitations can be sent through MailChimp or to members of your website community who have user accounts. Recurring events can be tracked according to a schedule such as "First Monday" or "Every Friday" at a specified time, and the software will calculate future dates according to that schedule and let you track them together.RSVPMaker now also specifically supports organizing online events or webinars with Google's <a href="http://rsvpmaker.com/blog/2016/11/23/creating-a-youtube-live-event-with-a-landing-page-on-your-wordpress-website/">YouTube Live</a> video broadcast service (formerly Hangouts on Air). <a href="options-general.php?page=rsvpmaker-admin.php">Options</a> / <a href="edit.php?post_type=rsvpmaker&page=rsvpmaker_doc">Shortcode documentation</a>.
Author: David F. Carr
Version: 4.7
Version: 4.7.1
Author URI: http://www.carrcommunications.com
Text Domain: rsvpmaker
Domain Path: /translations
Expand Down

0 comments on commit 5baf889

Please sign in to comment.