-
Posts
868 -
Joined
-
Last visited
-
Days Won
1
Everything posted by DaveP
-
Managing URL query strings when outputting links
DaveP replied to Vigilante's topic in General Support
PHP's built-in function http_build_query may also be of use. (I did a quick search and there doesn't appear to be a PW method that wraps this.) -
if(!$session->get('flag'){ echo 'New visitor'; $session->set('flag'); } else { echo 'Been here a while'; } Completely untested but can't think why it shouldn't work.
-
Interesting read - https://moz.com/blog/how-long-should-your-meta-description-be-2018 TL;DR 300 chars, up from 155
- 1 reply
-
- 2
-
newbie How to get Data From Database and Fields
DaveP replied to Timberwolf's topic in Getting Started
You have a few peculiar selectors in there. I'm not sure what you are trying to do but it looks to me like there is some confusion between $pages and $page, and between get() and find(). $pages is all the published (and not hidden) pages in the site (that the current user can view). $page is the current page only. get($selector) will return the first one item matching $selector. find($selector) will return all items matching $selector. Take a look at http://cheatsheet.processwire.com/ -
Exclude 500.html from file appending/prepending
DaveP replied to ksymmons's topic in General Support
Would if($page->is("template=''")) work? -
I think you'd be safe to comment all that section out. # ----------------------------------------------------------------------------------------------- # 1. Don't show directory indexes, but do follow symbolic links # 500 NOTE: Some cloud hosting companies don't allow +FollowSymLinks. # Uncomment +SymLinksifOwnerMatch and comment +FollowSymLinks if you have 500 errors. # If that doesn't resolve the error, then set it back to +FollowSymLinks. # ----------------------------------------------------------------------------------------------- # Options -Indexes # Options +FollowSymLinks # Options +SymLinksifOwnerMatch Worst that can happen? Still doesn't work.
-
Given that this thread is about Google Pagespeed, an easy improvement for those with enough control over the server to install Apache/Nginx modules is mod_pagespeed. I experimented with it on a cheap VPS earlier this year and it's almost like witchcraft! And it doesn't break the PW admin like CloudFlare does/did (haven't checked for a while).
-
Also... https://www.nngroup.com/videos/jakobs-law-internet-ux/
-
This might do it
-
The browser is already loading stuff from a URL, yours. CDNs do have advantages, that's why they exist.
-
help with dbase import/synchronisation/direction
DaveP replied to lickny2001's topic in General Support
Welcome to the forums. As first questions go, that's a doozy. And I'm not even going to try for a definitive answer, but let's just think out loud a bit. I like the sound of this. Once you've got your initial structure could you maybe query individual products on page load? (You probably wouldn't want to do this on every page load, just after a certain time since the last call, kind of like a cache.) Then return the info or an 'out of stock' or 'discontinued' message. That saves deleting pages and preserves any link juice that individual products might have garnered over time. You could also set up some kind of alternative product suggestion for those pages ('We're sorry, but X is no longer available, what about Y?') - good for internal linking and keeping visitors on-site, then after a period (6 months or a year maybe) turning that suggestion into a 301. Is it possible to ask the host system just for new or updated records? Either way, a cron or lazy cron is probably going to be involved. The good news is that iterating over all 600 or so records isn't going to take forever, even if that is the only way forward. Break it down into bite sized chunks. Solve one small aspect at a time. Not a complete answer, I know, but I'm sure others will chime in. -
Just found a few... International Bank of Azerbaijan https://ibar.az/ CinemaPlus Azerbaijan http://www.cinemaplus.az/ (PW is big in Azerbaijan, obvs) Canada business Network https://canadabusiness.ca/ Steinberg Help (Steinberg user manuals repository) https://steinberg.help/
-
[RESOLVED] Images losing saturation when resized by ProcessWire
DaveP replied to mike62's topic in General Support
+1 for this - ImageMagick is usually quicker and takes less server resources (can handle larger images) than GD. If available, I'd always prefer it over GD. Just a thought, is front-end resizing on upload involved at all? -
Further update on this - earlier today was still getting 403. However, we just relocated offices (this is a debugging step I don't recommend), and with a new IP, no 403. Could GitHub be blocking IPs for some reason?
-
The time I used it was a site for a courier company, so there was only one amount chargeable ('collect my stuff from A and take it to B') and no need for a 'cart' as such, so it was really easy, but the whole process is very streamlined.
-
I've implemented it once and it was very easy - both the technical side and the signing up and getting paid out part. Can't begrudge them their success at all, it's a very good product.
-
Excluding a past event from a PageReference field after it's been chosen
DaveP replied to a-ok's topic in General Support
Just kinda thinking out loud, but I'm not sure $today = strtotime("now"); is going to work as expected. See http://php.net/manual/en/datetime.formats.php -
You aren't on your own. The docs aren't mega clear. I got something working with the LESS version and AIOM (which can compile LESS) but it doesn't feel very 'sleek'.
-
Currently (and have been for most of this year) developing a site on 7.1.5 - only issues have been with AIOM, but fixes/forks are available.
- 11 replies
-
- 1
-
- php 7
- processwire
-
(and 2 more)
Tagged with:
-
Good starting point - https://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/ Golden rule with PW (at least when you are starting out) the solution is probably easier than you are expecting.