DaveP

Members
  • Content count

    748
  • Joined

  • Last visited

  • Days Won

    1

DaveP last won the day on November 13 2014

DaveP had the most liked content!

Community Reputation

797 Excellent

About DaveP

  • Rank
    Old Bloke
  • Birthday 01/23/1957

Contact Methods

  • Website URL
    http://dpreston.com

Profile Information

  • Gender
    Male
  • Location
    Chorley, UK

Recent Profile Visitors

15,911 profile views
  1. ...which I just merged/committed (whatever the proper term is). Going forward, I'm going to look at making this thing configurable, if only to allow a choice of dummy text file, mainly so I can switch to pommy ipsum when required.
  2. @netcarver has already forked my module and when I figure out how, I will pull (some of) his changes into mine. Anyone else is welcome to fork and create pull requests. For example, @horst's suggestions could be quite easily incorporated - it could also be made configurable so that different dummy text source files could be selectable, but that would be stretching my skills somewhat, so I would welcome others' input.
  3. I'm already looking forward to seeing this!
  4. It's hard to keep track of these great modules! That's exactly why I made it. Thanks. Just committed changes to enable pretty much exactly what you asked. Tags now work like this - [dc3] - Show 3 paragraphs ([dc:3], [dc3p] & [dc:3p] all do the same). (Same as original functionality.) [dc3-6] - Show 3 to 6 paragraphs randomly per page load ([dc:3-6], [dc3-6p] & [dc:3-6p] all do the same). (New stuff.) [dc3w] - Show 3 words ([dc:3w] does the same). (Same as original functionality.) [dc3-6w] - Show 3 to 6 words randomly per page load ([dc:3-6w] does the same). (New stuff.) (Anyone who has already downloaded and is happy has no need to update - the only changes are in response to @abdus's request above.)
  5. I think that can be done, although it's going to be stretching my limited regex skillz. Going to be some time next week at the earliest, though.
  6. I just made a textformatter module that allows you to insert dummy content (lorem ipsum style) in text fields via shortcodes. Usage is simple - just type for example [dc3] into a textarea with this textformatter applied (plain textarea or CKEditor) and it will be replaced at runtime by 3 paragraphs of dummy content. It can also be used to populate text fields (for headings etc) using e.g. [dc4w]. This will produce 4 words (rather than paragraphs) at runtime. The actual content comes from an included 'dummytext.txt' file containing 50 paragraphs of 'Lorem ipsum' from lipsum.com. The 50 paragraphs is arbitrary - it could be 10 or 100 or anything in between, and the contents of that file can be changed for your own filler text if you wish. The slightly clever bit is that for any given page, the same content will be returned for the same tag, but the more paragraphs available in 'dummytext.txt', the less likely it is that two pages will get the same content (very roughly speaking - it's actually based on the page ID) so content selection is determinate rather than random, even though only the tags are saved to the db. Update Tags now work like this - [dc3] - Show 3 paragraphs ([dc:3], [dc3p] & [dc:3p] all do the same). [dc3-6] - Show 3 to 6 paragraphs randomly per page load ([dc:3-6], [dc3-6p] & [dc:3-6p] all do the same). [dc3w] - Show 3 words ([dc:3w] does the same). [dc3-6w] - Show 3 to 6 words randomly per page load ([dc:3-6w] does the same). <End update on tags.> If you think it might be useful, you can download it from GitHub and give it a try.
  7. See $files vs $file http://cheatsheet.processwire.com/
  8. What happens if you echo $annual?
  9. One fun way of demonstrating a real difference between PW and WP is to run the average WP site (preferably one chosen by the (prospective) client) and an equivalent PW site (probably from the showcase) through a tool like YSlow. WP sites often have all these plugins, often including multiple different versions of jQuery etc etc. I just tried it on a WP site I know of and got this Yep, 28 external javascript files and 23 external stylesheets. That's, what, 40-odd unnecessary requests? Doing the same thing on a similar looking site from the showcase wasn't perfect - 6 js and 3 CSS (AIOM, anyone?), but it's actually a really obvious way of explaining even to a layperson that one way is very obviously better than the other - file conflicts, bandwidth, load time etc.
  10. FWIW, I respectfully disagree. For a lot of sites, it just isn't required. Maintainers can log in through the admin and a whole host of sites just don't need front end user management. It always struck me as silly that some other CMSs always have (had?) a visible login link on every page. If it's a concern that it might be a harder sell to clients that this isn't part of PW core, then surely the fact that Ryan is the developer should confirm that this is effectively 'part of PW', just not installed by default. As far as security goes, and misjudged editing of modules vs core files, there will always be people who go fiddling about in /wire/ when they shouldn't, so this functionality living in there won't necessarily help.
  11. Personal preference, I should think, but he also gave us (well, those of us skilled enough to take advantage) the tools to change that behaviour.
  12. Definitely with @abdus on this one. PHP7 is noticeably faster than 5.6, and PW has no problems (that I'm aware of?) running under 7. If it is available, do it (taking the usual precautions, obvs). Also, there might be optimisations you could make to your selectors and there are probably mysterious optimisations you may be able to make to your mySQL setup, depending on how much control you have within your hosting. First of those you will probably get help with here, if you are able to share some code, second is down to black magic, voodoo and selling the soul of your firstborn. Or hiring an expert. All of that having been said, it's a very good looking website, and it works well - initial loading doesn't feel slow, just the filtering isn't instant. <edit>Man, 3 more replies while I write this one.</edit>
  13. Just visited @apeisa's repo and found that I had forked it just over 5 years ago! (And lodged a pull request at the time.) Good job GitHub has a longer memory than me.
  14. Maybe people should be forking some of these kind of modules and breathing some new life into them.
  15. I was just typing something along those lines when you posted. It's either that, or fix Spex, or refactor the whole site not to need Spex. (I figured out where the live site is, and I'm guessing that refactoring isn't actually an option.) You might find that the core PW stuff in the working version is still covered in the docs, since stuff is rarely (never?) deprecated completely, just new stuff added, and there isn't the imperative with PW to upgrade like you might be used to with WP. You can always come back here for advice - we usually try to help when we can.