All Activity
- Today
-
I'm currently struggling to find a PHP code to check room occupancy in a template. Based on a date range, I need to check if a room is already booked. Does anyone have a working code? folgendes reicht nicht: $selector.=",datum<=".$id->datum.",datumbis>=".$id->datumbis; Already booked: z.B. 13.08.2025 - 04.12.2025 Checks: 12.08.2025 - 01.10.2025 no problem problem: 01.07.2025 - 03.12.2025 problem: 01.10.2025 - 01.01.2026
-
link to parent in backend leads to list overview instead of actual parent
joe_g replied to joe_g's topic in General Support
fantastic! thanks both! -
virtualgadjo started following Can I insert a soft hyphen in the CKEditor?
-
Can I insert a soft hyphen in the CKEditor?
virtualgadjo replied to Alf S.'s topic in Getting Started
Hi, sorry to be a bit late to answer this but those are two very different things when it comes to the wbr tag, it's pretty easy, in your site/modules/InputfieldCKEditor folder add a config js file which will allow you to solve both "problems", an exemple of one i have for an "old" website made with pw when it was using ckeditor 4 as its rich editor module CKEDITOR.editorConfig = function( config ) { CKEDITOR.config.fontSize_sizes = '8/.5rem;10/0.625rem;11/0.6875rem;12/0.75rem;14/0.875rem;16/1rem;18/1.125rem;20/1.25rem;22/1.375rem;24/1.5;28/1.75rem'; CKEDITOR.config.extraAllowedContent = 'section[id,class] wbr'; CKEDITOR.config.entities_additional = 'shy'; }; as you can see, i define some option for the font-size dropdown but here the thing we are interested in are the two other lines the extraAllowedContent tells cke not to delete those tags and allow section with id and class attribute and... the wbr tag (which, nomatter how you insert it will be transformed into <wbr /> but works the same way this being done, you can simply create a plugin to insert a wbr tag wherever you need when it comes to ­ or its html equivalent ­ its the config.entities_additional line that tells cke not to remove them, well actuelly only ­ in my case, i don't need both... as you can see, as cke docs says no & nor ; in the list, i could have written 'shy,#173' to make it work for both entities now, the problem is... it works!!! but depending on your browser you may not see it when saving, even if you look at the field content directly in the ddb, it's not a ckeditor issue at all but just a browser behaviour easy to check saving your content/page and viewing it in the browser, using its responsive viewer tool, playing with the page width, you'll see the soft hyphen in action where you've inserted them 🙂 now, like for the wbr tag, you just have to create simple plugin to insert the sofh hyphen in both case, i prefer writing my plugins using icons in the toolbar rather than just keyboard shortcuts as this way i'm sure it will work whatever os my victims are on, pc, minux, mac, it will work when i'm not sure about keys numbers, i'm sure for enter, space but ten plugins later, i'm going to run out of shortcuts 😀 as simple as this 🙂 in case it helps (just tell me if you need help with this plugin thing) have a nice day -
FireWire started following Calendar problem
-
@Frank Schneider Are you rendering this calendar on the front end or in the admin? First thing I noticed was that the closing </script> tag is missing. You can use the native PHP alternate control structure syntax if this is in a mixed markup/PHP file. It's up to your personal preference but it can help readability. <?php if ($page->path == "/avisierungen/kalender/" || $page->path == "/vermietungen/kalender/"): ?> <script> $(function(){ 'use strict' $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay,listMonth' }, height: 'auto', contentHeight: 'auto', aspectRatio: 2.0, weekNumbers: true, navLinks: true, eventTextColor: 'black', defaultDate: '<?=date("Y-m-d")?>', editable: false, eventLimit: true, // allow "more" link when too many events events: <?=json_encode($calendar_data)?> }); }); </script> <?php endif ?>
-
Thank you very much! It was really quite easy with ProcessAdminCustomPages and a foreach loop! $logentries = $log->getEntries("my-email-log", ["limit"=>"20"]); echo "<ul>"; foreach ($logentries as $logentry) { echo "<li>"; echo $logentry["user"]; echo " <br> "; echo $logentry["date"]; echo " <br> "; echo $logentry["url"]; echo " <br> "; echo $logentry["text"]; echo "</li>"; } echo "</ul>"; With chart.js, I was even able to implement a diagram.
-
I don't know if this would be helpful to anyone but it saved me a lot of work so I thought I would share it. When using Duplicator on Windows (I don't think this is a problem on another platform), the installer.php script would always hang on unzipping the files and never make it to the uploading the database stage. No matter what I changed in terms of time out or memory allocation or anything, it still would never full extract everything, and what it did extract was VERY slow. What I ended up doing in replacing the code where it extracts the files with a native tar extract. Starting at the $zip = new ZipArchive(); text (about line 731), I replaced the code down to the closed brace (about line 750) with this: $zip = new ZipArchive(); $res = $zip->open($this->package); if ($res == true) { if (is_writable($path)){ // ---- START: system tar extraction (replacement) ---- $archive = escapeshellarg($this->package); $dest = escapeshellarg($path); // Laragon ships with bsdtar, which can extract zip files $cmd = "tar -xf $archive -C $dest"; exec($cmd, $output, $code); if ($code !== 0) { $this->err("An error occured while extracting the package."); return false; } } else { $zip->close(); $this->err("The temp folder $path is not writable. Please adjust the permissions and try again."); $this->btn("Check Again", 2, 'refresh', false, true); return false; } if ($zip) $zip->close(); $this->ok("The package has been extracted."); } else { $this->err("An error occured! Duplicator couldn't open {$this->package}."); } Once I did that, the extract took 10 seconds max for many hundreds of files, whereas before I would be waiting for many minutes only to have it abort. I did get the code from ChatGPT so if it doesn't look quite right, blame it, but it does work. 🙂 I know I could refactor this a bit to remove the $zip variables that aren't really doing anything now, but I didn't feel like redoing more parts of the script, and it doesn't hurt anything. I hope it helps someone. Maybe a real programmer could clean it up and put it in the options when generating the installer.php file?
- Yesterday
-
If you didn't want to build your own Process module then this sounds like something that @diogo's ProcessAdminCustomPages would be suitable for. Once you'd created a template you could just grab the log entries and loop through them to output them in a table or something fancier. In a similar vein, @kongondo's RuntimeMarkup field can be use to show that kind of info on an editable page. I sometimes have a tab on a page template that just lists log type data in a tab so that an editor can see it.
-
Hi everyone, I wanted to share a small utility module I’ve put together to help keep the /site/modules/ directory tidy. What it does: When updating modules ProcessWire renames old module directories by prepending a dot (e.g., .ModuleName). Over time, these "hidden" backup folders can clutter your file system. ProcessModuleCleaner identifies these orphaned directories and allows you to delete them directly from the admin interface. Key Features: Automatic Detection: Scans your site modules folder for any directory starting with a dot. Native UI: Built specifically for the ProcessWire backend using UIkit 3 classes for a seamless look. Interactive Selection: Uses AlpineJS for a fast and responsive "select all" and delete workflow. Safe Deletion: Uses ProcessWire's WireFileTools for reliable recursive directory removal. How to use: Install the module. Navigate to Setup > Module Cleaner. Review the list of found folders. Select the ones you want to remove and click "Delete". Screenshot / UI: The module displays a clean table with the folder name and the last modified date, so you know exactly how old those backups are. GitHub: https://github.com/markusthomas/ProcessModuleCleaner I hope some of you find this helpful for keeping your production or development environments clean! Feedback is always welcome. Cheers!
-
- 10
-
-
-
On my Ubuntu (Gnome) laptop, I often get a popup saying an issue happened when waking up computer. I also sometimes had pain accessing an external drive, plug in, plug out, in, out... and finally it worked. Usually it works immediately, but not this time. Recently I was looking to free space, I have old accounts in my /home (from previous installations of Manjaro KDE, Manjaro Gnome...) and found I had 150 GB in the Download folder of one of this accounts. I opened a video just to check its content, and explorer crashed. I restarted explorer, selected everything in folder, deleted and... explorer crashed again. I tried again and this time it crashed when selecting files... I finally succeeded, but what a pain. I rarely turn off computer, just put it in sleep, I suppose this is why sometimes Firefox freezes for a few seconds after days without restarting, so I restart and everything is OK.
-
<?php if ($page->path == "/avisierungen/kalender/" || $page->path == "/vermietungen/kalender/") { ?> <script> $(function(){ 'use strict' $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay,listMonth' }, height: 'auto', contentHeight: 'auto', aspectRatio: 2.0, weekNumbers: true, navLinks: true, eventTextColor: 'black', defaultDate: '<?php echo date("Y-m-d"); ?>', editable: false, eventLimit: true, // allow "more" link when too many events events: <?php echo json_encode($calendar_data); ?> }); }); <?php } ?>
-
I am a tinkerer and I love to build my own Linux setup and that's why I love to use Arch. I am actively reading announcements and I am investigating updates before I apply them (both of them, Arch expects you to do). Like that, I never had a problem whatsoever. I have been on Linux for quite a while now and I bought all my hardware specifically to run Linux on it. Lenovo usually does a good job because you can even buy Laptops without any OS on them at all and with an open BIOS. Also, I don't have a fingerprint reader, no dedicated GPU, no noname brand WiFi adapters, no useless sensors and no hardware security crap (looking at you, HP Wolf Security). That system has been running perfectly for almost two years now. I am updating around once a week. I have another old Lenovo 2-in-1 and an all-AMD desktop which all are rock-solid on Arch with my own custom setup. TL;DR: If you want a completely stable experience, don't buy a laptop which relies on 1000 Windows drivers to work correctly and also, don't buy a laptop with NVIDIA Graphics. Maybe you take last year's model to ensure you are not running on bleeding edge. Then, put Debian on it with a desktop environment of your choice. @da² I am curious, what's your stability issues?
-
Totally valid. However to address this they added an option in 3.2.0 so that when updating, you don't get bleeding edge packages, but instead it's lagged by 1 month: https://github.com/basecamp/omarchy/releases/tag/v3.2.0 So that's comforting. Similarly, I use ProcessWire bleeding edge / dev branch, but if there have been changes in a particular week that I sense as more in-depth, especially those that touch selectors and database stuff, I usually wait another week or two to avoid potential subtle issues that are difficult to catch. I'd imagine I would use the same judgement with Omarchy.
-
I watched a video and Omarchy looks really great, but it's based on Arch Linux, I don't trust enough the stability of this distribution to use it for my daily job. I had a big issue in the past using Arch, only one time but when it happened the system was totally broken, after a simple "pacman -Syyu"... no more internet, no more access to external drives... The end. 😄 I also tried Manjaro, and after the dinner break, instead of a sleeping computer, I saw a black screen with graphic card fans at 100 % and everything else frozen. Ubuntu should be stable, but almost every day I have small issues on my Ubuntu laptop. That's why I didn't use Linux for my job since years, every time I try a distribution I see stability issues that scares me. Hope you'll have a great experience with Omarchy, keep us updated! 🙂
-
Considering you have i.e. `example.com/site/assets/file.zip` being accessed, you could: 1. Add a rule on Nginx as you mentioned. But ProcessWire won't help you with that; you need to change the Nginx config yourself. location = /some/spec/path/ { root /home/myweb/path; try_files /file.zip =404; } //NOT TESTED! 2. Or, if you are using Cloudflare as DNS provider, you can add a rule there to create the redirect without touching your server.
-
elabx started following Calendar problem
-
That definitely looks like CSS is missing to get loaded on the first screenshot, how is it being loaded? Is this a 3rd party module?
-
Aurelien Barrau is a french physicist and philosopher, I translate: 😅
-
I'm using the `$('#calendar').fullCalendar` function. One calendar for notifications and another for rentals. The notifications calendar looks as expected, but the rentals calendar doesn't; it only displays 30% horizontally. It needs to be stretched horizontally. The code is exactly the same, only the path is different. I have absolutely no idea why. Does anyone have any advice?
-
I have a log file for sent emails. The log file is structured as follows: 2025-11-24 18:00:37 guest /contact/ Email request sent Is it possible to display this log in the backend on a separate page and perhaps even as a diagram? Or is there a module for this? I would be grateful for any advice!
-
skeltern started following Stable solution for custom paths/URLs in a multilingual context
- Last week
-
Hi everybody, I'm trying to translate options into already activated languages, via hook: setOptionString works correctly for the default language, but I can't populate the options in other languages. More specifically, changing the user profile language the titles are translated, but the options are overwritten in the "default" language tab. So I have found the setOptionsStringLanguages method, but it seems to break someting (I have an error like: ProcessPageEdit:Multi language not enabled.. of course it's enabled) The scenario is a hook for an InputfieldSelect::render Any suggestion? Thanks in advance.
-
It does but using MarkupCache means that the file doesn't exist on the filesystem so, to my original point, loading /sitemap.xml starts PHP, makes DB calls, and then returns the cached markup via a virtual URL. Yes, it's cached and faster than generating a new sitemap on demand, but not as fast or efficient as writing a file that has a direct URL on the filesystem. Your topic may be better suited for a separate thread about multisite implementations. This thread is for support and discussion of SeoMaestro.
-
Omarchy looks interesting and appears to be getting some momentum. Haven't tried it myself yet but this is encouraging me to! I've used Mac and Windows a lot and a few years ago made the switch full time to Linux. I tried MX, Ubuntu, Zorin, Debian and Fedora before settling on Mint. It impressed me with its hardware support, stability and clean aesthetic. As it's Ubuntu based everything "just works" but you don't need to use snaps. There is also LMDE (Linux Mint Debian Edition) which is Mint's experiment of being free of Ubuntu. The regular edition is probably best for now but the experience was actually pretty much identical. Since Canva made Affinity Studio free I was able to get it working on Linux with Wine. Potentially a viable Adobe replacement although I rarely use design software myself. No official Linux release from Canva yet but that would be nice to see.
-
@FireWire Actually MarkupSitemapXML seems fitting for multisite because it does cache the XML anyway, one can simply change the cache time in the module code or add a config option to do so.
-
OK, got an answer. This $icsgen->events->add($myEvent); $icsgen->events->add($myEvent); does not work. This $icsgen->events->add([ 'summary' => $item->title, 'dtstart' => $item->Date_start, 'dtend' => $item->Date_end, ... ]); does. Why?...
-
Hi @thausmann, i'm puzzled and am looking for help. The demo script above run on PW 3.0.251, IcsGenerator 2.0.0 beta (and PHP 8.4) returns: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//hacksw/handcal//NONSGML v1.0//EN CALSCALE:GREGORIAN BEGIN:VEVENT DTSTAMP:20251215T224803Z UID:69409023adeb1 END:VEVENT END:VCALENDAR Instead, i would expect it to return an event with a start and an end timestamps (DTSTART, DTEND). Similarly with the script from the module page (https://processwire.com/modules/ics-generator/). Would you pls be able to hint me why is that?