heldercervantes

Members
  • Content count

    267
  • Joined

  • Last visited

  • Days Won

    6

heldercervantes last won the day on December 19 2017

heldercervantes had the most liked content!

Community Reputation

395 Excellent

About heldercervantes

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    http://heldercervantes.com

Profile Information

  • Gender
    Male
  • Location
    Porto, Portugal

Recent Profile Visitors

2,341 profile views
  1. DAMN! I'm gonna mention this to a client someday.
  2. I may be wrongly interpreting this as a quite specific need, but I'd make this feature a module. I've never needed something like this but who knows, maybe one day. So it makes sense to me to keep this out of the core, and something we could add as a module when we need it.
  3. I usually go by @rafaoski's approach. I first go to http://www.favicomatic.com/, upload a 500x500 image to generate a full icon pack. Then I place the icons in their own folder inside the templates folder. Usually /site/templates/img/favicon/ Favicomatic gives you a rather large HTML snippet. Slap that on your template, and on each line that points to a file, you'll have to fix the url, like so: <link rel="icon" type="image/x-icon" href="<?= $config->urls->templates ?>img/favicon/favicon.ico">
  4. 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.
  5. 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.
  6. 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.
  7. Does anyone happen to have a banner ads management module laying around?
  8. 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.
  9. 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/
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. Cheap move man! Merry Xmas!
  15. Great tip @horst , that will come in handy someday