Jump to content

DaveP

Members
  • Posts

    868
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by DaveP

  1. Anything in your error logs - \site\assets\logs\errors.txt for PW or for Apache (see http://stackoverflow.com/questions/3719549/where-does-phps-error-log-reside-in-xampp)?
  2. I love it when someone posts something as amazing as this! Another one where simply clicking 'Like' is nowhere near enough. Thank you Kongondo, this is an exceptional contribution.
  3. https://domai.nr/ is a good tool to suggest names.
  4. Joss channelling Keith Moon at one or two points in the narration...
  5. Antti, I haven't as I'm a bit nervous of doing so on the live system. PW requires 5.3.8 and I obviously don't know the difference between 5.3.2.6 and 5.3.26.
  6. Further strangeness - in the process of testing the original problem, it appears I cannot delete files from the aforementioned files fields within repeaters, either. I even grabbed a fresh copy of PW from github and replaced the /wire/ folder, but to no avail...
  7. I have a repeater to track approval of a customer's artwork, in a company intranet app. The repeater holds a couple of date fields, a multi file field for artwork proofs and a notes field. Our graphics department produce an initial proof and its details are stored on the repeater. Any subsequent re-proofs are also stored that way. The problem is that although the file uploads (.pdf mainly) work fine, but not the file description. (This is all through the PW admin, not the API.) I can edit the repeater item directly (via Admin > Repeaters) and it saves as expected, so the problem seems to be related to the files field being inside a repeater.
  8. I think that's your problem. You don't need to call first() on a field set to a single image.
  9. I see that Ryan's fix above has been downloaded 19 times before I just did, but no-one has commented on its efficacy. It doesn't seem to have worked for me, as I still have the problem Soma originally reported, except that saving the pages makes no difference. Does anyone have any comments or updates?
  10. DaveP

    English is Crazy

    This one will do your head in - http://en.wikipedia.org/wiki/Ghoti
  11. Just off the top of my head, CSV files are easily read by Excel, so you could create a php file that bootstraps PW to generate a CSV file, outputting the appropriate mime-type etc.
  12. Annoyed the heck out of us when people did that!
  13. Just to add a little to sshaw's comments, logging search queries in that kind of way can also help identify searchers' commonly misspelt words. I used to work for an online sports retailer and one manufacturer (Daiwa) was commonly misspelt as 'Diawa'. It makes no business sense to return no search results on a simple misspelt query such as this. A simple preg_replace() can fix obvious user errors like this, but a more elegant solution using, for example, mySQL's 'SOUNDS LIKE', searching your stored search history can quite easily be used to generate suggestions like google does ('Did you mean "Daiwa"?').
  14. @pwired sorry I missed that.
  15. Amazon have their own S3 PHP SDK - https://github.com/aws/aws-sdk-php/tree/master/src/Aws/S3
  16. Thanks to Radek for the mention of Manjaro Linux - it has helped me greatly. One of my colleagues at work had managed to get CryptoLocker on to her Vista desktop machine, so it needed urgent and drastic action. I installed Manjaro XFCE Edition and was well impressed by everything about it. Given that her department only need web browsing, email and to be able to open pdfs and the occasional Word file, it can do all of that straight out of the box, in a very Windows-like interface. And it runs much quicker than Vista and isn't threatened by viruses/trojans/malware etc to the same degree. So long as she doesn't have any insurmountable problems over the coming week, I will probably migrate several Windows pcs to Manjaro this time next week.
  17. Something like this should work... redacted due to non-functionality and a wish not to confuse those looking for working code Untested but should work. There may be quicker/easier way(s). There often are. Anyone?
  18. Just to add a bit of detail to Soma's answer - Don't forget the semi-colon $log->save('querylog', $q); (I did at first.) There's no need to add a file extension, as '.txt' is added automatically. (I did at first.) The file 'querylog.txt' is saved in '/site/assets/logs/' like so '2014-04-02 09:39:24 username http://example.com/search/ searchword'.
  19. Does what it says on the tin - about 250 bytes of CSS. http://mourner.github.io/dead-simple-grid/ For when Bootstrap, Foundation, etc are a bit too much. (I was sure I had seen this mentioned in the forum before, but a search didn't find it.)
  20. Chrome users can rid themselves of W3Schools (and any other rubbish that regularly turns up in the search results) by installing the Chrome Personal Blocklist. BTW I love the way they illustrate the extension using Matt Cutts.
  21. I think, following on from bwakad's comments and kongondo's (understandable) reaction is that the takeaway here is that you can't have too many example site profiles. What 'clicks' with one new user may well be different from what another new user has an epiphany with.
  22. I was reading the HTML5 Boilerplate .htaccess file (like you do), when I came to the bit about filename-based cache busting. TL;DR Resources used by a web page that will rarely change (js, css, images) should be given an 'expires' date well into the future to take advantage of browser (and possibly proxy) caching. However, when they do change, you need to tell the browser to load the new version instead of the cached version. Using query strings (eg styles.css?v=2) is not the best way. The html5bp htaccess references a blog post by Steve Souders on this topic. The 1st comment to this post references a way to include automatic versioning for these types of resources, based on the file date. (That last link pretty much summarises the whole deal, if you haven't time to read the other links.) The reasons why I mention this are It's an interesting subject. It seems to me to be something that could be implemented in PW for relatively little initial effort, but have significant benefits going forwards. Now my technical ability is limited as far as implementing this goes, but that's why I mention it here. I don't know if this should be a core feature request, or a module, or what, but I offer it for discussion. What do you think?
  23. Aahh, now I understand. Apologies. I think array_slice might be what you need. arsort($related_id); $related_id = array_slice($related_id, 0, 4); foreach($related_id as $key => $val){ $rp = $pages->get($key); ?> <a href="<?=$rp->url;?>"><?=$rp->title;?><br><? } That should limit the array $related_id to just the first 4 entries, which I think are the highest scoring after the arsort().
  24. Anthony, have you tried $related_pages = $pages->find("tags.title=$tag,limit=4");
  25. DaveP

    Lister

    Another one where clicking 'Like' doesn't feel anywhere near enough! This will be super useful for me on at least 2 sites.
×
×
  • Create New...