Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by mindplay.dk

  1. You should copy/paste these explanations to the wiki - this is important stuff.
  2. we can't all be at all conferences all the time - video is cheap to shoot, free to share. conferences really need to get better at this.

  3. this is of course better than passing around class-names as strings because... oh wait, you're still doing that. http://t.co/G1a0xq5gCD

  4. er, @twitter is rejecting a 138-character message - I thought the limit was 140???

  5. some notes about recent development of Idiorm and Paris http://t.co/G1694Ucgt2

  6. Looks like this could make a good starting point for what I'm talking about!
  7. Just thought of a module I might want to build - just wanted to share the idea and see if anybody else would be interested. The Page List tree-view is great for most things - but it's not necessarily the ideal interface for things that aren't structured. For things that are just flat lists, I'd like to have a tabular admin interface - a grid view with columns, and eventually with sorting and filtering functions, though not necessarily in the first version. I'd like to have an admin interface from which you can create table views as needed - e.g. give it a title, select the Template, select the parent Page, and optionally enter a custom selector. Tabular views would be accessible from the "Pages" menu. Thoughts?
  8. Looks like validation occurs in input-fields? I started writing a simple module: https://gist.github.com/mindplay-dk/71b7c74b1d73fe58146a I don't know how to implement the uniqueness validation... As far as I can tell, input-fields are unaware of the Page being edited? As you can see near the TODO in InputfieldUniqueId, I'm stuck... Field-types, on the other hand, don't seem to be able to report error-conditions? So I can't put the validation there. (Is this the real reason why so many field-types simply throw away invalid values without warning? Because they can't report invalid values? I'm pretty concerned about this, as mentioned above...)
  9. http://t.co/NKM0QF0Myo "Over 40,000 still images taken from my front window over 15 months were blended into the film" - amazing!

  10. microsoft now provides bootable VirtualBox and VMWare (Player) images with IE7/8/9 - nice!

  11. In my experience, 2 out of 3 sites need recursive navigation somewhere. What do you think about adding a $selector argument to the function? So as to allow recursively visiting pages of a particular type, etc. Edit: I also wonder if it's possible to preload the entire sub-tree to prevent high number of recursive queries?
  12. it's becoming increasingly apparent to me that if you want to work in Portland, you have to know Rails...

  13. I posted a question here http://t.co/v1SVm0qCyK if you understand Operational Transformation, please see if you can answer? thanks!

  14. You will be surprised at how quickly things are going to click for you - everything is so simple and intuitive, it basically just makes sense, without much reading or experimenting. Very different experience from any other CMS I've tried
  15. This is so common - I do things like this all the time, not just for menus. Does anyone else think this should be part of the core? For now, I wrote a simple flat function: /** * Recursive traverse and visit every child in a sub-tree of Pages. * * @param Page $parent root Page from which to traverse * @param callable $enter function to call upon visiting a child Page * @param callable|null $exit function to call after visiting a child Page (and all of it's children) */ function visit(Page $parent, $enter, $exit=null) { foreach ($parent->children() as $child) { call_user_func($enter, $child); if ($child->numChildren > 0) { visit($child, $enter, $exit); } if ($exit) { call_user_func($exit, $child); } } } With PHP 5.3 you can generate a menu (or whatever else) recursively as simple as this: visit( $pages->get('/menus/main') , function(Page $page) { echo '<li><a href="' . $page->url . '">' . $page->title . '</a>'; if ($page->numChildren > 0) { echo '<ul>'; } } , function(Page $page) { echo '</li>'; if ($page->numChildren > 0) { echo '</ul>'; } } ); Dead simple. I've seen the options for modules etc. that generate menus - they seem to grow out of control with a million options, and my own helpers seem to evolve the same way, and it doesn't jive with the beautiful, self-contained, simple templates you normally get away with in PW. Would it make sense to have a standard visit() method in Page in the core?
  16. "it's time to turn off Java for good" http://t.co/IP0I34K5 - I couldn't agree more. Java has no business existing in browsers anymore.

  17. Keep tweeting - even after you die. http://t.co/VFc3rEXa (bizzarre...)

  18. "Trailing Comma" PHP RFC: http://t.co/Bry8TyDT - does anyone else think this just makes PHP even uglier?

  19. am I the only one who think this completely hillarious? counting the asteroids doesn't increase risk or create more asteroids, does it?! ;-)

  20. posted this on php-internals http://t.co/p7gSjwNP I'm sure I'll burn for this one.

  21. more than 10 years ago, an employer told me, "you put too much honor into your work!" - I have been honored to disappoint him ever since :-)

  22. holy crap @Oracle http://t.co/w8g21Bjm what's the point of even tracking bugs if you leave them open and verified for 5 years or more??

  23. I may have uncovered a pretty serious bug in @MySQL - please take a look and see if it's repeatable on your system? http://t.co/x1mkjomW

  24. brilliant business model: "CAPTCHA is stupid, so we invented a new kind of CAPTCHA!" - er... huh? http://t.co/jak5xZuH

  • Create New...