Jump to content

strandoo

Members
  • Content Count

    106
  • Joined

  • Last visited

Community Reputation

34 Excellent

About strandoo

  • Rank
    Sr. Member
  • Birthday 09/19/1961

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,426 profile views
  1. My 2cents worth: I frequently add a credit line in the footer of my sites and like to provide a field in my settings to add links. To keep the rich text capabilities but strip out the paragraph tags so the content can be used inline, I use this function on the field: function stripParas($string) { $string = str_replace(array("<p>", "</p>"), "", $string); return $string; }
  2. @PWaddict Happy to help. SimpleContactForm and FlyDev's ReCaptcha did all the real work.
  3. @PWaddict Yes, I've got it working. I made a simple InputField that works with FlyDev's MarkupGoogleRecaptcha module so the reCaptcha can be added to the SimpleContactForm. Then, using the info on the SFC instructions page, I added the following hood to my ready.php file. I've attached the zip file of my field type if you want to take a look. I'm no expert, but I based it on another simple module. $this->addHookBefore('SimpleContactForm::processValidation', function(HookEvent $event) { $form = $event->arguments(0); $recaptcha = $form->get('recaptcha'); if (!$this->inpu
  4. @Zeka No problem, thanks for the suggestion. I'll have a look. 👍
  5. Hi @Zeka Thanks, but I probably haven't explained it correctly. The Category pages are not actual page trees (the products are already organised under as pages under the product type pages; I use sort=sort on those). The Category pages have no children and fetch their related content not as children but with a 'find' selector. The client wishes to reorder pages differently under Categories than their 'natural' order under Product Type.
  6. I've got an existing site where the client wants to add a custom sort order to his products when viewed on the Categories page. Categories are a Page field type and the products are already manually sorted by Product Type. And a product can appear in more than one category. If it were a 1-to-1 relationship, I'd just add an integer field to the product for a custom sort order field. But some products have 1 category, some have 4. Some categories apply to only a dozen or so product; some apply to 300 or 400. (He's supplied a spreadsheet to import). Even if I figure out how to sort these, w
  7. First, if you want to wrap the module render code in a div, don't use that class and id (and don't use 2 ids for the same element). Once the form is rendered, you'll see that there is already a div with that class that wraps the field you wish to hide. In the CSS, just target that class: .form__item--scf-website { display: none; }
  8. Thanks all. I ended up making a simple function that used used preg_replace and str_replace to strip the styles then nuke the empty spans and paragraphs. The imported html was pretty consistent, so it was pretty straightforward. But I like the idea of using $sanitizer, so I'll try both of those options to see how they work.
  9. Thanks, @kongondo . And thanks for the links, I’ll dig in and see what I find. 👍
  10. Hi all. I've built a module to create and update pages from an XML feed. It work nicely, except I'm having a problem with imported inline css styles. My Body field gets populated by a field in the XML that usually contains a load of inline CSS styles (like "<span style="font-style:normal;font-weight:normal;background-color:transparent;text-decoration:none;">). I've tried using $sanitize->purify() but that doesn't seem to do anything. Am I using it incorrectly? Is there another method to clean up this cruft from the HTML? Ideally, I'd just be left with <p>, <strong>, <b&
  11. Here's a follow up (see above): I've been able to partly update my existing registered users with the API. I've enabled tfa_type, but can't set their tfa_code_email. That means that when they first log in, they'll see a notice telling them to configure TFA by entering their email address and receiving a code. That's not horrible, but that means they may not set it up if they are lazy. I'd rather already have their email address set so they'll just receive the 'we've sent you a code...' message and do it. So any thoughts about pre-populating this tfa_code_email field (it's a module setting
  12. I've just been playing around with the TfaEmail module in conjunction with the LoginRegisterPro module. I've got a client who wants to upgrade their simple user registration/login system to use TFA (users request an account and if approved can access proprietary content and downloads). I thought the Email/SMS route would be the simplest and most familiar method. It works fine with just an email address (see below for SMS). The site already has about 60 registered users, all with valid email addresses. I'd like to be able to transparently upgrade all accounts to TFA, so I thought I could c
  13. Yeah, that's what I thought. While I was building the site, I hit the Stripe form page a lot (testing the layout, shopping cart, etc) then back again. I think I must have generated quite a few incomplete transactions! Once people start using the site, I don't think it will be a big problem. Maybe I'll just disable the intents during development in the future. But I'll probably look into a way to delete them via the API. I'll post my results if I get any. Thanks for the module.
  14. @benbyf Hi Ben. I've been trying out this module and modified the form for use with the Padloper shopping cart. (I was using a different Stripe module but I needed to upgrade to one that uses Intents). All is working well, but I've just realised that I've got a lot of 'incomplete' transactions listed in my Stripe Admin panel. I see the cancelIntent() function in the module, but I'm not sure when/how I should call this. Could I use this to get rid of my backlog of incomplete transaction? Sorry if I'm being thick, but I guess I don't quite understand the Stripe Intents concept. Thanks.
  15. @Robin S Thanks, that's perfect. I can't believe it was that simple; I was definitely over-thinking it, trying things like append and add. Many thanks. - P
×
×
  • Create New...