-
Posts
396 -
Joined
-
Last visited
-
Days Won
15
Everything posted by heldercervantes
-
It's heavy. Specially the marching group on the about section. But I think this has to do with older machines not supporting some of the stuff that's needed for webgl to perform well. Three.js reverts to more CPU intensive approaches and it starts burning. I'll have to look into that eventually.
-
@davep, that's resilience. I'm surprised you haven't got a message saying "Sorry mate, Apple doesn't allow you to run a machine this old. Get a pretty new retina iMac for only £2.000,00" I don't remember the age of the ones I had on my previous company, but I was shocked to find out they couldn't update to the version that had the store. Ended up in the bin with perfectly usable hardware.
-
Thank you for your input guys. @szabesz: Well spotted. I have to fix that. @adrian: Yes, I'm aware this is a heavy one. With the 3d library, models, sound, there's no way around it. Something I had to accept with all this 3d going on. @pwired: As to how this is achieved, actually there's a bunch of stuff working together... The sphere The base library is three.js (https://threejs.org/), using a wrapper that simplifies implementation called whitestorm (https://whsjs.io/ - I was involved in development and this site served as a guinea-pig). Using those I generate the sphere and background. The animation is made with greensock. Here, I'm animating each vertex on the sphere to a random position. The maximum displacement changes as you hover each link to make it more or less chaotic. The wave in the background that spreads as you touch the logo is achieved by calculating a radius that animates from the center to the edge, and on each cycle the vertices get displaced according to their proximity to that radius. The about section Here it's simpler. Each scene is modeled in blender, and greensock animates the positioning of the camera. Except for the second step. There, it's a single guy that's duplicated a bunch of times, and greensock animates a marching cycle that loops with each step. You can actually see the loop as a new row pops up at the end of the group on each step. The sound Not much to say here. Freebie audio, that I've edited on audacity to make deeper, longer, more consistent.
-
Hey guys. http://supertiny.agency/ For those of you that have already seen my website, this won't look much different. Under the hood however, I've made a few SEO oriented updates that involved a not so simple overhaul. New stuff includes a new services page, some tweaks here and there, but more importantly the navigation was remade to allow deep linking and proper page by page SEO. The previous site was a single page and worked more like a presentation than a website. Navigating links happened without page loads in order to have nice animated transitions. But search engines don't like that so I had to do something about it. The basic approach is quite simple. For each template file, I have a condition that includes a different file according to the type of request: <?php if($config->ajax) { include('./_about--ajax.php'); } else { include('./_about--direct.php'); } ?> Ajax returns just the chunk of content, whereas direct returns a complete page with the SEO stuff. Then I have a bunch of jQuery that basically looks for internal links and overrides them to be loaded via ajax instead of a regular page load. Engines can crawl, and users get nice transitions. The JS pushes a history state, sends a link update to Analytics and transitions into the new page. More and more ProcessWire looks to me like the jQuery of the CMS world.
-
Writer Relocations India is powered by Processwire
heldercervantes replied to ChiefPundit's topic in Showcase
NICE! -
Hey Margie. Hope you can convince them to use PW. Sorry for the long contribution, but I hope I'm giving you a good argument. I've had a similar discussion a while back when I was "selling" PW to one of the main shopping centre chains here in Portugal (dolcevitatejo.pt is one of these sites, made in PW). They wanted an OS CMS and were leaning towards Wordpress, and I managed to convince them. My main argument was security. Check out this article: https://www.notanotherdotcom.com/blog/a-better-cms-part-1-security/ PW is inherently closed, with no plugins that conflict with one another or reveal publicly known vulnerabilities that can be exploited. The big three are regularly targeted just because they're popular. Also, check out this security log for PW (you'll have to register first): https://secuniaresearch.flexerasoftware.com/community/advisories/search/?search=processwire ... then search Wordpress, Drupal, Joomla, whatever you want. Processwire : 0 (zero) incidents, EVER! Wordpress : 17 incidents in 2017 Drupal : 4 incidents in 2017 Joomla : 4 incidents in 2017 These include: Cross-Site Scripting Vulnerabilities SQL Injection Vulnerabilities Security Bypass Vulnerabilities Local File Inclusion Vulnerabilities All of which are as scary as nature is in Australia. I've never heard of a PW site being compromised since I discovered it 3 years ago. One curiosity I like to point out is something Ryan said somewhere about password recovery on PW's login page. You don't have that installed by default and need to turn it on yourself, because with password recovery on, the CMS's security will only be as high as that of the admin's email.
-
As always, @LostKobrakai offers us an elegant solution. Sir, you have my respect. For mac users (I do most my coding on a mac myself), adding ".DS_Store" is also a good thing. If only I could tell Filezilla to ignore those as well :/ I've recently been thinking of this matter as well. Having a few published sites where my local copy now has completely different content from what's online, it's simple to conclude that it's best to leave everything under assets away from version control. But on my latest project I'm also adding a couple of bespoke (love that word, so high-end) modules, so I'd keep modules within git's range as well. Then all you have to consider when changing stuff is export the new / changed fields and templates to the live version, upload new / changed files, and that's about it.
-
Hooks, compare page before and after save
heldercervantes replied to heldercervantes's topic in General Support
Thanks @bernhard, that tip will come in handy a bit down the road when I'll have to build reporting tools for this project. Great stuff! -
Hooks, compare page before and after save
heldercervantes replied to heldercervantes's topic in General Support
Hey @netcarver, I saw your module on my research. Cool stuff. But my case is different and too specific. It's for an online store, and it looks for specific stuff like changing the orders' state or adding a note. It then looks for the client's email address and sends out a notification. I'm also implementing a way of having email templates for various things, like welcoming a new user, notifying of password changes, stuff like that, which are editable in the admin, and are triggered by the frontend when need be. And having fun doing it. -
Hooks, compare page before and after save
heldercervantes replied to heldercervantes's topic in General Support
Damn were you right. I'm hooked. Refactoring a bunch of stuff with a grin from ear to ear. -
Hooks, compare page before and after save
heldercervantes replied to heldercervantes's topic in General Support
Of course. Should be using $this->session, instead of just $session >:[ -
Hooks, compare page before and after save
heldercervantes replied to heldercervantes's topic in General Support
I've managed to get the uncached version of the page and do comparisons successfully. Now my problem is something else. One of the fields I'm comparing is a repeater, and I'm noticing that in this case the saveReady hook is fired twice (or more), one time for the new entry in the repeater, and another for the page. So far so good. But now I need to compile changes and react to them all in one go at the end. So here's what I did: Hook before saveReady, I start by looking at $session->controlArray and set it as a new array if unset; Push to that array as I compare the various thingies; Hook after save parses controlArray, reacts to what's changed, then resets the array. But my controlArray seems to be scrapped after each hook. -
Hi guys, I almost feel like a grown up, now that I'm messing with creating modules. I'm trying to do something that, when a page is saved in the admin, detects certain changes and reacts accordingly. Example: Say an orderState field for... an order's state. And when the admin changes that state to something else, I want to fire an alert email to the client. So I started from this example and I'm working my way up from there. It's working fine, but now I need to know how to add a hook that gives me the page as it was before saving. I tried `...addHookBefore("save"...` and `...addHookBefore("saveReady"...`, but both give me the page after the changes. I'm sure it's super simple and I'm going to say "of course" once someone points me to the obvious solution that's right in front of me, but for now all I can do is bang my head against the wall and thank you in advance for your much appreciated help.
-
Pretty sure you can add a hook somewhere, catch the errors you want and send out an email. This would make great module though. Perhaps with the option to get a weekly digest of the log action. That'd be nice.
-
Page Reference field not updating with 'Show if...'
heldercervantes replied to Tom H's topic in General Support
Not really giving you a solution, but rather sharing my sympathy. I've had the same problem applying the pages field to the user template with a condition. In my case, I was showing the field if the user had a certain role. As you describe, it shows/hides as expected, but doesn't save. Bummer. Eventually left it open, and added a description telling the admin to "Use this field for yadda yadda on X role users".- 9 replies
-
- page reference
- show if
-
(and 1 more)
Tagged with:
-
Template associated to an _include.php page: possible???
heldercervantes replied to ARG's topic in Getting Started
Not sure I'm getting exactly what you want to do. You can specify a different file for a template. Edit your template and in the Files tab, look for "Alternate Template Filename". I've never tried pointing to a subdirectory there, but don't see a reason for it not to work. You can, as monchu stated, simply not create the file. I use file-less templates all the time, whenever the frontend doesn't require an actual page to exist. -
It is my first time with processwire.
heldercervantes replied to Herrmann22's topic in Getting Started
This is a tricky one, and the solution on the CMS side depends on how you want to do the frontend. You will not find a module that gets interactive 3d working on your frontend. PW modules mostly offer you ways of storing and retrieving info, but don't actually generate frontend widgets like slideshows and that kind of thing. First of all, the repeater is a go to module that you'll probably need somewhere along the road. Then just remember you can use file fields for storing 3d models or even JS that you load dynamically on the frontend, image fields for textures, and you have other field types for just about anything you can think of. For example, look at the nib selector on step 3 of your example. You can use a repeater to store each nib. Inside each repeater item you put in a title, an image file for the thumbnail, and a file field for the 3d model in whatever format you're going to use. Then you just have to figure out how to output that in your frontend so that the nib options can be managed from the CMS. Start by getting your frontend working statically. From there you'll see how to divide it into smaller chunks that can be served by PW and take it from there. -
Hi guys / gals. Rimaa deals with logistics and moving products around. They needed an interface for their clients to check the status on their orders and that's where I came in. Not much you can see just by visiting the site, because this is actually a private mobile oriented web-app. But see some screenshots below. This project features some cool things under the hood: First, the content is managed from a Google Spreadsheet. PW connects to the spreadsheet on an interval (that can be configured), parses the sheet and updates the orders list. So the various people that share that spreadsheet and keep it updated for internal control, are also maintaining this platform without even knowing it. PW users templates was modified to allow for this platform's different roles: Client : only sees his orders Agent : has a set of clients he can overview Super-agent : sees all clients Updated orders visual cue: Comparing the current version of an order (by $page->modified) with last viewed version's date (stored in an repeater on each client), the app turns on a visual cue that the order has been updated since it was last seen. Viewing an order is an accordion-style CSS toggle, so at that point an Ajax call tells PW to update the last version viewed by the current user. All in all, a very little project that once more shows the flexibility we get from this awesome API. Being able to modify users to have the fields we need to get something like this working is a beautiful thing.
-
Wow! That's a great idea. Thanks
-
Fortunately I live quite far from where the fires hit. Unfortunately those are a regular occurrence here, though this year was the worse I can remember. Mediterranean weather + atlantic moisture = lots of trees. Add a freak heatwave and boom. But it's been calm since that one, and hopefully it was that last straw that makes people take real action to prevent more tragedies like this.
-
I've seen a few threads on this, but not a really definitive answer that's as clean and simple as most things are in PW. I have a products catalogue that branches out with an unlimited number of subcategories. As the user navigates the categories menu, it's supposed to show a list of all products from that point down, with pagination. So I'm doing this: $pl = $page->find('template=product, sort=sort, limit=60'); And from there I foreach to make the product grid and renderPager() for pagination. But the order on the products is not that of the admin. I need them sorted like they are on the admin, grouped by parent, as if you had the whole tree open and picked products from the top down. As of now, my only solution would be to code an iterator that would crawl all subcategories, adding products to a pageArray. Seems overkill. Any better ideas? Thanks
-
Small world. I met my wife in Porto as well I hope to visit NZ too one of these days. Processwire is a special thing. I'm sure we'll continue seeing it grow steadily in the future.
-
Hello fellow ProcessWire-ers. Here's another little project I've made: http://godesign.pt/ GOdesign is a, you've guessed it, design agency, in Portugal. I've been doing quite a few projects with them where they design, then I build. It's portuguese only, but it's just a design portfolio and little more. It was built with a modular approach that I've been applying to some projects lately. Building a project page you get a repeater, where at first you select the block type, and then the respective fields appear. That way the admin can do a block with a single image, two side by side, text on the left, text on the right, video, and so on... The approach is great, and makes me wonder how cool it would be to be able to create templates in PW that can be used in repeaters. Like creating pages, but in a repeater-like field instead of the actual tree.
-
Set checkbox unchecked via API
heldercervantes replied to heldercervantes's topic in General Support
Once again I make an ass of myself For starters, I was testing the frontend part on the server and looking at the CMS locally. It was all downhill from there. This to say of course setting it to false unchecks the box. Sorry for wasting your time. Now excuse me while I go reflect on life.