• Content count

  • Joined

  • Last visited

Community Reputation

13 Good

About dab

  • Rank
    Full Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,047 profile views
  1. Make sure in your CSS you set the width to 100% & specify the height in px. I use: width: 100%; height: 600px; position: relative; overflow: hidden;
  2. Got it! So simple really $events = wire('page')->course_start_date_repeater;
  3. no problems, any ideas/input welcome
  4. @louisstephens Thanks.... It's got to be called via a hook, rather than a regular call from a page function getEvents() { $events = wire('pages')->get("/courses/hill-skills/")->course_start_date_repeater; foreach ($events as $event) { echo "'$event->course_start_date' : '<span>BOOK BELOW!</span>',"; echo "'$event->course_finish_date' : '<span>PICK THE START DATE!</span>',"; } }
  5. I'm using the "wire ('pages')->get" hook for an event calendar. The wire hook below is "hard coded" & works fine $events = wire('pages')->get("/courses/skills/")->date_repeater; But I want to get the repeater for the current page (being viewed) I've tried lots of ways of replacing the "->get" to get the repeater from the current page, but no luck. I've tried $currentpage = $page>path; & replacing the get("/courses/-skills/") with $currentpage but no joy.... Any hints would be a huge help.
  6. Have you tried this this? Might be of use? I've got it working using a repeater for the dates (but only 2 day courses start/end) if you need help.
  7. @justb3a ......thanks this is even better - perfect!
  8. For some sites the "spam message" might not be approprate So I changed line 215 in SimpleContactForm.module to $this->_("Sorry, but your message didn't pass our %s test. Please try another %s."), and change lines 155 (& the following) & 172 (& the following) in \lib\SpamProtection.php to $this->_('spam'), and $this->_('time'), So the message will read " Sorry, but your message didn't pass our spam test. Please try another time. " Thanks again @justb3a
  9. @justb3a Perfect! Resolved in this version. Many thanks.
  10. justb3a, thanks for such a lovely script! This works perfectly with SimpleContactForm 1.0.0 on Processwire 3.0.42 <?php $scf = $modules->get('SimpleContactForm'); $options = array( 'btnClass' => 'button fit big', 'btnText' => 'SEND MESSAGE!', 'successMessage' => 'Message Sent!', 'errorMessage' => 'Sorry - message send error!' ); echo $scf->render($options); ?> But if you just use this (without specifiying the successmessage) e.g. <?php $scf = $modules->get('SimpleContactForm'); $options = array( 'btnClass' => 'button fit big', 'btnText' => 'SEND MESSAGE!' ); echo $scf->render($options); ?> The form processes (send) correctly, but the form output on the web page after sending is shown as: <p class='form--success--message'>SEND MESSAGE!</p> Showing the 'btnText', rather than the correct 'default success message'. Have I missed someting obvious? I've posted just incase anyone else is having the same issues.
  11. All possible.....for the maps you can select what items you show on your map based on any field (for your specific turtle page): $items = $pages->find("marker_colour=red"); My code here: // LEAFLET MAP WITH BICYCLE ICONS $items = $pages->find("marker_icon=bicycle"); $map = wire('modules')->get('MarkupLeafletMap'); $options = array( 'markerFormatter' => function($page, $marker_options) { if ($page->marker_icon->title) { $marker_options['icon'] = $page->marker_icon->title; } if ($page->marker_colour->title) { $marker_options['markerColor'] = $page->marker_colour->title; } // And the icon colour. This is another text field. Colour values like White, Black or an RGB value are ok here. if ($page->marker_icon_colour->title) { $marker_options['iconColor'] = $page->marker_icon_colour->title; } return $marker_options; }, 'popupFormatter' => function($page) { $out[] = "<strong>$page->summary</strong>"; $out[] = "<a href=\"$page->url\" ><img src=\"{$page->summary_image->url}\" class=\"image fit\" /></a>"; $out[] = "<img src=\"{$page->summary_image->url}\" width=\"200\" height=\"200\" />"; // ** NB: Use escaped double quotes if HTML attributes needed ** return implode('<br/>', $out); } ); and for items from different categories (species for your big map): $items = $pages->find("marker_colour=red|green|blue"); Remember you can use: 'red', 'darkred', 'orange', 'green', 'darkgreen', 'blue', 'purple', 'darkpuple' & 'cadetblue' and any icons from your version of Awesome icons: http://fontawesome.io/icons/ Beneath each map you can summarise revevant posts for each region or each species with the page find function based on an "options field type": $features = $pages->find('species=loggerhead');
  12. Best approach is to just make your template responsive. I've found this template very easy to implement: http://getskeleton.com/
  13. Yes, change lines 165 & 166 in MarkupLoadRSS.module to to 'stripTags' => false, // Strip any markup tags that appear in the feed? (default: true) 'encodeEntities' => false, // Whether to automatically decode and re-encode the entities for all fields (default: true) Works a treat !
  14. @netcarver A fantastic job, very quickly completed. Nice work !
  15. Sorted - I've now got netcarver woking on this