joshuag

Recurme – Processwire Recurring Dates Field & Custom Calendar Module.

Recommended Posts

The fix seems to be to set all events as recurring, and use a count of one for events that don't actually recur.
 

Share this post


Link to post
Share on other sites

@joshuag

Got some notices when installing that you might like to fix:

image.png.1d3395be3f3e6f6be1c719bdb565018a.png

Also, and much more importantly, on the UiKit theme, there are some big CSS issues:

image.png.bf6766c51bdd1181bcf8b62de0f77984.png

 

Also, I don't understand why the start date includes the time when "All Day" is checked. Maybe I am missing something, but I think that makes it quite a confusing UI. Is there a way around this?

Another issue I am having is how to define an end date/time if it's not a recurring event. I was hoping I wouldn't need separate fields for recurring and non-recurring events. Do I?

Thanks!

Share this post


Link to post
Share on other sites

I'm trying to pass options to both renderEvent() and renderList(), but the functions aren't picking up my settings.
Here's code from my list display page:
 

$siteEvents = $pages->find("template=meetingevent, sort=meeting-event-date-recurring");

$options = array(
'selector'			=> '',
'monthFormat'		=> 'F',
'dateField'			=> 'recurme',
'renderEvent' 		=> array(
	'dateFormat' 	=> 'M d, Y @ g:i a',
	'timeFormat' 	=> 'g:i a',
	'dayFormat'		=> 'd',
	'monthFormat'	=> 'M',
	'yearFormat'	=> 'Y',
	'hourFormat'	=> 'g',
	'minuteFormat'	=> 'i',
	'secondFormat'	=> 's',
	'ampmFormat'	=> 'a',
	'xBefore' 		=> '<li class="rm-list-event {original.name}">ASDF<span class="rm-event-date">{time}</span> ',
	'xItem'			=> '<a href="{link}" title="{title}">',
	'xAfter'		=> 'STRING {title}</a></li>'
),
'renderDay'			=> array(
	'xBefore'		=> '<ol class="rm-list-day {todayClass} rm-{dayName}"><li><h3>',
	'xItem'			=> '<span class="rm-date-day">{day}</span><span class="rm-date-month">{month}</span><span class="rm-date-year">{year}</span></h3>',
	'xListBefore'	=> '<ol class="rm-list-events">',
	'xListAfter'	=> '</ol><!-- close list-events -->',
	'xAfter'		=> '</li></ol><!-- close day -->'
),
'renderMonth'		=> array(
	'xBefore'		=> '<ul class="rm-list-month rm-{month}"><li>',
	'xItem'			=> '<h2>{month}</h2>',
	'xAfter'		=> '</li></ul><!-- close month -->'
),
'cache'				=> true,
'cacheName'			=> '',
'noEvents'			=> '<p>No events to show!</p>',
);

$content .= $recurme->renderList($siteEvents, $options);

Events.png.5c55137a87cef596121185bd64141a91.png
Output looks like the attached screen shot.
Note that I'm not seeing any of my customization (I changed the UL to OL and added some strings, to test). 
I'm also not seeing Dates displayed.
Clearly I've missed something here - any help appreciated.
 

Share this post


Link to post
Share on other sites

 

On 2/15/2018 at 3:58 PM, Smoo said:

Clearly I've missed something here - any help appreciated.

If I understand correctly you have to get the events from $recurme->find() or equivalent.

Share this post


Link to post
Share on other sites

Actually i completely worked around this, pulling apart the object returned by $recurme->event() and formatting the whole setup myself.
But next time...
Anyway thanks for the tip.

 

Share this post


Link to post
Share on other sites

Hi guys, sorry for the delay in replying.

I am going over the following details from this thread and will post an update ASAP:

  • Install issues - blank file path, notices.
  • UIKIT theme CSS conflicts.
  • returning data on non-recurring events
  • all day toggle 
  • render methods and output overrides. 

As soon as I have an update, I will post it here to the forum. 

 

  • Like 2

Share this post


Link to post
Share on other sites
On December 19, 2017 at 3:56 PM, netcarver said:

