Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by joshuag

  1. This is a conversation that comes up quite a bit in our shop. It's a valid point you make especially from the perspective of first-timers. I have ran into this a lot of times with people new to PW or even just in general web design dev conversations where PW comes up. I preach PW to all my fellows (of course) and I am often met with the same reaction... something along the lines of "we would have chosen PW because it seems perfect, but we needed to get something done [fast, easy, simple, etc.]..."

    I am fully in the camp of the reason I love PW is that it doesn't force me into some frontend hell like other platforms (not mentioning any names). Of course, this is ideal for me as I am a frontend design/developer. So I see how there is this big gap in perception. I think there could be a strong market for prebuilt PW site profiles that are robust and full-featured. Especially if they focus on a specific demographic or genera (for lack of a better term) like real estate or business sites or hotels. 

    With tools like the Repeater Matrix, we almost always build a WYSIWYG experience for all of our customers. So they can choose, drag and drop, and combine site elements however they want. They love it. Buuuutttt.... this is where the whole conversation gets tricky. 

    The beauty of Processwire is that it's "an un-opinionated CMS/CMF". that literally is the magic sauce. So every time we break out this discussion and go down the idea phase of how we could actually create the type of experience you are suggesting... we end up at the same conclusion. That by making those content/layout/structure/design/ decisions in advance, we end up sacrificing the very thing that draws us to PW in the first place. 

    I agree that PW is missed in a lot of cases. In my experience it goes like this: 

    Developers: it's too simple - can't handle what I want to do. And they go a more "complicated" route. 

    Designers: it's too hard, I can't seem to get something to appear instantly... it's too hard/slow/complicated.

    I feel like I have been in that conversation 100 times.

    I find that the people that take to PW are almost always people who have crafted their frontend chops and care enough about that part of the experience that they value PW's way of staying completely out of your way. At the same time giving you full control over the design of your admin/backend experience as well. I think making an out of the box solution to websites with PW ends up missing the reason it works so well in the first place. But, this is probably not the last time I jump into this conversation or start to think of how I can make some killer templates/site profiles for sale. hahaha.  

    I hope this discussion continues because I think there is a piece of magic here... just haven't cracked the nut on it yet. 

    • Like 4
  2. Does anyone know of a way that I can hook into the processPageEdit module or Inputfield Module or something... so that I can force empty Inputfieldset and empty fieldsetTabOpen to render? I have been through the files ProcessPageEdit.module, InputfieldWrapper.module, etc. etc. I have really been searching. I even saw that inside repeaters there is a comment about adding an empty line break inside an otherwise empty inputfieldWrapper to force it to render. But I have been unable to reproduce this. 

    I then tried just creating a module that would loop through the input fields in a field group, render them out, then I am using javascript to insert them into the correct location on the edit screen, but it's getting to be too much to handle this way. 

    I literally, want to make a module that says, show empty fieldsets, tabs, and hidden fields in the edit screen. Hope this makes sense. 

    I don't want to create custom markup or render them a different way. I want to know if it's possible to make a module to have these things actually render in the admin screen in the actual markup. 


    Thanks in advance for the help. 

    Screen Shot 2018-07-03 at 7.37.05 PM.png

  3. 4 hours ago, adrian said:

    Hey @joshuag - I really need to bump this find() only working on recurring dates issue. Can you please at least confirm that this is definitely the case because I need to start figuring out an alternative. I don't see how this module can be used without it. How can you generate a list of upcoming events when some are recurring and some are not if the find() method only finds the recurring ones.


    Hey Adrian, thanks for all the good feedback in the last few posts. I am working on some fixes. I have confirmed that non-recurring dates are not showing up in find() in my latest version. I will fix this tomorrow and post an update here. 

    I appreciate your feedback. 

    • Like 1
  4. 1 minute ago, adrian said:

    I guess this is a feature request, or maybe I am missing an option, but at the moment I can do:

    $event = $recurme->event($page);

    to get the event for the current page, but if I want to render the calendar with just this event, I can't simply do:

    echo $recurme->renderCalendar($event, $options)

    Instead, I have to do:

    $options = array(
        'month' => date('m', $event->start_date),
        'year' => date('Y', $event->start_date),
        'selector' => 'id='.$page->id,
        'cache' => false,
        'mini' => true
    echo $recurme->renderCalendar($options);

    using "selector" to get the events for this page.

    Or is there a better way?

    You are correct. Currently your example is the only way to do it, but this is a good idea. I will look at how I can add just passing a $page or $pages to the calendar to render a calendar. Shouldn't be that hard and it would be a nice shortcut. 

    • Like 1
  5. 5 minutes ago, adrian said:

    @joshuag - not sure if this is a bug or just an inconsistency, but when setting up a recurring date if you specify the start date before the first day that the rrule settings allow, the calendar will show an entry for that start date, but the results in the admin won't show it.


    See the entry on the 5th - should that be there?


    Thanks for noticing this. I will take a look. 

    • Like 1
  6. 59 minutes ago, itsberni said:

    Could be - but i don´t know, where to put the selector. do you have any code example?

    // filter the caalendar results to just this page
    $options = array(
    	'selector' = 'title%=course1'
    // get the calendar

    The calendar grabs the current URL the appends the get variables. The calendar should page through months via ajax.


    Ajax is not working.

    Please make sure that your site contains a hidden page home/recurme-ajax/ using the template "recurme-ajax" and that you have a matching file in your site/templates/ folder. IF for some reason this file is missing, you can copy the template file from the InputfieldRecur/templates/recurme-ajax.php.

     Hope this helps, 

    • Like 1

    56 minutes ago, itsberni said:

    Hi folks,

    is there any chance to set the date/time - format to german?

    e.g. 1:45pm should be shown as 13:45Uhr.
    May should bei shown as Mai a.s.o.
    is this possible to achive this over the array "renderEvent=>dateFormat"? I've played with it, but without any positive result....

    Many Thanks!

    you can use the http://php.net/manual/en/function.strftime.php formats as well for languages other than english. 

  8. 11 minutes ago, GhostRider said:

    Hi @joshuag

    I am working on the same project with Adrian using your Recurme module.

    I've used the updated files you provided. rrule-gui.js and MarkupRecurme.module.


    Using the $event->timeEndUnix; that you have added is working for New and Imported events.

    However, both New and Imported events have an issue when changing the Date (non repeating events) and displaying the $event->timeEndUnix.

    On first save, the $event->timeEndUnix continues to display the old end date.

    But if I go into the event a second time,  and save once again (with no changes), the $event->timeEndUnix is updated correctly.

    OK, thanks for testing this. I will give it a look and upload a new file. :) 

    • Like 1
  9. On April 27, 2018 at 12:59 PM, adrian said:

    Hi Joshua,

    Any further news on this - sorry to bug you, but deadlines are looming and I need to know if I'll need to start parsing the the UNTIL value to get the end date or if you'll manage to provide a simpler option for getting a correct end date.

    Thanks for your time!


    I have added an extra variable to recurme to give you the timeEnd as a unix timestamp so you can format it however you want. 


    Here is an example that outputs the exact information you want:

    	$p = $pages->get(1120);
    	$event = $recurme->event($p);
    	echo date('M d - ',   $event->start_date);
    	echo date('M d',      $event->end_date)."<br />";
    	echo date('g:i a - ', $event->start_date);
    	echo date('g:i a',    $event->timeEndUnix);
    	// outputs
    	// Mar 14 - Feb 16
    	// 9:03 am - 9:02 am

    IMPORTANT: We need to re-save an event to add the value of timeEndUnix to the json data.

    I know this is not ideal, however it was the best compromise until I make date saving & conversions better all around.

    I have also adjusted the 'timeEnd' value to be effected by the 'timeFormat' option if you prefer to use that instead, however, this will only work if your saved data for the event has timeEndUnix Value. 

    You had mentioned that you have a lot of events, in order to take advantage of the new timeEndUnix variable, you will have to save your events again. Send me a PM and we can work out a way to do it with the API and add the timeEndUnix value to your JSON data for your existing events. 

    Please try these (attached) files and let me know if you find any problems. 

    Hope this helps,



    • Like 1
  10. On April 6, 2018 at 5:54 PM, adrian said:

    Sorry, I understand my mistake on this. It needs:


    Although I still don't know why the dateFormat is not being respected in the output.

    change the timeFormat option instead,


    change the xBefore template to use {date} instead of {time}.

    'xBefore' => '<li class="rm-list-event {original.name}"><span class="rm-event-date">{time}</span> ',


    On April 6, 2018 at 5:13 PM, adrian said:

    Looking at this all again now. I am working with manually created events (so there aren't any complications with API import) and I am still confused.

    This is what I set up:



    $recurme->renderEvent($page, array('dateFormat' => 'M d, Y @ g:i a'));

    results in: Error: Trying to get property of non-object on line: 682 of MarkupRecurme.module

    If I do:


    you can see that the "time" is off by an hour - probably a timezone issue, but how can I manually output something like:

    March 13th - March 30th, 2018
    10:00 am - 2:00 pm

    This sort of output I am sure is quite common.

    The problem is that end_date: 1522562399 is 2018-03-31 11:59 but the event only goes until the 30th. So how do I get the 30th - do I have to parse UNTIL from rrule, or can do take end_date and subtract one day - what is the reliable way to get the actual end date?

    Sorry if I am being stupid - I can't believe I am the only person to come across these issues, but I don't think I am missing anything - I think the module just needs more properties with things like actual start date, start time, end date and end time so we can easily output custom formats.

    Let me know if you want to spend a little time on a live chat/call about this.



    yeah, this looks like a timezone issue. I am digging into it. thanks for bringing it up. Subtracting one day won't work or be consistent. 

    • Thanks 1
  11. On March 28, 2018 at 7:25 AM, snck said:

    Thanks, it worked for events I received through $recurme->find.

    I could not find a way to access the allDay value from an event page.

    $allDay = $recurme->event($page->id)->allDay;

    Could you please point me in the right direction on how to access the allDay property for one single event?

    Thank you!

    Try this updated file: 
    I will add this to my next release.

    Thank you!


    • Thanks 1
  12. 14 hours ago, adrian said:

    Ok, more details:If I import a date, the json initially looks like this:

    {"startDate":1520956800,"endDate":1522440000,"allDay":false,"timeEnd":"02:00 pm","dates":["W11/13/Tue/Mar/2018","W11/14/Wed/Mar/2018","W11/15/Thu/Mar/2018","W11/16/Fri/Mar/2018","W11/17/Sat/Mar/2018","W11/18/Sun/Mar/2018","W12/19/Mon/Mar/2018","W12/20/Tue/Mar/2018","W12/21/Wed/Mar/2018","W12/22/Thu/Mar/2018","W12/23/Fri/Mar/2018","W12/24/Sat/Mar/2018","W12/25/Sun/Mar/2018","W13/26/Mon/Mar/2018","W13/27/Tue/Mar/2018","W13/28/Wed/Mar/2018","W13/29/Thu/Mar/2018","W13/30/Fri/Mar/2018"],"excluded":[],"active":true,"showResults":false,"rrule":"WKST=MO;FREQ=DAILY;DTSTART=20180313T100000Z;INTERVAL=1;UNTIL=20180330T140000Z"}

    Then if I open the page in the admin and save the page (without changing anything), it then looks like this:

    {"startDate":1520960400,"endDate":1522479540,"allDay":false,"timeEnd":"02:00 pm","dates":["W11/13/Tue/Mar/2018","W11/14/Wed/Mar/2018","W11/15/Thu/Mar/2018","W11/16/Fri/Mar/2018","W11/17/Sat/Mar/2018","W11/18/Sun/Mar/2018","W12/19/Mon/Mar/2018","W12/20/Tue/Mar/2018","W12/21/Wed/Mar/2018","W12/22/Thu/Mar/2018","W12/23/Fri/Mar/2018","W12/24/Sat/Mar/2018","W12/25/Sun/Mar/2018","W13/26/Mon/Mar/2018","W13/27/Tue/Mar/2018","W13/28/Wed/Mar/2018","W13/29/Thu/Mar/2018"],"excluded":[],"active":true,"showResults":false,"rrule":"WKST=MO;FREQ=DAILY;DTSTART=20180313T100000Z;INTERVAL=1;UNTIL=20180330T140000Z"}

    Notice the change in the startDate and endDate stamps as well as the fact that "W13/30/Fri/Mar/2018" is removed after saving.

    Help :)

    endDate will always be startDate -> till END OF THE CURRENT DAY from the interface if you have a timeEnd (11:59 from your example). endDate always represents the UNIX TIMESTAMP of the day/hour/min in seconds of the END TIME of the event. If you want a date for the events to stop if it is repeating, then it refers the the UNTIL value part of the RRULE UNTIL value. The until value tells recurme to expand the repeating dates up to the UNTIL date. I can see how this is confusing. I might rename these variables now that you have brought it to my attention. 

  13. 18 hours ago, adrian said:

    Hey @joshuag - I am quite confused about calling dates via the API.

    From the docs it looks like I should do:


    but what if I have more than one recurme field on the page?

    I am tempted to parse it myself like this:


    because this way I can get the start date from my selected "event_dates" field.

    However I am sure I am missing something in how this is meant to be used :)

    Any tips please?

    I am not sure that multiple recurme fields in a single page would work as expected. Parsing the Json would work well. 

  14. 1 hour ago, adrian said:

    Thanks for looking into this - right now I am going to have to either build up the JSON, or wait for you to implement an API method. I think the API method is essential because I am sure others will also need to import dates from existing sites. 

    I'd appreciate knowing whether you might have time to implement this relatively quickly, or if you think it might take some time to get to - not pressuring, just needing to know if I need to take the JSON approach to meet my deadlines. Thanks for your time!

    Sending you a pm. 

    • Like 1
  15. 1 hour ago, adrian said:

    Hey @joshuag - not sure if I am just missing it, but is there a method for adding new dates via the API? I have a LOT of events to import. Or, do I have to manually build up the JSON eg:

    {"startDate":1518778800,"endDate":1518940740,"allDay":false,"timeEnd":"12:00 pm","dates":["W7/16/Fri/Feb/2018","W7/17/Sat/Feb/2018"],"excluded":[],"active":true,"showResults":true,"rrule":"WKST=MO;FREQ=DAILY;DTSTART=20180216T030000Z;INTERVAL=1;UNTIL=20180217T235900Z"}

    and populate with $page->event->date = $jsonStr;


    I don’t have a method to add dates via the api, but that is a good idea.

    If you do add dates by populating the json manually, I could see some complications arising depending on how you have chosen the repeat pattern in the Recurme Field. Because the dates are generated based on the rrule via JavaScript. 

    I will give this some thought and see how we could make this a no-brainer. 

    Thanks for the great idea. 

    • Like 1
  16. On March 14, 2018 at 2:10 PM, DonPachi said:

    Fresh install of PW 3.0.62, I'm getting this error when installing the latest version of Recurme:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/sites/t/X/public_html/wire/core/Modules.php on line 3921
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

    Never seen this before and I'm a bit stumped... Any ideas?

    Edit: Increased memory limit with ini_set on the module to see where this goes and got a 30s execution time error. Can't figure this one out, there must be a loop somewhere as increasing that came back to a 800MB memory limit!

    Edit 2: Solved! I'll send you an e-mail with details.

    I would love to know what happened. Let me know, if I need to, I will issue an update right away. Thank you!

    • Like 1
  17. On March 12, 2018 at 10:49 AM, snck said:

    Hey @joshuag, thanks for the update! The toggle fix did not solve my problem (quoted above) because you still do not store the value of the checkbox/toggle. Could you please implement something like an $event->allDay property with a simple binary value? 

    Thank you in advance!

    $event->allDay should be giving you the value of $allDay in the event object true/false. This is also implemented in the json stored in the field. 

  • Create New...