Jump to content

dotnetic

Members
  • Posts

    1,070
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by dotnetic

  1. Added support for PageFrontEdit for the TinyMCE plugin. Now you can save your TinyMCE fields on the frontend via CMD-S (or CTRL-S). Works great in conjunction with RockFrontend and RockPageBuilder. quicksave-frontend.mp4 QuickSave.zip
  2. Just came across https://www.namviek.com/ today, maybe this is what you are looking for. Don't know about the tech-stack.
  3. Hey @Chris-PW I added some optimizations to the scripts. First, now on install the QuicksaveTinyMCE plugin is automatically added to the list of plugins for TinyMCE and removed on uninstalling the module. You still have to add it to the indiviual fields, where you want to use it, maybe this could be done automatically in the future. Second I hope that I fixed the meta key issue and double save issue when using the TinyMCE plugin. I could not test it on a Mac, as browserstack has some hickups, so I appreciate everybodys feedback if it works. QuickSave.zip
  4. Thanks for the information @bernhard I updated and extended my blog post
  5. Don't forget my blog article "Why ProcessWire is the best CMS for your website" https://dotnetic.de/blog/processwire-the-best-cms
  6. Hi @Robin S. Please also take a look at my request "automatically call the init method on custom page classes" https://github.com/processwire/processwire-requests/issues/456 and maybe leave a thumbs up. Your method requires changes to /site/ready.php or /site/init.php files. I think self-initiating custom page files are way better, so for example, a blogPage.php custom page class file would automatically create all fields and provide custom methods like `localDate`. This way, you can simply copy the file to a new project, and everything will be set up automatically without needing additional changes to other files.
  7. Yes, please keep them separate for the reasons you mentioned. I will also provide some features/tweaks inspired by AdminOnSteroids. I would love to see the folder structure replicated as grouped collapsibles in the RockTweaks config.
  8. For example I have a website with a shop. And now I am developing a redesigned version which also has new fields and features. With snapshots I can go back and forth between the actual site (for example for bug fixing) and the relaunch site in seconds (or a minute). An import of the MySQL database would take hours because it is fairly large and has many thousands of inserts. I am aware, that there might be other options like git worktree (or other techniques) and using a separate database for this kind of work.
  9. Please find attached an improved version in vanilla javascript which is much smaller 2.4 kb instead of 6.75 kb and more efficient without using a scroll listener. Tested in Firefox and chromium based browsers on windows. Please report if it does not work somewhere else. I didn't change the TinyMCE plugin, so I don't now if it still works. QuickSave.zip
  10. Ok the script is not programmed very effecient, because it saves the scroll position on every scroll event. This will slow down the browser. You only need to store the scroll position when the save button is clicked. I try to improve it
  11. Works fine on Windows in Chromium-based browsers and Firefox. I didn't even have to use the plugin for TinyMCE, it just works out of the box.
  12. This is basically saying that you are trying to read the value property of a category which is not available, as it is null. You could check the existence of category first and then check if the value is not empty, if you use the following comparison: <body n:class="$page->category && $page->category->value !== '' ? $page->category->value"> // or <body n:class="$page->category && $page->category->value ? $page->category->value">
  13. I will also attend to the meeting. Looking forward to see you guys
  14. Same happened to me, as my IDE auto-uploaded this file because I had checked a setting to "upload a changed file" on save. Somehow it thought I changed the config-dev.php and uploaded it. Site was not reachable after that.
  15. Let's assume you want to change the title of a an edit page. You could hook ProcessPageEdit:execute in a file like site/ready.php like described here. Adapt the template name in the following code to your needs: $wire->addHookAfter('ProcessPageEdit::execute', function (HookEvent $event) { $pageEdit = $event->object; $page = $pageEdit->getPage(); if ($page->template != 'shop') { return; // return early } $this->wire('processHeadline', 'My new headline'); // or modify the existing headline // $headline = $this->wire('processHeadline'); // $this->wire('processHeadline', $headline . " - " . date('d.m.Y', $page->created)); });
  16. The method you are looking for is headline. You could hook ProcessPageEdit:execute in a file like site/ready.php like described here. Adapt the template name in the following code to your needs: $wire->addHookAfter('ProcessPageEdit::execute', function (HookEvent $event) { $pageEdit = $event->object; $page = $pageEdit->getPage(); if ($page->template != 'shop') { return; // return early } $this->wire('processHeadline', 'My new headline'); // or modify the existing headline // $headline = $this->wire('processHeadline'); // $this->wire('processHeadline', $headline . " - " . date('d.m.Y', $page->created)); }); For easier finding and helping others in the future, I made a support post out of this:
  17. That isn't a question of one or multiple developers. I mostly use a staging server to showcase new functionality before it will get added to the live server. We use RockMigrations to ensure our development environment matches the live server. This allows Bernhard and me to add new fields and templates without risk of overwriting existing data during uploads, as any changes are automatically migrated
  18. You should take a look into the Latte template engine, which is also available for TemplateEngineFactory or RockFrontend. I like latte more than twig or smarty. The syntax is somewhat similar, but it has advantages such as added security.
  19. AI will change humanity just like the internet did
  20. First of all: Great module, I really like to have an overview, because I got many templates (20) with access roles Improvement suggestion: I would like it even more if it just modifies the standard template overview instead of adding a new one. What do you think of that?
  21. Wow. Not 20 minutes later and after a little discussion @bernhard fixed this. Thank you very much.
  22. In the version 5.0.0 of RockPageBuilder, there is an unprefixed .block class in the less file. It collides with the .block class from TailwindCSS. It would be nice if this could be prefixed, so this error does not occur (see red rectangles).
  23. If that is what he wants, it can be achieved with using the picture element and source <picture> <source media="(min-width: 1440px)" srcset="https://placekitten.com/1024/800"> <img src="no-image.png" id="hintergrundbild"> </picture> so the image would only load on screen size at 1440px and above. The no-image.png could either be replaced with a blank image or a low res version, which will never get shown, because the element is hidden by default. But sure, it will produce a 404 if the image does not exist. I adapted my codepen, to reflect these changes. I am not saying that da2's solution is wrong. It is just another way to do it. But I think the version with using an image is much more flexible.
×
×
  • Create New...