Jump to content

dab

Members
  • Posts

    149
  • Joined

  • Last visited

Everything posted by dab

  1. @psy, all resolved. Now working beautifully thank you @psy! Make sure, if you recreate your website entry on the PushAlert site you download a FRESH copy of the manifest.json & sw.js (oh dear, I thought I had!). The PushAlert support team were super fast & very friendly if you run in to any problems. Thank you PushAlert.
  2. @psy, many thanks, with the latest update, I can see alerts are now being sent from Processwire to pushalert.co! Thank you ??. My next step is to find out why push deliveries back to the subscribers are shown as "attempted" & not yet "delivered".
  3. Thanks @psy, all template files are 644 - not run in to permissions problems before. Not to worry re this one. With thanks.
  4. @psy, thanks for getting back. >field_PushAlert was not found ah yes, resolved when i used lowercase for the Pushalert field name on a later try (hope I didn't miss this instruction - sorry). >push_alert_endpoint.php template. Was this created? Yes, that was created OK. I'm thinking the lack of alerts might be PHP version related. I'll await any feedback from other users. Once again, huge thanks for all the work on the module - it's absolutely fab ?.
  5. @psy very excited to see this, thank you! I had a few problems, on install: /processwire/setup/field/edit?id=146 SQLSTATE[42S02]: Base table or view not found: 1146 Table mydominaname_processwire.field_PushAlert' doesn't exist (in /site/modules/PushAlert/PushAlert.module line 347) and on trying to uninstall: /processwire/module/edit?name=PushAlert&collap… Method WireFileTools::unlink does not exist or is not callable in this context (in /wire/core/Wire.php line 519) I couldn't get any notification sent on publishing a page with a FieldtypePushAlert field on it, but alerts work from the PushAlert website. Has anyone else tried & had any issues/got any pointers? I've checked modsecurity on the server & no errors & am running php 5.6.40. Thanks Nick.
  6. Sorry...this still wasn't working correctly, but this fixed it $thumb = $language->getUnformatted('flag_icon')->first; <?php foreach($languages as $language) { if(!$page->viewable($language)) continue; // is page viewable in this language? if($language->id == $user->language->id) { echo "<span class='currentlang'>"; } else { echo "<span>"; } $url = $page->localUrl($language); $hreflang = $homepage->getLanguageValue($language, 'name'); $thumb = $language->getUnformatted('flag_icon')->first; echo "<a hreflang='$hreflang' href='$url' title='$language->title'><img src='{$thumb->url}' alt='$language->title'/></a></span>"; } ?>
  7. Yes, an old post, but if you are having the same problems as @ChriWolf with the primary icon not showing when you swap to the 2nd language. It seem to fail when the field is called "language_icon", but works with the field called e.g. "flag_icon"...so omit the use of the word "language" for your image field name.
  8. @adrian thanks for the work on this! It's a super module that just got even better! Hope it's of use to others in its new multi-language support mode.
  9. Many thanks @Robin S, I was using the first option, initially as just the page id (obviously the request_id wasn't getting called, & then I tried "/login?return={id}" - but clearly the syntax was wrong. Thanks, I've spent hours going through the the forums & trying various combinations of code - I'm so grateful for your help.
  10. @Robin S, thanks kindly for your suggestion. I tried this, but instead, the logged in user get redirected to "home" on login instead of the requested page. The html output is <form action='./?id=1' What I don't understand is why the "get" $request_id is not working.... // get id var from request $requested_id = (int) $input->get->id; I'll see if I can find anything else on the forums.... With thanks.
  11. ..I did some more digging & identified that the chrome issue happens when I use: $content.="<form action='./' method='post'>"; rather than @Soma's code which was originally: $out = '<form action="./?id='.$requested_id.'" method="post">'; Note: I had to change some of the quotes on @Soma 's post to: $content.="<form action='./?id=".$requested_id."' method='post'>"; as the original gave a parse error with delayed strategy templates. but the resulting html output from my edit is: <form action='./?id=0' method='post'> So something is not quite right with the code, as the requested id is not being picked up from the code... if ($user->isLoggedin()) { $content.="You are already logged in."; } else { // get id var from request $requested_id = (int) $input->get->id; if ($input->post->user && $input->post->pass) { $user = $sanitizer->username($input->post->user); $pass = $input->post->pass; if ($session->login($user, $pass)) { // login successful $t = $pages->get($requested_id)->path; $session->redirect($t); } else { $content.="Login Failed. Please try again."; } } $content.="<form action='./?id=".$requested_id."' method='post'>"; $content.="<label for='name'>Usename:</label> <input type='text' name='user' id='name'/>"; $content.="<label for='password'>Password:</label> <input type='password' name='pass' id='password'/>"; $content.="<input type='submit' name='submit' value='Login' class='button fit special' />"; $content.="</form>"; } Not sure what to try next....
  12. I'm using @Soma 's nice code for a custom login & it's working great on IE, Edge & FF (thanks!) but on Chrome I just get a blank page after the login. After refreshing the page the password protected page loads OK. I've no plugins on Chrome blocking page reload etc. The pages has a template with access denied to guest, but set to allow access via a specific role/user with access. The template for the page is set to redirect the user to the login page when a user attempts to access. Not sure if this is significant, but the password protected page url stays the same when the the login page is presented to the user... Has anyone else come across this (Chrome issue)? Thanks
  13. 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.
  14. 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>
  15. 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...
  16. 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;
  17. Got it! So simple really $events = wire('page')->course_start_date_repeater;
  18. no problems, any ideas/input welcome
  19. @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>',"; } }
  20. 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.
  21. 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.
  22. @justb3a ......thanks this is even better - perfect!
  23. 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
  24. @justb3a Perfect! Resolved in this version. Many thanks.
  25. 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.
×
×
  • Create New...