Jump to content

heldercervantes

Members
  • Posts

    389
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by heldercervantes

  1. Maybe invert the IFs and put the errors on top. I mean: ... if (!$v->validate()) { $session->flashMessage = 'Recaptcha must be complete.'; } else { ... } ... This may make it more readable. Also some comments along the way can't hurt. In terms of performance, 4 nested ifs start to sound like too much, but in this case I wouldn't worry about it because it's a form submit. If it was something that triggered every time a page was loaded, maybe I'd look into ensuring the best performance possible, but I don't think this would justify 2 extra hours of your time. Think how much your time costs, how many milliseconds you could shave off it, and ask yourself if it's worth it.
  2. Agree. This sounds like a great candidate for a module. I was surprised seeing this barely mentioned in the forum. Unfortunately I myself have very little experience with ad management and wouldn't be the best guy for outlining less obvious features for such a thing.
  3. Just snooping around for a project, seeing what I can do on a shoestring budget. The client wants something like a directory site, and needs banners. Ideally, impressions, something to control what banners show where, and the option to use own or Google banners. But honestly a well built banners solution alone would blow the budget. I'll probably end up having to skip this one.
  4. Does anyone happen to have a banner ads management module laying around?
  5. Since I started working with PW I never needed something like this, but in my pre-PW life I have worked on projects that needed it. Any project that includes some kind of documentation archive solution is a good candidate for a feature like this. The most obvious example I can remember was the media regulation office here in Portugal. They have weekly meetings where they discuss media incidents, public complaints and things like that. Those reports are publicly available. At one point my (previous) company provided a solution for searching directly in those documents (PDFs). My role was creative only back then so I don't know the details, but basically what our platform was doing then was indexing the text as the file was uploaded. I'm working to grab a project this year that could potentially make use of something like this.
  6. Just like @3fingers found. Impressive how you've managed to find that on the compressed JS I don't actually name my vars a, b, c, but the scripts are all minified in the end and the names change. I have a script that listens to scrolling and when you go further than X pixels (don't remember the exact number) the "menu-collapsed" class is added to the document. That class will affect the menu, logo, and back to top button. The social sharing buttons are a plugin: http://tolgaergin.com/files/social/
  7. Hi guys. It's not necessarily PW related, but I do feature a project made in PW in this article. It's a short read challenging companies to think about their websites more like tools: https://supertiny.agency/en/blog/make-a-site-for-existing-customers/ Enjoy.
  8. I've made a few migrations, not from WP, but the same method applies. First I copied the assets. Layout images, CSS, fonts, etc. Then I went to the site's homepage, copied the source, pasted on home.php and started cleaning up. With the code clean, I move the header and footer into separate includable files. You'll have to replace the menu links with a loop to grab those from the admin, change the path to the assets and so on. Then do the same for the next page. Copy from the source's frontend, paste on the template file, replace header and footer for the includes we've prepared when doing the homepage, and proceed cleaning up and replacing the hard-coded content with calls to the page's fields. It takes some time, but it's straightforward. As @lokomotivan pointed out, best is to start from an HTML template. Processwire is geared towards custom-made solutions, where as Wordpress, specially when using templates, is more about allowing the admin to customise the layout from within the CMS. There is no way of directly or automatically replicating the same features of a WP template in PW. But if you take an HTML template, trim it to your needs, then setup PW to have just the fields you need for what you're building, you'll get a much cleaner and easier to use CMS. You can do it in one or two days after you get the hang of it, depending of the site of course.
  9. Good to know it was of use to you. I'll check out your boilerplate as well starting a new project in the future. Maybe webpack would be a good next step for my workflow.
  10. Personally I'm not using package managers. Mainly because I tend to avoid third-party packages in my projects. I'm a bit scared of updating one and breaking stuff. That said, I can show you my boilerplate: https://github.com/heldercervantes/PWBoilerplate This isn't perfect, and I'll certainly tweak it as time goes by, but it's simple and I love simple. Basically it lets me do version control for my templates and leave the PW installation itself out of GIT. Should I need to build a custom module on a project, that's easy enough to change. I'm also doing SCSS, and compile all my JS into a single file. The JS part works well for simpler projects, but i.e. in my own site, I have JS I want to load only on the homepage (3d thingy, a bit bulky if a user lands directly in a blog post where it's not needed), so I had to work around that. If it's any use, I'll be glad.
  11. Great tip @horst , that will come in handy someday
  12. Hey. What would be a clever way of detecting if the page being rendered is the first viewed in a session? Think landing page. In fact, think blog article. I want to put a CTA there that would appear only if the user just landed directly in that page. But if the user came from, i.e., the homepage, I want it to behave differently. Any ideas? Thanks, H
  13. Too many copywriters out of a job? I have a hard time getting clients to write 300 chars on the whole page, let alone the meta description.
  14. Exactly. If any vulnerabilites show up, there will be listings of it, either on Secunia or somewhere else. Certainly here in this forum, at least. And I do state that none of the listed vulnerabilities on the other platforms are scandalously dangerous. Of course PW benefits from freshness. I used a similar argument when I defended a proprietary CMS. But in the end, excuses aside, the fact is a compromised PW site is something unheard of in a 10 years old CMS. That's time enough for something to show up. Whereas if you own a Wordpress site which is "way more mature", you should check for updates every two weeks, just in case, and you risk breaking your site when you update. Basically the point here was to raise awareness that vulnerabilities do exist and pop up regularly. PW comes out ahead? Great! Hey, 2 alerts a month on WP on average? Come on!
  15. Hey guys, some light reading: https://supertiny.agency/en/blog/how-secure-is-your-website/ This discussion pops up from time to time, and this is something I usually point out every time I show PW to a new client, so I thought it would be nice to write a permanent post on the subject. Enjoy.
  16. Hey there! https://magenta.pt/en/ This is my latest release. A company that does digital textile printing. In this one I went way beyond just designing and building the site. I designed the logo and illustrations, shot the video in the homepage and the samples in the gallery as well. I have some tweaks planned after having tested the site with real people, such as adding a visual cue to scroll down on some pages. These will come in later, after gathering all input and planning the update. Technically this follows my usual recipe. Repeaters for building pages in a modular way (see the slideshows in the middle of the text in the services page), AIOM, MarkupSEO, Sitemap... The gallery is hand-built with a custom zooming engine that lets users drag with a finger on touch devices, or reacts to the mouse's position on desktops. Could be smarter loading the images, but for now there are only a handful, so I didn't bother for now and will revise on the 1.1 update. There's also a blog section that is currently hidden until they have enough content to launch it. Hope you like it. EDIT: Here's the case-study on my portfolio: https://supertiny.agency/en/folio/magenta/
  17. What about this one? https://sonarwhal.com/scanner Microsoft just launched their own flavour of web inquisition. I ran my site, had a good laugh.
  18. Hey guys. Can anyone point me to the PW logo (I mean the mark) in SVG, or at least a high-res-ish PNG? I need it for an article I'm writing.
  19. Not critical but somewhat important, at least from a marketing perspective. The other day I was out of the office and detected a problem in one of my sites. I had to use my phone to fix it and found out that on my phone I can't select text from a textarea that's powered by CKE. Can't select, means can't copy/paste, and if what you need is to do is moving a bunch of text around you're screwed. Of course CKE is now PW, but being the standard rich text editor for PW, I'd say we should look into making it more usable on phones.
  20. HAH! Nicely spotted. It's the opposite use of negative space however. And PW's is a cleaner design that's better than Pinterest's
×
×
  • Create New...