Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. That's true, but that's really not a problem. There are people with millions of pages in their processwire installation, so even ~1000 pages for seo field won't matter and that's already a big website. Ryan did already "kinda" mark this path as the way to go as he did develop the repeater field the same way, with it also potentially holding a lot of small pages even for only 2 to 3 fields. There's just no need to introduce new systems into the core, when everything needed is already possible. Contrary to the raw data-model implementation the field can certainly be refined in terms of handling in the backend UI, so for example that group subfields are populated to the template fields and are kinda marked as group. But that are mostly UI conveniences. Like I said in the other wishlist topic: Nobody does need to necessarily know that those grouped fields are saved in separate pages.
  2. It's not even running all supplied queries if it doesn't need to. So it's should actually be quite performant in that regard.
  3. Renobird is not 100% correct. ProcessWire does try to create a db for you, but it does need the access rights to do so. I'm not sure if that's the case for your setup.
  4. Have a look at this one: https://github.com/EX3MP/generator-processwire
  5. created is a native field without fieldtype, therefore there's no formatted to unformatted distinction (which is part of fieldtypes logic).
  6. The second option will work for all php versions, but you need such a function for each of your namespaces.
  7. CKEditor plugins should be added to the site/CKEditor/ folder. It's strongly adviced to not modify anything inside the wire/ folder, because it's simply replaced on updates.
  8. That sounds quite like what I was proposing in the topic you linked.
  9. () are OR-groups and end= is just so that those two groups do not mix with other OR-groups in your selector. If they're the only ones you can skip this label. Mixing fields for sorting simply isn't supported by processwire's selector engine. But it's possible using raw sql queries.
  10. Not filled date fields are sorted as 0 therefore you cannot "fallback" to another field's date. Secondary sorting is only used to determine sorting for pages, which have an equal sorting value by the first field. It's like sorting items which are already put inside a folder from a previous sort. The same goes for the >=today. NULL is not greater than the current timestamp, so the selector shouldn't return pages without end date. Use "end=(end_date=''), end=(end_date>=today)" instead.
  11. For php 5.6+ by using this: use function ProcessWire\wire; Or maybe a own function wire() for your namespace, which then delegates to processwire's function: function wire($key, …) { return \ProcessWire\wire($key, …); } And just to make that clear. Bootstrapping processwire will make api variables available as local variables, no need for wire() func calls here. Just use $config.
  12. I'm curious what you think a framework could migrate, that processwire can't.
  13. Is there a reason to replace the cache folder? Normally one would exclude such folders from deployments.
  14. With the new 3.0 api docs this could potentially be auto-generated, so I'm hoping
  15. 2.7 modules will probably be compatible with 2.8/3.0. There are only some small points which could require an update to fully make a module compatible with both versions. Backwards compat is another topic and depends on if one is using namespaces or other new features. On 2.8/3.0 you can install modules via composer which are set up to be used that way and installation of processwire via composer is planned.
  16. It depends on the type of WireArray and where it's used. It's just like arrays. One can choose to use string keys, but one can also leave keys be auto determined. $wirearray->getArray() will give you this internal array, $wirearray->getValues() is the internal array run through array_values() and $wirearray->getKeys() will give you the keys used.
  17. @bernhard are you sure it's not something in tracy's ajax request messing with the encoding? I wouldn't rely on those console tests to heavily.
  18. There's nowhere written that a WireArray does need to be keyed with integers. For the file fields using the filename as key makes a lot of sense. If you still need the integer value just use this: foreach ($data->img_gallery->getValues() as $key => $imageobj) { // Do stuff }
  19. It's a third party fiedltype: http://modules.processwire.com/modules/inputfield-time/
  20. If you're using a extra time field rather use FieldtypeTime and not a datetime field. A datetime field will not only save the hour/minutes, but also the date (it defaults to today when saving the first time), so it's sorting by the whole date, which you only chose not to display and not only by the hour/minutes.
  21. You could try to clone the admin template, create a new tree branch with it and duplicate site/template/admin.php to fit the name of your new template. I would just expect, that the admin parent (id=2) and the template name are often used in modules, so this might create some problems.
  22. The state "does a template have an existing templatefile" is never kept anywhere. Even the filename itself is constructed at runtime. So you need to do this a bit more manually. $all = $templates->getArray(); $withoutFiles = array_filter($all, function(Template $t) { try{ $filename = $t->filename(); } catch(WireException $e) { return null; // Couldn't construct filename, return } return file_exists($filename); }); array_walk($withoutFiles, function(Template $t) { return $t->id; }); $pages->find("template=" . implode('|', $withoutFiles);
  23. wire() is the global function which returns the same obj $wire does represent, but $wire is not globally available.
  24. Yeah, but that's just about it. Any module / template / field or other setting is saved in the db.
×
×
  • Create New...