• Content count

  • Joined

  • Last visited

  • Days Won


flydev last won the day on August 10

flydev had the most liked content!

Community Reputation

460 Excellent


About flydev

Profile Information

  • Gender
  • Location

Recent Profile Visitors

1,710 profile views
  1. Today, there is a small a preview of a successful deployment (on localhost) using Duplicator : Create a package in the backend Download the package and the installer Upload it to the new hosting Navigate and run the installer
  2. Hello guys ! The Gitlab server is fixed and running, you can update the module to the latest version. All SDKs can be downloaded separately without using composer, the link of each SDK is provided in the module settings. You must uninstall the previous version before testing it. Thanks!
  3. I am checking for this, and it appear that all the SDKs are compiled despite using /*NoCompile*/ on the require_once. Also I note that this feature was introduced in PW 3.0.43, so I assume the file will be compiled for PW 2.7. Concretely, what is the bad thing about leaving all those SDKs file being "FileCompiled" ? if($this->useFTP) { require_once(__DIR__ . '/Classes/FTPClient.php'); } if($this->useAmazonS3) { require_once (/*NoCompile*/ __DIR__ . '/SDKs/aws/aws-autoloader.php'); require_once(__DIR__ . '/Classes/ClientAmazonS3.php'); } if($this->useDropbox) { require_once (/*NoCompile*/ __DIR__ . '/SDKs/dropbox/autoload.php'); require_once(__DIR__ . '/Classes/ClientDropbox.php'); } if($this->useGoogleDrive) { //require_once __DIR__ . '/SDKs/google/autoload.php'; // oh my.. require_once (/*NoCompile*/ __DIR__ . '/Classes/GoogleAutoload.pain.php'); googleAutoload(); require_once(__DIR__ . '/Classes/ClientGoogleDrive.php'); } Anyway, for the people who have the module in hand, I bumped the module to the version 0.0.36. The Gitlab server is not running up but will give a download link in PM as I would appreciate a test on a Windows machine..
  4. Under Edit field > Input > CKEditor Settings > CKEditor toolbar, you need to add the button: A11ychecker Save, then you should see the new button
  5. Checking expiration_date in the selector should do the trick. $todaysdate = date("F j, Y H:i"); $today = strtotime($todaysdate); $ads = $pages->find("parent.template=client, expiration_date<$today, sort=expiration_date"); echo count($ads);
  6. You are not incrementing $alert_count. It should be : $alert_count += 1; // not =+ 1;
  7. I understand now what you mean by no error. There is one last error, which can be seen if you dump the variable $response. You could see that SendGrid return an error code which can be something like that : statusCode => 401 body => "{"errors":[{"message":"Permission denied, wrong credentials","field":null,"help":null}]}" The reason is that the global $sgAPIKey in the function is not getting the value from the $sgAPIKey defined with the key (from some reason that someone might explain here..) To solve the issue, just set your API key in the function directly. [...] function send_email($from_email, $to_email, $subject, $body) { $sgAPIKey = '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'; // Lucy [...]
  8. And I was sure YOU will ask that ! Sure, I am already trying to get back my Gitlab server. The server was hosted in a VMware guest machine, and when plugged the hdd and put the virtual machine ON, the network simply does not work anymore. Can't ping anything, but I know how to fix it, i am just too lazy those days. Edit: Just to say, I still have the code and used the module in the last days, but it look like its not the Windows compatible version..
  9. Sorry but I do not understand, could you explain a bit more please ? Where do you first defined the send_mail () function ? (its not a ProcessWire or SendGrid function). If I assume you defined the function in, for example, _func.php, its normal you got an error of an undefined function. Just assuming... In your last code snippet, everything look fine (I would have defined the function outside the hook).
  10. @oma Call SendGrid like that : new \SendGrid(); (As Adrian said, its a namespace issue) @teppo I used WireFileTools just for the example, the bénéfit of this class is that it provide the ProcessWire API to the object. Sorry for the short answer, i am on mobile.
  11. Yes you can. $this->addHookAfter('Pages::save', function(HookEvent $event) { $arguments = $event->arguments(); $page = $event->arguments(0); if($page->template == 'user') { // Require relevent libraries $wft = new WireFileTools(); $wft->include('sendgrid-php/sendgrid-php.php'); $from = new \SendGrid\Email("Example User", ""); $subject = "Sending with SendGrid is Fun"; $to = new \SendGrid\Email("Example User", ""); $content = new \SendGrid\Content("text/plain", "and easy to do anywhere, even with PHP"); $mail = new \SendGrid\Mail($from, $subject, $to, $content); $apiKey = getenv('SENDGRID_API_KEY'); $sg = new \SendGrid($apiKey); $response = $sg->client->mail()->send()->post($mail); // dump SendGrid object with TracyDebugger bd($mail); } });
  12. Look like i am going to love it and its a french who made it! ♥ Will give a try soon, thanks for this post @alan
  13. Hello @Niku, sorry I am not giving you the right answer but.. You could take a look at this module : From the module's description it look like it could save you time
  14. There are some good reads in the forum too :
  15. module

    The module got renamed and updated a bit as its not intended to run only on the backend, but work also on frontend side. - Now, the administrator can choose to activate or not the backend login buttons. - The providers are added "dynamically". You have to simply edit a JSON config file which once saved, will show the required fields in the module settings. For example the following JSON config will only provide Google as login provider : { "providers": { "google": { "className": "Google", "packageName": "league/oauth2-google", "helpUrl": "" } } } Small note for pw users : If like me you did not know, there is another module that manages OAuth2 authentication. Feel free to use the one which suit your needs! more info there: @jmartsch you should create a new module thread