Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. Glad you have found a solution. It would be nice if you could share it here, so that other community members who have the same question in the future, will benefit from it. I guess you used a hook in the end?
  2. I'm old enough to actually remember Macromedia Adobe Flash... sometimes you were forced to use that plugin just to display a (dynamic) custom font (sIFR). Oh the fun we had... sometimes I think the young generation of web developers don't know how lucky they are. ? </derail>
  3. $this->addHookAfter('ProcessPageAdd::buildForm', function ($event) { $form = $event->return; // If adding page under particular parent if ($this->input->parent_id === '1041') { // Add inputfield to form after existing title field // If you name the inputfield the same as the field you want to populate // then the entered value will be saved automatically $f = $this->modules->InputfieldText; $f->name = 'myfieldname'; $f->label = 'My Field Label'; $f->description = 'my field description'; $f->required = true; $f->attr('required', 1); // use HTML required attribute too $title_field = $form->getChildByName('title'); $title_field->label = 'Page Title'; $title_field->description = "page title description"; $form->insertAfter($f, $title_field); $event->return = $form; } }); I got this code a long time ago from somebody in this forum, and it works nicely. I can't find the original thread right now. It basically renders the field "myfieldname" in the first screen when you create a new page under parent id 1041. Not sure if that helps for your scenario.
  4. Well, it's certainly a sign that something's wrong somewhere. I never quite encountered the same problems (either separately or in combination, i.e. empty FB iFrame + can't delete modules). Things I would try / look at: Maybe your hosting company changed / updated something? (PHP version? .htaccess settings) Install Tracy Debugger and put your PW site into "debug mode" (in site/config.php). At the very least, you'll get some warnings / errors that you normally wouldn't see. Check server logs as well as PW logs See if there's any suspicious stuff in your browser JS console. Copy everything to the local machine and see how everything behaves there. Hopefully somebody else with more Form Builder experience will soon join in with help/tips.
  5. You might wanna clear the cache. (site/assets/cache/) __() seems to be a multi-language string somewhere, that is not being recognized. If that really comes from the core FB files or your own templates, I can't really tell.
  6. Well, there are several forum threads where similar issues were discussed. (storing user-prefs with sessions / cookies) https://processwire.com/talk/topic/21244-solved-redirect-based-browser-language-permission-to-change-language/ https://processwire.com/talk/topic/8733-autodetect-language/
  7. It looks like you have a textformatter enabled for file descriptions. Try to de-activate that HTML purifier textformatter.
  8. dragan

    COVID-19

    As if Corona wasn't enough, this morning Zagreb was hit by an earthquake. It seems that several hospitals were also damaged. Now instead of staying at home, several people are forced to go outside.
  9. No, I'm just genuinely surprised you didn't hear about that tool before, that's all. It's been around for quite a while. And yes, it works great. If you're doing frontend work the whole day, it's a great time-saver.
  10. You really only discovered this today? We're using it since years (with Gulp, Babel, Webpack etc.). Welcome to the 21st century ?
  11. @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.
  12. 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.
  13. 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/
  14. 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.
  15. 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.
  16. @horst It seems that security threats are increasing in these times... hackers even attack hospitals now ?
  17. and right now the site seems to be offline... ERR_CONNECTION_TIMED_OUT
  18. 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".
  19. 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
  20. 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?
  21. 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 ?
  22. 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.
  23. 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
  24. 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).
×
×
  • Create New...