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 Soma
      LogMaintenance
      A simple ProcessWire module to give some maintenance control over log files. I found myself often having lots of log files for different things that can grow more or less quickly to a size where they can be difficult to maintain. The built in Logger of PW does a good job of giving you the possibility to delete or prune logs. But it has to be done manually and sometimes a log grows into millions of lines, which makes it often impossible to even prune it as it's too large.
      LogMaintenance uses LazyCron to run the maintenance task and there's several settings you can setup on a global or per log basis.
      Archive: will create zip files for each log file in logs/archive/ folder and add the log each time the maintenance is run to a subfolder containing the datetime.
      Lines: keeps logs to a certain number of lines 
      Days: keeps the log to a certain number of days
      Bytes: keeps the log to a certain amount of bytes
      Each setting is checked from top down, the first setting to contain something is used. So if you check the "Archive" option, all other settings are ignored and logs are archived everytime the LazyCron is executed. If you want to keep your logs to a certain amount of bytes just leave all other settings to 0 or blank.
      Per Log Settings
      There's a textarea that you can use to setup a config for a specific log file one per line. All the logs you define here ignore the global settings above. The syntax for the settings is:
      logname:[archive]:[lines]:[days]:[bytes] 
      errors:1:0:0:0 // would archive the errors log messages:0:10000:0:0 // will prune the errors log to 10000 lines  
      The module can be found on github for you to check out. It's still fresh and I'm currently testing.
      https://github.com/somatonic/LogMaintenance
    • By teppo
      Fieldtype Page IDs is a third party Fieldtype that, simply put, stores Page references as integers (Page IDs).
      This fieldtype was built as a quick and dirty workaround for Page Reference fields' inability handle self-references due to circular reference issues. A project I've been working on for a while now includes a combination of RepeaterMatrix content blocks and tagging/categorization system that would've resulted in a lot of duplicate pages (and plenty of unnecessary manual work for content editors) had I used built-in Page Reference fields, and thus a new Fieldtype felt like the most sensible approach.
      Fieldtype Page IDs was designed to be loosely compatible with Page References in order to make conversions between the two feasible, but it is quite limited feature wise:
      largely due to the fact that stored values are actually just integers with no connection to Pages whatsoever some advanced selectors and related features are not supported, and page values can't be directly accessed configuration settings are limited to the bare essentials (selector string and Inputfield class) only a handful of Inputfields (AsmSelect, Checkboxes, Text) are (currently) supported Anyway, in case you need to store Page IDs (and Page IDs only) and are happy with the limitations mentioned above, feel free to give this Fieldtype a try. It has been working fine for me in one particular project, but hasn't been tested that much, so please tread carefully – and let me know if you run into any issues.
      GitHub repository: https://github.com/teppokoivula/FieldtypePageIDs
      Modules directory: https://modules.processwire.com/modules/fieldtype-page-ids/
    • By daniels
      This is a lightweight alternative to other newsletter & newsletter-subscription modules.
      You can find the Module in the Modules directory and on Github
      It can subscribe, update, unsubscribe & delete a user in a list in Mailchimp with MailChimp API 3.0. It does not provide any forms or validation, so you can feel free to use your own. To protect your users, it does not save any user data in logs or sends them to an admin.
      This module fits your needs if you...
      ...use Mailchimp as your newsletter / email-automation tool ...want to let users subscribe to your newsletter on your website ...want to use your own form, validation and messages (with or without the wire forms) ...don't want any personal user data saved in any way in your ProcessWire environment (cf. EU data regulation terms) ...like to subscribe, update, unsubscribe or delete users to/from different lists ...like the Mailchimp UI for creating / sending / reviewing email campaigns *I have only tested it with PHP 7.x so far, so use on owners risk
      EDIT:
      I've updated the module to 0.0.4. I removed the instructions from this forum, so I don't have to maintain it on multiple places. Just checkout the readme on github 🙂
      If you have questions or like to contribute, just post a reply or create an issue or pr on github. 
    • 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
      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 blynx
      Hej,
      A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated
      (Also pull requests are appreciated 😉 - have a new Job now and don't work a lot with ProcessWire anymore, yet, feel free to contact me here or on GitHub, Im'm still "online"!)

      Modules directory: http://modules.processwire.com/modules/markup-processwire-photoswipe
      .zip download: https://github.com/blynx/MarkupProcesswirePhotoswipe/archive/master.zip
      You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method:
      <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so:
      <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe
      What do you think? Any ideas, bugs, critique, requests?
      cheers
      Steffen