-
Posts
338 -
Joined
-
Last visited
-
Days Won
8
Everything posted by monollonom
-
Hi @FireWire, I need to test it further but I’m posting here first just in case. Is the module supposed to work for any multi-lang text inputs? I seem to have an issue with the Profield Table, but I don’t know if you’re using it or not...? Here are three issues I noticed: - it makes InputfieldTable’s js crash at some point because of a missing href. I added a quick fix in the module’s js but then... - the "Translate" button doesn’t do anything - and it seems to not detect / initiate the InputfieldTable when inside a Repeater. Let me know if you need more infos
- 220 replies
-
- translation
- language
-
(and 1 more)
Tagged with:
-
Okay I have to try it out but this is absolutely fantastic and something I wanted to tackle myself for a while now, working on websites with a lot of images. Thanks for sharing this!
-
column widths and conditional visibility
monollonom replied to gornycreative's topic in Themes and Profiles
@BrendonKoz here is a screenshot and screencast showing what gorny’s setup is (at least how I understood it): And here is what I’m suggesting / what I’m doing in such situation: Here the sum of the fields’ width is 100% -
column widths and conditional visibility
monollonom replied to gornycreative's topic in Themes and Profiles
In this case what I do is split the remaining 70% into the three conditionally visible fields (e.g. 23/24/23). The visible one will then stretch out to occupy the remaining width. -
[SOLVED] Trouble Comparing id Property of PageArray Objects
monollonom replied to Boost's topic in Getting Started
You said your page reference field “author” can hold multiple authors, so when trying to call $page->author you will get an array of authors instead of a single author and so when trying to get the “id” property you won’t get any since it’s an array, which is why your code doesn’t work. So in your initial code sample, I was suggesting to replace line 5 with $page->author->has($item), like so: // Grab other pages' content $authors = $pages->find("template=author"); <?php foreach ($authors as $item) : ?> <?php if ($page->author->has($item)) : ?> <?= $item->title ?> <?php endif ?> <?php endforeach ?> -
[SOLVED] Trouble Comparing id Property of PageArray Objects
monollonom replied to Boost's topic in Getting Started
You could use this instead: if($page->author->has($item)) // you could name the field "authors" to remove ambiguity The issue is that you were trying to compare with a (non-existing) id from a PageArray instead of a single author (since you allow multiple authors to be added in your page reference field) -
[SOLVED] $pages->find('') is not returning all grandchildren
monollonom replied to jploch's topic in General Support
FYI you don’t need to call this function everytime. PW is supposed to do this on its own (fill the pages_parents table as you add/move pages), but there may be a bug or what I couldn’t pin down. I’d say whenever you see an issue like, just do a quick function call through TracyDebugger’s PHP console and you’re good to go. -
[SOLVED] $pages->find('') is not returning all grandchildren
monollonom replied to jploch's topic in General Support
There wasn’t so much nesting in my case but I did have an issue I resolved using $pages->parents()->rebuildAll(). Maybe try this first? Otherwise I think you’d need to be more specific regarding your setup. -
Modify "Custom Page Label Format" via hook/API
monollonom replied to Jonathan Lahijani's topic in API & Templates
Adding my grain of salt to this (I just faced this situation), you can also leave the Label field to the default "title" and change it temporarily (though you need to set it back once the inputfield is rendered): $wire->addHookAfter("InputfieldPage::getSelectablePages", function(HookEvent $event) { if($event->object->hasField != "yourField") return; $pages = $event->return; foreach($pages as $page) { $page->originalTitle = $page->title; $page->title = "Custom title based on $page->someField"; } $event->addHookAfter("Inputfield::render", function(HookEvent $event) use ($pages) { foreach($pages as $page) { $page->title = $page->originalTitle; } $event->removeHook(null); }); $event->return = $pages; }); (not sure though how this would behave in your setup @Pete) -
If you don’t see an output as a guest user it means there was an error trying to convert the MJML code. Is there a way you could share your code? A screenshot maybe?
-
I’d still go with the EasySVG one. From what I'm seeing, though more “recent”, this library lacks the “font to paths” part that the other provides with .svg font files. Please let us know once you’ve handled this, I’m curious ?
-
(funnily I just went through the same question regarding showing a custom font in a svg) If you want your svg to show the font when displaying it through an <img> tag you will need to have it embedded as a base64, as mentionned in your SO link. My take on what you want to achieve is something along the lines of what I described here: With transfonter, you could generate a .svg version of the font file you're using and then build the svg with the icon and module name using this php library. I haven’t tested it so I can’t vouch for it but I would try this way first.
-
Regarding uploading from URL(s) you could check @Robin S’ AddImageUrls
-
Quick message to say the small tutorial literally saved me just now. I'm going to install the module asap and get back to working. Phew
-
Also note that strftime has been deprecated in PHP 8.1. Here’s a topic with alternatives:
-
I guess it depends on the way you structure your templates. In my case I never rely on CKEditor / TinyMCE as a way for the client to structure the page’s content, I actually mostly use them just so they can put links and eventually set in bold or italic. So if I want them to be able to add videos (where I want them to) this is the module I use. To me if you have a video within your template that is on its own (not within a text) then you could definitely use both. Edit: here’s an example within a repeater matrix with image/video types: (french says: "Go full-bleed?" / "Is it an external video?" / "Play automatically?" (I then str_replace the embed code to add the autoplay)) Sorry about this but this is what I meant yes ?
- 17 replies
-
- 1
-
- fieldtype
- inputfield
-
(and 1 more)
Tagged with:
-
https://github.com/neuerituale/FieldtypeOembed#field-preview I‘m not the author but in my case I use it when users need to be able to add an external video (or audio) to a page and I want to make sure they properly copied the video link. I always have a dedicated field for such videos so I have no use for a TextFormatter that would do something similar in a textarea. Also the field comes with various informations that I use: width/height, poster’s url, ... One other (albeit weird) use I have of this module is to put it as an image’s custom field so that I can replace an image by a video when I have a gallery with both pictures and videos. Though note that in order for this to work you have to allow this Fieldtype in the FieldtypeFile config page and also make a small change in PW core until Ryan accepts my PR. Also there’s no GDPR since it’s up to you to output the iframe’s code (the `html` prop).
- 17 replies
-
- fieldtype
- inputfield
-
(and 1 more)
Tagged with:
-
Alright, latest version is now published and available through the Upgrade module. Thanks again!
-
Ah! You uncovered my evil plan to put my website on every newsletter generated from my module ? Joke aside, thanks for spotting this one, it was because of $page->getText returning an empty string when there were no {brackets} in the string. I also spotted another bug if you left the "ignore" textarea empty. Here’s the updated file. Let me know if you notice anything else and otherwise I’ll publish the release! Edit: noticed and fixed another small issue with slashes (if missing in the custom host, or if the relative url doesn’t start with one) It shouldn’t make any difference indeed but thank you anyway for sharing your usage of the module!
-
Following the previous addition to convert relative URLs into absolute ones I quickly needed to ignore some that weren’t just starting with either "http", "tel" or "mailto" but were also keywords from mailing tools such as "*|UNSUBSCRIBE|*". However I also did some changes in the module’s config, mostly for clarity but also to avoid a call to the MJML API on every save. So before I publish a new release, I wouldn’t mind if any users (@wbmnfktr, @szabesz?) would try it out in a local environment and confirm everything is still working (it is on my side) before I create a new release and update it in the module directory. Thanks!
-
This is great to read! And I think it’s only fair to think about ways to make it sustainable for you. I’m not 100% sure I would need the Pro version but just for the sake of supporting your great module I wouldn’t mind paying that extra. This is a thing I really (reeeeeally) like with Ryan’s Pro modules model: provide an excellent base and sell this nice extra bit (that can be big) to allow to support the work. Now, I’m close to start working on a client’s website where I will be using your module (of course) and I have some questions: do you happen to have an ETA for this update? will the update process be smooth between the current version and the new one? I assume it will be but I prefer asking. finally: would you recommend to wait to get TinyMCE support? Thanks again for the great work and looking forward for the release.
- 220 replies
-
- 2
-
- translation
- language
-
(and 1 more)
Tagged with:
-
New very small release fixing a bug introduced in the previous one: it was falsely calling httpUrl on a string when prepending a custom host to relative URLs.
-
View a cached page without connecting to PW-database
monollonom replied to eydun's topic in General Support
Actually the cached files are cleared if they are expired but only through a LazyCron: (from the ProCache’s page) In other words, if you still have apache running and your database is down, you should not have to worry, so long as your website is fully cached. -
View a cached page without connecting to PW-database
monollonom replied to eydun's topic in General Support
Best would be to use ProCache which does exactly this. You just have to select the template you want cached and update your .htaccess so your server serves the generated page’s HTML. Edit: note though that the page needs to be visited for it to be cached -
Small FYI: apparently I was wrong... I updated my local setup to 3.0.217 and after refreshing the modules I got a notification inviting me to choose which copy of the duplicate module to use: This was after I confirmed but by default it seemed to have the core one selected. Though there are no problems to report because of this