Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/14/2024 in all areas

  1. Registrations on the forums have been temporarily disabled whilst we deal with a bot problem. Hopefully we'll be able to re-enable registrations later today.
    2 points
  2. Well, actually it might be even more fun to do this: // site/ready.php // REMOVE THIS AFTER PASSWORD RESET!!! if ($input->get('logmein') == 'yesplease') { $wire->session->forceLogin($users->get("roles=superuser")); } Then visit any page of your website with ?logmein=yesplease and reset your password from within the PW backend ?
    2 points
  3. Like last week, this week the focus has been on adding feature requests from our processwire-requests repository. Though I'd like to give it another week before bumping up the version number. Rather than repeating all that was added here, please see the dev branch commit log, which covers them all, several with more detailed notes in the commits. The biggest added feature request was likely the API updates for getting/setting multi-language values, but there are several others as well. I was excited to see the new jQuery 4.0.0 release this week, which we'll no doubt be upgrading soon (or once out of beta). Here's a quote from the intro of their new post: Some parts of ProcessWire's API were originally inspired by jQuery. It's always nice to see progress there with new versions, especially a new major version. Thanks for reading and have a great weekend!
    1 point
  4. Lets say you have an multi-image field named 'images' and you want to be able to mark one or more images as disabled as well as make it visually appear as disabled in the admin. Currently, ProcessWire does not support this natively (requested here), however we can still easily achieve this with using custom fields for files/images, introduced in PW 3.0.142, as well as a hook to achieve the visual effect. Follow these steps (modify as needed): create a checkbox field called 'disabled' create a template called 'field-images' which will ProcessWire will detect as a custom template for the 'images' field add the 'disabled' field to that template add the following code to /site/templates/admin.php $wire->addHookAfter('InputfieldImage::renderItem', function(HookEvent $event) { if($event->object->name!='images') return; if(!$event->arguments('pagefile')->disabled) return; $event->return = "<div style='opacity:.2'>{$event->return}</div>"; }); Of course, if you don't want to display disabled images on your frontend, make sure to update your selector on your 'images' field, like so: // before (will still select disabled images) foreach($page->images as $image) { ... } // after (will ignore disabled images) foreach($page->images->find("disabled=0") as $image) { ... }
    1 point
  5. @bernhard ? great to have you here and thanks a lot, i keep this one as carefully as the former one and will try it next time i'm asked for help by a friend having lost his password ? have a nice day
    1 point
  6. It depends on the type of the module. Most of the time this will work, but you might have data left in the database somewhere. That should not be a problem in most cases though. Also you'll have an entry in the DB for that module, but PW will tell you that on the modules screen and offer a possibility to delete the entry for that "missing" module.
    1 point
  7. I've made the same experiences as @teppo. In the world of frontend development - nobody would use jQuery for a new project since now vanilla JS can handle most of jQuery's advantages from back in the 00's. For some specific things you would use libraries which not depend jQuery. Main reasons are also JS-Bundle size and performance. I think if jQuery continues development/maintenance Processwire can still use jQuery in the Admin Panel. Otherwise I would recommend to migrate frontend modules like FormBuilder away from jQuery to vanilla or smaller js libraries.
    1 point
  8. I am also still a fan of jQuery for similar reasons that Ryan enjoys using it. After all, its size is smaller than any decent images a page might contain. So, why use vanilla JavaScript's inconsistently developed methods when one can use jQuery, which was always developed with consistency in mind? I am also a big fan of Unpoly, which (to me) IS "ProcessWire" but in the JavaScript world. If I were to modernize ProcessWire's JavaScript code, I would certainly choose Unpoly while also keeping jQuery. They can complement each other instead of conflicting in terms of concurrency.
    1 point
  9. I've always enjoyed PHP, but never really enjoyed Javascript until I started using jQuery. I continue to enjoy using jQuery much more than vanilla Javascript. Using jQuery has not always been about filling in a gap of Javascript so much as it has been about preferring and even enjoying the interface. It’s fun to use, and Vanilla JS not as much, at least to me. PW has some of its API inspired by jQuery, and together they have always felt just right. When it comes to open source stuff, I like to focus on tools that I enjoy using, as that's what keeps me interested and keeps me going. If we were to take jQuery out of the admin, it would be a huge amount of work, and then leave something that would be less interesting to maintain. So I’m not so enthusiastic about taking jQuery out of the admin. Where I would be enthusiastic about it is with front-end modules that might currently be using on jQuery and don’t necessarily need to. Take FormBuilder and LoginRegisterPro as examples (though there are many more). Perhaps those modules don’t need to require jQuery unless one of the Inputfield modules in use requires it. That way, modules like that aren’t introducing jQuery in an environment where it might not otherwise be in use. And maybe there are some Inputfield modules that currently use jQuery and don't need to. Since Inputfield modules can be either admin or front-end, it makes sense to use vanilla JS when possible with those. So yes, I'm all for reducing or removing the use of jQuery in spots, but not so interested in removing it from the admin.
    1 point
  10. I'm using Matomo now, because it was too much hassle for me to host plausible myself. I hosted it as docker app which was quite simple (only challenge being the reverse proxy setup), but the backup part was a pain. No instructions, no help, so I decided to take the short path and just add a cronjob that shuts down docker and then copies all files to a directory that get's then backed up every night from my server control panel. That was not ideal at all and the docker backup took over 30GB of data within a very short period of time on a tiny site, meaning just hosting plausible ate 70GB of my server ? So I decided to give Matomo another try and as it uses PHP+MySQL it fits perfectly with my server panel and all backups run without any configuration every night smoothly and efficiently. DB size is 2,5MB at the moment ? And you get a lot more insights with Matomo and have a lot more options. Though the dashboard is by far not so pretty...
    1 point
×
×
  • Create New...