events+ calendar display - show prev/next month navigation?

I'd love to use the monthly calendar display, but it seems impractical if it doesn't include navigation for upcoming (or previous) months. Am I missing something in shortcodes? If not, then feature request!

  • aecnu
    • WP Unicorn

    Greetings susan_langenes,

    Thank you for the great feedback.

    Am I missing something in shortcodes?

    What I believe you are missing is the add ons section where the Default to all Events add on If no year or month arguments are passed to your archive page requests, this simple add-on will show all applicable Events instead of truncating them to monthly archives.

    Please advise if this does the job for you.

    Looking forward to hearing form you in any event.

    Cheers, Joe

  • susan_langenes
    • Design Lord, Child of Thor

    Hi Joe and thanks for reply. I'll include a screenshot to try to explain a little better. I'm not sure if I understand what you mean by

    If no year or month arguments are passed to your archive page requests

    What I'm after is a calendar display of the current month, showing the name of the current month, and giving viewers the ability to click on a link to display next month (or previous). This works fine using the Calendar Upcoming widget; it produces this kind of navigation underneath the calendar.

    But if I use the shortcode [eab_calendar] on a page, I get no such navigation. See screenshot...

  • aecnu
    • WP Unicorn

    Greetings susan_langenes and williapv,

    @williapv Welcome to WPMU DEV!

    @susan_langenes and williapv Thank you for bringing that to my attention and indeed it already has this ability if you turn on the add on as shown live here on my production server:
    http://events.aecnuwpmu.us/events/

    The previous and next are on the bottom left.

    From Susan's screen shot it appears that she is logged into the admin dashboard or possibly using the same browser as she develops with and the system sees the cookie form admin recognizing her as admin.

    Please advise.

    Have a GREAT weekend!

    Cheers, Joe

  • susan_langenes
    • Design Lord, Child of Thor

    More information, and a solution:

    This works as it should when the above "override default appearance" is checked in settings, AND the page slug where the [eab_calendar] shortcode is inserted is also set to match the root slug in settings.

    I now have this working properly on three test sites with two different themes (2012 and Genesis).

    I'd also like to note that this is not very clear in settings or instructions, and is not particularly intuitive. New feature request: please clarify this somehow on the settings screen! Or better yet, make it so that the calendar output is the same regardless of page slug.

    Screenshots:

    First one (desired output) is what happens with [eab_calendar] shortcode inserted to a page with a slug that matches the root slug as set in settings for the plugin.

    Second one (not what we want) is what happens with [eab_calendar] shortcode inserted in a page with a different slug.

  • aecnu
    • WP Unicorn

    Greetings susan_langenes,

    Thank you for letting us know and for posting your solution which is greatly appreciated.

    Happy to see that you got this worked out to your liking and that it is indeed working for you.

    I will submit this ticket to the feature request section since you have requested it.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

  • clienttech
    • New Recruit

    Thanks Joe and Susan for this discussion as I have been pulling my hair out trying to display the month at the top of the calendar. Using your solutions, I finally got it to display by checking the override box and by updating my slug. I still have two issues remaining:
    1) Suddenly, it removed the page background css color (it was originally set to white for the content area, but now it has removed the white so you only see my website background image under the calendar which makes it very difficult to read and clearly not the look I want.)
    2) The navigation links are all but hidden at the bottom of the page. I'm afraid users will never notice them. Is there a way to put a "next" and "previous" arrow more prominently at the top of the calendar as most calendars have?

    Thanks!

  • susan_langenes
    • Design Lord, Child of Thor

    Cool. So the reason you're not getting a white background is because the white is being applied to the #content div of your other pages, and your events page doesn't have a #content div.

    Usually when I apply an image background site-wide, I put it in the body, but since yours is applied to the page, I'd recommend that you add

    #primary {
    background-color: white;
    border-radius: 5px;
    }
    to your stylesheet.

    I hacked the plugin files themselves to move the calendar navigation to the top. I'll post those mods shortly...

  • susan_langenes
    • Design Lord, Child of Thor

    Ok, so here's what I did. Navigate here via FTP:

    /wp-content/plugins/events-and-bookings/default-templates/calendar

    Add the following to the bottom of events.css:

    #wpmudevevents-wrapper h2 {
    float:none;
    }
    .event-pagination { text-align: center; }

    And in archive-incsub_event.php, I simply moved the event-pagination div so it outputs after the h2 and before the calendar.

    And I'll attach my modified version of archive-incsub_event.php so you can just upload that file directly without messing with the php.

    Put me down for another feature request! The default location of the pagination should be at the top.

  • susan_langenes
    • Design Lord, Child of Thor

    Oh shoot. Disallowed file type. Here y'go. copy and paste this from line 14 thru 40. Make sure there is NO extra empty line at the end (after line 40).

    get_header( 'event' );
    ?>
    	<div id="primary">
            <div id="wpmudevevents-wrapper">
                <h2><?php echo sprintf(
                	__('Events for %s', Eab_EventsHub::TEXT_DOMAIN),
                	date_i18n("F Y", $time)
    			); ?></h2>
                <div class="event-pagination">
    					<?php
    						$prev = $time - (28*86400);
    						$next = $time + (32*86400);
    					?>
    					<a>">Prev</a>
    					<a>">Next</a>
    				</div>
    	    <div class="wpmudevevents-list">
                <?php
                	if (!class_exists('Eab_CalendarTable_EventArchiveCalendar')) require_once EAB_PLUGIN_DIR . 'lib/class_eab_calendar_helper.php';
    				$renderer = new Eab_CalendarTable_EventArchiveCalendar($wp_query->posts);
    				echo $renderer->get_month_calendar($time);
                ?>
    
    			</div>
    		</div>
    	</div>
    <?php get_footer( 'event' ); ?>
  • aecnu
    • WP Unicorn

    Greetings susan_langenes,

    Thank you for being so d-a-r-n helpful to this other member and also for posting the code to help them out.

    In addition, great effort for debugging the background color issue and following up with clienttech.

    Some rep points sent your way.

    Cheers, Joe

  • williapv
    • New Recruit

    Ok, this works kind of. I am using Mantra as the theme. When I do finally get the next and previous links working it shifts the whole calendar to the right of the screen. I get several different behaviors.

    1.) I put the calendar shortcode on a page that isn't the root. I get the calendar that has no navigation.

    2.) I put the calendar shortcode on a page that is the root and I get an archive, but no calendar.

    3.) I put the calendar shortcode on a page that is the root and check the override checkbox and I get the calendar and navigation but it is all shifted far right on the page where half the calendar isn't visible.

    What I would expect is that if I put the calendar shortcode in I would get the calendar no matter what the url. Also, there should be an option for turning on the navigation like [eab-calendar navigation="true"] or something to that effect. I don't have the ability to edit files using ftp on this particular server so this may be a show stopper for me. If I can edit through the template editor to make it work properly then I am more than willing to do so.

  • susan_langenes
    • Design Lord, Child of Thor

    Hey williapv, I figured out a very simple fix. It'll take you less than a minute.

    Go to plugins > editor > and select Events+ where it asks you which plugin you want to edit.

    Find this file (way down at the bottom) and click on it:
    events-and-bookings/default-templates/shortcode-calendar-default.php

    Once you have that file pulled up, you'll notice that you can now see a different list of php files on the right.

    The one you want is about the 6th one down:
    events-and-bookings/default-templates/calendar/archive-incsub_event.php

    Click on that and in the editing window, where it says:

    get_header( 'event' );
    ?>
    	<div id="primary">

    Change the word "primary" to "main".

    Save, exit and you're good to go.

  • susan_langenes
    • Design Lord, Child of Thor

    By the way the reason you're getting the weird output is because your theme uses div id "primary" for the first sidebar. So it's forcing your calendar into the sidebar. Simply changing the name of the div the calendar puts itself in is all we're doing here.

    I made this change on my own two sites that use this plugin, and left it that way because it seems to work just fine in both my themes (Genesis and 2012). Might be another feature request for this plugin, given that I suspect there are lot of themes out there using "primary" div for the first sidebar.

  • williapv
    • New Recruit

    Thank you so much Susan! You are a rock star!

    So I have one more question. What happens when an update for the plugin appears. Do my changes that I made here persist?

    @WPMU, I would expect that the calendar would be styled the same as it does when it isn't at the root. That version of the calendar is pretty enough. This one takes over the sidebar. I will go back through this thread and apply Susan's styling changes tonight and I suspect it will work for me. It would be good though to have this work out of the box.

    Paul

  • susan_langenes
    • Design Lord, Child of Thor

    An update to the plugin would definitely wipe your changes -- unless of course, the update includes these changes as additions to its code!

    What I'd recommend is that you copy the contents of any php or css files you've edited, paste them into a draft page or post in this site, and title that draft something like "edits to Events+ plugin" so that your edits are easily accessible to anyone managing the site.

    I'd also recommend reviewing the changes to the plugin before updating.

  • aecnu
    • WP Unicorn

    Greetings williapv,

    Welcome to WPMU DEV!

    Thank you for your suggestion of working out of the box, indeed it does but it is impossible to code for every theme and it is indeed your theme styling that causes part of the reported issue.

    I am using Mantra as the theme. When I do finally get the next and previous links working it shifts the whole calendar to the right of the screen.

    This is the part that I am referring to is being done by your theme.

    Not having FTP is truly bizarre, what kind of host is that?

    And not being able to FTP makes it impossible to deal with the site in case it crashes for whatever reason because you cannot FTP in and delete the plugin or theme that is causing the issue.

    What I would expect is that if I put the calendar shortcode in I would get the calendar no matter what the url. Also, there should be an option for turning on the navigation like [eab-calendar navigation="true"] or something to that effect.

    This is spot on and I totally agree this would be a great help.

    Susan has truly been a gem here helping you deal with the styling and her advise obviously spot on.

    I will keep my eye on this ticket chiming in if I can indeed be of some assistance.

    Cheers, Joe

  • DRAN
    • Design Lord, Child of Thor

    Hello, I was unable to move the navigation links and month to the top of the calendar with the sidebar widget:

    http://durhamregionactionnetwork.com/

    Also, the arrows seem reversed...right is going back in time, left is forward. I would like to change that. And when you click on the arrows, if I have no event on that month it loads a different page stating no events but I would like the calendar to still appear for the following month.

    Thank you for any help you can provide!

  • PC
    • WPMU DEV Initiate

    Hello there,

    Thanks for posting on the forums.

    Can you kindly open a new thread for this issue as this one is quite old to reopen the discussion ?

    The plugin has undergone a few changes and it would be best if it was handled on the separate thread :slight_smile:

    Cheers
    PC
    Sales &Support

  • PC
    • WPMU DEV Initiate

    Hey there,

    Thanks for the understanding however I see that all the threads you posted are being dealt with someone from our support team.

    Creating multiple threads for the same issue would increase the response time and confusion though. However, if you feel that any thread is not being answered, kindly let me know and I will have a look at it.

    Cheers
    PC
    Sales &Support

  • DRAN
    • Design Lord, Child of Thor

    I'm confused....didn't you ask me to post this in a new thread? that's what I did. No, I did not get a resolution to this so I thought I would keep searching and found this thread and hoped someone on here might know. Other threads I've posted are for issues for other plugins installed. Only one issue has been resolved so far (not this plugin).

  • PC
    • WPMU DEV Initiate

    Hiya,

    Sorry for creating a confusion, I thought you create multiple threads for the same issue as per your statement above.

    I will post a third thread though and hope someone can help.

    Other threads I've posted are for issues for other plugins installed.

    I see that our support team is working on them with you and will get them fixed asap :slight_smile:

    Cheers
    PC
    Sales &Support

  • DRAN
    • Design Lord, Child of Thor

    Yes, I posted three for this one...one to support (no answer), then to this thread hoping someone might still answer this thread even though it's old, and then a third time when you advised. I had a response to the third but no resolution yet. Thanks.

    I'm still waiting on resolutions for issues with Events Group Calendar, Wiki, and this one.

  • PC
    • WPMU DEV Initiate

    Hiya,

    Thanks for posting back.

    I see both of your threads are being dealt with by @Vaughan and @Patrick Cohen and they will get it sorted out for you :slight_smile:

    Lets continue on the other threads instead of this one.

    Cheers
    PC
    Sales &Support

  • Abby
    • WPMU DEV Initiate

    After seeing this I am realising that this plugin isn't meant for folks who do events for a living. This shouldn't be so complicated to paginate a calendar, it should be a simple shortcode or something built in. I'm bummed out about this plug in. It spurts out the incorrect markup, difficult to use. Events are 100% of my income, and now I'm thinking about ditching all this software in the hopes of finding something that works.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.