Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates

  1. Past hour
  2. Constant Contact is not the easiest mail provider to work with as a developer. Although I had hoped to use a different provider prior to our website relaunch that likely won't happen for quite some time. In the process, I created a module to handle the handshake keep-alive that Constant Contact requires so that I could use a very simple, customized single-field form to allow visitors to subscribe to our newsletter. I share this module now. NOTE: Installs SubscribeToConstantContactKeepAlive.module REQUIRES: LazyCron (for the KeepAlive module) SubscribeToConstantContact A lightweight module for the ProcessWire CMS/CMF that lets you subscribe a user to a Constant Contact list. Heavily inspired by SubscribeToMailchimp. The basic idea // Easily subscribe a user with SubscribeToConstantContact $mod = $modules->get("SubscribeToConstantContact"); $mod->subscribe('email@example.com'); How To Install Download the zip file at Github or clone the repo into your site/modules If you downloaded the zip file, extract it in your sites/modules directory. You might have to change the folder's name to 'SubscribeToConstantContact'. Go to the modules admin page, click on refresh and install it. This will also install the associated SubscribeToConstantContactKeepAlive module which is necessary for keeping the API active. Setup at Constant Contact Log into your Constant Contact account and go to the Developer Portal > My Applications (you may have to click a "log in" button again) and edit an existing, or create a new application using Authorization Code Flow and Implicit Flow, and rotating refresh tokens. Retrieve the API Key and Client Secret. NOTE: The client secret may need to be recreated to retrieve it. Module Setup Put the API Key and Client Secret into the module settings (Processwire > Modules > Site > SubscribeToConstantContact), and use the "Redirect URL" as printed on the module config screen for your Constant Contact API application's Redirect URI field value. Submit the form to save the values from this step. Click on the generated URL, "Authorize and connect this module to your Constant Contact Application," on the module configuration screen. Values have been retrieved from the Constant Contact API. Click "Submit" to save them to the module configuration. OPTIONAL: Choose a default contact list for the module to subscribe contacts to. Usage // load module into template $mod = $modules->get("SubscribeToConstantContact"); // subscribe / update a user in your default audience $mod->subscribe('email@example.com'); // add additional fields to fill out user data // subscribe($email, $list_id, $parameters) // $list_id will default to the module's saved configuration value, if set // NOTE: Parameter values are not validated by the module, see the documentation for further info $mod->subscribe('email@example.com', null, ['first_name' => 'John', 'last_name' => 'Doe']); // Subscribe a user to a specific list (other than default) $mod->subscribe('email@example.com', 'adcdef12345', ['first_name' => 'John', 'last_name' => 'Doe']); Additional methods // Unsubscribe a user $mod->unsubscribe('email@example.com'); // Delete a user. Deleted users still exist in Constant Contact, but cannot be seen (in Constant Contact) or retrieved (via API) $mod->delete('email@example.com'); // Unsubscribe a user from a contact list (or array of lists) $mod->removeFromList('email@example.com'); $mod->removeFromList('email@example.com', 'abcdef1356'); $mod->removeFromList('email@example.com', ['abcdef1356']); Example Example usage after a form is submitted on your page: // ... validation of form data $mod = $modules->get("SubscribeToConstantContact"); $user_email = $sanitizer->email($input->post->email); $mod->subscribe($user_email); Troubleshooting In case of trouble check your ProcessWire warning logs. FAQ I can't see the subscriber in the contact list If you have enabled double opt-in in your Constant Contact settings, you will not see the subscriber until the confirmation link in the email sent by Constant Contact has been used; the user may have also been deleted. I get an error in my ProcessWire warning logs Check if you have the proper contact list ID and API Key. Check if you pass a valid email address. Make sure LazyCron is installed Go to the Constant Contact Developer Documentation for more information. *I have only done minimal testing on this module, so use with caution, and please report any bugs related to the stated purpose of the module. Contribution Pull requests welcome. (Especially for the awkward module setup/configuration flow.)
  3. Today
  4. Yesterday
  5. Hi @loukote, good catch, you are right, arrays should be used instead of new WireData(...), which was a faulty leftover from the first version. Reason being is that since 2.0.0 these arrays are directly passed on to and processed in the ICSEvent class, which is written in pure PHP. Thanks for letting me know, I updated it everywhere, added more examples and did some minor improvements (create named files, types, cleanup). If you encounter any further problems don't hesitate to reach out again.
  6. Last week
  7. @ryan Saw nothing on my side except that it was fixed (thanks to Netcarver). I received notification saying "Your post was approved". I'll have to go with your thought on the forum upgrade. Only tidied up some info on that original module post which I don't do very often. I think it happened once a while ago for the same reason, but it was approved quickly so I didn't think anything of it.
  8. Hello @maximus Thanks for sharing! I will certainly give it a shot. Side note: the guys at LEGO "can get furious" when someone else uses their trademark in a way they consider inappropriate. As long as it is for something personal, that should be legally fine. I am not a lawyer, but letting us download your file in a forum post like this should be considered to be "for personal purposes". If you were to turn it into a "product" then that would be a different matter.
  9. I'm back, happy to present a module that makes square images. https://github.com/mxmsmnv/SquareImages I welcome any feedback.
  10. I hope that you all had a nice winter holiday (Christmas, etc.) or are still on holiday till the new year. Not a lot to report this week since I’ve been on holiday too, but we finally launched that site that’s been keeping me busy for the last few weeks, so I’ll hopefully be spending a lot more time in the core this coming week. I'll get the site posted to the sites directory once some more of the post-launch details are taken care of. One thing I learned in launching that site is that Markup File Regions work great during development, but not so great on a busy site (at least a site using Amazon’s EFS file system, which is very slow). I ran into all sorts of strange issues so ended up converting the file regions back to regular old static CSS and JS files, and then everything ran smoothly again. So as solid as the file regions are during development, they will need more work before I use or recommend them in production. That’s the way it goes with developing new stuff sometimes. There is however a pretty nice improvement to Markup Regions committed this week though. Prior there were some limitations as to what could populate what. Typically output before the <html> (i.e. from template files) populated into output that comes after the <html> (i.e. a _main.php file). But now it is possible for the population of content to go in either direction. Further, more nested elements can also populate less nested (or non-nested) elements. It’s a little hard to explain, but basically, you don’t have to think too much about when and where you can populate things as Markup Regions will figure it out in the final output. This makes it even easier to use and hopefully more foolproof than before. Thanks for reading and have a great weekend!
      • 17
      • Like
      • Thanks
  11. The problem with all paid modules kongondo used to sell is that there is no documentation. My (paid) copy of MediaManager never worked properly (the same is true for Padloper 2) and there is no support at all, so I really try to avoid anything that comes from him...
  12. Hi @teppo This module is wonderful. I wonder is it possible to change the data stored in the database? If possible, is there a hookable method I can use to edit the data? Thanks. Gideon
  13. Hello all! There's a new version of Fluency and a critical update announcement for all DeepL users. Fluency 2.2.0 has just been released and is a critical update for all users of Fluency that employ DeepL as their translation service. As mentioned above, DeepL is deprecating their previous method of API authentication on January 15, 2025. This means that all Fluency versions less than 2.2.0 that are using DeepL will no longer translate content. Upgrading from Fluency 1.8.0 or earlier requires a complete uninstall/reinstall. The module will have to be configured again, so note your API key if you don't have access to it otherwise. This will not result in any content loss. Fluency 2.2.0 also brings additional features and bugfixes. These include compatibility with AdminThemUikit v3 and its theming customization abilities. Fluency also now uses CSS custom properties so it is possible to customize it separately. This release also includes a fix for an issue that may affect saving content in RockPageBuilder fields mentioned earlier in this thread. For full notes on changes and improvements see the Github release page. If you have any trouble with the module please report them here, filing an issue on Github is helpful as well. Thank you all for your feedback and ongoing support. Additional thanks to the developers who have donated via PayPal, always appreciated!
  1. Load more activity
×
×
  • Create New...