Jump to content

BrendonKoz

Members
  • Posts

    420
  • Joined

  • Last visited

  • Days Won

    11

BrendonKoz last won the day on March 4

BrendonKoz had the most liked content!

1 Follower

About BrendonKoz

  • Birthday 12/12/1980

Profile Information

  • Gender
    Male
  • Location
    Saratoga Springs, NY, USA

Recent Profile Visitors

10,710 profile views

BrendonKoz's Achievements

Sr. Member

Sr. Member (5/6)

418

Reputation

  1. One benefit of using an AI while writing/debugging new and old code is that you could, at this point, ask it to create and maintain as-it-goes a separate unit test repo or folder that any modifications can test against, update, and compare the potential efficiency impact on all ongoing changes. This could then be applied to either agent-based code updates, or check-ins of user-created modifications. Since you already have the bot running against and alongside the repo, it might be worthwhile to see if that's something that could be built alongside to reduce cross-module errors. Maybe. 🙂
  2. The content owner of this video that I randomly chose from the YouTube homepage had marked this particular video content as not-embeddable, so the JSON response from the oembed provider of YouTube responded with "Unauthorized" which the Essence library doesn't really handle (it just returns nothingness, which in this case is kind of appropriate). Once I tracked that down, I tried another YouTube video URL and it worked as expected. 🤦
  3. Is anyone using this recently? I have had this installed as a "just in case" type of module, and when originally developing, it worked. In trying to audit my code for accessibility practices a little more thoroughly, this module is currently not working (and I unfortunately hadn't used it for any saved data embeds as of yet). I'm getting the error message of, "No oembed data or provider found," and no error logs seem to be generated in ProcessWire, and PHP deprecation notices for the essence library on the webserver logs (PHP 8.2). My test embed was a YouTube video as a simple check: https://www.youtube.com/watch?v=-cdrVNfngo0 Haven't yet tried to track down the issue, only just noticed and thought I'd ask other users first. 🙂
  4. ProcessWire can sometimes "steal" the reported errors from the webserver log. Did you check in the logs folder under "site/assets/logs/*"? There are errors.txt and exceptions.txt, and http404.txt. Maybe even file-compile.txt? If htaccess is not correctly rendering, the error logging might never be reached, but it should be quick to check this. Did you check the various htaccess files for any settings related to subdomains? Your site/config.php file sets the subdomain as the httpHost?
  5. This is great. I wonder if @ryan would be up to this being a PR for the core's image processing handling? Or at least basing some of it on an update to offer more modern options. I'd love to see more community modules get adopted into the core, though I also do understand the potential for technical debt that could have (especially here, as you seem to be using an external library for help with the image processing). This is a really insightful and feature-rich addition. (Someone else also had a srcset handling module, but the addition of LQIP and such is just really awesome.) Question: I see the format of your breakpoints and aspect ratios fields doesn't use any commas, but the field mentions that it's a comma-separated list. Is it actually newline separated, or is that just a formatting thing where your list entries are a list of one (ex: each line could be a list)?
  6. That's a pretty neat way to distinguish without hovering over the app icon for the window preview (or using WIN+TAB). For what it's worth, if you didn't want to install an application to un-group your applications in the taskbar, I think the Windows Settings app allows you to customize that. If I'm wrong, then it still exists via registry, and is accessible via Group Policy. Start -> Run: "gpedit.msc" User Configuration > Administrative Templates > Start Menu and Taskbar > "Prevent grouping of taskbar items" ... set to "Enabled".
  7. 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.)
      • 1
      • Like
  8. Good catch. Definitely an oversight in the template code itself. The old version does not wrap all elements in an anchor tag. Comparable example.
  9. Coming from my own redesign that used a very, very bright non-white background color (to lessen the burden of contrast on the eyes), I agree with this. As much as an off-white may be slightly more soothing to the eyes, it's very difficult to make it look fresh, or clean, because we associate pure white with that, for the most part. It can be done, but is far more difficult to accomplish from a design perspective. That said, it's still just a preferential bias. 🙂
  10. I suspect it has to do with the new $files->unzip class method(s) (assuming it's part of dev version 253): https://github.com/processwire/processwire/commit/3f15400643a8c8eecf39b59144d94553fb876bcd I'm not yet running that version, but for those that are, if you wanted to dig down into the rabbit hole to discover where some inconsistencies might lie within the code, I'd start there.
  11. @MarkE's module is masterful. I'm really, really glad he developed it. Even if I haven't (yet) used it, the benefit that it can provide in certain situations is immense. I'm glad that mentioning it helped out!
  12. Have you tried to re-add the module files, and recreate the table schema (hopefully the data wasn't necessary) to see if it would be enough to provide a state that removes the errors? The ini_set errors are likely showing simply because errors are being output to the browser prior to a header() call being made; standard issue when errors are displayed in PHP. Fixing the errors should fix the ini_set warning.
  13. Fix confirmed. Thank you!
  14. The FieldtypeMeasurement module might be another option (I haven't used it myself yet, but it appears to offer time conversion). It may need some massaging to allow the interface to behave the way you want, but I'd think it would assist you quite a bit. I saw in the module's README that it has second, minute, hour, day; I just don't know if it offers (out-of-the-box) microseconds. The combination input values might not default to the formatting you'd want to provide end-users. Honestly, I'd probably just use a text field and handle the calculations myself, unless they have strict database requirements or comparisons that you'd need to do in the future. Just in case this is useful for your project (referencing a now-fixed rounding issue with Float values in PW):
  15. Hi Robin! I haven't yet identified how/where this is occurring, other than that it is. In a repeater field utilizing a TinyMCE-enabled textarea field, the (I assume) JavaScript injected icon and tooltip seem to be rendered twice. I'm seeing this in both ProcessWire v3.0.246 and v3.0.256 on PHP v8.2 with module version 0.1.3. Not a big deal, just thought I'd report it.
×
×
  • Create New...