strandoo

Members
  • Content Count

    51
  • Joined

  • Last visited

Community Reputation

15 Good

About strandoo

  • Rank
    Full Member
  • Birthday 09/19/1961

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

810 profile views
  1. strandoo

    @gebeer Wow. That was fast AND very helpful. I just changed 'Inputfield::render' to 'InputfieldSelect::render' as you suggested. I don't know why I didn't try that; I'll try harder next time! Cheers.
  2. strandoo

    Hi again. Great module; I'm using it again and wondered about this bit of code in your documentation: $this->addHookBefore('Inputfield::render', function(HookEvent $event) { if ($this->page->template->name === 'contact') { // adapt template name to compare with $inputfield = $event->object; $inputfield->addClass('col-sm-8'); $event->return = $inputfield; } }); This adds the 'col-sm-8' class to every field input. How can I just single out a specific type of input to add a class to? Specifically, a <select> input. (I need the class for some jquery stuff). Thanks in advance. P
  3. strandoo

    Maybe I'm missing something, but I've been using the following technique to darken my 'hero' images so I can put white text over the top: In my template, I have two fields, 'hero_image' and 'hero_overlay' (usually an integer if I'm dealing with alpha/opacity - or a text field if I want to specify rgba colour values). <?php $hero = "{$page->hero_images->first->width(1920)->url}"; //simplified; I usually do some responsive stuff here. $heroOpacity = $page->hero_overlay ? $page->hero_overlay : 0.3; // set a default opacity $heroOpacity = $heroOpacity * 0.1; //convert integer to a percentage. ?> <section class="hero" style="background: url('<?php echo $hero; ?>') 50% 50% no-repeat;background-size: cover;"> <div class="hero-overlay" style="background: rgba(0,0,0,<?php echo $heroOpacity; ?>)"></div> ... </section> Styles: .hero has a fixed height and .hero-overlay is absolutely positioned to fill the width and height of .hero. (I use 'first->' with my hero images because I like to try out different images and the ones I don't use can stay in the system in case I change my mind). The beauty of this system is that you can match the overlay opacity to the image to get the best fit between text legibility and hero image. I suppose you could reverse this and apply css opacity to whatever div holds the background image, thereby controlling the opacity of the image and letting a background color fill show through (as the ngrmm mentions in the o.p.) You can see this here: https://www.creationofnature.co.uk. Play with the opacity in the inspector. You can also expand this with 'rgba(x,x,x,x,)' instead of opacity to get coloured overlay effects.
  4. strandoo

    I’d like be able to show mine, but it is horribly out of date, so here’s one I did awhile ago for my (ahem, very talented) daughter: http://sarahstrandoo.com Also perhaps http://lynnmooredesign.com/ And although it’s not a portfolio, per se, this gallery goes into a bit more depth about their pieces and might provide some inspiration. http://ptfineart.co.uk/
  5. strandoo

    Ok, I'm revisiting this. I guess I need to echo the form when I use Ajax: if ($config->ajax) { echo $modules->get('SimpleContactForm')->render(); } else { Now the form works fine with one exception: when I submit the form with required fields empty, ajax works and I get the red 'Missing required field' text, but when I submit a second time (with or without entering data in a required field), the page submits without Ajax (i.e., it refreshes). I suspect it's a jquery thing; any suggestions? Here's the work-in-progress: http://bullocks-ley.strandoo.com/contact-us/. Thanks in advance.
  6. strandoo

    Hi all. Great module, Justb3a. It was easy to set up and get working, submitting to the same page without Ajax. Now I'm trying to do it with Ajax but something's not right: when I submit a blank form (expecting errors for required fields), the form disappears from the page without any notice (and without refreshing, so it's sort of working). Same if I submit the form with all the fields filled-in (I expect a Success message and no form, as without Ajax). I don't get any console errors. I've included the simplecontactform.js and initialised it per the instructions. My contact-page.php looks something like this: <?php if ($config->ajax) { $modules->get('SimpleContactForm')->render(); } else { include("./includes/head.inc"); ?> ... <div class="row row-2"> <div class="col"> <?php echo $page->body; ?> <div><!-- if I remove this div, the entire .col div disappears --> <?php echo $modules->get('SimpleContactForm')->render(); ?> </div> </div> ... <?php include("./includes/foot.inc"); } ?> Am I doing something wrong here? Any suggestions are greatly appreciated.
  7. strandoo

    Doh! I had, but not correctly, I guess. Once I echoed '$modules->get("MarkupGoogleRecaptcha")->getScript();', it worked. Thanks for your help. Now I need how the rest of it works. Cheers, Paul
  8. strandoo

    Hi @flydev My, that was quick! I did put this in my ready.php file, but don't see a captcha. Do I need to include your '$captcha = $modules->get("MarkupGoogleRecaptcha");' on the page? (I've tried it both ways). I've also tried this $f->markupText = 'Foobar'; (instead of your module) and 'Foobar' appears above the submit button, as expected.
  9. strandoo

    Hi @flydev. Great module. I'm using it on a custom form. I'd like to add it to an existing site where I've used Ryan's Form Template Processor module. (It's a long form; I'd rather not start from scratch). I've had a look at what you did with the log in form above; would I take a similar approach? Is there an easy way to slot the Captcha form in before the submit button (instead of outside the generated form)? I'm pretty new to hooks, if that's what's needed. Any suggestions appreciated.
  10. strandoo

    @kixe Thanks for the update. I'll check it out. @Can I'll pass for now, but thanks for the module.
  11. strandoo

    Hi. Nice module, seems to work pretty well. A few suggestions about configuring/customising. I like to keep my css files to a minimum, so I'd like to move the styles to my site css file (rather than inserting it after the first <link>). But when I untick the 'inject modules stylesheet?' option, it removes classes from the markup and hides the top/bottom, dark/light options. How about keeping these options available and just letting the user know that the css must then be manually added to a stylesheet? I've done modified my installation to do that and it works well. Also, when I've changed the class prefix in the config file, I had to still manually change one class: I changed Line 104 of the module.php file from $cookieConsentForm .= "<p class='mCCF__message'>"; to $cookieConsentForm .= "<p class='{$classPrefix}__message'>"; You may want to update that. Thanks again for the module.
  12. Update: a couple of days later, the problem returned. I contacted support for this account and after a bit of back and forth, I gave up. I took a look at the hosting Plesk cp and saw that mod_sec is turned off. The PHP version was 5.3 (I'm pretty sure I had it at 5.6) so I changed it back to 5.6. I'm basically back where I started. Maybe I'll move the account to my reseller hosting. Everything works fine there...
  13. So, as PWaddict predicted, turning off mod_security did the trick, but I couldn't do it with the htaccess rule. I tried that first, but it didn't do anything, so I disabled it in the Plesk control panel. (It's under 'Web Application Firewall..'; I've set it to 'detection only' rather than 'on' or 'off'. If anyone knows of a downside to this or if I can target something more directly, please let me know). But the video now appears as it should. Thanks all.
  14. Ah, I should have mentioned that. Since this is alive site, and that's an upcoming gig, I needed a workaround. I'm not using the module there, just a special field that inserts the YouTube URL in an iframe. I prefer the responsiveness of Ryan's module. @netcarver I've run into that problem in the past, so I've checked. All clean text. @PWaddict That sound promising. I've had problems with mod_security before. I'll try it out a bit later today. Last night I created a local version of the site and the videos loaded fine, leading me to think it's a hosting/php/config thing.
  15. @artaylor I've tried different URLs with similar results. I just tested the embed URL and that didn't work. And as @adrian pointed out, but short form does work (on the 'good' site). I checked other text formatters to make sure they didn't conflict. One thing I just thought of is that they are served from different hosting companies (StableHost vs HostingUK) so differing server configs could be in play...