Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/02/2019 in all areas

  1. Hi guys, I just released version 0.9.0 of the module which includes some fixes and new additions, you can find all the details in the changelog. What's new? The module offers a new section "Webmaster Tools" when editing a field, allowing you to set verification codes for Google and Bing. If set, these codes are rendered as additional meta tags. I had to refactor the UI in order to separate the webmaster tools from editing the default values. My solution was to separate them via fieldsets: Cheers
    4 points
  2. Sounds like you could use LazyCron here. Check your pages how often you want (daily, weekly, each hour), look for those pages and do what ever you want to do with them. Put things like this in ready.php or create a module: <?php namespace ProcessWire; wire()->addHookAfter('LazyCron::every6Hours', function (HookEvent $e) { $pagesOlderThirtyDays = $e->pages->findMany("template=order, ... "); foreach ($pagesOlderThirtyDays as $potd) { // WHATEVER YOU WANT }; });
    4 points
  3. I maintain a 2.5 instance of ProcessWire which needs to be upgraded in the future, too. Not only ProcessWire itself but design and functionality as well. 1.) My first test-run showed me that several things changed. The biggest issue so far was a field called limit. It worked in that site but with 3.x it doesn't. Some names are not allowed anymore - or are already pre-defined somewhere but there are easy ways to avoid that. Just rename those fields before upgrading. Which brings us to the next point. 2.) Always use a test instance and have a working backup. ? 3.) Modules are a big roadblock. Some don't work anymore with 3.x, some just say they don't support 3.x and others just need to be updated. By now I downloaded the most recent version of all modules manually. Switched old modules for newer ones and changed the ProcessWire core at the same time. It worked pretty well - after hitting refresh a few times. ? 4.) Compiled files cache, markup cache, sessions... just drop them. At least that's what worked for me. 5.) Crawl the whole site after first upgrades to find 3xx, 4xx, 5xx issues - I use ScreamingFrog and the Jumplinks module. 6.) Namespace... I had to add it to some files. 7.) I created a site profile from my upgraded copy and tried to install it. Just to check if everythings works even after exporting it and such things. It worked. Luckily. So I had a first, clean. updated and working version of that project for the upcoming changes.
    3 points
  4. Yo Ryan and everyone, I don't use ProcessWire anymore for new stuff — the size and scope of the projects makes using a database nonsense — but there is one half internal system that happily chugs along, for 7 years now (I think? Maybe 8 years?) Latest page ID created was 38047 ? So, thank you for everything — mostly for keeping my job while "new system" isn't happening ?
    1 point
  5. @Wanze haha awesome - I had checked the sitemap generation in the module config but I don't use it and the path is not writeable. after upgrading I got the error message and unchecked it. now my pw adminpanel runs 100 times faster.... ? and I thought the slowness would be normal with this amount of fields/templates/pages ?
    1 point
  6. You will remember it the next time. ? I checked the multilanguage support... that worked as well. As said before... try taking it apart with just a few simple templates to find the real problem.
    1 point
  7. I tried this: fresh 3.0.123 installation multilanguage profile PHP 7.2 latest Pages2PDF module At first I saw no changes at all because I changed the wrong templates in /site/modules/Pages2PDF/default_templates/ and not those in /site/templates/pages2pdf/. Right now... all I can say is: it's working as expected. Sure... there is no custom code in my page templates or anythings. Just the basic stuff. My recommendation: try it with a simple basic template without anything else in it. Maybe even blindtext. Maybe the reason for your errors are at a different place than the module itself. Update: just saw in your post that you ARE in the wrong folder with the wrong templates.
    1 point
  8. Just to get the records straight... ProcessWire version? Multilanguage profile or another profile made multilanguage? How many languages? Does it work in any of the languages? PHP version? Module version? How do you generate the PDFs? Code snippet would be great Where do you create the PDFs - frontend or backend? Templates: page or PDF? Template location? Template strategy - delayed, direct, regions?
    1 point
  9. Just in case - don't activate the auto-accept option. Unless you modified the code to auto-disable cookies.
    1 point
  10. I have just changed the link to the page demo view ...
    1 point
  11. Thank you very much for the module. Based on latest EU legislation, cookie consent requests must default to NO. However, if clicking the X in the top-right of the cookie consent dialog, it seems to default to YES: 02-10-_2019_10-23-18.mp4 But it is even worse: In the cookie consent management, no choice is indicated, leaving visitors clueless, whether cookies are stored (while they actually are). This really seems to be a bug which can bring users into troube. Could you please update the module, so that no cookies are allowed until the user expressly agreed to it?
    1 point
  12. The error persisted even when i deleted the contents of site/assets/cache/FileCompiler. But I have now added the following inside the PHPExcel File and it is working now: KR Orkun
    1 point
  13. $allowed_fields = [ 'title', 'seo_title' ]; $out = $pages->find('include=all, limit=10')->explode(function($p) use($allowed_fields) { $fields = $p->fields; foreach($fields as $f) { if(in_array($f->name, $allowed_fields)) { return [ 'id' => $p->id, 'title' => $p->title ]; } } }); echo json_encode($out);
    1 point
  14. Hi @rafaoski, thank you for the profile. The demo seems to be unavailable via the link above, would you be able to bring it back to life?
    1 point
  15. @flydev Great module. It would be nice to have/force a different language or multi-language support. Right now Google renders the widget in what it thinks is you native language. For me that's Dutch, although the html lang="en", the site's default language and my browser is in English as well. This could be done via a simple extra parameter in your module's getScript() and a "hl=langcode" setting, ie.: <script src='https://www.google.com/recaptcha/api.js?hl=en'></script> There's a list at https://developers.google.com/recaptcha/docs/language Edit 1: Already figured out you can do this via the ->render("","en") method. Edit 2: Somehow that's not working. But I expect it's Google's fault. It renders "en" but still displays it in Dutch. Edit 3: It was Google's fault. When you're logged in with your Google account in Chrome (aka 'sync') it will take the language of that account, no matter what language you asked the widget to be. Google always knows better™ ?
    1 point
  16. @Rudy Did you consider using innoDB tables? Apparently they're better suited for heavy read-write operations (row-level vs. table-level locking). There are a few discussions in the forums with pros and cons of that approach.
    1 point
  17. Hi, @jploch . Can you explain the workflow, or maybe do a diagram. What I think you want is: - Admin interface uses gridstack.js - In this context (ie your module building on PageTableExtended), each item in the grid contains the child page preview, and the page that is being previewed is where the data for gridstack.js is stored / set If you want to save the data after dragging / resizing an element, I'd probably leverage events from the api here https://github.com/gridstack/gridstack.js/tree/develop/doc and set the data via ajax. To do that you just need an endpoint to send the data to, eg /pw/setgriddata/. Below code is not tested, just an example as I haven't used gridstack.. In the module js file: $('.grid-stack').on('gsresizestop', function(event, elem) { var $elem = $(elem); var data = { width: $elem.data('gs-width'); height: $elem.data('gs-height'); x: $elem.data('gs-x'); y: $elem.data('gs-y'); id: $elem.data('id'); } $.ajax({ url: "/pw/setgriddata/", data: data, }).done(function( msg ) { console.log( msg); }); }); At /pw/setgriddata/: if ($config->ajax && $input->post) { if ($p = $pages->get("id={$input->post->id}") { $p->data_gs_width = $input->post->width; // etc $p->save(); return "Updated page: " . $p->title; } else { return "Could not find page: " . $input->post->id; } } You probably don't want to do this on all resizes however. If you want to do it on page save, again I would probably use gridstack events to populate the input fields you are rendering. Again, very quick... $('.grid-stack').on('gsresizestop', function(event, elem) { var $elem = $(elem); $elem->find(".grid-stack-input#data-gs-width")->val($elem.data("gs-width")); // etc });
    1 point
  18. What about PNG images with transparency? The transparent areas are appearing as black in the webp images. Any special settings for those?
    1 point
  19. @pwired — there was a time when I'd agree with you, but there are quite a bit of options for I ❤️ PW devs out there - for flat file CMS at least. So in the end I'd say that ProcessWire and its community are better served by focusing at its one thing.
    1 point
  20. As long as there is no WordPress involved. ?
    1 point
  21. I just wanted to mention. I found a new job as a front-end dev at https://backslash.ch. Since 2 months there already and enjoy it. We work with in-house CMS specially targeted to governments. So a lot less PW for me in the future, but I'll use it as my tool for private projects.
    1 point
  22. What the f*ck JavaScript? A list of funny and tricky JavaScript examples Some really odd stuff there... worth scanning through. I chuckled more than once... "b" + "a" + +"a" + "a"; // -> 'baNaNa' NaN === NaN; // -> false (![] + [])[+[]] + (![] + [])[+!+[]] + ([![]] + [][[]])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]]; // -> 'fail' typeof NaN; // -> 'number' (It ain't new, so sorry if this has been posted previously here)
    1 point
  23. not sure if i understand you correctly david, but maybe @adrian 's batch child editor is worth a look?
    1 point
×
×
  • Create New...