• Content count

  • Joined

  • Last visited

Community Reputation

142 Excellent

About fbg13

Recent Profile Visitors

389 profile views
  1. @flydev Take a look at https://github.com/jubos/fake-s3 and https://github.com/jserver/mock-s3 I have not used them.
  2. You can always use the cache for time/resource demanding code and you can update it with a cron or hook so users never get long load times.
  3. https://processwire.com/api/modules/form-builder/#requirements
  4. Users are pages in PW, if you look at the database there is no users table. This is how you create an user // Create the user $u = new User(); $u->name = $sanitizer->pageName($username); $u->email = $sanitizer->email($email); $u->pass = $pass; $u->addRole("member"); $u->save(); this will create a new page under /admin/access/users/ and that is your user. What i suggested above is just what i find easier to work with as i don't want to mix default pages with the rest.
  5. @LimeWub Regarding the processing of the form pages. You can save the forms in one or more pages under a page representing the user. For example you create a page named "Users" and whenever an user registers you create a page under users with the user's name. Users --username1 --username2 Then when he submits a form you create a page under the corresponding user. Users --username1 ----form1 ----form2 ----form3 --username2 ----form1 ----form2 Or create just one page and you save just the fields from the current form and on the next forms you update the page with the new fields. Then you can get the forms for a user with $currentUserForm1 = $pages->get("parent=/Users/username1/, name=form1"); $currentUserForm2 = $pages->get("parent=/Users/username1/, name=form2"); create pages through api upload files
  6. This https://www.mail-tester.com helped me with my e-mail. I got it from someone here on the forum i think.
  7. $config->urls->httpRoot https://processwire.com/blog/posts/processwire-2.6.18-updates-pagination-and-seo/#new-http-prefix-available-for-all-config-gt-urls-properties
  8. I think Pages::added might fit better. Thanks.
  9. I'm so stupid . I am saving the same page, I have a views field that gets incremented once per session.
  10. With null as expiration, after a restart, it still doesn't get the cache, but when opening the page in another browser (after it was loaded in another browser) it gets it on the first load. Same with no expiration or an integer. And I forgot to ask, but why is the code inside the hook executed?
  11. I changed the code in the template to only $cache->get("cacheName"); and left the cache generation to the hook for easier debugging. Also I changed the constant to null and opened the page in a new browser, with the same result. Will test it a little more, but i can't restart my pc right now.
  12. The module where i generate the cache is autoloading and whenever i restart my pc and access a page that should be cached, and it is cached as i can see the entry in the caches table, the caching functions still executes. If I refresh the page, it loads fast, 0.5 seconds compared to 13 seconds. If I open the page in another browser the same happens, first page access doesn't load the cache, but creates it again, even though it's in the database. Is this a bug or am i missing something?
  13. @kongondo is the sql solution preferred because it's faster or uses less memory, or both, compared to php?
  14. I have pages that have children whose name/title is just a number. echo "<pre>" . print_r( $page->children()->sort("name"), true) . "</pre>"; echo "<pre>" . print_r( $page->children("sort=name"), true) . "</pre>"; The above gives me //echo "<pre>" . print_r( $page->children()->sort("name"), true) . "</pre>"; ProcessWire\PageArray Object ( [items] => Array ( [2] => /parent/1/ [0] => /parent/3/ [3] => /parent/5/ [4] => /parent/11/ [1] => /parent/15/ [6] => /parent/31/ [5] => /parent/33/ ) ) // echo "<pre>" . print_r( $page->children("sort=name"), true) . "</pre>"; ProcessWire\PageArray Object ( [items] => Array ( [0] => /parent/1/ [1] => /parent/11/ [2] => /parent/15/ [3] => /parent/3/ [4] => /parent/31/ [5] => /parent/33/ [6] => /parent/5/ ) ) Seems like this is not possible as mysql can't sort results that way. http://stackoverflow.com/questions/153633/natural-sort-in-mysql I think that's why the ways of sorting i posted above are different, first is sorted by php that can natural sort and second is sorted by mysql which can't natural sort/