Jump to content

Gadgetto

Members
  • Posts

    394
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Gadgetto

  1. @kongondo Thank you for your hints. In general, I'd like to follow the standard behavior of ProcessWire as closely as possible. So having own "data" columns for each language would be the best. I have a Fieldtype "FieldtypeMessageMeta" and try to extend it with "FieldtypeMessageMetaLanguage" - just like other language capable field types do. So an admin can switch between normal Fieldtype and language Fieldtype if necessary. the longer I think about it, the more uncertain I am if the message subject has to be multilingual at all. Is it common to automatically send multilingual newsletters? Or is it better to send a separate newsletter for each language?
  2. I don't know how to describe it better. I thought multi-language field is a common term for fields which provide input for different languages (like the InputfieldText/InpufieldTextLanguage). My Fieldtype is a multi-columns field not multi-rows, therefore FieldtypeMulti won't work (as it is only for multi-row fields). As I explained in my initial post, I created a Fieldtype which has these columns: $schema['data'] = 'text NOT NULL'; // we're using 'data' to represent our 'subject' field $schema['sendstatus'] = 'tinyint NOT NULL DEFAULT 0'; // message send status $schema['recipients'] = "int(10) unsigned NOT NULL DEFAULT 0"; // recipients counter $schema['sent'] = "int(10) unsigned NOT NULL DEFAULT 0"; // sent counter $schema['started'] = "int(10) unsigned NOT NULL DEFAULT 0"; // message sending start $schema['finished'] = "int(10) unsigned NOT NULL DEFAULT 0"; // message sending finished The "data" col is a text field and I'd like to provide language support for this col only! (the other columns send status, recipients, ... arte integer fields and don't need language support). I simply can't find an example Fieldtype which provides similar functionality.
  3. Sorry for that, I was indeed searching for the "Reveal hidden contents" feature as I saw this in other post. Just couldn't find it. Thanks!
  4. I' really stuck here guys... ? Documentation is no help. Comparing with other multi-language fields doesn't help because they are all single-value fields. Here are the full sources of my multi-value input field: FieldtypeMessageMeta.module.php FieldtypeMessageMetaLanguage.module.php MessageMeta.php InputfieldMessageMeta.module.php
  5. I use the class name many times across this class and in derivates - so using the literal class name directly would be a pain if something changes...
  6. BTW - this works perfectly without \Processwire if I use the class name directly: if ($f->type instanceof FieldtypeMessageMeta) {
  7. The question is: should I use this and risk a future problem with newer PHP versions?
  8. Hey, just found out its super easy to copy/paste color-coded code from VSCode! ?
  9. This is correctly defined in class body and the debugger confirms it holds the correct string "FieldtypeMessageMeta" OK - this is strange: changing the const definition to const FIELDTYPE_GROUPMAILER_MESSAGE_META = '\Processwire\FieldtypeMessageMeta'; ... it works as expected! Why is this? My class file is already namespaced correctly!
  10. Could somebody please tell me why this works ... $templates = $this->wire('templates'); $messageTemplates = array(); $className = 'FieldtypeMessageMeta'; foreach ($templates as $t) { foreach ($t->fields as $f) { if ($f->type instanceof $className) { $messageTemplates[] = $t->name; break; } } } // $messageTemplates array is populated correctly! ... and this doesn't work: $templates = $this->wire('templates'); $messageTemplates = array(); $className = self::FIELDTYPE_GROUPMAILER_MESSAGE_META; // is set to 'FieldtypeMessageMeta' foreach ($templates as $t) { foreach ($t->fields as $f) { if ($f->type instanceof $className) { $messageTemplates[] = $t->name; break; } } } // $messageTemplates array is empty!
  11. I still haven't found my perfect syntax theme ... currently using the built in "Dark+"
  12. Sadly there is currently a problem with Intelephense plugin which leads to wrong problem reports: Expected type 'ProcessWire\Page'. Found ''. Expected type 'array|null'. Found 'array()'. Expected type 'array|null'. Found 'null'. ... and so on ... https://github.com/bmewburn/vscode-intelephense/issues?q=is%3Aissue+is%3Aopen+label%3A"resolved+in+1.0.3" But it seems an update is on its way...
  13. I switched forth and back between left and right side bar and no it seems I'll stuck on right! ?
  14. @ukyo thank you, I’ll have a look at your module. I just thought about creating a checkbox toggle module for myself.
  15. This version fits more into UIkit admin theme: (I could think of a simple theme detection and use colors based on selected theme)
  16. Nice addition with the :focus! I personally do like the 2nd one most! Its clean and flat and snappy! Your 2nd CodePen link doesn't show the same version as in the ani.gif: https://codepen.io/baumrock/pen/zeVErm (it has a shadow) Do you have a working version of the second one?
  17. It was more your nice work - so thanks for your help! ? This is one of the best, cleanest and CSS only drop in replacements for HTML checkboxes I ever saw! Especially that it doesn't need extra HTML elements is great!
  18. @Chris Bennett, @LostKobrakai I found the problem: we need to remove this background image when UIIKit theme is active: .uk-checkbox:checked { background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23fff%22%20points%3D%2212%201%205%207.5%202%205%201%205.5%205%2010%2013%201.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A"); } Here is the final CodePen: https://codepen.io/gadgetto/pen/WPqwLy Thanks all for your help!
  19. Hello Chris, could it be you are referencing the wrong CodePen? @LostKobrakai's Pen has no display:flex rule. I'm using the code from this Pen: https://codepen.io/LostKobrakai/pen/ZwNMxa Here is what it looks like when resized to .85em (note the small white artifact in active state):
×
×
  • Create New...