-
Posts
372 -
Joined
-
Last visited
-
Days Won
4
Everything posted by gornycreative
-
I have been totally out of the loop working on a contract, but I saw the video release and now have read over this thread! Looks great, especially if you need to maintain public calendars. I was working around the code for FieldtypeRecurringDates but this looks like a full-featured alternative for appointments and other simpler event management. Something to think about, and it may already be on your roadmap but... For sites that include more extensive event descriptions, or reusable chunks of complex metadata or descriptions, it would be nice to be able to associate pages with an event - or perhaps an event rule? Is their an external page association you can set to an event/event rule in addition to the event title and description paragraph? Either from the calendar side via a page selector, or on the external page side from a multiselect dropdown field? It would be nice to be able to link an outside event information page - which describes everything - to an event on the calendar. I'll have to grab this later and see if there are some sync options to dev. Would be nice to be able to sync to a google calendar or acuity, bonsai, calendly, clickup, etc.
-
A minor issue, but if a site isn't running multiple languages, the $language api var is null. There needs to be a null check on line 322 in the .module file, such as: if ($this->wire('languages')->count()) { $lang_id = $this->wire('languages')->getLanguage()->id; } to: if ($this->wire('languages') && $this->wire('languages')->count()) { $lang_id = $this->wire('languages')->getLanguage()->id; }
-
Page Classes - Diving into one of ProcessWire's best features
gornycreative replied to FireWire's topic in Tutorials
Yeah custom page classes are absolutely essential to everything I put together. It's really nice to be able to populate interfaces for different page types this way - e.g. I have a jsonld method I attach to various page classes that allow me to segregate the structured data and custom tailor it for each class - but in various templates I can simple $page->jsonld() and not think about the schema more than once for each page class. I already know the right fields for a given page type will go in the right spots in the schema output. -
Cool yeah I agree re: cast vs loose comparison. I'm not entirely sure why it is getting stored/pulled as a string in my install, but it is. In terms of PageField vs field, this comes up if you have a braoder library of RepeaterMatrix types and need to iterate over the fieldgroup for the RepeaterMatrix - that field list gets a bit unwieldy (since it includes all fields for all matrix types for the given matrix). If I have an operation that iterates through the fields list, I've found it useful to test certain operations where Page content is being used to test for instanceof PageField - but that is probably a niche case limited to page builder assemblies... I don't think under normal circumstances it makes much of a difference.
- 25 replies
-
- 1
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
Nice to see it in the modules area! Thanks for putting it together! I have two notes from working with it. In my install it looks like the form id is stored in the field data as a string, not an integer, so the strict comparison on line 102 fails and I never get a selection for the dropdown from ___getFormOptions. Dropping the === to a == fixes this for me, I suppose you could recast the stored value also. There is no initial class set up for the inputfield - i.e. I'm using Admin themes and the UIKit class is not getting pulled into the initial load for the inputfield attributes. Something like this could be used to get whatever admin theme classes exist: /** * {@inheritdoc} */ public function ___render() { $attrs = $this->getAttributes(); //ADD $adminTheme = $this->adminTheme; if($adminTheme && method_exists($adminTheme, 'getClass')) { $attrs['class'] = $adminTheme->getClass('select'); } $value = $attrs['value']; unset($attrs['value']); return <<<EOT <select {$this->getAttributesString($attrs)}> {$this->___renderOptions($value)} </select> EOT; } The only other thing I was thinking about - and I haven't done a ton of dev with FormBuilder so there might be a good reason for this - but I was wondering why you built this using a select instead of storing it as a PageField? I like having the ability to display the form using other formats besides the raw name - maybe that's easier with this method? Anyways, thanks again!
- 25 replies
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
Although they have been bought by Canva, once I got used to how Affinity does things their Photo/Designer/Publisher trinity is my daily driver - particularly with the improvements finally brought to Publisher to make it feature complete with Serif's prior publisher (proper endnotes/footnotes support). And they do run on Linux with Wine and a bit of massaging: https://codeberg.org/Wanesty/affinity-wine-docs
-
So I started playing around with Supermaven's free tier. If you are looking for a code assistant for VSCode I would recommend giving it a try. I started using it after Theo covered it in one of his tool videos, and I can say it probably shaves about 15 minutes of work per hour for me. It does a reasonably good job of anticipating structures you are building based on a quick overview of the codebase for your project. I haven't extended the codebase to include the entire source for processwire in my projects, but even with just the minimum core wire folder modules and a few site module source code bits it is more than enough to cover the bases. I am using the free tier which has a smaller token context limitation, but the code suggestions are fast, they don't feel inappropriately intrusive and don't write-ahead too far until the engine has high confidence in the direction you are trying to go. When it has high certainty, it opts to give you large code blocks - even entire functions with appropriate substitutions. It has sped up my RockMigration script writing considerably - beyond the macros, because it sees other migration functions I have defined and does a very good job of anticipating not only the class structures for custom page classes, etc, but also replacing names for new classes with proper singular/plural forms, etc. I'd say it provides the correct code without modification 85% of the time. https://supermaven.com/
-
Yeah and I've been debating rolling my own styles and template also since I tend to try to use update UIKit or TW or whatever I am using and I have only started messing with FormBuilder, but I figure it may still be worth covering? Not sure.
- 26 replies
-
- formbuilder
- ajax
-
(and 1 more)
Tagged with:
-
I was playing around with this today. A few things I noticed. ->styles and ->scripts return null, but I could pull the original form output and use the extractions from there. I get an AJAX response and the submission works, but the parsing of the whole page object returned didn't seem to work (the whole page replaced the original form on the page). I don't have any PR yet, just going to tinker now, but thought I'd report my findings. I should comment - I am using latte templates for output. I may need to hook into output markup somehow.
- 26 replies
-
- 1
-
- formbuilder
- ajax
-
(and 1 more)
Tagged with:
-
It may depend on how you define your LESS variables, and whether you use CSS variables or not. This is something that the Wikimedia LESS and other frameworks run into from time to time - it's not unique to UIkit. Usually the strict math option resolves it because parenthesis are required to indicate math operators that LESS should evaluate - so I was surprised this was still choking, and it wasn't stopping on my custom mod LESS (partly because I had already quote escaped the math I needed to protect from LESS) - it was choking on stock UIKit source. The issue started for me with UIKit 3.18 I looked into whether the math setting changes may have an impact because of what others found on unrelated frameworks. In my particular case, I allow for dynamic type scaling in theme options based on variables, and I use dynamic font scaling to maintain line line lengths also. In my case when you allow LESS to do the math on its own it sometimes the parser is too greedy. I do wonder if using the up-to-date LESS.php package (I think it is 4.4.1 when I dug into it yesterday) would help, but I found it wasn't necessarily a direct drop-in for some reason. I ended up reverting to the default module.
-
This is more just a reminder post than a problem post. If you have been having issues building UIKit from more recent repos it may be because the math setting in the currently used LESS.php wikimedia version is a bit greedy. Even after setting the 'math' => 'strict' option in the $less object it still gave an 'Operation in invalid type error'. I forgot that I needed to modify two files in order to get this to compile. base.less and article.less have two variable calculations that need to be quote escaped. Basically you need to turn this: @base-h1-font-size-m * 0.85; into this: ~'calc(' @base-h1-font-size-m ~'* 0.85)'; No matter how many times I write this someplace I forget that it needs to happen. So I am saving it here for the next time I desperately search for it.
-
Okay... Doublechecking it was in RepeaterMatrix items only. Nested maybe 3 deep. I will play around with it later this week if it doesn't affect you and I'll let you know if I find anything related to the module. I need to dig into how I can alter the pwimage selector in front-end editing to grab the imagefield from the item in a repeater field and not from the page where the repeater field is anyway so I will dig into that as well.
- 25 replies
-
- 1
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
Just Repeater and RepeaterMatrix - like I said the value is still in the database so it doesn't break anything. Could be a fieldgroup context issue I just haven't had a chance to look at the code to see.
- 25 replies
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
For some reason this doesn't recall selections in repeaters for me. I see valid forms in the dropdown, select one and save, but the setting doesn't return to the form - the select element is stuck at the blank default. On the backend, however, the selection is saved to the database.
- 25 replies
-
- forms
- formbuilder
-
(and 2 more)
Tagged with:
-
That makes sense. I'll look for more hookable stuff - I always forget to do that for mods.
-
My reason for looking into this is for things like a style block selection or a font selection - it would be great to be able to show an image below the selection instead of text. I'm not sure how well it would work for tooltips.
-
I like what this does a lot. Have you considered allowing an image field to be selected and using, say, a thumbnail of the first image in the field to be shown?
-
module PrivacyWire - Cookie Management & async external asset loading
gornycreative replied to joshua's topic in Modules/Plugins
I haven't dug too deeply into this yet, but is I saw there is supported integration with TextformatterVideoEmbed - I'm wondering if this could apply to either TextformatterOembed / FieldtypeOembed postprocessing as well, or if that requires more fine tuning because of how different providers may offer different embedded content. Perhaps all of these fall under external-media? -
Theo_gg had a really solid take that I believe is applicable to many disciplines being threatened by the AI incursion. If you need an excuse to stop coding, Devin is more than willing to provide you with that excuse. If you don't want to stop coding, Devin will absolutely not take away the need for you to provide innovative and custom solutions. AGI may be more of a threat, but still - we are at a point where AI is able to teach and perform things for people that someone already knows how to do. And you can get really far with this, but it is not the endless threat. Think about how valuable it will be as part of the singularity to be exposed to every post on Twitter. There's a lot more junk than AI knows what to do with at this time. Once that changes, life is going to get interesting. It will be different. I don't think people will be interested in having their freedom curbed because a machine is better at determining their motives and endgame than they are. I say this as someone who has worked in business intelligence, where this comic ABSOLUTELY indicates how interested people are in giving authority to numbers and facts:
-
Cannot bootstrap index.php & run via PHP CLI?
gornycreative replied to hellomoto's topic in API & Templates
This thread and tool may help you out: -
I have a site structure with repeaters that contain page select fields, and then I am outputting the content of those page fields in a hierarchical layout. I'd like to allow users to edit the content on the front-end, and for general text editing this works fine. The changes are saved to the original page, and wherever that page is inserted elsewhere in other layouts the changes are reflected. When I try to insert an image into that page where no images exist, the system tries to use the layout page where the repeater is, rather than the page selected whose tinymce is being edited. So I have to navigate the page tree down to the original page being entered into the tree. In most cases it would be redundant to pass an id to the page image select process because you are likely editing the content from the page url - so the url test works. But could that ID also get either passed or tested so that pages rendered as parts of other pages can have their images added to/edited without navigating through the tree to the original?
-
SEO PRACTICE: How to insert json-ld structured data
gornycreative replied to franciccio-ITALIANO's topic in Getting Started
That's a great library. Thanks for sharing.