Jump to content

psy

Members
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by psy

  1. Did you try turning off formatting before changing the page field data? wire()->addHookAfter('Page(template=user)::saveReady', function($event) { $page = $event->arguments('page'); $page->of(false); $page->title = $page->last_name . " " . $page->first_name; $event->return = $page; });
  2. @heldercervantes Oops... shared your great blog post on FaceBook and concerned it may have gone viral
  3. @tpr Thank you for this great module. Note to self: When your site is doing something fabulous and you can't remember for the life of you how you did it, check AOS first
  4. I've used https://themeforest.net/item/canvas-the-multipurpose-html5-template/9228123?s_rank=1 for a number of sites and found it covers most of my front end requirements. It has a heap of page templates that are easy to convert to PW templates and individualise for client site looks.
  5. @horst thanks for that tip. Love that I learn something new about PW's inbuilt power everyday
  6. Should also add... if you decide to change the abcd page URL, you should also consider redirecting any backlinks pointing to the old URL to the new one. Module comes to mind but have no idea if it works with PW 2.3
  7. Don't be put off by what your competitors are doing. They can be wrong. Google gives lower ratings to pages that it sees as lower down the page tree... eg page abcd in the tree abcd.com.au/all/about/abcd would rate lower (probably 40%) than page all-about-abcd in url abcd.com.au/all-about-abcd (probably 80% as it's one page off the root) Google is also smart enough to recognise hyphens in URLs as spaces. The only suggestion I would make would be to rename the URL to abcd-is-about - that way abcd is up front Hope this helps
  8. @horst Google is Google... not %100 certain but strongly suspect G adds meta to jpgs it optimizes and so gives higher scores even if the original was fully optimized first. Even so, still regularly getting GSPI scores on mobile 75%+ and desktop 90%+ with PW, Procache etc and with careful coding so no errors on https://validator.w3.org/ . Can only do what I can do. I use the PW site results as comparisons to WordPress site performances to show my clients that PW is the way to go. For me, it's not about getting upset with G, it's more about proving how well PW performs
  9. Like you, I've tried lots of different compression techniques. Seems Google only likes its own compressed files. What I do to get the scores up... 1. Run the test then download the zip containing the compressed images generated by Google Page Speed Insights and expand the file 2. Upload the images to the assets/files/[page#] directory and overwrite the images generated by PW 3. Run GPSI again and your score will soar It's not a long-term answer but helpful in development.
  10. @szabesz yes but stranger things happen on the web! The original PDF's are 'print-ready' so not web optimised and Robin S didn't say how they were 'adapted' to responsive web docs. Just putting an idea out there as an alternative to developing and maintaining a separate app... can all be done within PW.
  11. Had a similar challenge, ie client needed access to PW generated documents when there was no internet access. My solution was to convert the PW pages to PDF and save them to a DropBox folder that synched with their mobile devices. There are many roads up the mountain
  12. Lovely site and unbelievably fast. How did you do that?
  13. Hey @heldercervantes Very nice. I want to go there! Chrome Developer inspector reported: The fontello css was missing on other pages too and guessing I didn't get to see the full beauty of the site due to the missing font?
  14. psy

    Beautiful Human Way

    @rick Thanks for the tip. Done
  15. Hi @maxf5 See the kink in the border on larger screens more as a quirk than a bug . Have used the same technique on sites including my own. Kinda like it.
  16. Client suddenly realised she needed a website in order to hand out her new business cards which had the website URL & email address, less than 2 weeks before her TED talk. Was given 1x logo, 1x photo, 1x phone screenshot of a paragraph of text and told she'd like to see the 'wings flying'. TED talk event 2 Nov 2017: https://www.ted.com/tedx/events/23988 End result landing page: https://beautifulhumanway.com/ Hopefully site will grow to show more of this amazing woman and her achievements Using PW 3.0.79 with delayed output and regions Modules (many thanks to @ryan and his pro modules): Profields: Functional fields Profields: Repeater Matrix ProCache FormBuilder MarkupSEO MarkupJson-LDSchema MarkupSimpleNavigation MarkupSrcSet EmailObfuscator and for a short time during development, PageProtector
  17. Thanks @Robin S. too early in the morning. Realised I'd misread the requirement and edited my post.
  18. Thank you @ryan for pointing me in the right direction. Problem solved. FormBuilder was a red herring, all good there. The cryptic debug message was key to finding the cause. I refer to the home page throughout the site and normally add $homePage = $pages->get('/'); in the _init.php file. Tried to be too clever and tweak page load speed by reducing the number of database calls so put the following below the LoginRegister code: // shortcut to home page saved in session $homePage = $session->get('home-page'); // Fairly certain this is the culprit! if (!$homePage) { $homePage = $pages->get('/'); $session->set('home-page', $homePage); } While the above works for $cache, it doesn't for $session, or even replacing $session with $_SESSION and using array_key_exists('home-page', $_SESSION), etc. Reverted to $homePage = $pages->get('/'); for every page and Login/Register working perfectly.
  19. @wbmnfktr Wow! Thank you again. I'm still having problems. My forms are embedded via the API. Back to the drawing board
  20. Managed to get Login/Register working on a clean install with no FormBuilder with a few minor tweaks to the code: Firstly, to be on the safe side, I changed $page->url to $page->httpUrl. Secondly, on occasion my frontend page named 'login' got confused with the admin page named 'login' so specified exactly where to redirect. if(!$user->isLoggedin() && $page->id!=1193) { // not for login page $session->set('returnPage', $page->httpUrl); $session->redirect($pages->get(1193)->url); } Still having issues with SessionCSRF with LoginRegister + FormBuilder. Will post in the FB forum. Thanks
  21. @wbmnfktr thanks for recreating the scenario - epic and also for the feedback. Still more weirdness on my site and I have a horrible feeling the conflicting session-related module may be FormBuilder even though at one point, I removed all FB forms from the login page (there was one in the footer) and turned off SessionCSRF on all FB forms. Will keep working on it. Any other help/suggestions in the meantime most welcome
  22. Having problems with the new Login/Register module and hoping someone can help. Desired result: Guest lands on site (or later specific page) and is redirected to the Login page. The user’s landing page is saved to a session and once logged-in, is redirected back to the original landing page What’s happening: Guest lands on any page on the site and is redirected to the Login page Guest enters credentials, hits submit, then sometimes a variety of error messages get written to the logs including sessionCSRF and MYSQL errors. Guest user is presented with the Internal Server Error. Regardless, guest is not logged in Scenario: Using PW 3.0.76 and PHP 5.6 User account created manually in admin with login-register privilege User is my old mate: Username: fred Email: fred@flintstone.com Password: 1234test. Site is configured to use delayed output with Regions & Functions API In _init.php I have: <?php namespace ProcessWire; if(!$user->isLoggedin() && $page->id!=1193) { // not for login page $session->set('returnPage', $page->url); $session->redirect('/login/'); die; } In login.php template: <?php namespace ProcessWire; if($user->isLoggedin() && !$input->get('profile') && !$input->get('logout')) { // login and go back to the previous page or go to the home page $goToUrl = $session->returnPage ? $session->returnPage : '/'; $session->redirect($goToUrl); } else { // let the LoginRegister module have control $content = $modules->get('LoginRegister')->execute(); } ?> <div id="regContent"> <div class="content-wrap"> <div class="container clearfix"> <region id="regPostContent"> <!-- Post Content ============================================= --> <div class="postcontent nobottommargin clearfix col_three_fourth"> <?=$content?> </div><!-- .postcontent end --> </region><!--#regPostContent--> </div> </div> </div><!-- #content end --> What am I doing wrong? Why can’t Fred login? Any help to resolve much appreciated. TIA Psy PS: Tried to use TracyDebugger to see what was happening but got js errors. Just not my day. Uninstalled TD and no errors
  23. Hi @abmcr Try: foreach($page->images->shuffle() as $image) { echo "<img src='$image->url'>"; }
  24. Thanks for this module @DaveP It's so easy to use and saved me heaps of time copy/pasting from lipsum.com
×
×
  • Create New...