-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Click on the url part in the table. This will open the details view with a few new tabs to look at.
-
Any module guide/steps for beginner?
LostKobrakai replied to Speed's topic in Module/Plugin Development
I've learned a lot from looking into the core modules. -
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.
- 28 replies
-
- icon
- fontawesome
-
(and 2 more)
Tagged with:
-
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.
-
$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.
-
https://processwire.com/talk/settings/ Here you should be able to change your display name.
-
Unable to call wire() in namespaced classes
LostKobrakai replied to Mike Rockett's topic in Module/Plugin Development
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."); } } } -
Did you enable urlSegments on the homepage's template?
-
Can't this be done with the "skipLabel…" settings on inputfields? If not via the UI a Hook could add the setting.
-
Unable to call wire() in namespaced classes
LostKobrakai replied to Mike Rockett's topic in Module/Plugin Development
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. -
Unable to call wire() in namespaced classes
LostKobrakai replied to Mike Rockett's topic in Module/Plugin Development
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. -
Just take a look at these changes: https://github.com/LostKobrakai/MarkInPageTree
- 28 replies
-
- 1
-
- icon
- fontawesome
-
(and 2 more)
Tagged with:
-
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.
-
You know that Mandrill did change their pricing policy, so you have to be a paying mailchimp customer to use their service?
-
Redirect to Lister after Save + Exit via Hook
LostKobrakai replied to gebeer's topic in Module/Plugin Development
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. -
Any page in processwire without a valid template file is like a non existing url to the outside, so it should still work.
-
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.
-
Just allow urlSegments on the home template, so it's a catch all for urls not existing in processwire itself.
-
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.
-
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
- 28 replies
-
- icon
- fontawesome
-
(and 2 more)
Tagged with:
-
How about using InputfieldSelector for the page selection and using InputfieldIcon for the icon selection?
- 28 replies
-
- 2
-
- icon
- fontawesome
-
(and 2 more)
Tagged with:
-
Processwire as the choice for small businesses (starting a dev shop)
LostKobrakai replied to mikeuk's topic in Pub
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).- 10 replies
-
- 3
-
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.
-
Like this?