alxndre

Members
  • Content count

    144
  • Joined

  • Last visited

  • Days Won

    5

alxndre last won the day on February 25

alxndre had the most liked content!

Community Reputation

238 Excellent

About alxndre

  • Rank
    Distinguished Member
  • Birthday 05/06/1987

Profile Information

  • Gender
    Male

Recent Profile Visitors

3,901 profile views
  1. alxndre

    I think his problem is how to get the value for $hash. // $hash = ????; $hash = howToHashThePlain('password1337'); $u = $pages->get("template=user, pass=$hash"); I'm trying to figure it out as well but most of the related things (salts, functions matches and hash) are set to protected, so I'm thinking this could not be done without touching the core modules, or extending/duplicating them to support generating the hash for the field on-the-fly. I'll perform more tests when I could. On a side note, I could not imagine a practical use case where you -should- be using the password field to search for members given that passwords are not meant to be unique or indicative of anything. So if OP could enlighten us on how he's using this, maybe we could be motivated to work on it more.
  2. I don't think this is possible because WireLog replaces the escape characters with spaces: // somewhere in WireLog::save() $text = str_replace(array("\r", "\n", "\t"), ' ', $text); and it also sanitizes the tags when outputting.
  3. Usually we use the finder (Pages > Find) and saving bookmarks for commonly used filters. Other times, we create custom module for this if additional functionality is needed.
  4. alxndre

    Here's a somewhat long discussion about default values. The take-away is that it is that it's not as needed as it seems, and that if you do need it, it can be implemented using hooks or a quick module. No core support for it that I know of.
  5. alxndre

    Most of them work because ProcessWire compiles them automatically. I'd suggest you spin up a local test installation to be sure.
  6. alxndre

    Do you mean in the page editor? I'll look if there are modules for this because I'm not sure. But you can also do this via the api: $home = $pages->get('/'); echo date("d M Y", $home->published) . PHP_EOL; // 21 Feb 2017 echo date("d M Y", $home->created) . PHP_EOL; // 21 Feb 2017 $home->published = strtotime("February 21, 2016"); $home->created = strtotime("February 21, 2016"); $home->save(); echo date("d M Y", $home->published) . PHP_EOL; // 21 Feb 2016 echo date("d M Y", $home->created) . PHP_EOL; // 21 Feb 2016 Edit: My bad. The changes doesn't seem to persist. Turns out, published, created, and modified are not "fields" per se, but rather are properties built-in to the page. This might be a good candidate for a quick module for those who need to edit the values.
  7. alxndre

    I'm pretty sure ProFields: PageTable allows creation of new pages from from within the page being edited.
  8. I dunno why yet, but can confirm the weird behavior. The function works when fed with strings but gives weird results when input is taken from the array. // output looping through getDateFormats() l, j F Y : %A, $-d %B %Y j F Y : $-d %B %Y d-M-Y : $d-%b-%Y dMy : $d%b%y d/m/Y : $d/$m/%Y d.m.Y : $d.$m.%Y d/m/y : $d/$m/%y d.m.y : $d.$m.%y j/n/Y : $-d/$-m/%Y j.n.Y : $-d.$-m.%Y j/n/y : $-d/$-m/%y j.n.y : $-d.$-m.%y Y-m-d : %Y-$m-$d Y/m/d : %Y/$m/$d Y.n.j : %Y.$-m.$-d Y/n/j : %Y/$-m/$-d Y F j : %Y %B $-d Y-M-j, l : %Y-%b-$-d, %A Y-M-j : %Y-%b-$-d YMj : %Y%b$-d l, F j, Y : %A, %B $-d, %Y F j, Y : %B $-d, %Y M j, Y : %b $-d, %Y m/d/Y : $m/$d/%Y m.d.Y : $m.$d.%Y m/d/y : $m/$d/%y m.d.y : $m.$d.%y n/j/Y : $-m/$-d/%Y n.j.Y : $-m.$-d.%Y n/j/y : $-m/$-d/%y n.j.y : $-m.$-d.%y Will investigate more. Edit : https://github.com/processwire/processwire/blob/master/wire/core/WireDateTime.php#L86 The code actually has those $ symbols. Submitted as an issue.
  9. What exact code are you running so we'd have an idea where the $ is coming from? I just tested right now: echo $datetime->convertDateFormat("Y-M-D","strftime"); // output %Y-%b-%a
  10. alxndre

    My suggestion as always would be to install Tracy Debugger, to see what's going on. The built-in terminal for example would be very useful for this. I would probably do a dump or print_r of the the $resource->image variable just to make sure if it's an array or whatever it really is.