Craig A Rodway

Members
  • Content count

    306
  • Joined

  • Last visited

  • Days Won

    4

Craig A Rodway last won the day on January 4 2016

Craig A Rodway had the most liked content!

Community Reputation

499 Excellent

About Craig A Rodway

  • Rank
    Distinguished Member

Contact Methods

  • Website URL
    http://webman.me.uk/
  • Skype
    m0php-craig

Profile Information

  • Gender
    Male
  • Location
    North East England

Recent Profile Visitors

8,207 profile views
  1. You need to call this as a function to get all POST data: $input->post();
  2. I've done an implementation of "magic link" logins via email on a previous (non-PW) site using HMAC SHA1 to avoid having to store passwords. On an upcoming site, I plan to do a similar thing but using JWTs to encode and verify the data, as it's a better standard than just concatenating a bunch of values
  3. You can double-click the bin icon on file/image fields to mark all items for deletion.
  4. I recently experienced a similar effect too, across three sites on two very similar servers. Running 5 requests with no caching against the PW Admin login page, as guest, these results are the median response time for just the page request: Server 1, PHP 5.6.15, Site A, PW 2.7.3: 217ms Server 2, PHP 5.6.22, Site B, PW 2.7.1: 293ms Server 2, PHP 5.6.22, Site C, PW 3.0.17: 672ms I noticed the slower time when Site C was first launched, but had little time to really investigate it there and then, and haven't got round to it since.
  5. Bandcamp might be a good option for the selling part?
  6. I can see the REST topic being split into its own thread, but on that subject here are some of my own observations/notes based on some recent projects. URLs: Generally, lots of them are needed. This either means lots of pages/templates to keep track of, or implement routing logic in a template and call other classes/functions/modules as required. Content Type, Input Method and errors: Detecting and responding correctly to content type headers has to be done manually - or just ignored, and respond with your chosen format. This is generally OK, but uncaught exceptions or errors will just show HTML instead. Sometimes it's necessary to implement DELETE and PUT HTTP methods as well. Input data: PW doesn't allow deeply-nested arrays/objects (WireInputData@cleanArray) which has proven problematic. Slightly related to the above point - but sometimes data is sent as regular encoded form data, and other times it is JSON or XML in the raw PHP input body. Returning objects: sending page data means creating arrays and specifying exactly should be sent. For text/number fields it's not too bad, but is much more involved when images and Page fields are used. My solutions for this range from implementing toArray() methods/hooks, right up to third party library http://fractal.thephpleague.com/.
  7. In something similar, I stored this in a sort of "availability" custom database table. It was quite simple though, with two columns: day_of_week (int) time (time) The UI wasn't quite like yours - it was day of week, and then add multiple time ranges (e.g. 9am-12pm and another could be 2pm-5pm). The end result was the same as what you are wanting to achieve though. You could add an ID and/or date field as well depending on how you set up your schedule too.
  8. Same, but just with Pingdom It's interesting to see the subtle differences between the services, and the gradings they come up with.
  9. WordPress: Grade D 65, 10.29 seconds load time, 3.5 MB page size, and 206 (!!) requests (URL) ProcessWire: Grade A 93, 1.73 seconds load time, 2.5 MB page size, and 70 requests (URL) (Using the same service and location) Good work
  10. Would this module be any good? http://modules.processwire.com/modules/fieldtype-select-file/
  11. I think one solution which may work here is to add these as separate fields to your node/router template, using the fieldtypes that already exist. Or is there a specific reason you would want these in one field? Proposed fields for your router template: IP address: text. Lat/Lon: MapMarker Hardware: text? Firmware: text? Connection time: text/integer? Your API "nodeinfo" data can hopefully be decoded and transformed so you can get the values easily - what format is it in? Plain text, or something like JSON or XML? Here's some example code to update a router page that has separate fields for your data: $router = $pages->get(1234); // a router/node page by its ID $router->ip_address = '127.0.0.1'; $router->geo->lat = 54.12; $router->geo->lng = -1.2; $router->hardware = 'cisco'; $router->firmware = 'cisco-ios-fw-100'; $router->connection_time = 42;
  12. Wow, the new Pingdom Website Speed Test result is... amazing Grade D, 10.29 seconds load time, 3.5 MB page size, and 206 (!!) requests.
  13. I think that is a novel way of setting the focus point! But I don't necessarily agree that it should be the only option. I have feeling more novice users/editors would be confused by it not being "specific" enough, as they might not be able to visualise how that appears in the front-end on their news article for example. Unless the pre-defined crop areas - as they exist now - will still show a preview step, somehow? Perhaps I've been thrown by the multiple tiles in the demo? I just really enjoy how, for me and the projects I've worked on, CroppableImage has been one of the best image-related things in PW. It just helps so much being able to specify the dimensions images should be
  14. That's pretty good Pete! Should be nice seeing the data and results and getting the feedback and seeing the differences in a short time
  15. Hi ceberlin. According to the original post, the upgrade was rather important to do. It's different, yes. And it may take a while to get used to. But it's something that needed doing