-
Posts
4,054 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
Hi zwergo - very interesting project. I've done a few jobs with maps before but this takes things to a whole new level
-
Oh, also domain name registrars will often be able to do great prices, but if you get them from the web hosts they can install them for you as well for free so it depends how much you want to be involved in the process.
-
Quite a few hosts sell SSL certs far cheaper than you cam buy them directly from SSL companies and they're the same certs. I won't name-drop, but you can get a $249 cert (2048-bit encryption and some other fancy features) for less than half that price from one webhost, so you could choose to see this as a chore or you could ask your host to install it for your clients which will take them a short space of time and be auto-renewed along with the hosting so there's no major headache for you. You can choose to pass the whole discount on to customers or, quite reasonably, add a little markup for the time it's cost you but still come in a lot cheaper than buying a cert straight from the cert providers. Everybody wins and the internet is a little bit more secure with each site that switches
-
I think Manfred is trying to point out some potentially unwanted behaviour in the midst of what are neat new features The problem I encountered on a fresh install is that if you check for new modules it brings up ALL modules. They were of course all installed recently, so technically it's correct behaviour, but when you are setting up a new site and installing new modules from the modules directory and other sources, it makes them harder to find in the list. I think the easiest way to fix it would be to have it ignore modules in the /wire/modules/ directory when checking for things like new modules in the last day etc. Possibly ryan has already fixed it as I tested this about 5 days ago.
-
Not sure how I missed this one, but it looks fantastic for article-heavy sites. Thanks ryan!
-
Nice first post - very useful to know as I've scratched my head over this before, thanks!
-
I didn't see it I think pink is too close to black - maybe we should make the text blink or something on links
-
On a related subject there is also this module: http://modules.processwire.com/modules/schedule-pages/
-
Processpageeditimageselect Needs More Configurable Options
Pete replied to hdesigns's topic in Module/Plugin Development
I love code like this. Until sometime last year I wasn't aware you could be as clever as that, but now I'm doing things like this a lot with a system I'm updating where I don't want to edit hundreds of templates right now -
That's not to say PHP isn't messy or inconsistent at times (probably why I get on so well with it ), but it is good.
-
Adrian - you could take it further and use a custom fieldtype and hide it. This would give you a custom table able to store all publishes and un-publishes to every page and just requires a column for date, user and action (pub or un-pub). But then we're into more of a user action history module instead and I think there's already a module for that? That was totally not what you were asking though
-
You could also change $u back to $user at the end of all that code above // present the login form and simply move the first line in your code to just after the closing of the if statement since you don't seem bothered about checking the role on line 1 if they're already logged in? But I think adrian has identified the problem: $u != $user
-
Shop-For-Processwire: Send Confirmation Mail With Order Content
Pete replied to Pascal's topic in Modules/Plugins
You could alternatively set up a template file for this (just the file, not in the admin) and pass variables to it like this: $t = new TemplateFile($config->paths->templates . "your-template.php"); $t->forename = "Bob"; $t->surname = "Bobness"; $mailbody = $t->render(); and that gives you a simple way to parse data from your page into a separate template file and send it via email. Essentially, $forename and $surname can then be used in that template file (or $this->forename and $this->surname if you're adding this code in a module and not in a template file). In the dev branch there is also an email class called WireMail, so for the sake of completeness, if you wanted to use the dev branch you could do something like this: $mail = wireMail(); $mail->to($customeremail)->from('sales@yoursote.com'); $mail->subject("Thank you for your order"); $t = new TemplateFile($config->paths->templates . "your-template.php"); $t->forename = "Bob"; $t->surname = "Bobness"; $mail->bodyHTML($t->render()); $mail->send(); -
@Nico - yep, but when you access the field in your templates it fetches the relevant page object so as you say it's just as good, but your explanation clarifies what is actually stored (i.e. It doesn't clone a page or something silly like that )
-
A page field can store unlimited pages, so All your friends Obviously all it does is store pages and not their status, but you could store them in another page field called "friend request" or something first, then move them to the friend field after.
-
I didn't even know you could do this. Since I mostly seem to shop on or visit sites that are fixed width I thought they were just using one large background image and a transparent gif over the top to make the clickable so this is all pretty interesting
-
I don't think there are any easy fixes for the first issue as I'm not even sure where the code is to detect devices in this software. You can change the theme manually at the very bottom if the page though you would then have to change it back on your PC. I'm also not sure why the second issue would even happen. Are they just showing collapsed or something?
-
I think anything that sees PW being marketed as Enterprise needs ryan's input as there have been discussions around enterprise support etc in the past and the last thing any of us want is to market it as enterprise without the infrastructure to back that up (for example if I was an enterprise customer seeing PW marketed as such, I'd go straight to the PW website to see if there was any official support from the core team in case things went wrong with the dev doing the work - it's only sensible to be cautious with large sums of money). I know marketing it as suitable for enterprise work and official support are two different things, and it's fine to discuss how to market it as such, I'm just saying that it's not as simple as putting up a page or mini-site.
-
This would be a good article for the new docs section!
-
Good work on the site - nice and clean 301 redirects are perfectly reasonable though Joss - you could just use that handy module by Antti: http://modules.processwire.com/modules/process-redirects/
-
In an edit page, are all entries from a FieldtypeMulti field loaded automatically into memory or only when they are rendered on the page? For example, with ryan's events fieldtype, if you had 1,000 entries on one page (extreme example) would they all load into memory if you go to edit that page?
-
Nope - can't see it in the latest dev. I'm going to put a note about it on GitHub and then if it gets included you can specify PW 2.5 as a minimum requirement.
-
I can vouch for moving accounts under WHM - nowadays it will even repoint the DNS records on the source server for you as well so theoretically the sites immediately begin to be served from the new server (as long as the source server remains up during the time your domain name registrar's DNS changes are taking place of course). I've got some sites hosted at ServInt Amsterdam and haven't had any trouble though there do appear to be a couple of short periods over the last month or so with no traffic (presumably reboots due to these Kernel updates or similar). Looking at the timings they've been during the early morning for the most part so that would explain why I haven't noticed and nor has anyone from the sites hosted there. Not that it's much comfort, but I would say that every host has its issues. I had a VPS with LiquidWeb and later using their StormOnDemand service and had no issues for about 4 years, but there would be some random server crashes towards the end of this that neither of us could quite pin down. Since I had more UK/European clients being hosted on that server I decided to move to ServInt's Amsterdam server and those issues that we couldn't pinpoint vanished - I guess that points to a config issue somewhere on the server. LiquidWeb is another pretty big player - I'm sure if we'd kept at it we could have resolved that issue, but since I wanted to move some sites closer to home it made sense to move hosts. Since using ServInt, I've moved all my UK clients completely over to UK servers with Future Hosting so they're at least in the right country now, and left the non-region-specific sites with Servint in the Amsterdam datacentre (it's pretty much split now based on personal projects being on ServInt and clients on Future Hosting, though the sites I'm classing as personal projects have hundreds of thousands of visitors each month so they're busier than client sites by far). I think the theme for my switching around over the years, and my negative experiences over a decade ago with shared hosts, is that US hosting companies seem to offer better value for money and have great service teams (all three of the companies mentioned will usually turn a ticket round in under 15 minutes) and I never had any massive issues with any of them. Good UK hosts are hard to find it seems unless you want to pay massively more for the same service. Not sure where I'm going with this to be honest - just name-dropping I guess - but I've not had any real issues with the larger companies like ServInt or LiquidWeb. It's still fairly early days with Future Hosting, but they're impressing me as much as the other two so far.
-
CHMOD 777 (on shared hosting at least) could be very bad pwired. If the server is configured badly, like a lot of cheap ones out there probably are, 777 gives everyone on the server the ability to affect your files. There are plenty of posts about this on the internet if you do a quick search - here's one: http://stackoverflow.com/questions/11271596/how-will-a-server-become-vulnerable-with-chmod-777 If you're not on shared hosting then you're safer, but 777 is about the most open permission you can apply to a file or folder. You would need to read up on CHMOD really (I think I need to as well as it's been a while) as what permission you can realistically tighten it up to depends on how PHP is installed (mod_php etc) and I honestly don't know enough about the subject. Your recommendation of 777 just rang alarm bells with me because that's basically "anyone can read, write or execute this file" whereas something like 755 means "owner" can read, write and execute, but "group" and "others" (others being everyone else I believe) can only read and execute the file. Other folks here might be able to tell us if it's even an issue nowadays, but I just remember a lot of scripts a few years back that told you to set certain permissions on certain folders.
-
777? Not the best idea: http://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/ But it all depends on what you mean by "content" as well.