-
Posts
2,321 -
Joined
-
Last visited
-
Days Won
44
Everything posted by tpr
-
Using translatable strings across template files
tpr replied to Webrocker's topic in Multi-Language Support
Glad that it worked. Not sure what is going on there though ? -
Using translatable strings across template files
tpr replied to Webrocker's topic in Multi-Language Support
How about changing to this? If doesn't help, try to check that the file you try to include has the correct path. include_once(__DIR__. "/_strings.php"); -
Using translatable strings across template files
tpr replied to Webrocker's topic in Multi-Language Support
Has the footer php namespace ProcessWire in the first line? -
Using translatable strings across template files
tpr replied to Webrocker's topic in Multi-Language Support
My question was that if there is a "<?php" in the very first line of _strings.php. If not, it will be interpreted as html and that's why you see the content there. -
Using translatable strings across template files
tpr replied to Webrocker's topic in Multi-Language Support
Are you sure there's an opening php tag in the strings php file? I include that file in ready.php but I don't think that makes a difference. -
Glad you sorted this out. Even though I would change the main selector as @rafaoski suggested, to retrieve only those pages that have images, imo it's a bit more performant.
-
Then all child page is of the same template? If not, perhaps the images field is not available or perhaps a template override for the number of images is set to single image. Try to dump the images field for each children in the loop (eg with Tracy Debugger).
-
Does every child page contain an image in the images field? You should check first if there's any.
-
Perhaps I'm the only one who does this but I usually load the site's main css into ckeditor. This way the look is much closer to the final result, at least for font size, family, color etc. If I need to exclude a style from ckeditor I use body:not(.cke) in css (if I remember right for the classname).
-
Latest v1.8.3 further improves checkAllCheckboxes feature. Now its state properly corresponds to individual checkbox changes and also fires a change event (without that showIf fields wouldn't react).
-
Thanks, will fix that, although I don't see this (at least in Chrome). I think auto format code went wrong.
-
Nice to hear that. I see some parts that could be improved but I think it's usable as it is now.
-
Upgrade time!
-
Not really, only an addition to yours, that is, showing the "Check all" only on hover. But this of course would be unavailable on mobile which is not that bad imho.
-
Version 1.8.1 adds Input mask feature and the misaligned bottom save button dropdowns should also be fixed. As for the phone country library for input masks (Cleave.js) I've added the all-in-one library which weighs about 250 Kb. It's not loaded automatically so you'll need to check it in the module settings page if you need it.
-
please add input masks for text inputfield support
tpr replied to adrianmak's topic in Wishlist & Roadmap
Let's continue discussion on Input mask in AOS here. -
@Robin S Thanks, I'll have a look. Input masks continued from here I've managed to make it work on multilanguage installs, however, PW doesn't load the non-default field's value automatically (on the field config page). It's only a matter of a few extra lines but I feel this is a bug, or perhaps I'm doing things wrong. // $this->addHookAfter("Field(type=FieldtypeText|FieldtypeTextLanguage)::getConfigInputfields", $this, "addInputMaskConfigField"); $f = $this->wire('modules')->get("InputfieldTextarea"); $f->attr('name', "inputMask"); $f->label = $this->_("Input Mask"); $f->useLanguages = true; // setting value here, but this doesn't set for non-default languages $f->value = $field->inputMask; // need to iterate on languages and set each separately if ($this->wire('languages')) { foreach ($this->wire('languages') as $lang) { if ($lang->isDefault()) continue; $f->{'value' . $lang->id} = $field->{'inputMask' . $lang->id}; } } See the comments in the snippet, am I missing something? File size Another issue is that Cleave comes with many javascript files for phone masks, one for each country, that's about 3.4 Mb altogether. This would increase AOS size a lot (about 2.5 times as now), which I don't like a lot. Any idea how to overcome this? Should I load them via cdn? I've found bootcdn.cn only where they are available but I know nothing about that site. Or perhaps make it somehow available through $config->inputMaskAddons or something, and devs should take care of that if needed?
-
please add input masks for text inputfield support
tpr replied to adrianmak's topic in Wishlist & Roadmap
Cleave looks nice, thanks. I managed to set up a working PoC, the only issue came up was submitting the value - the formatted value got saved so I had to remove fomatting on submit to save the raw value. You can see the raw value (no delimiters) for a second before submit and Tracy Console also shows the right value. The configuration looks like this: -
please add input masks for text inputfield support
tpr replied to adrianmak's topic in Wishlist & Roadmap
If it's JS only then I could try adding it to AdminOnSteroids, even though in the past years I haven't felt the need for such feature. What makes it harder that multi-language needs to be taken into account, eg. you may need different mask per language. -
Thanks, interestingly I don't get any notices but I see where can it fail. Could you try disabling line 2605 with this? if (!empty($configData['IUC_enabledTemplates']) && $editedPage->template && !in_array($editedPage->template->name
-
Just made it optional in v1.8.0. Also the built-in asmSelect placeholder is now kept when asmSearchbox is enabled, eg. the fieldselector on editing a template now retains the placeholder value after adding a field.
-
I'll make optional to keep the list open.
-
I meant a regular page edit screen, eg editing the Home page. Sounds great, looking forward to it!
-
Thanks, but fortunately this one was totally unrelated. It was the case changer in AOS, in the MarkupSEO module the "Inputfield_titleSmart" named field triggered the case changer beause a selector was written like "[id^="Inputfield_title"]. I've also fixed a CSS positioning issue for the case changer. Check 1.7.9 for the fix. (offtopic) I got a js error if I remove all the selectors in the MarkupSEO settings, like you did in your second screenshot, on a regular page edit screen: Uncaught Error: Syntax error, unrecognized expression: ,input[name=seo_title] In MarkupSEO.php it seems this line assumes there's at least one field selected: $('{$titleFieldsSelectors},input[name=seo_title]').keyup(function(){ This fixes it: $('{$titleFieldsSelectors}').add('input[name=seo_title]').keyup(function(){ Could you check this? I'll add the fix to the MarkupSEO github if you (or someone) could confirm this.