@joshuag Early on in the thread you mentioned a work-in-progress fix for the 2800 event limit, and also about a more elegant update feature when adding exclusions. Any update on this? I've scanned the posts in the rest of the thread but might have missed it. Have these issues been addressed in the current version?

Hi Netcarver, 

Currently, I am still unable to break that limit or 2800 repeats of an event. Even so, that is a long time:

Example Recurring Time:

Daily = approx. 7.5 years
Weekly = approx. 53.5 years
Monthly = approx. 233 years
Yearly = approx. 2800 years

I am working on a copy of recurme with a revised interface but it is nowhere near complete. The current exclusion works ok for 99% of the use cases. Although I do agree that it could be GREATLY improved. I would like to focus on fixing the more pressing bugs before releasing any huge changes to the interface. 

  • Like 2

Share this post


Link to post
Share on other sites

Hi Guys, 

Here is an updated version of Recurme. I would appreciate any testing/feedback. 

## [1.0.2] - 2018-02-21
### changed
 - Fixed Skipping Month Issue for months with more days (ie. Jan 31)
 - Fixed Broken $options[RenderEvent] options (see this post)
 - Fixed Non-repeating event data
     - Non-repeating events display without setting repeat to x1.
 - Added timeStart field. 
 - Added timeEnd field. $event->timeEnd
 - Added “All Day” toggle
 - Fixed Install notice $template->id
 - UIKIT theme compatibility Fixes

InputfieldRecur.1.0.2.zip

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the getting to these issues @joshuag

1) It looks like the UiKit theme issues are fixed

2) I can't seem to save a non all day event. I uncheck "all day" and enter a start and end time, but when I save the page, the "all day" is checked and the end time isn't saved.

3) The results seem to be off by a day - note 15/16 vs 14/15 in the results.

image.thumb.png.767404c826e201f13c394a541ec6d3f7.png

  • Thanks 1

Share this post


Link to post
Share on other sites
3 minutes ago, adrian said:

Thanks for the getting to these issues @joshuag

1) It looks like the UiKit theme issues are fixed

2) I can't seem to save a non all day event. I uncheck "all day" and enter a start and end time, but when I save the page, the "all day" is checked and the end time isn't saved.

3) The results seem to be off by a day - note 15/16 vs 14/15 in the results.

image.thumb.png.767404c826e201f13c394a541ec6d3f7.png

Hmmm. That is very strange that you can’t save. Do you have any js errors?

also, have you set your timezone in the config? 

Looking to see if I can Reproduce this. 

Thanks a lot! 

Share this post


Link to post
Share on other sites
4 minutes ago, joshuag said:
9 minutes ago, adrian said:

 

Hmmm. That is very strange that you can’t save. Do you have any js errors?

Looks like it's ok now - I changed the date to something else, then saved and now it's working. Not sure if it was some change tracking issue or what. I did try several times before, but seems ok now - I'll keep an eye on it and let you know.

Let me know if you have troubles reproducing the results table issue.

Also, would you consider changing the behavior of the code icon - I see that it's a tooltip for the RRule, but it might be nice if there was no target, because I thought it was clickable and the # target directs me to the top of the page and makes me think the link is broken. I actually think it might be nice if clicking it showed the RRule below, like the results table shows.

This question is not really specific to this module, but I am wondering if there is a standard way to handle multiday events that have different start/end times on different days, like a concert or conference. I am guessing these just need to be single separate events, otherwise it's not really a recurring event?

  • Thanks 1

Share this post


Link to post
Share on other sites

A different incarnation of the save issue:

save_bug.gif.1194735178aac25d6ab99bbd44f8c1fe.gif

  • Thanks 1

Share this post


Link to post
Share on other sites

@adrian yes, I could change the rrule. Good idea. 

Thank you for testing this and the detailed feedback. I’m trying to track down why it’s not saving your start time or this would be happening. I’ll post a fix as soon as I can reproduce it and figure it out :) 

