Jump to content

dragan

Members
  • Posts

    1,967
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. You really only discovered this today? We're using it since years (with Gulp, Babel, Webpack etc.). Welcome to the 21st century 🙂
  2. @mjut Please don't place your question in more than one place. I read both of your posts, but I'm still not sure about the whole scenario. Please define what "even if I previously did chose Danish" actually means. Where and how did that choice happen? Did you create a link that stores language preference in a cookie or session? In your other post, you mentioned that visitors are coming to your site via QR codes. If you want people to see your Danish language content, then simply use your Danish language URL for the QR code, not the default one. There are many different strategies how to tackle such things, e.g. detect the user's browser default language and (if necessary) do a redirect. Or make the user click somewhere and store his/her preference in a cookie or session. From a usability point of view, you would create your landing page in a way that the users can quickly and intuitively switch language versions, if needed. The default PW multilang site profile has a nice commented working example (how to dynamically switch languages). Bottomline: If you did your homework re: information architecture / UX, no special technical "trickery" is needed. Just make sure your navigation and everything else (breadcrumbs...) in your site setup takes ML into account, and once the visitor is on "his/her" language version, they know how to get their respective language content.
  3. You can also create your own .ini file and place it wherever you like: https://www.php.net/manual/en/function.parse-ini-file.php Or a static file you only require/include when needed, from inside your templates.
  4. You mean a module? How do you post? The "traditional" way (form submit on click), or via AJAX? These topics may be related to your issue: https://processwire.com/talk/topic/19486-input-get-post-inside-of-process-module/ https://processwire.com/talk/topic/17168-input-post-empty-with-dynamically-added-input-fields/
  5. This one? https://modules.processwire.com/modules/textformatter-video-embed/ Did you actually set your CKE field(s) to use that textformatter? ("details" tab in field settings). Just installing that module won't do much.
  6. dragan

    COVID-19

    A work colleague has to find a new appartment till the end of March, because she got kicked out of the flat-share appt. The real-estate market is already unaffordable for most "normal" people in Zurich under "normal" circumstances. But findind something even halfway affordable in such a short period of time is crazy under such definitely-not-normal circumstances.
  7. @horst It seems that security threats are increasing in these times... hackers even attack hospitals now 😠
  8. and right now the site seems to be offline... ERR_CONNECTION_TIMED_OUT
  9. Nice look and feel. If you allow just a few remarks: On really large screens the main texts are too wide. I would either increase the font-size a bit, or define a max-width to make it more readable. The color contrast is insufficient (way below 1:4.5) for most text. If you care about accessibility, I'd adjust the colors accordingly. There's no h1 anywhere. And also no meta description. For SEO, I would also use a bit more text for <title> than just "Goldkinder".
  10. You can also take a look in the DB. Get the news template id from table templates, and do a query SELECT * FROM `pages` WHERE templates_id = 58
  11. What's your workflow? Does FB post directly to your DTP app? Or do you export entries as CSV and import those in your DTP app? Or maybe even "manually" via the API?
  12. Why don't you simply strip out the linebreaks with a simple str_replace? By definition, HTML textareas allow linebreaks and simple text inputs do not. You could change the input type to text input, but that would be hardly useable if you need 500 characters 🙂
  13. ProcessWire doesn't care about any of your frontend-assets. It's your job as a developer to put it all together and get the expected output. Looking at your site, I noticed that all JS references are wrong, i.e. the paths to your Javascript files are incorrect and therefore don't load. My guess is that some of these "CSS animations" aren't pure CSS animations, but actually triggered by those (missing) JS files. Adjust your CSS + JS paths, and put them somewhere in site/templates/ and it will work as expected. You can use pre-configured paths like $config->paths->templates in your .php templates, which will also work regardless if you are developing on localhost or a remote server.
  14. 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
  15. 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).
  16. 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)
  17. 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)
  18. 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/
  19. Go to your template settings, tab "advanced", and choose any of the other options:
  20. 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 🙂
  21. 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).
  22. 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.
  23. @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...
  24. @bernhard I guess this issue is a good fit for an addition to https://processwire.com/talk/forum/5-wishlist-roadmap/
  25. 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)
×
×
  • Create New...