Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Click on the url part in the table. This will open the details view with a few new tabs to look at.
  2. I've learned a lot from looking into the core modules.
  3. Multi-value fields in module config is a bit tricky, because almost everything multi-value in pw is based on pages, which you don't use here. It's probably simplest to add an integer field "number_of_configuration", which does, after it's saved, cause the field(s) for the page selection to be rendered that many times. In your modules code you'd also use that number for determining how often to loop though potential configurations.
  4. The javascript error is most likely just caused by the php error, which does return html markup instead of the expected json content. So I'd rather expect that php does have some problems on the actual upload of the file / or moving it from the temp folder to it's final location. So I'd rather look into known issues on the php side, even though I cannot help you narrowing it down even more.
  5. $children = $page->children("template=article"); foreach(['A', 'B', …] as $letter) { $startingWithLetter = $children->find("City^=$letter"); if(!$startingWithLetter->count()) continue; // Do things here } Only the first find is a call to the database, while all the other ones in the foreach are just in memory searches and therefore quite a bit faster.
  6. https://processwire.com/talk/settings/ Here you should be able to change your display name.
  7. So to answer the question of your entry post: namespaced files are never compiled. The compiler is mostly meant for 2.x to 3.x transition. As pw 2.x is namespaceless the compiler does only work on files without namespace (also makes things easier to control). So you would probably be fine if you could push all the 2.x / 3.x differences into a separate class without namespace. <?php class Bridge extends Wire { public function getNew($shortname) { switch($shortname) { case 'InputfieldWrapper': return new InputfieldWrapper(); default: throw new WireException("Classname $shortname isn't setup or is invalid."); } } }
  8. Did you enable urlSegments on the homepage's template?
  9. Can't this be done with the "skipLabel…" settings on inputfields? If not via the UI a Hook could add the setting.
  10. static:: (/late-) binding will result in each class doing their own calculation. You probably would want to use self:: so it's really a one time calculation for all of your classes.
  11. How about storing the result of the function selection in a static variable, so the computation does only happen once per request. The namespace won't magically switch mid request.
  12. Just take a look at these changes: https://github.com/LostKobrakai/MarkInPageTree
  13. This does work in processwire's templates just like in any other php file. You just need to make sure the path to your readsql.php is correct.
  14. That sounds like a pretty nice tool. Will surely try it out later today. For naming I'd suggest focusing on the "setup test environment" as it doesn't really test by itself (which is nice).
  15. You know that Mandrill did change their pricing policy, so you have to be a paying mailchimp customer to use their service?
  16. I think you could try to edit the size setting of the modal via a hook, which should give you a similar experience than opening a full page.
  17. Any page in processwire without a valid template file is like a non existing url to the outside, so it should still work.
  18. Do you mean a external php file or literally the string "echo …"? The first one you'd include/require and the latter one can be executed by eval. But keep in mind that any dynamic php code can be a security issue if not handled with care.
  19. Just allow urlSegments on the home template, so it's a catch all for urls not existing in processwire itself.
  20. Why are you loading a permission in the getModuleInfo? This should a static a.k.a. self-contained function which returns information about the module independent of the installed system. Also permissions are usually referenced by name. I mean it's technically correct, but still curious.
  21. Use them just like any other inputfield. InputfieldSelector does have quite a few custom settings you can see here: https://github.com/processwire/processwire/blob/35df716082b779de0e53a3fcf7996403c49c9f8a/wire/modules/Inputfield/InputfieldSelector/InputfieldSelector.module#L23-L52
  22. How about using InputfieldSelector for the page selection and using InputfieldIcon for the icon selection?
  23. ProcessWire is going to cost more on initial development than setting up things in a prebuild and bought wordpress theme and just doing some editing. But as soon as any amount of serious customization is needed you should be fine with ProcessWire as well. I mean you can still use prebuild html templates, but it's not a drop in thing like in other systems. If you need more than just styling or basic-content customization, but also custom business logic you'll probably have a better time in processwire than in other cms systems. Depending on the projects scope it might even be easier to set up than using a full-on framework like laravel or others (e.g. you get the backend basically for free).
  24. In short: You shouldn't. You won't want all requests to hit the index.html as it's going to prevent you from hitting processwire in any way (even ajax requests). I'd rather suggest letting your build steps transfrom the index.html into some file, which you can easily include as part of your templates and you're good to go and much more flexible. The alternative would be serving processwire and the SPA unter totally separate domains / access points.
×
×
  • Create New...