As for multi-day events, you are correct, they can repeat on those days, or be separate events. Currently I have no means to span days with events. 

Share this post


Link to post
Share on other sites

Looks like there is no timeStart in the POST data:

image.thumb.png.6bf87473168e8ed53dfc69e95d1039cd.png

{"startDate":1518699600,"endDate":1518854340,"allDay":false,"timeEnd":"03:00 pm","dates":["W7/14/Wed/Feb/2018","W7/15/Thu/Feb/2018"],"excluded":[],"active":false,"showResults":true,"rrule":"WKST=MO;FREQ=DAILY;DTSTART=20180215T050000Z;INTERVAL=1;UNTIL=20180216T235900Z"}

Share this post


Link to post
Share on other sites
9 minutes ago, adrian said:

Looks like there is no timeStart in the POST data:

image.thumb.png.6bf87473168e8ed53dfc69e95d1039cd.png


{"startDate":1518699600,"endDate":1518854340,"allDay":false,"timeEnd":"03:00 pm","dates":["W7/14/Wed/Feb/2018","W7/15/Thu/Feb/2018"],"excluded":[],"active":false,"showResults":true,"rrule":"WKST=MO;FREQ=DAILY;DTSTART=20180215T050000Z;INTERVAL=1;UNTIL=20180216T235900Z"}

There is no timeStart in the data since I am saving the date+timeStart as a Unix timestamp. 

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, joshuag said:

There is no timeStart in the data since I am saving the date+timeStart as a Unix timestamp. 

It looks like the timestamp is not being updated, because that timestamp is showing 5am in the POST data after saving.

Share this post


Link to post
Share on other sites
3 minutes ago, joshuag said:

@adrian Could you try this updated JS file? 

 

rrule-gui.js

This seems to have fixed the time update issue - thanks!

Just the results table issue to go :)

Share this post


Link to post
Share on other sites
1 minute ago, adrian said:

This seems to have fixed the time update issue - thanks!

Just the results table issue to go :)

Thanks a lot. Do you have your config timezone set? 

Share this post


Link to post
Share on other sites
Just now, joshuag said:

Thanks a lot. Do you have your config timezone set? 

I do have the timezone set (we are talking about in the PW config.php?). Anything else I can do to debug?

Share this post


Link to post
Share on other sites
9 minutes ago, adrian said:

I do have the timezone set (we are talking about in the PW config.php?). Anything else I can do to debug?

looks like anything before 6am is counting as the day before. :/ hmmmm.

Share this post


Link to post
Share on other sites
On February 21, 2018 at 11:47 AM, joshuag said:

looks like anything before 6am is counting as the day before. :/ hmmmm.

I think I have finally fixed this! woot woot. Thanks @adrian for all your help. I have attached a new .js file. Let me know if that works for you. 

:)

rrule-gui.js

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Just wanted to let everyone know that I sent out an email to everyone who purchased Recurme with the updated Recurme Module Package.

