Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. https://www.autohaus-bendel.at/ Highlights/Features: New Logo and matching Backend using module AdminStyleRock Very good google- and performance-ratings thx to UIkit and ProCache Flexible content pages (using private module RockMatrix) Cars are fetched automatically from an austrian cardealer API and converted into ProcessWire pages with a custom filter page: https://www.autohaus-bendel.at/fahrzeuge/ Forms with honeypots and live validation (using private module RockForms based on nette forms) Web-Coach The client gets automated reminders if he does not add new content to the website. Thx @wbmnfktr Bendel Web Coach The last news entry was created 21 days ago. There must be something new that will interest your clients ;) > To the website > Create news entry Animated page transitions using barba.js Migrations and deployment using RockMigrations. Debugging using TracyDebugger. ?
  2. Beautiful site as always ? Do you have some details on that one?
  3. Hi @BlindPenguin glad to hear that ? It does not really matter as the migrate() method uses createField() and setFieldData() etc behind the scenes. What might make a difference is that migrate() makes sure that all fields and all templates exist before it sets their data. That means you can reference fields and templates from within that migrate call and they can even reference each other without creating an infinite loop! It depends. Of course you can. RockMigrations does not care. At the moment RockMigrations can't do that. What's interesting is that even the core field export does not export translations of an options field. So I'm not sure if that is possible at all at the moment. For a real world use (aka quickfix) you could just create the field via RockMigrations, push the migration to the live system (which will create the field), then translate your options and then pull the DB changes to your dev environment (manually). If you need a 100% automated solution you could use pages and a page field to select the option (that's the way we did it before the options field even existed). Does that help?
  4. you are missing one closing bracket before the : <?php if(count($page->slider)): ?>
  5. Glad you got it sorted. Welcome to the forum @BlindPenguin - I hope you enjoy exploring PW ? Maybe @teppo wants to update the docs?
  6. Hi @Gary and welcome to the forum! If you tell us more about your skills in general we can provide better answers... Are you familiar with PHP? With HTML/JS/CSS? How did you find PW? Why are you using it? ...
  7. Hey @Thromisios welcome to the forum ? In my opinion: ProcessWire is perfect for this scenario! Why I think that: ProcessWire has a very active and friendly community that will always be there to help (that's very important when learning something new). I used other systems before ProcessWire and in their forum you never knew if you would get an answer or not. Terrible. In the PW forum you'll almost instantly get great answers or even ready to use code snippets or even modules ? ProcessWire hides a lot of complexity in the beginning. That makes it easy to use and you can come very far by using a few very basic concepts. Often it's just using fields together with the API. On the other hand ProcessWire is capable of so much more. That's all hidden under the hood and once you grow, you can start exploring more and more of it's features. In other systems you'll have to learn a lot upfront just to get simple things done. For example with other PHP frameworks you'd have to build the admin interface for your users completely from scratch (not all systems of course, but there are many where you have to do so). Hooks are such a brilliant concept that not every system has. Most of the time when you want a small customization of your system/program/website that means a small snippet of code. In other systems you often need to understand the whole OOP model to extend the correct class or you need to build a plugin or an extension. In ProcessWire you hook into the correct spot (if you don't find that the forum will help) and you add some simple lines of PHP and you get what you want. We have Adrian's great TracyDebugger which is such a huge help while developing. Just a simple dump of a variable is so much more helpful than doing a var_dump(). Other systems might have similar tools, but there are for sure systems that don't have anything like that. For me it was an eye opener in many cases. For the last part you can head over to my signature link "afraid of hooks?" A simple example could be: <?php // send me an email when the client adds a new blog post $wire->addHookAfter("Pages::added", function($event) { $page = $event->arguments(0); // only execute this hook for pages of type "blog-post" if($page->template != 'blog-post') return; // send mail $mail = new WireMail(); $mail->to('your@mail.com'); $mail->from('robot@yoursite.com'); $mail->subject('New blog post at yoursite.com'); $mail->bodyHTML("Url of the new post: ".$page->httpUrl()); $mail->send(); }); Good luck and have fun ?
  8. This post shows the latest UI of RepeaterMatrix. There has been some improvements lately ?
  9. Is there a reason why you are not using RepeaterMatrix for that purpose?
  10. Are you talking about a page builder? Then I guess FieldsetPage will not work for you... Or what do you mean exactly with "standardised reusable groups of fields"?
  11. https://processwire.com/api/ref/wire-log/
  12. Maybe it was a caching issue then. Not sure why that would happen but chrome itself should 99,99% not be the issue ? Welcome to the forum!
  13. We have a new option now ?
  14. From PW Weekly: This week we're happy to introduce a brand new module from Bernhard Baumrock, called RockLanguage. As the name suggests, RockLanguage is a tool for dealing with translations, and more specifically with translations related to ProcessWire modules. While ProcessWire natively ships with extensive language support, including the ability to ship module translations with the module itself, this does still require some manual work. That is exactly what RockLanguage aims to solve. Here's what the module translation process looks like with RockLanguage: Install RockLanguage on your site and (optionally) configure custom language code mapping via the module configuration screen. Add a directory for the language you'd like to include translations for within your own module's directory, e.g. /site/modules/MyModule/RockLanguage/FI/ for the Finnish language. Translate your module for said language via ProcessWire's translations manager. RockLanguage will automatically notice the update and duplicate the translation file from its original source to the directory you've just created. Now if you install this module to another site with the language folder included, and the site has RockLanguage installed and Finnish as one of its languages, the translation files for your module will be automatically synced with ProcessWire. What's nice about this workflow is that it takes some manual steps out of the equation, thus streamlining translation management. It's too early to say how widely this module will be adopted among public third party modules, but if you like the concept, you can easily start using it for your own modules right away. Download + Docs: baumrock.com/RockLanguage
      • 11
      • Like
      • Thanks
  15. Yeah that's the part that is missing and why I've not yet officially released it. I want to prepare better docs and an intro video to make it as easy to use as it can get. Any help in that direction is welcome, so if you try it please let me know all your questions, concerns etc ?
  16. Thx for the quick and detailed answer ? Have you seen the new version? https://github.com/baumrock/rockmigrations#running-migrations What you describe is possible with a single file called /site/migrate.php (similar to /site/ready.php for hooks): https://github.com/baumrock/rockmigrations#quickstart No need for another module, no need for creating separate php files with php class notation for simple migration changes, no need for a CLI. Unless I'm missing something ?
  17. Hey @elabx could you please describe how you are using RockMigrations and why you are using it in combination with Migrations? That would be very interesting for me and maybe also others ?
  18. DDEV ?
  19. Using my vscode snippets extension all you need to do is adding your settings to the getModuleConfigInputfields method: $inputfields->add([ 'type' => 'text', 'label' => 'Foo Setting', 'name' => 'foo', 'value' => $this->foo, ]); return $inputfields; https://marketplace.visualstudio.com/items?itemName=baumrock.pwsnippets
  20. Your logic is impossible. If the page is a child of archive it can not be a child of the other pages... I guess you need another approach but I don't really understand what you (or your client) wants, so maybe you try to ask again with other words and a detailed description?
  21. thx @pwired yeah that's how I always find my way around when it comes to ckeditor stuff. @Robin S has often helped me out - maybe he can give us a little help on how to better understand ckeditor and it's docs?
  22. Great solution ? Imho $page->siblings()->last() and $page->siblings()->first() would be a little bit easier to read ?
  23. Thx @DaveP I'd prefer to get a better understanding of how to customize ckeditor to my needs rather than fixing/rewriting things afterwards ?
  24. You can use https://doc.nette.org/en/utils/validators#toc-isemail I think that should work? Or just copy the single method? https://github.com/nette/utils/blob/35f77d3cef633ea75c1a620f40211b1494bfe00b/src/Utils/Validators.php#L304-L319 $isEmail = function(string $value): bool { $atom = "[-a-z0-9!#$%&'*+/=?^_`{|}~]"; // RFC 5322 unquoted characters in local-part $alpha = "a-z\x80-\xFF"; // superset of IDN return (bool) preg_match(<<<XX (^ ("([ !#-[\\]-~]*|\\\\[ -~])+"|$atom+(\\.$atom+)*) # quoted or unquoted @ ([0-9$alpha]([-0-9$alpha]{0,61}[0-9$alpha])?\\.)+ # domain - RFC 1034 [$alpha]([-0-9$alpha]{0,17}[$alpha])? # top domain $)Dix XX, $value); }; db($isEmail("post@kirchlein-im-grünen.de")); // true
  25. Hey @ryan thx for the tab update ? I've played a little with the getMultiple() method. Not sure if I'll use it a lot or not, but taken this example: I'd prefer this: extract($page->getMultiple('foo,bar,baz', true)); So I was wondering if we could have something like this? $page->extract("foo,bar,baz"); echo "$foo<br>$bar<br>$baz"; But I think that is not possible without the extract() call, is it? Also I'm wondering if using list() is better than using extract()?
×
×
  • Create New...