-
Posts
394 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Gadgetto
-
@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?
- 21 replies
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
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.
- 21 replies
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
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!
- 21 replies
-
- 1
-
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
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
- 21 replies
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
Thanks, but this doesn't help. It addresses a different problem.
- 21 replies
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
[SOLVED] A question for PHP pros (variable as instanceof argument)
Gadgetto replied to Gadgetto's topic in API & Templates
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... -
[SOLVED] A question for PHP pros (variable as instanceof argument)
Gadgetto replied to Gadgetto's topic in API & Templates
Great help from you guys - as always! I love this community! -
[SOLVED] A question for PHP pros (variable as instanceof argument)
Gadgetto replied to Gadgetto's topic in API & Templates
BTW - this works perfectly without \Processwire if I use the class name directly: if ($f->type instanceof FieldtypeMessageMeta) { -
[SOLVED] A question for PHP pros (variable as instanceof argument)
Gadgetto replied to Gadgetto's topic in API & Templates
The question is: should I use this and risk a future problem with newer PHP versions? -
[SOLVED] A question for PHP pros (variable as instanceof argument)
Gadgetto replied to Gadgetto's topic in API & Templates
Hey, just found out its super easy to copy/paste color-coded code from VSCode! ? -
[SOLVED] A question for PHP pros (variable as instanceof argument)
Gadgetto replied to Gadgetto's topic in API & Templates
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! -
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!
-
I still haven't found my perfect syntax theme ... currently using the built in "Dark+"
- 242 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
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...
- 242 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
I switched forth and back between left and right side bar and no it seems I'll stuck on right! ?
- 242 replies
-
- 1
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
@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!