-
Posts
396 -
Joined
-
Last visited
-
Days Won
15
Everything posted by heldercervantes
-
Processwire as a Progressive web app backend
heldercervantes replied to Gideon So's topic in General Support
I've never really built a progressive web app, so this answer may be silly. Not having experience with them, I only know the basics, and am not aware of the best practices. Disclaimer out of the way, Processwire's best feature is the flexibility of what you can make with it. I've made web-apps that mimic the look and feel of an actual app, and I've made single-page web applications that load content through Ajax calls. You can very easily set up a page template that grabs content of the POST variables, does its thing and outputs whatever you want, be it JSON, XML or just a chunk of HTML to feed into a <DIV>. If your frontend is able to read that output and display it, you're good to go. -
PW – Update for this week (Jan 19, 2018)
heldercervantes replied to ryan's topic in News & Announcements
Wouldn't mind having a go at that. Just for a weekend -
PW – Update for this week (Jan 19, 2018)
heldercervantes replied to ryan's topic in News & Announcements
Oh how I love my country. Just came home from a night out with the wife, a nice dinner followed by a glass of Macallan on a terrace. A jacket and scarf with just a shirt underneath is enough. Got home, all the heating we have is a couple of cats and a gas heater for when it's really cold (by our standards), which is turned off, but temperature is perfectly fine. This while the US is going through an ice age and people are getting blown away by the wind in the Netherlands. And after I click "Submit Reply", I'm going to change into a t-shirt, fill up a hot water bottle and go to bed, feeling blessed. -
New Template Family Setting: Single Child
heldercervantes replied to wheelmaker24's topic in Wishlist & Roadmap
DAMN! I'm gonna mention this to a client someday. -
New Template Family Setting: Single Child
heldercervantes replied to wheelmaker24's topic in Wishlist & Roadmap
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. -
How to setup a favicon for my PW website?
heldercervantes replied to LAPS's topic in General Support
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"> -
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.
-
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.
-
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.
-
Does anyone happen to have a banner ads management module laying around?
-
Module idea: index + search file-contents
heldercervantes replied to dragan's topic in Module/Plugin Development
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.- 7 replies
-
- 1
-
- file-search
- uploads
-
(and 2 more)
Tagged with:
-
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/
-
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.
-
Best Way To Convert Wordpress Themes PW Themes?
heldercervantes replied to pwuser1's topic in Dev Talk
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. -
Using build tools and package managers with processwire
heldercervantes replied to Sipho's topic in General Support
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. -
Using build tools and package managers with processwire
heldercervantes replied to Sipho's topic in General Support
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. -
Cheap move man! Merry Xmas!
-
Great tip @horst , that will come in handy someday
-
Detecting first page view in session
heldercervantes replied to heldercervantes's topic in General Support
HAH! Of course! That will definitely work. -
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
-
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.
- 1 reply
-
- 4
-
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!
-
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.
- 11 replies
-
- 13
-
Thanks adrian. Eagle eyed as always