WordPress.org

Ready to get started?Download WordPress

Forums

Google Calendar Events
Match AJAX Grid Month to earliest event retrieved? (6 posts)

  1. ajsilverton
    Member
    Posted 1 year ago #

    Hi,

    Our site is for a reunion happening next year. I am retrieving events between the dates *(using UNIX timestamps) of our earliest event and last event. I am also displaying a calendar grid.

    If our earliest event is, for example, in August 2013, is there a way to make the AJAX grid also show August 2013 instead of the current month?

    Thanks,

    -A

    http://wordpress.org/extend/plugins/google-calendar-events/

  2. Ross Hanney
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    Unfortunately not, I'm afraid. Short of amending the code, at least.

    This is on my to-do list for future development.

  3. ajsilverton
    Member
    Posted 1 year ago #

    Thanks for the response.

    I'm looking at your code now and it seems that I can do this by retrieving, "retrieve_from_value" from the options and passing it to, "gce_print_grid" in whatever format it and "GCE_Parser" parser need it. Maybe other places, too - I'm not done digging through it.

    I suppose I could also add a new shortcode attribute to toggle this on/off. I'm only using a single feed, but I suppose it's more correct to get the "retrieve_value_from" for each feed and pass the earliest one when printing the grid.

    Let me know if you want me to send you the code if I do this. You are welcome to it.

  4. Ross Hanney
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    If you're just using the shortcode (not the widget), and you're ok with "hard-coding" the month / year required, I've posted some updated code here. If you replace the shortcode_handler function in google-calendar-events.php with that code, it should allow you to use year and month parameters in the shortcode, like this:

    [google-calendar-events type="ajax" year="2013" month="8"]

    This isn't a pretty solution, but hopefully it might do the trick for the time-being!

  5. GaryManners
    Member
    Posted 1 year ago #

    I had this same issue. My first events were two months in the future and I wanted that month to show up instead of the current month.

    This code patch and adding the short code tags worked great, although I had to delete my feed and re-add it. The code edit seemed to have knocked it out.

    An even better solution would be if by default the grid displayed the first month containing events. Because now that I have the short code telling the grid to display a month and a year, once that month passes, I'm presuming I'll have to delete those parameters or else that month will permanently be the landing month for the calendar.

    Maybe your next upgrade can incorporate this idea?

    Rock on.

  6. Ross Hanney
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Gary,

    Defaulting to the first month that has events is definitely on my to-do list!

    Many thanks for your feedback.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.