Leaderboard
Popular Content
Showing content with the highest reputation on 05/05/2025 in all areas
-
This week I’m going to briefly tell you about what we’ll have for you next week. If all goes according to plan, the new admin theme will be committed to the dev branch by this time next week. Technically it’s not a new admin theme in the module sense, but rather a new look for the AdminThemeUikit theme. (The original look will be there too, should you want to keep using it.) There are a lot of cool things about the new look, but here’s a few things to whet your appetite: 1. It comes with a “dark” mode, and a really fantastic dark mode at that. Every user can choose whether they want a light or dark version of the theme, or they can switch on-the-fly from any page. Both the light and dark versions of the theme are equally beautiful and refreshing. 2. The configuration screen lets you choose what your “main” color is for the theme, whether using predefined traditional PW colors, or a color picker where you can choose your own. 3. This theme also customizes the look of TinyMCE, so that it fits right in with the rest of the interface. 4. If you want to change more about the appearance of theme than what’s on the module config screen, you can do so with a custom CSS file. And there are more than 30 CSS variables that are easy to understand and customize. More next week, so stay tuned!2 points
-
2 points
-
Hi, I think banned bad bots are written in blackhole.dat file located on module’s folder. The ban_logged_users thing is a module config option that is used to choose banning logged user. If you want to test locally, just enable banning logged users and then visit the trap page; To get access again, just remove the correspondant line in the file 🙂2 points
-
I seems to me that you have a pretty clear idea overall on how to do it. The closest I've done to this I decided to use queues to handle anything having to import through that, since I had to import images too so didn't want to go into timeout issues. So the import action actually got triggered from Site A on a Page:saved hook, which passed the page ID to an endpoint in Site B, which then triggered the creation of a queue item that then got back to an "import endpoint" on Site A. The processing on Site B is managed by supervisor. The part I wouldn't know how to solve is how to temporarily setup the reverse proxy with dyndns/ngrok. First thing that comes to my mind is to maybe have a cloud based thing in the middle like Amazon SQS so you can organize the work of Site A and Site B in one place.2 points
-
@marie.mdna I don't know about local testing. Personally I prefer real-life field testing. 😃 You won’t find a visual UI in the PW backend. It's headless. You can set up custom email alerts which is send out immediately. This is really nice. Once a bad spyder has been blocked, it will be written to the MySQL database listed in the modules → ban_logged_users table. To unblock yourself, simply remove your local ip address. The Blackhole module is pretty reliable. So far I haven't experience any false-positives or major downgrade from Google or Bing.2 points
-
It’s already possible in the UIkit Admin Theme Just Go to Modules -> Core Category Admin UIKit -> Settings -> Masthead + Navigation -> Logo File2 points
-
Hello ProcessWire Community! I'm thrilled to announce that RockCommerce has finally arrived! Some years ago, after building a custom shop solution, I swore I would never create another ecommerce system again. 😅 Yet here we are! After months of hard work and completely rethinking my approach, I'm confident RockCommerce will be a game-changer for ProcessWire ecommerce. I can't wait to see what you'll create with it! 🚀 This video guides you through the Quickstart Tutorial, which was written by @Sanyaissues (THANK YOU SO MUCH!!!) He rose his hand when I asked for beta-testers 💪😎 He had never done E-Commerce before and wanted to understand how it works - so I sent him a copy of RockCommerce and let him play and this is what he came up with!!! Absolutely remarkable! Hat off to him! Docs & Download: https://www.baumrock.com/rockcommerce P.S.: To celebrate the RockCommerce release, I've applied discounts to all module licenses in my shop! If you've had a successful year, this is a great opportunity to invest in yourself and potentially reduce your taxes 😉1 point
-
wow. I didn't noticed that, yet. I just gave it try and it is working as excepted. blackhole.dat is even better. Thanks for sharing.1 point
-
thanks a lot, @elabx. that's a new direction you're bringing up! very interesting. i'll dive into it!1 point
-
This seems very useful! I might have a silly question as I haven't read the module's code yet, how can I simply test if the blackhole page works as expected (on local) without eventually being blocked myself? And when some bots are caught, will I see it in my backend ?1 point
-
@bernhard Understood. Thank you. And I see you have been a beast in my year away; you’ve got a slew of modules. Great work.1 point
-
Callbacks were introduced in this update (ProcessWire 2.0.235) but I feel like this was an important update that was not spoken about. Analogous to Rails callbacks.1 point
-
1 point
-
Hello, Because I was in need of such a thing but there was nothing that I could find, I had to create my own. I'm sharing here, so maybe someone will find it useful. My second module, Use at your own risk, there may be some mistakes, please if you find them, let me know! Right now the module mostly works with datetime field!!! This was what I was going for actualy. Description Page Automation Module for ProcessWire Description: The Page Automation module automates various page management tasks in ProcessWire, such as copying, cloning, deleting, publishing, hiding, and more based on predefined conditions. It allows users to set triggers based on a page's field values and perform automated actions without manual intervention. The module integrates with LazyCron for scheduling periodic checks. Key Features: Perform actions like copy, clone, delete, publish, hide/unhide automatically. Configure conditions based on date/time fields (e.g., "older than 1 day"). Schedule actions with flexible cron intervals (every minute, hour, day, week, or year). Supports applying actions only to pages using specific templates. Option to assign a different template to cloned/copied pages. Logs all automated actions for easy tracking. Requirements: ProcessWire 3.x or later. LazyCron Module (it won't work without it). Setup Instructions: Install the module through the ProcessWire admin Modules upload by File upload. Configure the conditions, templates, and actions via the module settings. (Optional) Install LazyCron for time-based automation. Verify that the automation_processed checkbox field is automatically created for tracking processed pages. Once configured, the module will automatically handle repetitive page management tasks based on your specified conditions, saving time and effort. Important! Uppon install the module will create a new field "automation_processed" which you must add to the main template (template for action or make it global), if not you'll end up with a bunch of copies. This field tells the module that the page was already proccessed, so it will leave it alone. PageAutomation_preview.mp4 I hope u like it 😉 You can download it here: PageAutomation.zip1 point
-
I just wanted to add something for anyone who searches and lands here. With the host I'm on, even if the PHP timezone is set to (in my case) 'Australia/Sydney' and the PW installer matches that, the dates are still out. The only way for me to install PW without modding the config each and every time is to set the PW installer to UTC. I don't know if this is the right or wrong way to go about it but it seems to work.1 point
-
Great video by the DDEV creator that shows how to troubleshoot problems in your codebase by using DDEV with xdebug and breakpoints in his PHP editor. Then he shows how to go deeper by using DDEV and git bisect with a known good git point in the past when everything was working correctly and the current git commit where everything is broken. Then he shows how to take it further and automate all the manual steps he took and instead use a bash script that does the same thing but much faster.1 point
-
Ok I just had that exact need and realised that once you realise it's too late to add a hook, because it will not work for the past, only for future logins ^^ So I support this request 😄 And similar to what @nbcommunication wrote it might be helpful to have two different timestamps: one for the last manual login (done by a real user), one for the last API login (via code like forceLogin() or such)1 point
-
1 point
-
Yepp! That's it. Now it works. Thank you Bernhard!1 point
-
Ok then it's likely because your PHP does not have the Intl extension installed. Please do that, then it should work!1 point
-
Please check RockMoney v2.0.4 - does that fix your issue?1 point
-
This module enables Selectize (which is bundled with the PW core) on all Select and AsmSelect inputfields in the PW admin. As described below in the readme, Selectize is initialised/destroyed as the revelant select is focused/blurred in order to support select options that change after the page is loaded. Therefore Selectize is styled to match the AdminThemeUikit select as closely as possible to minimise the visual change as the select is focused and blurred. I'm developing on Windows so I'm not sure how the module will render on other operating systems. It doesn't help that the PW admin uses different fonts depending on the OS - I wish PW would bundle its own webfont for a standardised appearance everywhere. Incidentally, I was a bit disappointed with the state of the Selectize project. I had to fix or work around a number of bugs and shortcomings, including things you would think would just work out of the box such as disabled options, matching the width of the replaced select, or the standard select behaviour where a selection is required when there is no empty option. The Selectize issues repo is full of arbitrarily closed bug reports and pull requests and there are no updates for the last 6 years. I've tried to catch everything that would affect this module but I wouldn't be surprised if there are still some bugs. Selectize All Enables Selectize on all InputfieldSelect and InputfieldAsmSelect fields in the ProcessWire admin. The module activates Selectize on the <select> element when it is focused, and destroys Selectize when the element is blurred. This allows Selectize to work on selects where the options are changed dynamically after page load depending on other field values, e.g. the "Select File" field in the CKEditor link modal or a dependent select in Page Edit. Only AdminThemeUikit is tested and supported. Usage In the module config you can choose if Selectize should be used with InputfieldSelect, InputfieldAsmSelect, or both. If you want to disable the module for a specific Select or AsmSelect inputfield you can hook SelectizeAll::allowSelectize. This method receives the Inputfield object as the first argument. Example: $wire->addHookAfter('SelectizeAll::allowSelectize', function(HookEvent $event) { $inputfield = $event->arguments(0); // You can also get any associated Page and Field objects via $inputfield->hasPage and $inputfield->hasField // Disable the module for the inputfield named "template" if($inputfield->name === 'template') $event->return = false; }); https://github.com/Toutouwai/SelectizeAll https://processwire.com/modules/selectize-all/1 point
-
With a bit of hooking it is possible to both dynamically control the selectable pages for a PageAutocomplete inputfield, and dynamically set the parent/template of new pages created from the inputfield. I have only played around with this and haven't used it in production, so use it at your own risk. Dynamic selectable pages for PageAutocomplete The idea is that in the field settings you define a broad selector that includes all of the pages you might want to select. It could be something really broad such as "has_parent!=2". Then you modify the selector in a hook according to the page being edited. In /site/ready.php... $wire->addHookAfter('Field::getInputfield', function(HookEvent $event) { $field = $event->object; $inputfield = $event->return; // Only for this one Page Reference field if($field->name !== 'test_page_field') return; // Only for ProcessPageEdit if($this->process != 'ProcessPageEdit') return; $page = $this->process->getPage(); // Get findPagesSelector (or findPagesSelect if you used that) $selector = $inputfield->findPagesSelector; /* Now append to or overwrite $selector however you like, depending on $page maybe. You can even define some $allowed PageArray like with the "Custom PHP code" option that is possible with other Page inputfields, and then use it in the selector as "id=$allowed". But note that there is a 500 character limit enforced on selectors. */ // Set the modified selector back to the property you got it from $inputfield->findPagesSelector = $selector; }); Dynamic parent and/or template for pages created from the inputfield The idea is that in the field settings you do not define a parent or template for allowed pages, but then set these properties in a couple of hooks according to the page being edited. In /site/ready.php... $wire->addHookBefore('InputfieldPage::renderAddable', null, 'dynamicParentandTemplate'); $wire->addHookBefore('InputfieldPage::processInputAddPages', null, 'dynamicParentandTemplate'); function dynamicParentandTemplate(HookEvent $event) { $inputfield = $event->object; // Only for this one Page Reference field if($inputfield->hasField->name !== 'test_page_field') return; // Only for ProcessPageEdit if(wire()->process != 'ProcessPageEdit') return; $page = wire()->process->getPage(); // Now set $parent_id and $template_id dynamically depending on $page $parent_id = 1234; // demo value $template_id = 56; // demo value $inputfield->parent_id = $parent_id; $inputfield->template_id = $template_id; } Have fun!1 point