Jump to content

dragan

Members
  • Posts

    1,982
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. Well, that's in your HTML. PHP doesn't care about that, or even knows about it ๐Ÿ™‚ Set it somewhere in your template, at the top (if you have a multi-lang setup, you probably need to detect the user language first) https://www.php.net/manual/en/function.setlocale.php or globally in site/config.php
  2. dragan

    COVID-19

    Switzerland's government yesterday also announced new measures: Schools and public sport places (swimming pools etc.) will be closed, events with more than 100 people are forbidden. Probably for the first time in my life, I witnessed what panic buying and empty shelves look like in a nearby supermarket. I've previously only seen such stuff on TV. As for work... we try to avoid / postpone meetings and do telcos instead. And home-office is always an option (always was, up to a degree).
  3. Hi @kunago and welcome to the PW forum. I am not sure if you refer to the actual "page-edit" / backend-GUI scenario, but I guess you do. What you can do is to duplicate the original image, and then crop that duplicated image, and save it as a variation. Or do you want to have a custom preview of all images in the page-edit instance to be always "aspect ratio 1:2"? (thumbnails)
  4. Well, I just found processInputErrorAction() in ProcessPageEdit.module, but that is a non-hookable method. A related function seems to be * // Disable change tracking * $page->setTrackChanges(false); which is in wire/core/Wire.php I would maybe try to work with "Required only if custom PHP returns true" and add some logic like "required only if data is edited in the frontend", but I'm not even sure that's possible. A quick test with $isAdmin = $this->page->rootParent->id == 2; return !$isAdmin; seems to work... (thanks to @LostKobrakai's post here)
  5. Well, frankly speaking, I don't quite see the issue here. Required is required, so some warning messages make sense. Why do you define certain fields as required in the first place? You can try to be creative with other kinds of setups / workflow, e.g. nothing is required initially (on save). But you could define some fields as required only once the page gets published. There are probably methods and hooks that let you do that, e.g. https://processwire.com/api/ref/pages/publish-ready/ You could also "fake" a required field in the backend, e.g. use labels like "Phone*" and / or use a yellow background (UIKit field settings). In other words - make them look super-important for the users visually. Here's a rather old thread that is somewhat related: https://processwire.com/talk/topic/4476-validating-field-before-page-save/
  6. Go to your template settings, tab "advanced", and choose any of the other options:
  7. I always keep separate blocks at the bottom. In any case, I add lots of comments, so I know what each block is supposed to do, if I have to touch it years later ๐Ÿ™‚
  8. Well, as long as it works, it works. Of course, you should always keep a backup in case you break something. The only stuff I usually add is blocking bad bots and some performance tweaks (compression, cache rules).
  9. Well, that error message is unfortunately misleading. It should say something like "This board is only accessible if you have a paid Pro support license". When you buy a Pro module, you have access to the VIP forum for one year. After that, you have to sign up for a support plan (the module itself doesn't have an expiry date, of course), which is something like $25 / year, last time I checked.
  10. @Robin S I don't have this particular module installed, but (amongst others) Admin On Steroids, which also uses keyboard hot keys (if enabled). Thanks for pointing me in the right direction to solve this...
  11. @bernhard I guess this issue is a good fit for an addition to https://processwire.com/talk/forum/5-wishlist-roadmap/
  12. On a related note: Does anybody know what these random strings like 6450242531912981c3683cae88a32a66 are used for? { "file": "site\/modules\/FormBuilder\/ProcessFormBuilder.module", "textdomain": "site--modules--formbuilder--processformbuilder-module", "translations": { "6450242531912981c3683cae88a32a66": { "text": "Formulare" }, "c9cc8cce247e49bae79f15173ce97354": { "text": "Speichern" }, (This short excerpt is from a generated translation file for Form Builder) Is this just for making sure you get a valid JSON and keeping key/values intact when you switch between PHP arrays and JSON? (keys)
  13. Don't you use your browser's "remember login" feature? ๐Ÿ™‚ I just logged in successfully. Thanks for your work on this @Pete
  14. The FB board is here. Often, a module is v3-compatible even though it's not officially marked as such. Try to install it and see if it works. Sometimes all you (maybe) need to add, is PW namespace in the .module file(s). There's also this module that might do what you want: http://modules.processwire.com/modules/guid-generator/
  15. I once asked Ryan if he plans to add language files to his Pro modules. He doesn't plan to do so. His reply was (more or less) that most people using these modules were developers, not authors (clients), and a developer surely understands English. Fact is, many of the Pro modules are not only being used by superusers, so that's kind of a weak excuse. It's a lot of work translating e.g. a Lister Pro language file. Of course, for German, I only did it once, and then copy files over. Other eco-systems have solved this way better imho... On a side-note: Ryan is maybe missing out on marketing arguments here... it would be easy for him to aggregate at least a dozen translations for his modules from existing developers / agencies who bought a license and translated everything on their own. In return, he could give away licenses or free access to the VIP support boards to those ppl who translate Pro module JSON files ( A classical win-win situation ๐Ÿ™‚). For some ppl, it makes a difference if a module is already translated in x languages or just English. That's a robust sales argument right there.
  16. Apparently, that's an old question: https://processwire.com/talk/topic/15367-translating-module/ https://processwire.com/talk/topic/2583-delivering-module-translations/ Seems like nothing has changed in that regard in the last years ๐Ÿ˜ž I'm sure there would be workarounds, but then every module developer would have to create such a "install multi-language files" routine for himself, and that's hardly efficient (e.g. a menu in your module config screen where you could map JSON file A to PW-language C, and then the file(s) would be moved to the right folder. It would indeed be nice to have that functionality in the core.
  17. On one particular site, CKEditor behaves rather weird: When I copy and paste "normally", i.e. CTRL + V, there is an alert popping up "do you really want to leave this page?". If you cancel, the text is pasted into the field. If not, you get redirected to the frontend of the page you just edited, and the changes are lost. The "paste from Word" button doesn't work. CTRL + SHIFT + V works, but all formatting is lost (apart from paragraphs). I'm using inline editor mode, ACF + Purifier are activated. I know that if I disable those two, CTRL + V works, but I won't do that, since CKE then saves all the garbage code from MS-Office. Has anyone ever come across this issue? I tried with Chrome + FF. No JS errors.
  18. Nope. One uses React, the other plain vanilla JS (ES6). You are actually asking more than one question. How to display such stuff in the frontend? (to some degree answered by your CodePen examples... but I doubt you want to use React just for one single widget like that) How to display such stuff in the frontend with contents that come from PW? How to save the user's combinations / choices (result lists) in PW? How familiar are you with ProcessWire? How familiar are you with JS?
  19. If all embeds are iframes, I would only use a text field for the URL. There's also this textformatter module or a CKE plugin I would check out.
  20. Works here. I just tried it out with selector string: parent=1097, include=hidden, sort=-name and it does list by name in descending order.
  21. Nowhere. PW doesn't store any such thing anywhere. You define allowed hosts in the config, but that's it. This is most probably a caching issue. Try to delete everything inside site/assets/cache/, your browser cache and try again.
  22. Where exactly? "on the admin page" is a bit vague... In the top menu? In a particular page when in page-edit mode? In the page-tree? elsewhere? For use-case 2, you could try https://modules.processwire.com/modules/fieldtype-runtime-markup/ Another very useful module is https://modules.processwire.com/modules/page-field-info/ - especially if you need to provide contextual information based on your selection (checkboxes, radio buttons, page fields, options...).
  23. @matjazp did you find out what happened?
  24. Interesting. I don't even see that override option...
  25. I've read your post now three times, and I'm still not sure what you try to achieve. Your selector is basically useless, since there can only be one page with template=home. (and sorting one single page is... useless too) Did you mean has_parent=home?
ร—
ร—
  • Create New...