Craig A Rodway

  • Content Count

  • Joined

  • Last visited

  • Days Won


Craig A Rodway last won the day on January 4 2016

Craig A Rodway had the most liked content!

Community Reputation

514 Excellent

About Craig A Rodway

  • Rank
    Distinguished Member

Contact Methods

  • Website URL
  • Skype

Profile Information

  • Gender
  • Location
    Gateshead, UK

Recent Profile Visitors

8,782 profile views
  1. I would say Stripe is a leader in this area and a good option to consider. Failing that, there's always PayPal
  2. Craig A Rodway

    When I've needed to implement a multi-page process, I've stored the user's responses in the session, using the built-in ProcessWire Session handling code. If anything needs to be permanent at the end of the process, only then would I create the necessary pages.
  3. Craig A Rodway

    You need to call this as a function to get all POST data: $input->post();
  4. Craig A Rodway

    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
  5. Craig A Rodway

    You can double-click the bin icon on file/image fields to mark all items for deletion.
  6. Craig A Rodway

    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.
  7. Craig A Rodway

    Bandcamp might be a good option for the selling part?
  8. Craig A Rodway

    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
  9. Craig A Rodway

    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.
  10. Craig A Rodway

    Same, but just with Pingdom It's interesting to see the subtle differences between the services, and the gradings they come up with.
  11. Craig A Rodway

    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
  12. Would this module be any good?
  13. Craig A Rodway

    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 = ''; $router->geo->lat = 54.12; $router->geo->lng = -1.2; $router->hardware = 'cisco'; $router->firmware = 'cisco-ios-fw-100'; $router->connection_time = 42;
  14. Craig A Rodway

    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.
  15. Craig A Rodway

    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