Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


BillH last won the day on April 21 2022

BillH had the most liked content!

About BillH

  • Birthday 03/06/1962

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    London, UK

Recent Profile Visitors

2,195 profile views

BillH's Achievements

Sr. Member

Sr. Member (5/6)



  1. Following from @wbmnfktr's suggestion, note that the documentation for sort=sort states "But note that if the results have multiple parents, the resulting order isn't likely to be that useful." I find that in cases like yours something along the lines suggested in this post is often what I need:
  2. One approach might be to keep a log of a certain number of timestamps for the most recent hits on each page (dropping the oldest when adding a new one). Calculating the average difference between the timestamps would give a rate at which the page is being hit. It might also work to look at the age of the oldest timestamp, and if it's less than a certain age assume the page is receiving a lot of hits. You might find some useful techniques in the Page Hit Counter module.
  3. I assume that you are talking about a user of the back end being able to change the order. The nicest way that comes to mind would be to use the ProFields Repeater Matrix (a paid module), which would allow dragging fields into order. Otherwise, I'd suggest a Page Reference or Select Options field to define the order of fields. You could use radio buttons with predefined field arrangements (e.g. 'main text / slider / image' , 'slider / main text / image', etc). It might also be possible to use AsmSelect instead of radio buttons, with each value being a field, and with preselected or default values that include all fields. However, you'd probably want to omit the delete button on each item and the selection dropdown, which could get complicated (perhaps easiest using CSS). Others may have better ideas!
  4. That's a serious amount of PW awesomeness you've provided! Bookmarked for my own purposes 🙂
  5. To implement what has been suggested by @bernhard and @BitPoet, there are modules that might help. Perhaps you could display data using the RuntimeMarkup module. And for selecting a race, the Dynamic Options module or the Dynamic Selects (commercial) module might be useful.
  6. I don't know how to do what you're suggesting (perhaps someone else can help!), but I'm wondering if it might be possible to achieve what you need using field dependencies. It might work to combine dependencies with validating fields or setting field values as discussed here:
  7. I too forgot it was only pages before a certain date, so don't miss @bernhard's suggestion! Meanwhile, I guess that deleting so many pages will cause timeouts or memory problems (I may be wrong!). If it does, you could run the code several times using a suitable 'limit' in the selector. You could do this manually, or perhaps put the code in a shell script and repeat using Cron. Or use LazyCron.
  8. The counter is correct: you still have 124019 pages. Perhaps the script is timing out or running out of memory. Try this variation of @AndZyk's script: $authlogs = $pages->findMany('template=authlogs, limit=100'); foreach ($authlogs as $authlogPage) { $pages->delete($authlogPage); } Note: findMany() reduces memory usage; 'limit' reduces the number of pages selected. (And 'authologs' is changed to 'authlogs' in two places.) Does the count now drop by 100?
  9. I notice that in the example code the selector for $authlogs is 'template=authologs' (with an extra 'o'). Did you perhaps copy that selector without correcting it?
  10. Another recommendation is the Page Manipulator action of the Admin Actions module.
  11. I've finally got back to dealing with this... And the link in my previous post does provide a working solution. Thanks @poljpocketfor your help!
  12. I think the solution may be here (applied to a repeater rather than a repeater matrix), though I'm still conducting tests:
  13. However, I've just found that $page->secureFiles() returns "true". [EDIT] I don't understand this, but I'm not sure how relevant it is, as I think I may have found the solution - see next post.
  14. "Prevent direct access to file assets owned by pages using this template?" is set to "No". I tested the other two settings, and they didn't change anything. Also, following on from your suggestion, I checked $config->pagefileSecure in wire/config.php, and it's set to "false".
  15. Thanks @poljpocket, a useful thought and I've just checked. In each case the URLs are identical.
  • Create New...