dab

Members
  • Content count

    68
  • Joined

  • Last visited

Community Reputation

15 Good

About dab

  • Rank
    Full Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,114 profile views
  1. I've had this with several sites when trying to up from 3.0.62 to 3.0.90 - but I've still not resolved it. I suspect it is a languages issue, as the sites were setup using the multi-language template, but in the end the sites just used a single language. I also get a 404 when trying to edit some (but not all) of the pages via the admin login PW editor back end. NOW RESOLVED: If you have all the language modules installed, ready for a multi-linugual site & are not using them you will get 404 issues. I've converted fields to single language, removed all the language modules from the core tab & after upgrade no issues are seen.
  2. Found a fix for posts with multiple images... Replace // output video with: <a href="<?=$media['link']; ?>" class="instagram-item"> <picture> <source media="(min-width: 55rem)" srcset="<?=$media['images']['standard_resolution']['url']; ?>"> <source media="(min-width: 45rem)" srcset="<?=$media['images']['low_resolution']['url']; ?>"> <source srcset="<?=$media['images']['thumbnail']['url']; ?>"> <img src="<?=$media['images']['thumbnail']['url']; ?>" alt=""> </picture> </a> e.g. <div class="instagram"> <?php foreach ($feed as $media): ?> <?php if ($media['type'] === 'image'): ?> <a href="<?=$media['link']; ?>" class="instagram-item"> <picture> <source media="(min-width: 55rem)" srcset="<?=$media['images']['standard_resolution']['url']; ?>"> <source media="(min-width: 45rem)" srcset="<?=$media['images']['low_resolution']['url']; ?>"> <source srcset="<?=$media['images']['thumbnail']['url']; ?>"> <img src="<?=$media['images']['thumbnail']['url']; ?>" alt=""> </picture> </a> <?php else: ?> <a href="<?=$media['link']; ?>" class="instagram-item"> <picture> <source media="(min-width: 55rem)" srcset="<?=$media['images']['standard_resolution']['url']; ?>"> <source media="(min-width: 45rem)" srcset="<?=$media['images']['low_resolution']['url']; ?>"> <source srcset="<?=$media['images']['thumbnail']['url']; ?>"> <img src="<?=$media['images']['thumbnail']['url']; ?>" alt=""> </picture> </a> <?php endif; ?> <?php endforeach; ?> </div>
  3. Has any one noticed a problem with Instagram posts with multiple images not showing? I get the output: // output video suggesting that "multiple image" posts are not picked up as media type "image". <?php if ($media['type'] === 'image'): ?> With thanks...
  4. 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;
  5. Got it! So simple really $events = wire('page')->course_start_date_repeater;
  6. no problems, any ideas/input welcome
  7. @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>',"; } }
  8. 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.
  9. 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.
  10. @justb3a ......thanks this is even better - perfect!
  11. 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
  12. @justb3a Perfect! Resolved in this version. Many thanks.
  13. 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.
  14. 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');
  15. Best approach is to just make your template responsive. I've found this template very easy to implement: http://getskeleton.com/