Jump to content

benbyf

Members
  • Posts

    818
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by benbyf

  1. thats the strange thing. the code above is the only place i'm using it, I tried twice to assure I haven't called the function twice (hence the single log message). And the site is a fresh install, no other modules installed.
  2. Module. class MembersMessaging extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => "Members messaging" ...blah blah ... 'singular' => true, 'requires' => array("PHP>=5.4.0", "ProcessWire>=3.0.1, MembersMessagingProcess"), ); }
  3. Trying to work out why my module is send two emails when it should be sending one. I have a log statement at the end, it only shows up once in the logs where as i'm still recieving two emails!!? Which is why I'm confused: $mail = wireMail(); // set a default email address if none set $mail->to($u->email)->from($this->siteEmail); // all calls can be chained $mail->subject('New Unread message'); $mail->bodyHTML($msg); $numSent = $mail->send(); if($numSent) $this->wire('log')->save('mm_emails', 'New email sent to: ' . $u->email); I'm running PW 3.0.165
  4. wheres this sorry? I looked in the module InputfieldCKEditor and the settings on the textarea field itself but couldnt see this.
  5. awesome thank you!
  6. Feel like I missing something basic: I can't seem to work out how to add alt text to images when they're using the CKeditor in a body field without having to change to source and inputting that way. Is there a way to add image alt text?
  7. @adrian anymore show stoppers found or do you think its nearly prime time for php8 and PW?
  8. benbyf

    101aandd.com

    101aandd.com New site mostly designed by the client and implemented in Processwire. Mostly concentrating on small subtle animations.
  9. benbyf

    tandc.games

    Amazing, thank you! Zuse wasn't on the list and is now
  10. i believe you'll need to implement the module in your templates as per the README https://github.com/apeisa/PaymentStripe/
  11. ended up with this, but be nice to get a best practice of tutorial on this as still don't really understand. public function ___uninstall() { // for each installed page delete on uninstall $pages = array('my_test_page'); foreach ($pages as $key => $value) { $page = $this->pages->get("name=$value, include=all"); $this->wire('log')->save('mm_log', $page->id); if($page->id){ // delete page and any children $page->delete(true); $page->trash(); } } // delete field groups used on system templates $f = $this->fields->get('my_repeater'); $userTemplate = $this->templates->get("user"); if($userTemplate->id) { // $userTemplate = $this->templates->get("user"); // $fg = $userTemplate->fieldgroup->remove($f); // $fg->save(); $userTemplate->fields->remove($f); $userTemplate->fields->save(); $this->wire('log')->save('mm_log', 'delete user field'); } // delete messages template $templates = array('my_template'); foreach ($templates as $key => $value) { $t = $this->templates->get($value); if($t->id){ $t->flags = Template::flagSystemOverride; $t->flags = 0; $this->templates->delete($t); } $fieldgroup = $this->fieldgroups->get($value); if($fieldgroup){ $this->fieldgroups->delete($fieldgroup); } } // for each installed field delete on uninstall $fields = array('my_field'); foreach ($fields as $value) { $f = $this->fields->get($value); if($f->id){ // if field exists, then delete $this->fields->delete($f); } } $this->modules->uninstall($moduleName); }
  12. thanks, fingers crossed that works. was using fieldgroups before no template->fields
  13. Never really got my head around field groups and it shows, In my module uninstall I think I figured out how to delete a page, then a template and it's fieldgroup so that nothing gets upset. But for fields that belong to templates that need to stoick around I'm still abit stuck to how you would remove the field and when I try I still get: Unable to delete field '[field name]' because it is in use by these fieldgroups: 'user' is there a tutorial or best method for removing added fields, pages and templates?
  14. benbyf

    tandc.games

    Hi @JeevanisM Thank you so much for your kind words! The art for Grace has been done but the amazing Joe https://www.tandc.games/news/team-spotlight-joe-blakeston/. Let me know if you have any other ideas for important people from CS history who should be included! And sign up to the news letter or socials if you wanna hear its progress etc. Cheers,
  15. benbyf

    tandc.games

    https://www.tandc.games/ New website for my games design company. We're currently working on Grace Hopper: Bug Rescue about computer science history, check it out and let me know if you have any suggestions for historic characters or topics/hardware. Built with PW, and is heavy built upon my other website https://www.ethicalby.design/ basically taking it as a base and building on it.
  16. Thanks Ryan. This is something I had to deal with for a client a couple of years ago adding custom save buttons that then used lazyCron to publish the page later–this however is a much neater solution so i'll refactor at some point.
  17. I have the messaging module ready to go if anyone is interested in Beta testing it (then please message me) and ill get the shop up and running to sell it from (unless the PW market place is willing to have it of course???).
  18. Hi, just wondered if anyone had tackled a module to add a masonry effect to the image field in PW admin? I've got a front end effect by calculating all the hieghts of each new image and placing them in a column with the least current overal height (instead of doing the same in javascript), but be nice to see the same representation in the admin too.
  19. Hi HI David, in PW any function in a module that has ___ at the start, like ___handleApiRequest() in the AppAPI module you can use as a hook in your own code. See https://processwire.com/docs/modules/hooks/
  20. $order = wire('pages')->get($data->id); echo $order // {} somehow I'm getting this when expecting string "order". PW 3.0.148
  21. Hi @Sebi I added the log to app-api (will create a PR somepoint soon), I wondered if you wanted a log message on each request and maybe a setting in the modules settings to turn on or off, or maybe something more granular? My use case is going to require lots of log messages in the api files but having a generic log message on each request I though might be nice. Also wondered if it was worth making a second log for failed (exception) based log messages? so successful requests get logged to one and exceptions to the other..... any thoughts would be cool
  22. Thanks both @Sebi and @thomasaull I appreciate your time. Will look into the log bug as thats paramount to us using the module so would be great to clear up. The non-apikey endpoints is more of a nice to have really as you can set up informational endpoints that act like website frontends but without the visual code obviously. In terms of users, applications and version, they seem loosely connected. There seems little reason to fill out the apikey version when creating a new apikey if it doesnt actually relate to anything. But maybe i just havent seen how it does or could relate. Also the users are too loosely associated with the applications (slight tangent), but it would be nice to leverage the user and roles system byt associating a user/s with either key or applications, and then auth them against them on route. e.g. [..., [route_options_role_required = "delete-pages, update-pages, create uses" ]] as the folowing api might enable these things and you wanna be pretty damn sure that user is allowed to do it ?
  23. Thanks! @thomasaull I mean on the settings page the is a link to a log, which when clicked takes you to the logs overview page with an error saying the log you were trying to access doesnt exist. disabling auth doesnt create an open endpoint as you still need an apikey to access anything without an error sounds good but how do you implement this as there is nothing in the docs? ? cool beans, but my comment still stands ?
  24. Sorry for all the questions ... Its not clear to me currently how version numbers or api keys or users are related and can be used to auth against a certain route... is that something we have to build into the api call to test the signed in user and their restrictions? be cool if this was tired into the auth stage/routes as you have all the parts there available but not tied together for some reason...?
  25. Also, anyway to create a no apikey GET endpoint. could make this using templates but be nice it it was part of the same system
×
×
  • Create New...