Jump to content

dragan

Members
  • Posts

    2,008
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. For a long time, Twitter didn't care too much about a11y at all. Their most prominent open-source FE product Bootstrap wasn't all that accessible until v.4. With earlier versions, you'd have to use the Paypal a11y plugin for their JS components. I don't want to open another "Pandora box", but I recently wrote about accessibility and its many pitfalls on the web, and one of the points I made is that a blind faith in FE frameworks can be dangerous. Just because a framework/library is very popular, doesn't mean it's all "plug and play" and covers everything (you mean) it should. </sorry-for-slightly-derailing>
  2. Sure, why not? Perhaps you don't even need a module for this. Just some custom HTML with an anchor .pw-modal which opens your page. With one of the three "runtime markup" modules that would be easy to do, I guess: https://processwire.com/talk/topic/21982-rockmarkup-inputfield-to-easily-include-any-phphtmljscss-in-the-pw-admin/ (this is the latest one of this kind, afaik). Is your general goal to have something like a central image library for often-used assets?
  3. Welcome to the wonderful world of "modern" SPA frameworks (React et al) !
  4. I don't know if this helps, but in a simple test setup I got this to work: In the field settings "show only if..." > show only if custom PHP returns true: $rep = $page->textblocks; $c = $rep->count() -1; $last = $rep->$c; if($last->depth > 2) { return true; } Basically, I check the number of entries in a repeater called textblocks, then get the last (deepest) one, and check if depth is bigger than 3 (2, since it's zero-based).
  5. Did you try https://processwire.com/api/ref/page/num-parents/ ? edit: Actually, no. I was confused - the above seems to work with Matrix Repeaters, for regular repeaters depth should work.
  6. What do you mean with "custom template to add markup for images..."? The output is just XML. Why would one browser display another XML? That makes no sense. Do you mean "if logged in as superuser I see another XML as when not logged in"? Also, maybe you should have posted in the module support threads instead: https://processwire.com/talk/topic/799-module-xml-sitemap/ https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/
  7. Well, then just remove that line. If you're deleting, it makes no sense anyway.
  8. Well, does it work if you run it normally (not as cron job)? Do you get errors? What are the permissions of the page this runs in?
  9. @Hurme Did you check your server error logs for hints? Or site/assets/logs/ ? First of all, you could try to delete everything in site/assets/cache/modules/. If that doesn't work, rename the REST API module: prepend a dot (.modulename).
  10. I'm not sure, but maybe this is related: https://processwire.com/talk/topic/20006-module-restapi/?do=findComment&comment=176115 I guess that only superusers see such messages, and regular editors don't.
  11. Are you familiar with page reference fields? Are you already using them? Assuming you are already using them, I guess you want cross-references in both directions. In that case, take a look at this module: https://modules.processwire.com/modules/connect-page-fields/ From the API side, there's also this relatively new method: https://processwire.com/api/ref/page/references/
  12. I never had to deal with it myself, but check out Ryan's announcement.
  13. If it's just styling, you should first try a CSS-only solution. You can do a lot with just :nth-child or flexbox.
  14. I don't think that would make any impact on filtering and search. If anything, it would only make your setup more complicated than it needs to be. You would have to take care of creating year/month/day parent pages with each new record (or create them ahead of time).
  15. err, I should have googled this before answering... (I had no idea what ESP means). So it's data from one single weather station only? My above post was based on the assumption that you get weather infos from all over the world via some 3rd-party API and you update your site via cron jobs. It's been said time and again that a big number of PW pages will scale well, but a combination of (too many) fields, templates, and pages - plus complex queries - can seriously impact speed. In your case, the setup seems to be quite simple though, so I would go the "native PW route". However: When it comes to loading huge data-sets and visualise them (aggregate a 5-year-span of weather data and create statistics or curve diagrams), I would surely look for RockTabulator or some such. You can fake a future situation yourself with simply creating thousands of dummy data-sets.
  16. The majority (everything?) of the content is automated via imports, and you have practically no use for the whole PW admin backend? If so, I'd surely go the custom-mySQL-tables route. In PW, do your visualisation stuff (pulling raw data from mySQL). Perhaps you'd only have to build 1 page per location, and then use the location-page-id as a foreign key in mySQL. If you expect huge traffic, then a proper caching strategy would be essential. Do you plan to have some sort of search / filter on your site?
  17. @BFD Calendar It's certainly none of my business, but don't you want to optimize your site a bit? For starters, it takes ages to load. It's also not responsive. Your homepage is a whopping 24MB. You're loading JS in the <head> instead of the end of your <body> etc. The pattern backgrounds makes reading content hard. Images don't have an alt attribute. Google doesn't like slow and non-mobile-friendly sites, and chances are, your users won't either. https://search.google.com/test/mobile-friendly?id=Os-IXOq4pmJaFuqLUSb8xQ https://developers.google.com/speed/pagespeed/insights/?hl=de&url=https%3A%2F%2Fwww.birthfactdeathcalendar.net%2F The long homepage e.g. could make use of some lazy loading technique - it ain't that hard to do. I don't know what else is slowing down the site (TTFB is over 7 seconds, which is really bad)... maybe un-optimized PW selectors?
  18. Did you debug it with Tracy? Check whether you need parent or rootParent, and your template and field names.
  19. Did you check the Apache error and access log?
  20. Nice. Apparently, my anti-virus software thinks your demo site is spam.
  21. @ttttim This module was just released yesterday... maybe take it for a test-drive?
  22. Did you try someting like $unifiedMatches = $pages->find("id=$find1, limit=$limit")->add($pages->find("id=$find2, limit=$limit")); ? Seems to work with a quick test here...
×
×
  • Create New...