Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter soaringthor

    (@soaringthor)

    Thank you!

    Thread Starter soaringthor

    (@soaringthor)

    I would see a couple of options if you were to change this behavior:

    • Add an advanced option under Tweak Permalinks named “Custom Permalinks” or something like that, for users that prefer fully custom links/slugs without having the date tacked to the end
    • Change the behavior so that the date is only appended to the slug if the event has the same title as a past event

    I would personally love to be able to set custom slugs, if it is possible to add that functionality back in.

    Let me know your thoughts so I can mark this thread as resolved! As always, thanks for your speedy response and your awesome plugin!

    Thread Starter soaringthor

    (@soaringthor)

    Update: I found the Tweak Permalinks option in the RSVPMaker settings, and that did not resolve the issue.
    The permalink format is set to /site/rsvpmaker/my-event.

    Thread Starter soaringthor

    (@soaringthor)

    Haha what a noob.

    Closing the quotes worked.

    [rsvpmaker_upcoming type="next-event" no_events="We're still planning our next meeting. Please check back soon for updates!"]

    From rsvpmaker-pluggable.php:

    <!-- guest section -->
            <p id="guest_section"><strong><?php echo __('Guests','rsvpmaker');?>:</strong> <?php echo __('If you are bringing guests, please enter their names here','rsvpmaker');?></p>
            <?php echo $guestedit;?>
            <div class="guest_blank"><?php echo __('First Name','rsvpmaker');?>: <input type="text" name="guestfirst[]" style="width:30%" /> <?php echo __('Last Name','rsvpmaker');?>: <input type="text" name="guestlast[]" style="width:30%" /><input type="hidden" name="guestid[]" value="0" /></div>
            <a href="#guest_section" id="add_guests" name="add_guests">(+) <?php echo __('Add more guests','rsvpmaker');?></a></p>
    <script>
    jQuery(document).ready(function($) {
    
    $('#add_guests').click(function(){
    	$('.guest_blank').append('<div class="guest_blank">First Name: <input type="text" name="guestfirst[]" style="width:30%" /> Last Name: <input type="text" name="guestlast[]" style="width:30%"/><input type="hidden" name="guestid[]" value="0" /></div>');
    	});
    });
    </script>
    <!-- end of guest section-->

    So… the first guest entry has an id of guest_blank. When you click the (+) Add more guests link, a script runs to append the guest_blank area with a new guest line. But this new guest line also has an id of guest_blank. So, if you click the (+) link again, there are now two lines with the id of guest_blank, and so the script is going to append a new guest line to each existing line, making a total of 4 lines. Now there are 4 lines with the id guest_blank, so clicking the (+) link again will add 4 more lines.

    I made the following change to my rsvpmaker-pluggable.php:

    <!-- guest section -->
            <p id="guest_section"><strong><?php echo __('Guests','rsvpmaker');?>:</strong> <?php echo __('If you are bringing guests, please enter their names here','rsvpmaker');?></p>
            <?php echo $guestedit;?>
            <div class="guest_blank"><?php echo __('First Name','rsvpmaker');?>: <input type="text" name="guestfirst[]" style="width:30%" /> <?php echo __('Last Name','rsvpmaker');?>: <input type="text" name="guestlast[]" style="width:30%" /><input type="hidden" name="guestid[]" value="0" /></div><div class="add_one"></div>
            <a href="#guest_section" id="add_guests" name="add_guests">(+) <?php echo __('Add more guests','rsvpmaker');?></a></p>
    <script>
    jQuery(document).ready(function($) {
    
    $('#add_guests').click(function(){
    	$('.add_one').append('<div class="guest_blank">First Name: <input type="text" name="guestfirst[]" style="width:30%" /> Last Name: <input type="text" name="guestlast[]" style="width:30%"/><input type="hidden" name="guestid[]" value="0" /></div>');
    	});
    });
    </script>
    <!-- end of guest section-->

    After the guest_blank div tags, I added an empty <div class="add_one"></div>, then modified the script so that it appends the guest line to that add_one rather than the guest_blank. Since the new guest line doesn’t include an add_one div, there’s only ever one add_one div in the page, which means only one line gets added at a time.

    Hope that makes sense… I’m also unsure if this change is going to be annulled when the plugin is updated – but I may not ever update the plugin.

Viewing 5 replies - 1 through 5 (of 5 total)