Leaderboard
Popular Content
Showing content with the highest reputation on 04/02/2025 in all areas
-
Work continues on the new processwire.com website. I’ve nearly finished developing most of the modules directory this week and next week will be working on the development side of the API reference and sites directory. Some more good news to share is that when the new site launches, the new admin look and feel will launch as well. The website and admin share a similar design language in some areas, and I’m confident you will love them both. When we use screenshots of ProcessWire in the new site design, they will be from the new admin look and feel. It is still admin AdminThemeUikit, but with a new face that is beautiful, modern and professionally designed. I’ve been using for more than a week and it’s fantastic in my opinion. If for some reason you end up wanting to keep the current look of AdminThemeUikit (perhaps a client doesn’t like change), it will remain as an option too. If you are extending AdminThemeUikit or using the admin.less feature (developed by Bernhard) to custom style the admin, all of that will continue working too. What will likely be changing is that we’ll be moving the older AdminThemeDefault and AdminThemeReno out of the core and into the modules directory. I’d rather keep the core efforts focused with AdminThemeUikit, but continue to support the older admin themes as installable options. Prior to this, most of what you’d seen in ProcessWire’s core admin and website has been designed by me (excluding AdminThemeReno). And I haven’t worked full time as a designer since 2005 or so. If I ever had any site design skills, they are long gone. So PW has always had a “designed by a developer” look. Having professional designers take over the design of both the admin and the website just feels like a major upgrade to ProcessWire all around. More than I could have guessed. I look forward to when I can share the new site design, admin look and feel, and the designers with you. Thanks for reading and have a great weekend!1 point
-
That's likely the part that I was getting caught up on, and what is happening. I was a little confused when I could query it successfully from a location that wasn't from the template that enabled the URL segment; I originally thought it wouldn't work at all...and the fact that I was able to actually process the request from the PHP template file related to the parent (car-maker), it made me question the docs' in that it prioritized children that existed in the system (as that would seemingly immediately render a 404, and not even show processing from the parent -- i.e.: if I try accessing car-maker/mazda, the car-maker template is being processed, at least initially). Thanks, @Robin S!1 point
-
The docs for the feature say: So if the URL being loaded is the URL for an actual page (regardless of whether it has a template file or not) then no URL Segment is going to apply. And if the URL resolves to a "car" page then the template file that's rendered won't actually be "car-maker.php" where your URL Segment code exists. If there's a car template file then it will be "car.php" that's rendered, and if there's no car template file then it will be whatever template file applies to your "404 Not Found" page.1 point
-
No. I was still on v1.4.0 It is working now 🙂 @bernhard By the way: Will there be a config option for the RockPageBuilder module to create SCSS files instead of LESS files for new blocks?1 point
-
Do you have v1.4.1 ? This issue has been fixed 2 days ago: https://github.com/baumrock/RockDevTools/issues/31 point
-
Hey @bernhard & @monollonom I didn't forget about you, just hammering out some work. Taking notes from your great input. I appreciate it! Will be back when I escape from programming prison 🤣1 point
-
PDF Fieldtype/Inputfield Module for ProcessWire allowing you to easily generate thumbnails of the PDF files embedded to the site. Current version: 1.1.2 (Changelog) Module page: http://modules.processwire.com/modules/fieldtype-pdf Github: https://github.com/uiii/ProcessWire-FieldtypePDF For detailed instructions see: https://github.com/uiii/ProcessWire-FieldtypePDF/blob/master/README.md1 point
-
You can use a hook in /site/ready.php to set the page that images will be selected from, if you want it to be different than the default. The hook will work for both CKEditor and TinyMCE. $wire->addHookBefore('ProcessController::execute', function(HookEvent $event) { $input = $event->wire()->input; $page = $event->wire()->page; $pages = $event->wire()->pages; // Return early if the process is not ProcessPageEditImageSelect if(!$page || $page->process != 'ProcessPageEditImageSelect') return; // The ID of the page that is open in Page Edit $edit_page_id = (int) $input->get('edit_page_id'); // The ID of the page that images will be selected from by default // Often this is the same as $edit_page_id, but it can be different in the case of Repeater items, etc. $images_page_id = (int) $input->get('id'); // Check that the $edit_page_id is populated, otherwise the user will not // be able to manually choose a different page to select images from if(!$edit_page_id) return; // Optionally do some test using $edit_page_id and/or $images_page_id $edit_page = $pages->get($edit_page_id); if($edit_page->template != 'basic_page') return; // Set a different ID for the page that images will be selected from // e.g. select images from the home page $input->get->id = 1; });1 point
-
There isn't anything major to write about this week, so I'm just checking in to say hello and I hope that you are having a nice week, and tell you what I'm working on here. Time this week has been split mostly between working on the new PW website, working on an API project for a client, and researching and interviewing companies to replace our HVAC systems. That last one probably took the most time, as I didn't know much about HVAC before our maintenance person said it's time to replace the the heating and air conditioning systems. So I've been trying to learn all I can about HVAC in order to go about it in the most informed fashion possible. This is the sort of thing most might only do once or twice in a lifetime (it's a big expense). Usually I'm more DIY with this kind of stuff, and a lot of it is approachable. But when you get into the A/C side of things with refrigerants (R410A, R454B, R30), condensers, compressors, and coils, that's where my head spins, it's way beyond my DIY range. It really is a job for the professionals. So I'm going to leave that to the experts so I can focus on web development. On the PW website I've been working on the API reference this week, along with some final details on the modules directory. Next week I'm hoping to finish the API reference and start working on the homepage. Following that, I'll be writing a lot of new copy for the Features section (thanks for all your feedback there). Then we should be nearly finished. So it's still a few weeks out, but progress is good. Thanks for reading and have a great weekend!1 point
-
This module provides Captcha functionality to ProcessWire. This specific captcha uses a puzzle that has to be solved by pulling the slider into the correct position. In contrast to other graphical captchas, this captcha also verifies the result on the server side. No jQuery is required. Only PHP and JavaScript. After module installation the source code in the page has to be modified as described in the following 3 examples. Example 1 This example shows, how to use the captcha with a form-submit and the captcha on the submit-button. Insert a onclick-listener in the button-tag: <button onclick="javascript:captcha('testform');return false;">Submit</button> Add the JavaScript: <script> function captcha(form) { slideCaptcha.onsuccess(function () { document.getElementById(form).submit(); slideCaptcha.hide(); slideCaptcha.refresh(); }); slideCaptcha.init(); slideCaptcha.show(); } </script> The form is not submitted by clicking on the button. Instead, the captcha is displayed. If the captcha has been solved correctly, the form is submitted. Check again on the server side, whether the captcha has really been solved: <?php session_start(); if ((isset($_POST['send'])) && ($_POST['send'] == '1')) { if ((isset($_SESSION['SlideCaptchaOk'])) && ($_SESSION['SlideCaptchaOk'] == 'ok')) { unset($_SESSION['SlideCaptchaOk']); echo '<p style="color:lime">Form submit received: Captcha solved</p>'; } else { echo '<p style="color:red">Form submit received: Captcha NOT solved.</p>'; } } ?> Example 2 This example shows, how to use the captcha with a form-submit and the captcha on a checkbox. Insert a onclick-listener in the checkbox-tag: <input id="id_checkbox" type="checkbox" required="required" onclick="javascript:captcha('id_checkbox');return false;" /> Add the JavaScript: <script> function captcha(checkbox) { slideCaptcha.init(); slideCaptcha.show(); slideCaptcha.onsuccess(function () { document.getElementById(checkbox).checked = true; slideCaptcha.hide(); slideCaptcha.refresh(); }); } </script> By using the required option inside the checkbox-tag, the form can only be submitted when the checkbox is checked. By clicking on the checkbox, the captcha is displayed. If the captcha has been solved correctly, the checkbox will be checked and the form can be submitted. Check again on the server side, as described in example 1, whether the captcha has really been solved. Example 3 This example shows, how to use the captcha with a hyperlink. Insert a onclick-listener in the hyperlink-tag. Also move the href link into the JavaScript-function: <a href="" onclick="javascript:captcha('Example3.php');return false;">DOWNLOAD</a> Add the JavaScript: <script> function captcha(file) { slideCaptcha.onsuccess(function () { window.location.href = file; slideCaptcha.hide(); slideCaptcha.refresh(); }); slideCaptcha.init(); slideCaptcha.show(); } </script> The captcha is displayed by clicking on the hyperlink. If the captcha has been solved correctly, the JavaScript will redirect to the specified location. Check again on the server side, whether the captcha has really been solved and deliver the content: <?php session_start(); if ((isset($_SESSION['SlideCaptchaOk'])) && ($_SESSION['SlideCaptchaOk'] == 'ok')) { unset($_SESSION['SlideCaptchaOk']); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="Example3.php"'); readfile('Example3.php'); die(); } ?> Module settings The settings for this module are located in the menu Modules=>Configure=>CaptchaSlide. Filename Filename which must not exist in the root directory and also not represents a page. The filename must be also changed in the captcha.js. The resolving URL receives the information from the client side JavaScript. Tolerance Specifies a tolerance in order to offer better user experience. A tolerance of 3 means +- 3 pixel tolerance (3 recommended). Logging Logs unsolved and solved Captcha attempts in the ProcessWire system logs. Pages The JavaScript and CSS for the Captcha will be included into the following pages. Photos All photos provided by unsplash.com. As described on their website, all photos, offered on their website, can be used for free for commercial and non-commercial purposes: Link to module directory: https://processwire.com/modules/captcha-slide/ Link to github.com: https://github.com/techcnet/CaptchaSlide1 point
-
Just a tip - I replaced the "Page fields to search" setting in the PW core Page Search (ProcessPageSearch) module to use the search_index field. It seems like a great alternative when you want to have the admin live search find pages based on the content of lots of fields (not just title etc).1 point
-
1 point
-
Hi Benbyf, I'm really enjoying this module. It really helps visualize how the page tree relates to the templates. I'm using "template" in Data. One request: It would be really helpful if you could add a permission so that only super users see the MarkInPageTree stuff in the Page Tree by default. If other roles need to see the MarkInPageTree stuff in the Page Tree, a site admin could add a MarkInPageTree permission to that role. The only caveat is that existing sites that have already installed this module will need to be updated to use the new permission.1 point
-
I think you need to save the new page before adding the repeater item to it. $p = new Page(); $p->parent = wire("pages")->get("template=something"); $p->template = 'some-template-name'; $p->name = 'some-name'; $p->save(); // save the page here $r = $p->repeater->getNew(); $r->field1 = 'somthing'; $r->field2 = 'somthing'; $r->field3 = 'somthing'; $r->save(); $p->repeater->add($r); $p->save(); // save again after adding the repeater item1 point
-
Hi lenoir, There is a version compatible with 3.0, it is in devns branch, it is separated because i didn't find a way to have one codebase compatible with PW 2.x and 3.x (I can tell you more if you want). What happend with your pdf files in 3.0? Why did you have to restore the database? Should I fix something? Cheers, Richard1 point
-
1 point