Thanks again to everyone who tested the changes and feedback. Especially @adrian:) 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks @joshuag - just curious - did you also take a look at the rrule code icon idea I brought up?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By horst
      Croppable Image 3
      for PW 3.0.20+
      Module Version 1.1.16
      Sponsored by http://dreikon.de/, many thanks Timo & Niko!
      You can get it in the modules directory!
      Please refer to the readme on github for instructions.
       
      -------------------------------------------------------------------------
       
      Updating from prior versions:
       
      Updating from Croppable Image 3 with versions prior to 1.1.7, please do this as a one time step:
      In the PW Admin, go to side -> modules -> new, use "install via ClassName" and use CroppableImage3 for the Module Class Name. This will update your existing CroppableImage3 module sub directory, even if it is called a new install. After that, the module will be recogniced by the PW updater module, what makes it a lot easier on further updates.
      -------------------------------------------------------------------------
       
      For updating from the legacy Thumbnail / CropImage to CroppableImage3 read on here.
       
      -------------------------------------------------------------------------
       
    • By MoritzLost
      UPDATE: I have published a stable version of this module!
      Discussion thread:
      Github: https://github.com/MoritzLost/TextformatterPageTitleLinks
      ---
      Hello there,
      I'm working on a tiny textformatter module that searches the text for titles of other pages on your site and creates hyperlinks to them. I'm not sure if something like this exists already, but I haven't found anything in the module directory, so I wrote my own solution 🙂
      It's not properly tested yet and is still missing some functionality I would like to implement, so at the moment it should be considered in BETA. Features include limiting the pages that will get searched by template, and adding a custom CSS class to the generated hyperlinks. As I'm writing this I noticed that it will probably include unpublished and hidden pages at the moment, so yeah ... it's still in development alright 😅
      You can download the module from Github:
      https://github.com/MoritzLost/TextformatterPageTitleLinks
      There's some more information in the readme as well.
      Anyway, let me know what you think! I'm happy about any feedback, possible improvements or ideas on how to improve the module. Cheers.
    • By blad
      Hi guys!
      I just uploaded a module to explore files based on elFinder. By default it will show the "Files" folder.
      Screenshots:

      Video:
       
      To do:
       More options To fix:
       The function of rotating or scaling an image fails  Image editors V 1.01 (view issue)
      Fixed the bug working with the Multi-Language support ( translation of folders ). Fixed the name of elfinder.en  Github:
      https://github.com/LuisSantiago/ProcessElFinder/
      I hope you like it.
    • By BitPoet
      I'm really in love with FormBuilder, but the one thing missing to match all my end users' expectations were repeatable field groups. Think repeaters, in ProcessWire terms. Our primary application of PW is our corporate intranet, so "lines" of fields are quite common in the forms I build. We have all kinds of request forms where the information for a varying number of colleagues needs to be entered (from meal order to flight booking request) and where it is simply impractical to send a form for each, and I don't want to clutter my forms with multiple instances of fields that may only get used ten percent of the time.
      That's why I started to build FormBuilderMultiplier (link to GitHub).
      What it does:
      Adds an option to make a regular Fieldgroup repeatable Lets you limit the number of instances of a Fieldgroup on the form Adds an "Add row" button the form that adds another instance of the Fieldgroup's fields Adds a counter suffix at the end of every affected field's label Stores the entered values just like regular fields Makes the entered values available in preview and email notifications Supports most text based fields, textareas and selects (really, I haven't had enough time to test all the available choices yet) What it doesn't do (yet):
      Support saving to ProcessWire pages (i.e. real Repeaters) I haven't tested all the validation stuff, Date/Time inputs etc. yet, but since I'm utterly swamped with other stuff at work, I didn't want to wait until I have it polished. Any feedback is welcome. There might also be some issues with different output frameworks that I haven't encountered yet. The forms I work with mostly use UIKit.
      Status:
      Still alpha, so test well before using it in the field.
      Known issues:
      When rows are added, the form's iframe needs to be resized, which isn't completely clean yet.
      How it works:
      The Fieldgroup settings are added through regular hooks, as is the logic that adds the necessary field copies for processing the form and displaying previews.
      "Multiplied" field instances are suffixed with _NUM, where NUM is an incremental integer starting from 1. So if you have add two fields named "surname" and "givenname" to a fieldgroup and check the "multiply" checkbox, the form will initially have "surname_1" and "givenname_1" field (I'm still considering changing that to make the risk to shoot oneself into the foot by having a regular "surname_1" field somewhere else in the form less likely).
      When a "row" is added, the first row is cloned through JS and the counter in the fields' IDs, names and "for" attributes as well as the counter in the label are incremented before appending the copies to the Fieldset container in the form.
      To keep backend and frontend in sync, a hidden field named [name of the fieldset]__multiplier_rows is added to the form. Both the backend and the frontend script use this to store and retrieve the number of "rows".
      ToDo:
      Naturally, add the option to store the data in real repeaters when saving to pages. Do a lot of testing (and likely fixing). Make a few things (like the "Add row" button label etc.) configurable in field(set) context. Add a smooth API to retrieve the multiplied values as WireArrays. The mandatory moving screenshot: