-
Posts
6,662 -
Joined
-
Last visited
-
Days Won
366
Everything posted by bernhard
-
Making unpublished changes to pages that require approval?
bernhard replied to mpdude's topic in Getting Started
In almost 10 years I think I have never waited more than a day to get great answers here on the forum ? -
Making unpublished changes to pages that require approval?
bernhard replied to mpdude's topic in Getting Started
@ngrmm what you say is correct and it's very easy to PREVENT publishing of unpublished pages. But if I'm reading correctly @mpdude requested a process where an EXISTING (aka published) page can be edited by a user, but the CHANGE to that page is not published until a more privileged user approves that change, but with the original page staying unchanged and published throughout the whole change request process. I don't have experience with the ProDrafts module but it sounds like a good candidate ? Alternatively you could implement a custom logic like this: user clicks on "change request". you use the PW api to clone that page (that's really easy) and you save it under eg /drafts. you save a reference to the original page, eg via $newpage->meta('originalpage', $oldpage->id) you send an email to an admin that a new change request was created (easy using WireMail). you add a button "approve" to that page. once that button is clicked, you loop over all fields of that page and save that content to the original page (using the page meta reference). after that you can delete the draft page and you have all the changes on your original page. That way you can quite easily build very custom workflows that exactly fit your clients needs. -
Great update, thx @FireWire ! Another small thing to improve the UX: Hovering the translation icon shows the help on hover after some time. If you add "uk-tooltip" to that element you'll get an instant tooltip on hover styled by uikit: That's really a small thing but still a little nicer I think. Another one, maybe more helpful: When clicking that icon you end up on the translation modal. There you need to select the language from the I thought it might make sense to suggest the installed languages here, but that might not be so easy, as they might be named differently than in deepl (eg Deutsch vs German) But I found another hardcoded color ?
- 315 replies
-
- 1
-
-
- translation
- language
-
(and 1 more)
Tagged with:
-
- 1 reply
-
- 1
-
-
Hi @Clarity I'm always using this snippet: <?php // install german language pack for the default language // this will install language support, download the ZIP and install it $rm->setLanguageTranslations('DE'); $rm->installModule('LanguageSupportFields'); $rm->installModule('LanguageSupportPageNames'); $rm->installModule('LanguageTabs'); $rm->setFieldData('title', ['type' => 'textLanguage']); I do that once and then comment everything out so that it does not run on every migration. Once I have the files in the project I simply git push them to live.
-
Ah, sorry, that might have been a property that PW sets itself later in the process. Didn't know that as I'm using file modification timestamps as stated. Sorry for the confusion, but maybe good to see that one has to be careful with what you name your properties ? That's one of the downsides of allowing these kind of dynamic things I guess...
-
Creating custom route to a specific php file for logic handling
bernhard replied to TomPich's topic in Getting Started
This has been the case until we got Url Hooks in 03/2021 ? ? PS: Also have a look here: -
Yeah PW is very open here and PHP has been too. Since PHP 8.2 those dynamic properties are deprecated: https://php.watch/versions/8.2/dynamic-properties-deprecated
-
Just tried and it instantly worked with the code I shared above. I've added an example to the readme. Does that help? https://github.com/baumrock/Scss/blob/main/README.md
-
I think because there is nobody that cares about making it more popular. Which is a shame. And I think it's a little bit similar to linux. It's far more flexible, far more secure, but that also means that things are more complicated. There is no standard way of doing things and that's a problem. That means it's a lot harder to communicate and to learn. In windows or mac it's easy... Win10, 11... etc; MacBook Air / Pro ... Easy and everybody can understand that. Linux? Mint, Arch, Ubuntu, Suse etc etc... Which one to choose? Decide yourself. That's nice for someone who wants that freedom but it's a pain for 90% of "normal" users. So back to your question it's the same situation. There is no standard way of doing that in PW. You can (have to) find your own solution for it. It's easy. But there is no standard. I like to use timestamps of the file for cache busting. If you use RockFrontend that will be done automatically for you. If you want to read more about cache busting in the PW backend this issue has some interesting discussion: https://github.com/processwire/processwire-issues/issues/1791 And to give a simple solution to your actual question about where to put some constants: You could simply add that to config.php $config->version = "101"; And then append it to your assets like this: <link href="foo.css?v=<?= $config->version ?>" rel="stylesheet">
-
PS Maybe you can share more details about this here or in the pub? It's always good to know the competition and to know what problems client might face if they want to use WordPress... PPS: I tried to edit my post but the forum software decided to create a new one, sorry ?
- 315 replies
-
- 1
-
-
- translation
- language
-
(and 1 more)
Tagged with:
-
I've had a similar issue and for me it was the problem that the endpoint was not reachable. The reason was that I moved the fluency page in the admin from the top level down into the setup tab. You can try to inspect the network tab of your devtools and see what response you get from the fluency api request. It should be JSON - for me it was HTML. I've talked to @FireWire about changing his implementation to url hooks to prevent this issue. Maybe it's something similar for you. Maybe you moved the page as well or maybe you have any other redirects going on from some hooks?
- 315 replies
-
- 1
-
-
- translation
- language
-
(and 1 more)
Tagged with:
-
Thx for your interest. I'm sorry that it takes longer than expected. The module is ready to be used and it has been developed for something around 3 years. It works great and I think it is a great tool for developing websites. Anybody interested doesn't need to wait and can send me a PM and buy a copy right away. Unfortunately we don't have any infrastructure for selling commercial modules. So anybody who wants to sell modules needs to build one on its own. That is not trivial and takes time. And unfortunately there are other things that kick in from time to time (client work and life...). I do my best to release it soon ?
-
I just tried and everything seems to work as expected if you set the correct import path (see docs https://scssphp.github.io/scssphp/docs/ ). I've added an example to the readme. <?php // for development you can put this in site/ready.php /** @var Scss $scss */ $scss = $this->wire->modules->get('Scss'); // watch all files in /site/templates/scss $watchFiles = $files->find( $config->paths->templates . "scss", ['extensions' => 'scss'] ); // set the import path so that relative @import statements work $scss->compiler()->setImportPaths($config->paths->templates); // compile SCSS to CSS if any of the watched files changed $scss->compileIfChanged( // create this file with the content from the uikit docs: // https://getuikit.com/docs/sass#how-to-build input: $config->paths->templates . "scss/uikit.scss", watch: $watchFiles, output: $config->paths->templates . "scss/uikit.css", style: 'compressed', );
-
Why didn't you use the new methods that I implemented for you? Did anything not work?
-
Use properly "ProcessPageView::pageNotFound" hook ?
bernhard replied to sebr's topic in General Support
What if you just add some code at the bottom of _main.php and check for the page id there? <?php if($page->id === 27) $site->track404(); ?> If Jumplinks kicks in, that should happen earlier I guess, so it should only track real 404 impressions? -
Thx @wbmnfktr I'm limited to what the newsletter company provides I guess... I can use another editor, like this one: Would that be better to read?
-
Nice, thx for clarifying ? Yeah, looks like using the API is for free unless you hit any of their limits, which is really awesome with your awesome module!!
- 315 replies
-
- 2
-
-
- translation
- language
-
(and 1 more)
Tagged with:
-
Just sent out the October Newsletter and at the moment we're holding at 49 subscribers, one being myself ? and basically stagnating since last month (+1). Not sure if the newsletter is helpful for anybody, but I try my best to provide interesting content. Here are some numbers from the first two issues: If anybody has some ideas, feedback or other input feel free ? The first two issues were basically written by ChatGPT with some minor manual tweaks. The input came from a RockShell script that scans all my repos and then creates a log and lists all commits. ChatGPT did a quite good job in converting these into some nice sentences. This months version I decided to put more manual work into it. There have been less commits and so it was possible to give it a more personal touch. Have a great month! PS: It's not too late ? https://www.baumrock.com/rock-monthly/ ?
-
Automate Repeater Matrix types creation with RockMigrations
bernhard replied to Ivan Gretsky's topic in RockMigrations
It's already on the dev branch - could you please check if everything works for you? https://github.com/baumrock/RockMigrations/commit/a4b9be86fb321fd621661250b23b1f361a379a5c -
Hey @FireWire, thanks for the fabulous update! I have a question regarding DeepL... I don't understand their pricing! For my website I think I'm fine with my free developer API account. I've translated several blocks of content and I've used only 1% of my limit. That's really great and has saved me so much time! That feature would be great for so many multilingual websites so I'm thinking about how I could sell that to clients. What plan would I need then? Would I let them use my developer key? Or would they need to register their own account? They would not be allowed to use the free dev plan I guess, so what would be the correct plan? There's only one for a single person starting from 9€ per Month, which is not so cheap. Especially for websites where you don't have lots of changes... Thx for your help (or anybody else who has an answer)!
- 315 replies
-
- translation
- language
-
(and 1 more)
Tagged with: