-
Posts
868 -
Joined
-
Last visited
-
Days Won
1
Posts posted by DaveP
-
-
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.
- 1
- 1
-
Interesting read - https://moz.com/blog/how-long-should-your-meta-description-be-2018
TL;DR 300 chars, up from 155
- 2
-
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/
- 2
-
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).
- 1
-
-
23 hours ago, SamC said:
Defy convention at your own risk...
Also...
- 2
-
This might do it
- 4
-
19 minutes ago, pwired said:
I guess loading from a url makes it a bit slower and gives more overhead.
The browser is already loading stuff from a URL, yours.
CDNs do have advantages, that's why they exist.
-
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.
2 hours ago, lickny2001 said:json api calls directly to the data
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.
2 hours ago, lickny2001 said:I’m not sure i can build it
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.
- 1
-
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/
- 1
-
This answer on Stackoverflow may be of interest.
-
-
8 hours ago, heldercervantes said:
You can also try using ImageMagick for your image processing needs
+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?
-
Good spot @wbmnfktr - in fact it appears to be an encoded opening php tag - %3C?php
- 1
-
Very nice indeed. UX very much aligned with the product.
Good rule of thumb for me is, if the source is as tidy as the output, you're doing pretty well. (WP sites never pass this test.)
-
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.
- 1
-
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.
- 1
-
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
- 1
-
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'.
- 1
-
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.
- 1
-
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.
- 5
Managing URL query strings when outputting links
in General Support
Posted
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.)