Jump to content

Peter Knight

Members
  • Posts

    1,384
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Peter Knight

  1. I was having some issues logging into a site with PageProtector turned on using Chrome on Android. My users would hit login and either nothing would happen. occasionally, a 500 error would be displayed. In the end, I transpired that a setting called 'Data Saver' was enabled. Once you disable this, my logins worked. Alternatively, you can run your site over HTTPS to bypass this. I've yet to try it but if you're logging into sites etc then HTTPs should be the default anyway ?
  2. After trying various sort and reverse options, I saw you post, tried again and it's perfect now ? $does2 = $page->prevAll("template=a-practice-area")->reverse(); foreach($does2 as $do2)
  3. Actually I spoke too soon. Combining the two gives me 5,6,7(and then) 4,3,2,1 What I'd like to do is 5,6,7,1,2,3,4
  4. It doubles up on my code but certainly works. Thanks ?
  5. You're right - thank you. So I adapted my code to use page instead of pages and this modfied version works $items = $page->nextAll('template=a-practice-area'); foreach($items as $item) { echo " IE if you were on page 4, the output is5,6,7 Is there a method to restart the array after it reaches the end so that the output is 5,6,7,1,2,3,4
  6. Thanks for this. It looks promising but seems to apply to page instead of pages. Is there a pages equivalent?
  7. I have a selector which is pretty simple and just fetches a series of pages except for the current page. 1,2,3,4,5,6,7 When you're on page 1, the output is 2,3,4,5,6,7 When you're on page 2, the output is 1,3,4,5,6,7 $services=$pages->find("template=a-practice-area, id!=$page, sort=sort "); foreach($services as $service) { echo " <div>... Currently, the array (is that what it's called? starts from the first item (service) in the tree and continues. I'd now like to start the array from the next item in the array instead always starting at the first. IE if you were on page 2, the output is 3,4,5,6 IE if you were on page 4, the output is 5,6,7 Looking at the docs, a selector called 'start' is mentioned. I think this is what I need and have tried the following to no avail <?php $services=$pages->find("template=a-practice-area, id!=$page, sort=sort, start=$page"); Any tips?
  8. I have some width and height restrictions on my images field so the image gets uploaded and resized. In this case I'd assume anything specified in the gets applied. But i'm only guessing.
  9. Is there a way to make JPGs progressive by default via the API? I've added the following to my site/config.php file but user-uploaded images are often displayed as non progressive. $config->imageSizerOptions = array( 'upscaling' => true, // upscale if necessary to reach target size? 'cropping' => true, // crop if necessary to reach target size? 'autoRotation' => true, // automatically correct orientation? 'interlace' => true, // use interlaced JPEGs by default? (recommended) 'sharpening' => 'soft', // sharpening: none | soft | medium | strong 'quality' => 95, // quality: 1-100 where higher is better but bigger 'hidpiQuality' => 60, // Same as above quality setting, but specific to hidpi images 'defaultGamma' => 0.5, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) ); Thanks
  10. Lovely work as usual. Well done.
  11. If you want to limit the amount of posts listed on a page, just use the 'limit=X' API call in your selector. I think the docs are a little broken at the moment as a new site has just been launched but there should be plenty of examples available. How are you handling categories? Can you screengrab your tree structure ?
  12. Does anyone know if all the old URLs that Google had indexed have been updated to the new URLs? If not, there'll be a pretty big dive in SEO rankings. As an example, I was searching for some API info and was brought to this page https://www.google.com/search?q=processwire+selector+limit&amp;rlz=1C5CHFA_enIE731IE731&amp;oq=processwire+selector+limit&amp;aqs=chrome..69i57j0.6332j1j7&amp;sourceid=chrome&amp;ie=UTF-8 If you click on the search result, you'll be taken to a 404 page etc.
  13. A necessary evil ? I'm fully locked in
  14. The only issue I've ever had with Transmit is with regards to folder syncing. They may have solved it now but at the time they didn't think it was a bug. Basically on Dreamweaver, I can upload a single file that's several directories deep and DW will auto-create the necessary parent folder. On Transmit, this wasn't (or didn't used to be) the case and I had a scary moment where a few PHP files landed where they shouldn't. Transmit also used to have a super IOS app which they are shelving. My favourite FTP application ever was actually an app called Fetch back in early 90's. When a file transfer was in progress, there was a cute dog animation ?
  15. Transmit by Panic is also good.
  16. Good excuse to use Jumplinks here ?
  17. I think the site is a huge step forward. Nice work ? IMHO it should go live ASAP and changes and bug fixes could be streamed in incrementally My main points would be: Text It seems 'wordier' that the current site. On almost every page I'm hit with a wall of text. We should have more screenshots on internal pages. Screenshots I think we've lost something with the wall of text and more emphasis should be put on the screenshots. I think you should loose the iMac mockup and replace with a simple collection of 10 or so screenshots which a user can cycle through. None of my clients has ever tried PW based on a description of the CMS. In contrast, almost every one has been an instant fan of the simplicity of the UI. I've had clients who were new to PW fire up the initial tree view and become instant fans. I think the essential simplicity of ProcessWire has been lost in an effort to describe ProcessWire. Pictures and 1,000 words and all that etc... Video One of the things that attracted me to PW was Ryan's video where he spoke about the CMS and what it means / stands for. It was sincere, clear and honest without hyperbole. I just rewatched it and it's still a very compelling piece of video and 100% of what is said is still relevant. Of course the screengrabs are out-dated but that didn't stop me exploring PW and diving in at the time. Is it worth including this and later on re-doing it? Edit: I found the video on the new site ? API examples This is subjective but I'd rather the API samples were a little more user-friendly in tone and presentation. An example I like is on Stripe.com https://stripe.com/ie If you scroll down the the section 'Developers First' they have a lighter background and a nice way to flick between the different methods Zooming text That's the only part I'd 100% change. It's too gimmicky for my tastes. But seriously - good work. ?
  18. Hi Mike Must be an out-dated version of Jumplinks (1.5.48) The Examples link goes here: https://rockett.pw/jumplinks/examples
  19. Hi Mike When creating a jumplink, there's a link to your site for examples. Currently generating a 404 error
  20. Correct. I am using echo $photo_header->srcsetUrls['smallest']; If I use echo $photo_header->srcsetUrls; there is an error but it only shows up in the network tab. The images seem to still work but they could be cached versions.
  21. That's it. Removing the [0] at the end worked. Many thanks ?
  22. Yep - I think it's all good. <div data-sizes="auto" data-bgset="/site/assets/files/1089/adams-cubes.-crop-staff-photo.1200x550.jpg 1200w, /site/assets/files/1089/adams-cubes.-crop-staff-photo.800x366.jpg 800w, /site/assets/files/1089/adams-cubes.-crop-staff-photo.600x275.jpg 600w, /site/assets/files/1089/adams-cubes.-crop-staff-photo.400x183.jpg 400w" class="uk-width-uk-width-1-1 staff-pic uk-first-column lazyloaded" style="background-image:url('/site/assets/files/1089/adams-cubes.-crop-staff-photo.1200x550.jpg') ;"> Have cleared the cache, refreshed from small size and expanded that way.
  23. I've been using LazySizes manually for a while and wanted to try your Module. Can I check that the following is setup correctly? I'm applyng this is a background image which is new to me. First of all, I have been setting a variable of photo_header which uses a named, cropped image of 1250x550 <?php $photo_header = $page->image_staff_header->getCrop('crop-staff-photo'); ?> My actual html which outputs this image looks like this (pre MarkupSrcSet) <div class="uk-width-uk-width-1-1 staff-pic" style="background-image:url(<?= $photo_header->url?>);"> When I apply my MarkupSrc set, I think this is the proper way <div data-bgset="<?php echo $photo_header->srcset('1200x550,/1.5,/2,/3'); ?>" data-sizes="auto" class="lazyload uk-width-uk-width-1-1 staff-pic" style="background-image:url(<?php echo $photo_header->srcsetUrls[0]; ?>);" > and it does produce the following... <div data-bgset="/site/assets/files/1089/adams_-_cubes-1.-crop-staff-photo.1200x550.jpg 1200w, /site/assets/files/1089/adams_-_cubes-1.-crop-staff-photo.800x366.jpg 800w, /site/assets/files/1089/adams_-_cubes-1.-crop-staff-photo.600x275.jpg 600w, /site/assets/files/1089/adams_-_cubes-1.-crop-staff-photo.400x183.jpg 400w" class="uk-width-uk-width-1-1 staff-pic uk-first-column" style="background-image:url(/site/assets/files/1089/adams_-_cubes-1.-crop-staff-photo.1200x550.jpg);" > However, I notice that when I inspect the Div above in Chrome, I always seem to have the same image regardless of device width element.style { background-image: url(/site/assets/files/1089/adams_-_cubes-1.-crop-staff-photo.1200x550.jpg); } Is this right? Surely I should be seeing different image sizes above? Cheers @tpr
  24. Hi all Just wanted to wish everyone who celebrates it a very Merry Christmas. Thanks to everyone on the forums for all the time and support over the year and all the answers, help and general banter. 2019 is hopefully going to be like 2018. Lots of learning, lots of Processwire, lots of great new Processwire developments. Anyway - have a good one ? P
  25. That's pretty cool. And new to me too. I'll try that tomorrow and file under 'new stuff'. In the meantime, Robin's observation had me back on track.
×
×
  • Create New...