Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. You can work the other way around without a regex. So basicly you have 2 parent folders: Available and In Use. All possibilities go in Available, then when chosen, change the parent of the code page. So move the page from Available and In Use. This way you can check if a code is already gone. And see which one is active.
  2. That site use a lot of cookies
  3. One for my wishlist An Inputfield & Fieldtype that lists from every found page the first Image thumbnail. So the input fieldtype should look like an album & browsing the tree should show the first found image or the image field thats configured. This field can be used to build photo albums, select photo's with meta data etc.
      • 2
      • Like
  4. See last 2 picture in the pedigree profile, if such a menu fits, you could download the profile. The navigation function is located in /site/templates/inc/func.inc
  5. The only option I see is adding an url segment to the 'ajax' links with javascript and only if your browser is compatible with pushState. Say you push ajax/ to the end of the url, that way you can have the page cached and the URL segment cached. I know this is ugly... if($config->ajax && $input->urlSegment(1) === 'ajax') { ...serve the page } else { echo $pages->get('/')->render(); } It's not ugly if you do it like this: $.ajax({ url: default.url + "ajax/", // assumed the url to get is in default.url, and we append the ajax urlSegment cache: true }).done(function (markup) { $("#container").html(markup); });
  6. Orbit is ugly with z-index stuff, Slick Slider looks great I like the 'API' Methods.
  7. To array or not to be (array) Thats how you configured the image field. As single image or as an array of images.
  8. @Manfred62, using javascript for a sticky footer is in my opinion a bad habit. if it's reasonable & possible with html & CSS, do it that way.
  9. There's a sticky footer in the pedigree profile.
  10. Thanks, FieldtypeTemplates is one of my favorites
  11. @bwaked: “Übung macht den Meister” Don't redirect on the session throttle. (WireExeption) If you set before all if statements the $errors = false; then you could after the statements ask: if ($errors) { // continue with the page. echo $errors; }
  12. You can't login that easy with email address. $session->login wants the name of the user. (Page name) Email is not unique in processwire. Something like this can work. (Could have a bug or 2 didn't test it) $email = $sanitizer->email($input->post->email); $password = $input->post->password; $amount = $pages->count("template=user, email=$email, include=all"); $error = false; if (!$email) { $error = "Not a valid emailadres"; } elseif ($amount === 1) { // if we have only one user with this email address, give the username back $username = $users->get("email=$email, include=all")->name; try { $u = $session->login($username, $password); if ($u && $u->id) { $session->redirect(1234); } else { $error = "Login failed."; } } catch(WireException $e) { // throttle login $error = $e->getMessage(); // get the error message } } elseif (!$amount) { $error = "No user found"; } elseif ($amount > 1) { $error = "multiple user accounts"; } if ($error) { echo "<p class='error'>$error</p>" }
  13. The users as actual pages. users | +-- admin | +-- bwaked | +-- martijn There's no way you could put a double bwaked in the above structure. (remember $users->get('bwaked') syntax, getting bwaked user from users PageArray ) If you want to create a new user front-end, you should first check if the user already exists by asking the id. if ($users->get('bwaked')->id) { // user already exists, if it didn't existed the returned id was 0 so bools to false } else { // there's no bwaked, goahead and create } If you create a new user that already exists and you want to save this user, ProcessWire prevents saving. (error)
  14. name field (This insures the uniqueness of the user) On every custom login send name / pass secure, use https or ssl
  15. Looks like you've enable caching.
  16. Great work Kongondo! Guess you've fun developing this one.
  17. You could build with PW planboards, map applications, newsletter-tools, news-scapers, spiders, voting games, surveys etc etc. Calling PW an enterprise CMS is way to limited.
  18. Say you have a local 'domain' called 'mydomain.dev' then you can reach it in your browser at http://mydomain.dev, and the manager at http://mydomain.dev/processwire/. This way your local environment have the same url structure as the live situation. etc.
  19. Ahh, should have read better. For process module pages there's ProcessHello. For the tutorials maybe one tutorial / article that lists boilerplates, startingpoint for modules.
  20. My thought on this is that a tutorial only can be build if you're in a process to build a theme yourself and 'record' every step you've done. (or you need a lot of experience building themes ) The development process will be a bit slower, but on the end you've the admin theme and a tutorial.
  21. <?php //template places foreach ($page->children as $child) { $child->rendered = true; $content .= $child->render(); }; ?> <?php // on the child template if ($this->rendered) { // not sure, could work or else take it from $page->rendered echo "<div>markup you need</div>" return; // return, end rendering & give control back to processwire } ?> <!doctype html> <html> <head> ... etc Can't test this right now... sorry
  22. Tnx reems, + It's hardcoded in your template I guess...
  23. @reems, i'm nitpicking here: You've exposed the edit link for guest users. If you don't really need it, it's better to show it only if a user is logged-in.
  24. There a few reasons why I won't choose Revolution as CMS again, but extjs isn't one of them. But developing tightly GUI integrated plug-ins for MODX is for most users who have no experience with extjs (like me) way more difficult.
  25. Slow loading of the pagetree forexample is for most not an extjs issue, but a getting the data quick to load the tree is the issue. Lot's of people do blame extjs, but I don't think that is fair.
×
×
  • Create New...