Jump to content

Robin S

Members
  • Posts

    5,008
  • Joined

  • Days Won

    333

Everything posted by Robin S

  1. I opened a request on GitHub: https://github.com/processwire/processwire-requests/issues/226 @Macrura, I noticed this post of yours from a while ago: Were you only able to achieve the data attributes by disabling HTML Purifier on the CKEditor field?
  2. Yes, but it can be set by anyone linking to your site, so I think it definitely needs to be verified. If you just display the event date from the GET variable without verifying it then any third party can create a link to your site that causes your event page to display any date of their choosing. I solved it like this: $req_date = $input->get->int('date'); $event = $recurme->find($req_date, $req_date, "id=$page->id")->first(); if(!$event) { // $req_date is invalid for this event // ... } rrule-gui.js needs updating in this package to account for the timeEndUnix property. Not quite. You are first passing the string through date()... // ... if(date('U',$date)){ $date = $date; } // ... ...which does not handle those example date strings correctly.
  3. The $dateFrom and $dateTo arguments aren't working with some date strings that are valid for strtotime(). // Not working $events = $recurme->find('01-08-2018', '31-08-2018'); // Also not working $events = $recurme->find('08/01/2018', '08/31/2018'); These are being converted by Recurme to the timestamp for "January 1 1970".
  4. @joshuag, is there a Recurme method to find the next n events, regardless of date? For example, if I want a listing showing the next 5 events. Another thing: the docs say that the $dateFrom and $dateTo arguments for the find() method are optional, but when I leave either of them out no events are returned. Edit: I worked this one out by looking at the module code. $dateFrom and $dateTo are set to today if not supplied (I was expecting no $dateFrom/$dateTo limits if not supplied). $events = $recurme->find(); // empty PageArray $events = $recurme->find('today'); // empty PageArray
  5. This is already possible since PW 3.0.87: https://processwire.com/blog/posts/pw-3.0.87/#new-field-template-context-settings
  6. @joshuag, when I do... $event = $recurme->event($page); ...where $page is a page with a Recurme field on it, I get the following notice: Undefined property: stdClass::$timeEndUnix in ...\site\modules\FieldtypeRecurme\MarkupRecurme.module:851 MarkupRecurme.module version 103. Is this the latest version? I think maybe you don't always bump up the version number as you make fixes? As I've mentioned to you previously via PM, when I purchased Recurme I never received a link to download the latest version so I'm always wondering if I'm using an older version with bugs that have already been fixed. Also, I think one area where the documentation needs more detail is how event data should be accessed when you are viewing an event page itself. For example, the calendar creates links to events like this: /path/to/eventpage/?date=1534366800 The date variable is a timestamp for the relevant date, but how is that to be used? Does the Recurme module use this so we can get the equivalent date somehow from $event? Or are we meant to just get that timestamp from $input and convert it to a date, in which case how do we validate that the timestamp is in fact a valid date for that event?
  7. Maybe you are just missing an echo? <div><?php echo $page->rockgrid; ?></div>
  8. $pages->find() returns a PageArray, and you can't get the URL of a PageArray. I think you want $pages->get() or $pages->findOne(). I recommend checking that a real page is returned before trying to get its URL. $p = $pages->findOne("template=categories-template, artcategories=2"); if($p->id) { // Page was found, output its URL, etc } else { // No page found, so deal with this somehow }
  9. Hi @adrian, What do you think about adding a "Expand/Collapse All" button for dumps? This button would expand/collapse all nested elements within a dump would be useful in situations where you are dumping a massive nested object and you want to use the browser's find tool to look for a specific string of text.
  10. When "Use HTML Purifier" is enabled for a CKEditor field any data-* attributes are stripped out. This happens regardless of the CKEditor ACF settings, and is pretty annoying considering how frequently data attributes are used/needed these days. I'd like to keep HTML Purifier activated but I want to change the configuration to allow specific data attributes. I know how to do this via addAttribute() - as mentioned here - and I can get this working if I directly edit MarkupHTMLPurifier::init() and clear the HTML Purifier cached files from /site/assets/cache/. public function init() { $this->settings->set('Cache.SerializerPath', $this->getCachePath()); $this->settings->set('Attr.AllowedRel', array('nofollow')); $this->settings->set('HTML.DefinitionID', 'html5-definitions'); $this->settings->set('HTML.DefinitionRev', 1); if($def = $this->settings->maybeGetRawHTMLDefinition()) { $def->addElement('figure', 'Block', 'Optional: (figcaption, Flow) | (Flow, figcaption) | Flow', 'Common'); $def->addElement('figcaption', 'Inline', 'Flow', 'Common'); // Added line below to allow data-ext attribute on 'a' elements $def->addAttribute('a', 'data-ext', 'Text'); } } But how can I change the configuration like this without modifying a core file? I want to set the configuration from a custom module. I don't see any hookable methods in MarkupHTMLPurifier but surely it must be configurable somehow. Does anyone know a way to do this?
  11. Very nice, thanks!
  12. Not sure if it's just the result of the forum but when I paste your code above into the Tracy console I can see some unwanted hidden characters. When I remove those it works fine:
  13. I like this, but I think when you switch back to the first tab the dump should be expanded. Because in clicking the tab you are saying "show me this tab content", and if you are actually wanting to just reduce the height of the dump container you would click to collapse the dump on the current tab. Maybe a simplified way of handling this would be that clicking any tab a) shows that tab's content and b) toggles the collapsed state of the dump. So dumps in all tabs would be loaded collapsed by default, but clicking a tab also toggles open a collapsed dump so has the same effect as this latest update. It would also allow for an alternative way to collapse the dump on the current tab (i.e. clicking the active tab collapses/opens that dump depending on its current state).
  14. I don't think that colon is supposed to be at the end - that URL leads to a 404. Looks the URL should be https://insidemodernism.co.uk/feed/
  15. A little issue... Tracy Debugger v4.10.24 (working) Tracy Debugger v4.11.10
  16. Thanks for all the recent updates @adrian (and @tpr too). Is the "Use debugInfo() magic method" option redundant now? With this option unchecked I still see a populated Debug Info tab in the dumps panel. Also, do you think it would be possible to include a setting for which dump tab is active (or leftmost) by default, for those of us who most often want the Full Object and the Debug Info only once in a while?
  17. I can't reproduce that here. Do you have any modules installed that might be affecting the page list?
  18. Thanks, should be fixed in v0.1.4.
  19. @adrian, thanks for the report - should be fixed in v0.1.3.
  20. Yes, it seems we have sadly lost the ability to manipulate the search results like that. I've used that approach a few times myself. Maybe you could make a GitHub request that Ryan make ProcessPageSearchLive::find() hookable? It looks like manipulating the $items array that the method returns could be a good solution. And maybe add some thumbs-up support to this existing request too: https://github.com/processwire/processwire-requests/issues/214 ?
  21. I haven't found the icons ambiguous so far, but the colour scheme you're suggesting sounds like it would be a good enhancement.
  22. I also see this on the FAQ page: So that is a pretty big chunk of money you could avoid missing out on by simply having a Stripe or PayPal button alone. And think about how much money 10% of all donations adds up to. I'm skeptical of these outfits that sound like they're all about altruism but really they are making stacks of money in the process. Here in NZ a lot of charities raise money via the Givealittle service that is run by one of the big telcos. When it launched all of the money donated was retained by the charities ("we're good corporate citizens"), so naturally it became very popular. Then in 2016 they stealthily started taking a 5% cut. They say that donations are at 22 million per year, so 5% of that is a big fat 1.1 million that goes into their pockets.
  23. You have to enable those fields in the settings of the ProcessProfile module: FYI, you can't use FieldsetTab in edit profile: https://github.com/processwire/processwire-issues/issues/552
  24. Maybe I'm missing something, but in terms of raising money isn't Open Collective basically just a fancy donate button? The only money raised for a project is the money that users donate to that project, right? The transparency features are cool, but is it a lack of transparency that's actually holding back users from donating money to the PW project or PW modules? If people aren't donating currently then it's hard to know for sure why that is, but some possible reasons: 1. It isn't possible to donate (i.e. no donate button exists - presumably because the leader of that project doesn't want to have a donate button). That is the case for PW itself, and I have never heard Ryan express any interest in seeking donations from users. I think he prefers to raise money via his Pro modules. And if users aren't taking that opportunity to support PW via the Pro modules then I think they're unlikely to donate via Open Collective either. With regard to Tracy there have already been several requests for a donate button. 2. 3. 4... Users can't afford to donate, or they never think about offering financial support, or they have thought about it but they're just not motivated to pay money to support the software they use. Or maybe they prefer to support the PW project in other ways - e.g. spreading the word, helping out in the forums or at GitHub, developing free modules for the community, etc. In any of these cases I'm not sure why an option to donate via Open Collective would change their mind. But I'm all in favour of people starring the modules that they use.
  25. I get different results. Using the Sanitizer::translate constant in the second argument means the sanitizer will use the character replacements defined in the InputfieldPageName module settings. So if you only need to account for the German language you can edit the replacements for ü, etc, to achieve a result like that shown above.
×
×
  • Create New...