Jump to content

froot

Members
  • Posts

    720
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by froot

  1. apologies for the misconduct here in the forums, this happens when I don't start a new thread right away but actually start with researching existing posts to begin with, which I like to think to always do thouroughly. @Jan Romero as a matter of fact I do have ProFields Table and it is dope indeed, but like I mentioned in this thread here, I (and maybe others) would prefer the module I'm building and its dependencies to be free of charge, considering the still quite basic requirements it has to the tableish nature of the inputfield. I also use Tracy Debugger, but I'm not always sure how to use it though. I agree a table field is far more complex than say a checkbox field, yet it's still what is used to explain how to build a custom field, i.e. FieldTypeEvents, and my requirements not much different either, so I thought I give it a shot. Besides, I learn a lot more by doing than with too much theory. But maybe this is more long term project after all. Thanks so far everybody.
  2. I disagree, it is actually that hard : D All I'm trying to do is re-use the FieldTypeEvents/InputfieldEvents to build a sort of "week" inputfield, each table cell reprenting a individual checkboxes. So instead of 3 columns, it would have 7 (1 for each weekday) + 1 on the left. So I amended where those subfields are defined accordingly. However, now I get Call to a member function hasPermission() on null in wire/core/Modules.php:1389 Not sure if that tells anyone anything. Then I need to circle back to my db backup. Also, maybe a bit confusing in this particular case: Is $event always arbitrary, I mean coicidentally the name of the variable? Because you also have $event when using hooks which you can't really change, so need to be clear on this if this is prone to being confused.
  3. no idea how this module works. Example(s)?
  4. thanks @bernhard, it helps I'm still wondering though, as I want to create a custom fieldtype inside a custom module, should one module do both? or should one module require/install the other, i.e. two separate .module.php files or one .module.php file? Also, if I use two .module.php files, could both files be in the same module folder or separate? In my understanding, two folders would mean two modules, but I might be wrong. thanks for advice!
  5. When I create a new page, the name is auto-derived from the page's title. Can I simply skip that for a specific template so it stays empty and has to be entered manually?
  6. maybe a stupid question, I'm far from being an expert, but what's so exciting about avoiding the db in the first place? Aren't inputfields and inputfieldtypes not supposed to do nothing else than just that: insert data to the db? In other words, if you don't insert/input data in the db, why even call it inputfield? I'm trying to create an actual inputfield (that inserts data in the db) that I would use within a module I'm building. No sure if I would handle this separately or all in one module. I'm trying to start with FieldTypeEvents but it's indeed quite complex. I never know if what ever bit of code I'm looking at concerns the admin interface or the frontend. Also don't know why there are two files: FieldTypeEvents.module and InputfieldEvents.module. That goes for other Fieldtypes as well, I guess all of them.
  7. FieldTypeEvents is a separate fieldtype module. I understand it's just an example of how to create custom fields. I'm not sure though how that would fit in here – would I create that custom field that I need inside the module itself? Or would it also be a separate module that my custom module requires/installs? It actually seems quite basic in its functionality and comes quite close to what I need, but the code looks quite complex to be honest.
  8. of course, need to un-install and re-install, then it works. (I feel so stupid). Thanks
  9. ParseError syntax error, unexpected ''/templates/'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' I don't get it EDIT: I understand it needs to be $this->files->copy(__DIR__.'/templates/', $this->config->paths->templates); but still doesn't copy
  10. and a follow up question: if I do something like $src = $urls->site.'modules/myModule/templates/'; $dst = $urls->templates; $move = wireCopy($src, $dst); inside init() or ___execute() It of course asks for what is $urls. How would I pass it the $urls variable because if I just put it in the brackets, it's too few arguments where it's called, which I don't know where. Am I misunderstanding?
  11. thanks @ukyo I guess it works now, you're clearly in the user list. thanks for the tipp, what's the name of the FieldType? A sort of "range" input field that lets you drag with the mouse from start to end is cool for a month or year view but if you're trying to select multiple weeks over a a period of months, I reckon it's easier to just enter the week number and year. At least I couldn't find any time picker that makes this task easier, not in flatpickr nor anywhere, maybe something like drag or click the week number on a year calendar. And the other thing is entering times. The time input functionality from flatpickr is not much of use and dragging hardly could be an option since you would want to enter time slots and not so much ranges. So just having a simple text field is just as straight forward and probably more flexible.
  12. I actually have a very specific issue that I'm stuck with… How do I make the module create the template files, not just the templates in the database via API but also the corresponding php files in the webcontent when being installed?
  13. OK so I was looking for a module for weekly schedules, available time slots and bookings thereof. But all I could find is other people looking for a module like that. So I gave it a try. It's not a module yet but it will be soon, for now it merely is some templates and some fields. I gave ryan's ProcessHello module a try which makes module development much easier but I'm still not sure where to begin. How and where to create templates, with fields and repeater fields. Also, this setup requires FieldTypeTable which is a pro module so I'm not sure everyone will appreciate this requirement. I guess there could be an easier way? The tableish requirements are quite basic. https://foobar.roofaccess.org/userlogin/ if you have time and feel like it, you can just create a fake account and play around with it a bit, I hope it's somewhat self-explanatory. Should the module do more? or less? I welcome any feedback!
  14. I'm trying to give the newly registered user (via LoginRegister) permissions to edit some page in the admin. So I added permissions accordingly to the role login-register, but now the role is not assigned to the user when they register because in the settings it says Roles with page-edit permission are not shown. so that's kind of paradoxical. How to solve? only with hooks? EDIT: never mind, this works perfectly:
  15. I use pages instead, each with two files-fields (one for each language). Does the trick and is quite clear.
  16. @Jan Romero thanks, I knew I saw that somewhere before, just couldn't recall. Works.
  17. doesn't work with blank PW profile. Also, my attempts to make it multilingual not only do not work but break the site. $config->pageNumUrlPrefix = _x('Seite', 'general'); thoughts?
  18. I did this. If I leave the src tag empty, nothing is loaded. If I accept the marketing cookies, nothing is loaded either ? I'm on local BTW, not sure if that's relevant
  19. thanks, I will try that. And a follow-up question, would those cookies set by Vimeo or YouTube indeed be marketing or external media?
  20. I installed PrivacyWire and am having a hard time testing if it's doing what it should. I can check the cookies in the Google Chrome console under "Application". Before I accept and if I reject the cookies in question, there shouldn't be any, otherwise there should, right? Well they are never there, no matter how. Here's what I do and what I use to test. <iframe src="https://player.vimeo.com/video/<?=$page->vimeoID;?>?color=5a90ff&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen> </iframe> <script data-src="https://vimeo.com/" data-category="marketing" src="https://player.vimeo.com/api/player.js"></script> As you can see, i put data-src="https://vimeo.com/" data-category="marketing" inside the script tag so to categorise the cookies set by this script as marketing-cookie. Is that right? Is that enough? Should that work? Maybe there just is no cookie set by the vimeo-script and I waste my time to handle it? Also, I have a newsletter-subscripion form using a third-party newsletter-service. I guess I need to add another data-attributes to the <script> in use. What category would that be? thanks for help EDIT: actually, when I view the embedded video on the website, no cookie is set. But if I click on the vimeo-link inside the viewer, bringing me to vimeo.com, I get 13 cookies expiring in 1 year. Whether I don't select anything in the cookie consent, "accept only necessary cookies" or "accept marketing cookies" doesn't make any difference, it's always 13 cookies. Doesn't seem right… The cookie domain of these 13 cookies in the console is .vimeo.com, so are they out of scope? Maybe it's just my lack of understanding…
  21. I would need some kind of advanced files-field that enables upload to subfolders, so that the uploaded files are nicely organized and so that I can output different categories in the frontend. Any ideas?
  22. I have an issue where some emails are lacking the replyto email-address though I set it in the code as follows… $mail->sendSingle(true); $mail->subject($subject); $mail->body($message); $mail->replyto($email); So that's bad because, needless to say, cannot reply to the email. The log clearly show the email address in the array [replyTo] => yada@example.com Any ideas how that can happen? I mean why how... Is that just an email client configuration? EDIT: never mind, pretty sure it's an email client issue
  23. I'm trying to add a simple explanatory text within the options of my custom admin action. Right now it seems like all elements of the array returned by defineOptions are input fields. But I just want to add a text to explain some stuff to the user. Also, I need basic formatting like line breaks etc. What to do?
  24. I'm not using any custom code, just the module settings in the admin backend and the following (which is the default email template of the Promailer module) : if($input->get('type') === 'html') { ?> <!DOCTYPE html> <html> <head> <title>{subject}</title> <meta http-equiv="Content-Type" content-type="text/html; charset=UTF-8;" /> <style type='text/css'> body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 15px; } a { color: #009ADA; font-weight: bold; text-decoration: none; } a:hover, a:focus { color: #333; } </style> </head> <body> <h1><?=$page->title?></h1> <div><?=$page->body?></div> </body> </html> } else if($input->get('type') === 'text') { // Text-based email output (optional) if($input->get('preview')) header('content-type: text/plain'); echo $sanitizer->getTextTools()->markupToText(strtoupper($page->title) . "\n\n$page->body"); } else { // show preview links to our text and HTML emails ?> <html> <body> <ul> <li><a href='./?type=html&preview=1'>Preview HTML email</a></li> <li><a href='./?type=text&preview=1'>Preview TEXT-only email</a></li> <?php if($page->editable()) echo "<li><a href='$page->editUrl'>Edit this email</a></li>"; ?> </ul> </body> </html> <?php }
  25. I'm trying desperately to send HTML emails with WireMailPHPMailer, but It always seems to convert the markup from a CKEditor body to I think is what you call autogenerated text or alternative text. something like FLOWERS ARE RED =============== my name is NOT Dave this poem makes no sense microwave (https://en.wikipedia.org/wiki/Microwave) instead of: flowers are red my name is NOT Dave this poem makes no sense microwave What could it be? Thanks for help!
×
×
  • Create New...