Leaderboard
Popular Content
Showing content with the highest reputation on 11/22/2023 in all areas
-
Wow @BitPoet that's real bit poetry ? I've taken your example and did some research in the code and found this as an alternative solution: <?php $wire->addHookAfter("PageFinder::getQuery", function (HookEvent $event) { // get the DatabaseQuerySelect object $query = $event->return; // modify the query to only find names with length < 6 $query->where("LENGTH(pages.name)<6"); // remove the hook after first execution $event->removeHook(null); }); // find users with names < 6 chars bd($wire->pages->find("template=user")); It's important to add the hook immediately before the $pages->find() call. And it's important to remove the hook so that it only executes once.4 points
-
A short&quick&dirty module that adds .length (switching back and forth between regular Text fields and "Text with .length Selector" should not cause any troubles): <?php namespace ProcessWire; class FieldtypeTextWithLength extends FieldtypeText { public static function getModuleInfo() { return [ 'title' => __('Text with .length Selector', __FILE__), 'summary' => __('Like FieldtypeText, but with a subfield selector .length for string length comparison', __FILE__), 'version' => '0.0.1' ]; } public function getMatchQuery($query, $table, $subfield, $operator, $value) { $database = $this->wire("database"); if($subfield === 'length') { $table = $database->escapeTable($table); $value = $database->escapeStr($value); $query->where("LENGTH({$table}.data){$operator}$value"); } else { parent::getMatchQuery($query, $table, $subfield, $operator, $value); } return $query; } }4 points
-
One of the things that has had UIKit 3 folks jump ship to tailwinds or another system is the lack of CSS Grid support. Having looked into it a lot I started working on something to addon but discovered it has already been done by the Beaver Builder people and their addons pals. Beaver Builder is a page construction kit for WP. https://www.wpbeaverbuilder.com/ Kindof nice, actually. @Macrura it's another WP builder that seems to use blocks in a similar manner to Yootheme Pro and is UIkit friendly. But within the ecosystem of this setup and its open source friends are two interesting repos for general use. https://github.com/master3-blank-template/UIkit-Ex this repo refactors the uk-width component to allow up to 30 divisions of granularity. AND it adds uk-push and uk-pull back in! https://github.com/badabingbreda/uikit-css-grid this repo adds a whole new set of classes for cssgrid support! It is in SCSS but I will likely port it over to LESS if possible. You just need to remove any uk-padding from divs in the columns as they use gap instead. The CSS grid template/areas section takes a little bit of playing with to understand, but it allows for some breakpoint driven grid layouts that are simply not possible with vanilla UIkit 3. Especially if you opt for a 12 column CSS Grid layout. I've only started playing around with them this evening but so far, so good.2 points
-
Hello, Did you try sort flags? I don't know which one it is, maybe SORT_NATURAL: $repeater->sort('title', SORT_NATURAL);2 points
-
2 points
-
I've just uploaded a video about RockPdf to processwire.rocks ? Until 30.11. you can get the module for 49€ @ https://www.baumrock.com/processwire/module/rockpdf/ Here are extensive docs for the module: https://www.baumrock.com/en/processwire/modules/rockpdf/docs/1 point
-
Happy to announce the launch of the completely rebuilt San Francisco Contemporary Music Players website, using ProcessWire. https://sfcmp.org/ The previous website was a hornet's nest of disorganized content, dozens of 3rd party plugins, duct taped together within WordPress... difficult to use, time consuming and confusing to manage. And didn't look so good either. Lot of fun to rebuild this, though took several months. YOOtheme Pro and UiKit were a dream for me to work with, just love those. Made it so possible to create all of the custom sections, widgets, sliders, cards, mega menus, and so on. Don't consider myself a front-end focused web dev, so have a deep appreciation for the time, care and effort that Yoo has put into both UiKit and YOOtheme Pro. Almost no additonal CSS was needed to be written for this; the stock UiKit classes and attributes make it possible to just build things in HTML and not have to fiddle with CSS. Ryan's commercial modules played a major role in the build. ProFields, ListerPro, ProCache, and FormBuilder were all important. FormBuilder+Stripe allowed me to confidently migrate their need for a stripe checkout from some WP plugin to the clean and simple setup now using FB. ( https://sfcmp.org/donate/print-for-sale-dirge-by-hung-liu/ ) Some libraries also were of great use and value, namely PLYR for audio, and tabulator for some table display type of stuff. As always, the API was a dream to work with, many custom import scripts were created along the way to import legacy Press, Albums, Repertoire works, Program Booklets library, Players etc.. The image API is doing wonders with SRC sets, and webp images. The PW documentation site was a daily companion. This forum likewise was always a most valuable and enjoyable resource to search and rely on for solving the occasional conundrum. There is such a wealth of info here that i never found it necessary to post a question. Lastly, to underscore just how unparalleled, flexible and user-friendly the PW backend is, we had the backend training session a couple of weeks after the site was launched, and within 30 minutes, the person who will be managing the content was able to know how to create and manage concerts, blog posts, albums, press articles and more.1 point
-
Thanks for getting back. I don't mean this as criticism, this is only to check if it would make sens to try padloper with this particlar project I have in front of me. I'm not in a rush, if not this project there will be another one later. If I think about it, this is what would make me try it out (if not now then maybe some time) — written docs with documentation of api — written MVP that is easy to copy paste that contains no extra markup or code - so just the absolute minimum of HTML, like most of Ryans examples. This is especially important with the cart, since the cart is the selling point of Padloper (for me, at least, otherwise I might as well use formbuilder and it's checkout). I personally much prefer text documentation, since I can copy paste examples and scan the page quicker. For example FieldtypeTable has mostly video documentation and to try and find out how the selectors should look like to search a FieldtypeTable is an exercise in scrubbing back and forth in that one particular video. I have to think about whether I can get involved in the process, but thanks for the invitation!1 point
-
Okay works like a charm now!!!! So the thing were - I did a fresh install but before i installed RockMigration & RockFrontend i moved the RockPageBuilder into the module folder and i think that RockFrontend somewhat installed RockPageBuilder or so it seemed... So by first moving the RockPageBuilder into the module folder after installing the other modules made it work. Thank for your help! The installation part is always the most stressful for me and the one I never get right, hehe. But now to the fun part!1 point
-
Hi @joe_g, Apologies for the very late reply. I have been away. First, thanks for your continued interest in Padloper despite the difficulties you have previously encountered. The docs are still not great, sorry. I am currently working on releasing version 009 of Padloper after which I'll introduce a soft feature freeze and solely focus on working on documentation and bug fixes. I decided to focus on video documentation rather than written ones at the moment. You are right. I focused on using htmx since that was the easiest way I could illustrate how to build a shop using ajax. It was my intention to quickly follow this up with other examples using jQuery and non-ajax examples. Apologies that I never got round to this but my plan for the video documentation is to start from scratch with very simple examples, first without ajax, then with ajax and subsequently cover more advanced techniques. I take full responsibility for this misconception. Padloper does not produce any markup except for a checkout form which you don't have to use. Perhaps my (complicated) htmx examples created the impression that the markup was coming from Padloper. Padloper closely aligns with the ProcessWire approach; it gets out of your way but is always on hand to assist you with its powerful API. I don't know what your timescales are but I think this would be a great opportunity to learn how to use Padloper's API. I know the video docs are not ready but perhaps your project could help shape my video documentation? Please let me know. Thanks.1 point
-
Ok thx, I was just curious. I'm not adding phpmyadmin in my setup. I'm always using Adminer that comes with tracy debugger ?1 point
-
1 point
-
@d'Hinnisdaël I tried adding something that would make it ignore a leading "processwire-" on the repo name, so that something like "processwire-ImagePlaceholders" might potentially work, so long as the part after the processwire- prefix is still the correct module/class name. I don't have any repos to test that format with though, so I'm not positive if there might be more to it that I need to account for. Give it a try and please let me know if you find it still doesn't work.1 point
-
This is great! Just a tiny nitpick: I'd swap around the logic for "Don't allow selection in both directions" and get rid of the "Don't", or maybe change it to "Disallow". It's a very cultural and regional thing whether questions with a negation get answered with a yes or no to confirm then, and it's bitten me in the backside myself when I rolled out an app with such a toggle to our international employees.1 point
-
Hey @ryan that looks great! Are you also planning to add an API to select pages matching a date range? That would be great, because when working with date ranges the INPUT is only one part of the equation. May I ask you to have a look at this thread? https://processwire.com/talk/topic/23097-previewdiscussion-rockdaterange-fieldtype-inputfield-to-easily-pick-daterange-or-timerange/ It shows what I came up with some time ago. I didn't proceed with the module, but some parts of selecting pages where quite promising: <?php // find events in 2023 (meaning from 2023-01-01 00:00:00 to 2023-12-31 23:59:59) $pages->find("template=event, my_range=2023"); // find events in taking place in 2023-11 (meaning from 2023-11-01 00:00:00 to 2023-11-30 23:59:59) // this would also find an event starting in 2023-10 lasting to 2023-12 $pages->find("template=event, my_range=2023-11"); // find events in taking place in 2023-11-17 (meaning from 2023-11-17 00:00:00 to 2023-11-17 23:59:59) $pages->find("template=event, my_range=2023-11-17"); // find events starting after 2023-11-17 00:00:00 $pages->find("template=event, my_range.starts >= 2023-11-17"); // find events ending before 2023-11-17 00:00:00 $pages->find("template=event, my_range.ends < 2023-11-17"); Not sure how/if that works when dealing with different timezones, but for my use case it was of great help to have this easy human readable API, because when using timestamps it quickly get's complicated and prone to errors (like forgetting to use <= instead of < or such): <?php // find events taking place in 2023-11 $from = strtotime("2023-11-01"); $to = strtotime("2023-12-01"); $pages->find("template=event, my_range.starts >= $from, my_range.ends < $to"); That example is actually not working, because for real world queries you'd need to take more possibilities into account: So if 2023-11 starts at the first black line and ends at the second, then you'd need this query to find events that take place in 2023-11: // find events that either // start within 2023-11 (meaning start after or at 2023-11-01 00:00:00 and start before 2023-12-01 00:00:00) // or end within 2023-11 (meaning end after or at 2023-11-01 00:00:00 and end before 2023-12-01 00:00:00) // or start before 2023-11-01 00:00:00 and end after or at 2023-12-01 00:00:00 That shows that it quickly gets very complicated and you need to be really careful with all the times and comparison operators! IMHO using the other syntax makes code a lot easier to read and maintain. For my use case (showing events in a calendar) it was a lot easier to use this syntax, because you don't have to find the timestamps of the first second of the month and the last second of the month or the first second of the next month etc.; You just use "range=2023-11" and that's it.1 point
-
it's like a hotrod type of setup... i have a YT dev subscription, and a sort of process to be able to use the files in my PW front end, and have the wordpress install on local to work with the settings and sometimes do some designs...1 point
-
Alternatively someone could build/generate a docset from the php sources for usage in dash or zeal. No stars required. https://zealdocs.org/ / https://kapeli.com/dash https://kapeli.com/docsets1 point
-
This happened to me today. Clean your cache/FileCompiler folder. For me its gone. .a1 point
-
404 pages serve an important purpose from an SEO standpoint. So if this is a public facing site, I'd recommend maintaining a proper 404 page rather than just redirecting to or displaying the homepage. You could always have your 404 page link to your homepage or even meta redirect to it after a few seconds.1 point