Tom.

Members
  • Content count

    249
  • Joined

  • Last visited

  • Days Won

    3

Tom. last won the day on August 17 2016

Tom. had the most liked content!

Community Reputation

284 Excellent

About Tom.

  • Rank
    Sr. Member
  • Birthday 11/01/1992

Profile Information

  • Gender
    Male
  • Location
    England
  • Interests
    ProcessWire

Recent Profile Visitors

1,823 profile views
  1. I feel like 580px for the sidebar is far too big, and that's the minimum. I feel like 380px would be far more comfortable. The view without the sidebars doesn't have the page breadcrumbs anymore.
  2. Haha, I actually knew this! Sorry, complete Sheldon Cooper moment there!
  3. Surely it would look better with no styling? I'm sure when it comes to creating the actual theme, we will not aim to make it look worse. Great work Ryan, this is shaping up really well! Can't wait to get stuck in!
  4. Hello, I can see it's using <canvas>, it's very likely that all the urls are set in Javascript. I can't find any documentation on how to change the URL, am I getting your question right? If you like to any documentation I'm sure I can help you further.
  5. I personally haven't had any issues, just make sure you do the standard checks that are built into ProcessWire's API https://processwire.com/api/ref/sanitizer/ also make sure you do permission checks such as updating a user: $u = $users->get($id); if($user == $u) { // Do stuff here } else { // You don't have permission to edit this user } If for example you have profile pages which are a page, you will have a Page Reference field that will store the user then you can do: $p = $pages->find("template=profile, user=$user"); $p->of(false); if($location) { $p->location = $sanitizer->text($location); } $p->save(); And the update will be url will be: domain.com/users/update/?location=England In the ajax.php file you don't want to pass $user as this is built in however you do want to pass location: if($input->urlSegment1 == "users") { if($input->urlSegment2 == "get") { wireIncludeFile("ajax/users/get", ["id" => $input->get->id]); } if($input->urlSegement2 == "update") { wireIncludeFile("ajax/users/update", ["location" => $input->get->location]); } } EDIT: Sorry, I didn't consider if you was using AJAX externally (websites on a different server), you will probably want some external authentication checks you can create fields for Users I would create a field called auth, salt the username and password then you can do a check on username and password salt and if it matches select that user as active $ajaxUser = $users->find("auth=$salt);
  6. Hello, I suppose there loads of ways of doing this, and it mostly comes down to person preference. I usually create a template called Ajax then give the template the ability to use segments, I use segment 1 for the group and segment 2 for the action, the rest I use GET. Then each action can live in an Ajax folder. The ajax.php will look like: if($input->urlSegment1 == "users") { if($input->urlSegment2 == "get") { wireIncludeFile("ajax/users/get", ["id" => $input->get->id]); } if($input->urlSegement2 == "update") { wireIncludeFile("ajax/users/update", ["id" => $input->get->id, "email" => $input->get->email]); } } Then in ajax/users/get.php for example I do: return $users->get($id); Ajax request will be to the url domain.com/ajax/users/get/?id=1039 for example Not sure if I'm answering your question here.
  7. This is amazing and so easy to skin, I noticed a few CSS errors, I will put them on GitHub Great work Ryan!
  8. I always wondered the best way of setting up fields in terms of Performance, do you have one field for example called "slider" which you can use across multiple templates, or is it better for performance to break down the field into templates: "home_slider" "journal_slider" For example, will it take longer to query the single entry for home slider among the potentially hundreds of entries for journal slider, if you use one field "slider".
  9. @Robin S I understand your concern, however this is default but will not remain default. What I get from this blog post is Ryan wants to work with the designers on this forum to customise UIKit using it's built in classes to create a front-end which will be ProcessWire's new default. I personally love the new simplistic approach and it's pretty much an empty canvas for us to inject some personality. For our website - http://peterandpaul.co.uk/ we use our own customised version of the backend.
  10. Any news on this?
  11. @BitPoet sadly this has broken the website. All date format fields when using the time field also get the following error - All the data has reset to 1970. It also breaks the ability to do $pages->find("timeon<=". time() ."); Error saving field "timeon" - SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column 'data' at row 1
  12. HI fbg13, I have already namespaced it, thank you for your reply. I was making BitPoet aware. I opted to namespace the entire php file.
  13. Exactly what I'm looking for, thank you very much! Edit: @BitPoet Not working with 3.0 - Error: Class 'ProcessWire\WireDT' not found (line 109 of /home/peterand/public_html/pwtramlines/site/modules/WireDT/FieldtypeDatetimeAdvanced.module)
  14. Hey, I'm wanting to build a selector where you can filter the day (Friday, Saturday, Sunday). However, it doesn't matter the date as long as it falls on a Friday, Saturday or Sunday. $pages->find("template=act, showing_on=Friday"); I'm using a dateTime field because it will show the actual date, the only thing I can think of is have a date select and a options field to select the day. I was just wondering if there is a better way of doing it avoiding the user selecting twice. Before I was looping through each act and converting the dateTime to day and checking if it doesn't equal the day !="Friday" and removing it from the array if it doesn't. However this crashes the server when traffic is high.
  15. Hello, I've recently done an update on one of our websites adding a field to a template. I changed 1 template by adding the field echo <?=$page->field->url?>, that was the only change. After clearing ProCache so users can see the update. All images stopped working on the website, strange? I only edited the one file. Then I noticed that the SEO module stopped working, and also a lot of functionality just stopped working. Here's where it gets strange, if I'm logged in everything is fine. I've cleared and disabled ProCache however, that hasn't fixed anything. This is the error I'm getting in the logs based on an image Error: Call to a member function width() on boolean (line 15 of /home/eizo/public_html/site/assets/cache/FileCompiler/site/templates/stockist.php) Why would the image field come out as a boolean? I've ran an update on ProcessWire and nothing. EDIT: Deleting the folder /home/eizo/public_html/site/assets/cache/FileCompiler/ does nothing. EDIT2: It appears that it was due to Access on the field, even though guest and moderator had permission to view the field but not edit (which I want). No idea how to get around this so our moderator can not change images on the website, without it breaking the website. However the SEO module still isn't working.