Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/09/2020 in all areas

  1. Last week I told you guys about how I was working on development of a client’s site and deep diving into the details. Well this week was the same, except perhaps more so. Yesterday we finally launched phase one. There’s still more to do, and still working out some small bugs and such. This is a site I’ve been developing since back in the early versions of ProcessWire 2.x, which I think was nearly a decade ago. In fact, this was one of the first sites running ProcessWire 2.x, if I recall correctly. We’ve been keeping it up-to-date over the years, but this is the first time we’ve done a full front-end redo of the site, essentially starting from scratch on that, and spending a few months on it. But the admin side (fields, templates and page structure) remains roughly the same from where it was 10 years ago, and that’s what we’re going to redo in phase 2 (this year). There’s a lot of fields in this site, so I’m looking forward to really simplifying it with ProFields, repeaters and more — none of these existed when the original site was built. One thing really great about this iteration of the site is that it’s a ProcessWire community collaboration. Pete (our awesome forum administrator) did the design, as well as most of the front-end markup/css for the site. Jan (our awesome system administrator) setup the servers that it runs on, with AWS load balancer setup and everything related to that (he’s also one of the owners of the site). I did the other development stuff (the ProcessWire API side of things), making all the content fill all the markup in the right places, structure and organization, markup regions, search engines, optimization, etc., basically the stuff needed to get it all working in PW. This is the first time that I’ve developed a site where we can run new and old site side-by-side off the same ProcessWire installation. During development, the client could click a checkbox in their user profile and then they’d be using the new site. Behind the scenes, it does this using a fairly new feature in ProcessWire which is: $config->setLocation(‘templates’, ‘site/tpl’); So we had site/tpl/ having the new site templates, while site/templates/ had the old version. So one limitation for this phase 1 is that the old and new sites had to deliver the same exact content, even if the resulting output was very different. This site also uses custom page classes (another new feature), Markup Regions, and ProcessWire’s Functions API, and the Uikit 3 front-end framework. Pete also wrote a nice custom PW module for this site to handle localized weather forecasts — I ran out of time to get it in place yesterday, but that should be there next week hopefully. Yesterday we launched the site and we were finally able to start running it through its paces with live traffic. I thought I was going to be working on the PW core today, but you know that as soon as you launch a new site you always find things that need adjustment and can’t wait, so that was all of today. There’s more optimization work to do, and then there’s phase 2, where we start using ProFields and Repeaters to better isolate a lot of data and be able to implement the rest of Pete’s design in the parts that we weren’t able to in phase 1. This is where things like the current pricing tables (one example of a weak point) start to look really sharp. But I’m also looking forward to taking a little breather and catch up on some serious PW core work, issue reports and module updates over the next few weeks before diving into phase 2 of this site. I didn’t want to share the site quite yet because there’s still some details to take care of and such. But here it is Friday and I’ve got no other ProcessWire news to report, so was feeling a little guilty that I didn’t get more ProcessWire core work done over the last week, due to being focused on developing this site. But this was one of the first sites running ProcessWire, so it's an important one to me. And here it is about 10 years later, still the same installation (templates, fields, page tree) but with a brand new design and running the latest PW, and lots more to come. Tripsite.com
    7 points
  2. Beluga, I'm not much into carousels either, but also wouldn't claim there's no place for them. There's 1 small carousel on this entire site, and there was also one on the previous iteration of the site—the client has always liked it, and the customers react well to it. I really like this client for a lot of reasons, but one is that they are much more involved than most, know their technology, their product and their audience better than anyone I've worked with. The carousel is not my idea, but I trust and am certain the client knows their customers better than any self proclaimed experts online. I got a kick out of that linked anti-carousel site because it's a bit of a self own by whoever made it—it uses a carousel to make points that we likely would not have bothered to read if they weren't in a carousel. ?
    6 points
  3. Thanks Ryan - I can't claim all credit on the design by a long shot as there's still a tonne of bits you had to figure out on the complex results filtering, plus whilst we're working with older content in new templates I still want to tweak some of the templates around the site. There's some seriously impressive regexp going on behind the scenes by the way everyone - the old tour pages had maybe 3 or 4 tabs and the new ones have more but it's mostly all in one CKEditor field so Ryan had to do some magic pulling the right bits out and even displaying icons next to some parts of it. Will be much saner to manage all that after the fields get an overhaul in phase 2. Carousels - there's a bit of variation in how they were implemented. Some have dotnav (which isn't the clearest), we're probably going to implement arrows overlaid either side on some of them where it makes sense during phase 2 (customer request I've not got around to yet), but if you don't autoplay who's going to bother to look for the play button? ? I don't think ANY of the information in the carousels is essential so in this case doesn't matter so much, but given the audience is looking for trips and will be drawn in by the nice pics carousels work well for this site. Plus it's somewhat consistent with the old site and also what the customer wants as has been said. I don't really want to be drawn into an argument about carousels (too late) but I think they're perfectly fine in some scenarios.
    5 points
  4. I think the carousel implementation is perfectly done. Well designed, and perfect auto scroll speed. As for the whole site, great job people. As for the link you provided @Beluga, I would respectfully disagree. Running 100s of sites, especially ecommerce, carousels contribute to a massive spike in product sales. Dont read what works for others, implement what works for you.
    3 points
  5. That, for example, may not work for people who don't like much reading. Can be that those people just don't see or get what you want them to, also if you explicitly have done it for that reason. I think it depends a lot, or only, on the use case, the target audience and its implementation, ( and sometimes maybe plus what your customer want to have ) ? Haha, yep. Now its one of my favorites, I never would have read all quotes when they where listed top down. But with the carousel, I was curious about every next quote. @ryan Very well done redesign. I know this site for some time now and have a feeling that your customers do know their target audience very well, and do and like to do their own jobs in more depth than many people may do. Seems to me that this is one of their essentiell points. - I am a bit envious of the way you work together and would like to work with (more) such clients too. But they really seem to be very rare. ? Ah, and I sometimes like carousels.
    2 points
  6. @Greg Lumley, you took every single word out of my mouth... Happy coding, Bro!
    2 points
  7. Same feeling I had when I found PW around Christmas-time a year and a half ago. It still feels like wrapping up Christmas gifts, every time I find a new useful module (though the modules directory is a bit messy ?).
    2 points
  8. I've only recently stumbled across Processwire. Thanks to ADHD and avoiding doing other work. I'm blown away at the power of Processwire. Ryan and all those who've built modules have done an incredible job of making a system that is fully customizable with incredible dev speed. Wordpress has so much bloat, it isn't very user friendly when all you want to do is quick a blog post or change. In fact unless you're a geek, It's actually quite daunting. Hell I'm still daunted by it all the time. I've never got my head around the interface layout and placement of menus and settings. On top of that, most plugins are trying to cater for anyone everyone and they have more junk to 'impress' than anything else. I love that I can just build my own functionality with PW easily or find a way to do it. What I'm particularly excited about is the end clients point of view. I could show a client in 5 minutes what they need to do to maintain their site. Changing look and theme as looks and trends move on would also be a cinch because no mark-up data is stored within the fields, unlike all the WP editor themes out there. Change templates, new site and look. All legacy data looks as good. So thank you to Ryan and the community for Processwire. I've only recently restarted developing after 15 years and frankly really didn't want to but PW has excited about web development again. I'm not one for blowing air up peoples arses but when something excites me, it excites me. ? Now I have to decide on whether I'm going to import my existing website's data or start an entirely new one ? G
    1 point
  9. @EyeDentify I think @JeevanisM was referring to this:
    1 point
  10. @ryan, I know it's an ancient thread, but I'm slowly finishing my first public/client site with PW and this "sort=-sticky" trick has just blown my mind... ? I've got few crossing loops with different layouts and was trying to implement some kind of clever sticky mechanism onto all my find/sort structures. I was almost there with checkbox conditions but decided to look around here for a little help. Found this thread, adjusted and put your suggestion into my project and... started to dance and scream. ? PW is PHENOMENAL! I'm learning PW API for few weeks intensively and I'm more and more thrilled. Thank You and all Devs so much for this wonderful CMF/CME!
    1 point
  11. Maybe @dotnetic can elaborate why this is a bad practice?
    1 point
  12. Summary: When you start a new site and the default not should be english: 1) enable languages support 2) set Title / Label of the default language to your desired none english native language, (e.g. 'Deutsch' (German)) 3) drop in the none english language pack (for admin backend) into the default language, (e.g. german langpack) Now you are ready to start with a single language site of your choice. If you want to use a multi language site, you now can add as many additional languages you want. If one of them should be english, you add it, but do not need to apply a language pack. 4) add a new language to it and drop in a language pack for any none english language or simply don't drop in a language pack to get the english version (but not as the default one!) For single language sites you only need to enable languages support, NOT language inputfields!, NOT language pagenames!, only basic language support, - to be able to change the default languages name and its lang pack! Of course, if you plan a multilanguage site, you also will need language pagenames and language inputfields, but not if you only need a none english backend. ? So, if you know at the beginning of a new site / project what has to be the default language, it is done with a snip. Only disadvantage is, if you need to switch the default language later on, when already content was filled into a site. These seems to be very rare cases in real life. And for that I think have read a complete step by step guide from @BitPoet within the last two or three month somewhere. (Is this right @BitPoet ? and sorry for ping you here) You also can read it here:
    1 point
  13. Something like this should get you going. This is stolen from a recent import I did which worked well. This assumes you have a field called "images" that you want the images uploaded to. I have also done more complex versions of this when the source HTML image tags have width and height tags - you can use those to resize the images using the PW API and embed that version back into the HTML. $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); foreach($dom->getElementsByTagName('img') as $img) { // grab image from the external URL and add to images field try { $np->images->add('http://olddomain.com/' . $img->getAttribute('src')); if($img->getAttribute('alt') != '') { $np->images->last()->description = $img->getAttribute('alt'); } $img->setAttribute('src', $np->images->last()->url()); } catch(\Exception $e) { // in case remote image can't be downloaded } } return preg_replace('/^<!DOCTYPE.+?>/', '', str_replace( array('<html>', '</html>', '<body>', '</body>', '<p>&amp;n<p>', '<p><p>', '</p></p>'), array('', '', '', '', '<p>', '<p>', '</p>'), $dom->saveHTML()));
    1 point
  14. Had the same feeling after 10 years work with TYPO3.
    1 point
  15. Welcome to the forum @Greg Lumley! Another great aspect of Processwire vs any other is this forum itself. You have access to many great developers that have been using PW for many years and their depth of knowledge will benefit you with whatever you want to create. So jump right in with any questions!
    1 point
  16. Displays image tags overlaid on the thumbnail using customisable colours. This makes it easier to see which images have which tags without needing to open the edit pane for individual images or changing to the list view. Screenshot Usage Enable tags for one or more image fields. Install the Image Thumbnail Tags module. Optionally configure colours for any of your tags. https://github.com/Toutouwai/ImageThumbnailTags https://modules.processwire.com/modules/image-thumbnail-tags/
    1 point
  17. [Litte OT] @Wanze Out of curiosity, has something changed in your development arsenal? ?
    1 point
  18. Just as a heads up if someone needs database testing: I am trying a different approach at the moment: I simply added a database configuration to the config.php which is used if PW is called from PHPUnit. in config.php if(isset($_ENV['UNITTEST']) && $_ENV['UNITTEST'] == true) { $config->dbHost = 'localhost'; $config->dbName = 'db-test'; $config->dbUser = '...'; $config->dbPass = '...'; $config->dbPort = '3306'; $config->httpHosts = array('localhost'); } and my PHPUnit configuration.xml looks like this <phpunit ... some settings here ... > <php> <env name="UNITTEST" value="true" /> </php> </phpunit> maybe this will save someone a headache in the future
    1 point
  19. You can get the timestamp of the date when accessing the unformatted field data like so: $ts = $page->getUnformatted("datefield"); $day = date("d", $ts); $monthYear = date("F Y", $ts);
    1 point
  20. The function seems a little overkill, but why not. After all to get the grandchildren you only need something like $grandchildren = $pages->find("parent=$page->children, sort=-modified, limit=20"); That's already a function right there. One can of course wrap it into a function and play around with it.
    1 point
×
×
  • Create New...