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 bernhard
      WHY?
      This module was built to fill the gap between simple $pages->find() operations and complex SQL queries.
      The problem with $pages->find() is that it loads all pages into memory and that can be a problem when querying multiple thousands of pages. Even $pages->findMany() loads all pages into memory and therefore is a lot slower than regular SQL.
      The problem with SQL on the other hand is, that the queries are quite complex to build. All fields are separate tables, some repeatable fields use multiple rows for their content that belong to only one single page, you always need to check for the page status (which is not necessary on regular find() operations and therefore nobody is used to that).
      In short: It is far too much work to efficiently and easily get an array of data based on PW pages and fields and I need that a lot for my RockGrid module to build all kinds of tabular data.

      Basic Usage

       
      Docs & Download
      https://modules.processwire.com/modules/rock-finder/
      https://gitlab.com/baumrock/RockFinder/tree/master
       
      Changelog
      180817, v1.0.6, support for joining multiple finders 180810, v1.0.5, basic support for options fields 180528, v1.0.4, add custom select statement option 180516, change sql query method, bump version to 1.0.0 180515, multilang bugfix 180513, beta release <180513, preview/discussion took place here: https://processwire.com/talk/topic/18983-rocksqlfinder-highly-efficient-and-flexible-sql-finder-module/
    • By OLSA
      Hello for all,
      ConfigurationForm fieldtype module is one my experiment from 2016.
      Main target to build this module was to store multiple setup and configuration values in just 1 field and avoid to use 1 db table to store just single "number of items on page", or another db table to store "layout type" etc. Thanks to JSON formatted storage this module can help you to reduce number of PW native fields in project, save DB space, and reduce number of queries at front-end.
      Install and setup:
      Download (at the bottom ), unzip and install like any other PW module (site/modules/...). Create some filed using this type of field (ConfigurationForm Fieldtype) Go to field setup Input tab and drag some subfields to container area (demo). Set "Name" and other params for subfields Save and place field to templates ("Action tab") How to use it:
      In my case, I use it to store setup and configurations values, but also for contact details, small content blocks... (eg. "widgets").
      Basic usage example:
      ConfigForm fieldtype "setup" has subfields:
      "limit", type select, option values: 5, 10, 15, 20
      "sort", type select, option values: "-date", "date",  "-sort", "sort"
      // get page children (items) $limit = isset($page->setup->limit) ? $page->setup->limit : 10; $sort = isset($page->setup->sort) ? $page->setup->sort : '-sort'; $items = $page->children("limit=$limit, sort=$sort");  
      Screenshots:


       
      Notes:
      Provide option to search inside subfields Provide multilanguage inputs for text and textarea field types Provide option for different field layout per-template basis Do not place/use field type "Button" or "File input" because it won't works. Please read README file for more details and examples Module use JSON format to store values. Text and textarea field types are multilanguage compatible, but please note that main target for this module was to store setup values and small content blocks and save DB space. Search part inside JSON is still a relatively new in MySQL (>=5.77) and that's on you how and for what to use this module.
      Thanks:
      Initial point for this fieldtype was jQuery plugin FormBuiled and thanks to Kevin Chappel for this plugin.
      In field type "link" I use javascript part from @marcostoll module and thanks to him for that part.
      Download:
      FieldtypeConfigForm.zip
      Edit: 14. August 2018. please delete/uninstall previously downloaded zip
      Regards.
         
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://gitlab.com/baumrock/RockPdf
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
    • By Thomas Diroll
      Hi guys I'm relatively new to PW and just finished developing a page for a client. I was able to include all necessary functionality using the core fieldtypes but now I it seems that I need to extend them with a custom one. What I need is a simple button, that copies the absolute url (frontend not PW-backend) of the page which is currently edited to the clipboard. As this feature is only needed inside a specific template, I tend to use a custom fieldtype which provides this feature. I've been looking inside the core modules code (eg. FieldtypeCheckbox.module) but I don't really get the structure of it and how its rendered to the admin page. I also didn't find a lot of tutorials covering custom fieldtypes.
      Maybe some of you could give me some tips on how to write a basic custom fieldtype that renders a button which copies the value of
      page->httpUrl() to the clipboard using JS. Thanks!
    • By BrendonKoz
      I began writing this module from scratch, basing it off simple examples of modules, trying to learn the necessary methods required to create a fieldtype. I was WAY off, but learned a lot. Eventually I moved towards examining the FieldtypeEvents example from Ryan and, in many areas, copy/pasting and then adjusting the code (and then trying to determine what it all was doing) method by method, file by file (from his example to my module).
      I've gotten to the point where I was ready to test the code - I haven't fully fleshed out my visual interface, nor integrated any of the 3rd party API tools this will (can) take advantage of. I also haven't implemented any JS or CSS for the interface. Right now I'm just trying to get it to save and then display any of the data that has been entered into the form fields of a template from the admin. When I save the page, the field is reset to defaults and no feedback message (for the field) is shown at the top of the page upon reload. When using Tracy Debugger from within the processInput method (immediately attempting to debug the $input variable), Tracy caught no data to be shown.
      If anyone has some time to take a quick look and see what I might've done wrong I'd be super grateful. I've had no forward progress in about 3 days (and like many others was unable to get Xdebug breakpoints working in PHPStorm). 😞
      https://github.com/BrendonKoz/FieldtypeBooks