-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
161
Everything posted by kongondo
-
No. It could. Not worth the hassle. Instead, I'd suggest you try one of the 'restore' DB modules or at 'worst', do a manual save state of DB and restore it after each of your import script tests. Some candidates to do this: ProcessDatabaseBackups - https://modules.processwire.com/modules/process-database-backups/ (quick, in out, all or nothing) RockMigrations - https://modules.processwire.com/modules/rock-migrations/ (if you want fine-grained control BUT I am not sure how it deals with pages )
-
What is the actual way to start multiple instances? I get compile error
kongondo replied to horst's topic in General Support
Nothing newer. I use multi-instance recently and it worked fine. -
What is the actual way to start multiple instances? I get compile error
kongondo replied to horst's topic in General Support
This is a curious line. Why do you need this? Or are you ONLY using it if on CLI? -
Designme - Visually Layout Your Edit Screens - Preview
kongondo replied to joshuag's topic in Modules/Plugins
Moderator note: @MarkE, Moved your question to the module's support thread. -
Moderator note: @JeevanisM, please keep the same question in one place. Thank you.
-
With bells and whistles ?
-
You're da boss! ?
- 75 replies
-
Have you seen my response, 3 posts above?
-
Hi @Gideon So. Thanks for chiming in. I see we posted at the same time. Please let me state that this is incorrect. @spercy16's function is a recursive function ? It can be called inside itself. The code works just fine as it is (I tested it) ?
-
Hi @spercy16, Your snippet is working just fine for me. I am not sure what you mean by not working in my child pages but I think the reason is access issues. The following will not naturally show up in page finds: Unpublished pages Pages the user has no access to Hidden pages If your pages (including child ones) fall into any of those categories, they will not show up. However, if you need them to, you can override access control behaviours. For something like a menu, that may not always be what you want. For instance, if a page is unpublished, you want it that way for a reason. Please have a look at the docs (link below) for how you can use (for example, $pages->get('/')->children('include=unpublished')) overrides in your selectors. https://processwire.com/docs/selectors/#access_control Since you are new to ProcessWire, please note that overriding access controls using 'include=all' for the children of Home ('/') means you are asking ProcessWire to return all pages on the site, including admin pages, roles, permissions, etc, clearly not what you want. Additionally, calling $pages->get('/')->children without any limits, [e.g. $pages->get('/')->children('limit=50'))] can potentially lead to the retrieval of lots of pages (assuming you have a big site). A quick by the way, although this: foreach ($children as $page) does not affect the working of the function, since the $page variable is out of scope inside a function, it's just good to know that if used outside, it would have side-effects, i.e. overwriting the current page (variable). Maybe you knew this already. Otherwise, conventionally, some people go for $children as $child or $children as $c or $children as ....whatever, for consistency (and clarity) of use in and out of functions ?. Welcome to ProcessWire and the forums ?
-
I don't think you are doing anything wrong. I don't think we have a sanitizer for inline CSS. Regex maybe? https://stackoverflow.com/questions/2488950/removing-inline-styles-using-php https://www.sitepoint.com/community/t/remove-inline-style-with-preg-replace/21743 https://wordpress.stackexchange.com/questions/91949/removing-any-and-all-inline-styles-from-the-content https://www.php.net/manual/en/function.strip-tags.php#99643
-
Something like this... wire()->addHookAfter('Pages::published', function($event) { $page = $event->arguments(0); if($page->template !='blog-post' ) return; // ProMailer API TO SEND EMAILS // no need to return $event if you haven't modified it }); Talk to Ryan about ProMailer API if what you need does not exist here https://processwire.com/api/ref/pro-mailer/
-
I think you still need #1, but that's the easy bit ? https://processwire.com/store/pro-mailer/
-
How could I forget this? Hehe. Thanks for the reminder ?
-
I see. There seems to be nothing presently that suits your needs then (but others can chime in). If that's the case, you can roll your own. A most basic one would consist of two parts. Publishing a post: A hook to monitor this event (e.g. in ready.php) should do the trick. You could send the emails right within the hook. How and when you do it depends on how many emails you have to send. Subscribe/Unsubscribe: There is a module, I think for email subscriptions? If not you would have to store this somewhere. Ryan wrote about this somewhere, how he does it with ProcessWire weekly newsletters. I think they are just pages.
-
You can read more about it here:
-
There's these two, but the latter is no longer maintained: https://modules.processwire.com/modules/subscribe-to-mailchimp/ https://modules.processwire.com/modules/newsletter-subscription/
-
Unit test for modules, hooks or pages
kongondo replied to rmenu's topic in Module/Plugin Development
In case you decide to go with another testing framework, I found these PHPUnit lessons very helpful: -
Help with filtering based on the Skyscraper functions
kongondo replied to flash's topic in General Support
Hi. I didn't have time to go through all your code, so you might have already answered this. It is not clear to me which is the search form that triggers the initial search. Is it the keywords or the channel or both and the category as well? Normally, with search dynamic selects, you need both PHP and JavaScript. Do you need help with the JavaScript as well? How do you want the results returned? For instance, if you fetch a parent, do you want it to come with all its children in one go? -
This module has no window and does not open any modal. It's still not clear to me how you are using it. I am thinking maybe you are trying to use the module in your own module? Or in the ProcessWire admin? If I could get a bit more information about this and/or a diagram/drawing (or even an animated GIF), that would help.
-
I am not sure. If it is a normal file upload it checks and uses PHP's $_FILES (see the method getPhpFiles()). I am wondering though if an ajax upload would work in your case (not sure worth the hassle though if you are not using Ajax). See getPhpFilesAjax(). Class docs https://processwire.com/api/ref/wire-upload/ I don't think setName() would work either.
-
Redeeming page field's preexisting value in saveReady hook
kongondo replied to hellomoto's topic in API & Templates
This old thread should get you started. However, I am not sure how you would be able to get the current value of the start time to compare against. -
I don't understand the question, I am afraid. Please explain.