-
Posts
7,473 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
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 Flashmaster82'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.
-
Cross referencing a similar topic with, possibly, an answer to your question @Spiria
-
Exception SQLSTATE[HY000] [2002], SSL encryped database connections
kongondo replied to Lutz's topic in General Support
Cross referencing a similar topic with, possibly, an answer to your question @Lutz -
Hi @Melakh, Welcome to the forums. Sorry, not an answer to your question. However, since this question has been asked two or three times before, but without a solution, I am going to be naughty and tag probably two of the most knowledgeable people in these forums with respect to databases. Sorry both! @BitPoet, @LostKobrakai, for tagging you like this. Could you please weigh in on this issue if you can? Many thanks. ? Here are two previous similar questions:
-
JavaScript to the rescue ? Have a look at this: Intl.DateTimeFormat https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat and in particular this example in SO: https://stackoverflow.com/a/34602679 const tz = Intl.DateTimeFormat().resolvedOptions().timeZone As usual, won't work in all browsers, you know, the usual suspects... ?
-
Not sure I fully understand the scenario, however, technically, there is no 'adding children to a page'. Conversely, you give a child a parent ?. This means, there is no difference between creating a parent page and its children except for specifying the parent. // create parent $p = new Page(); $p->template = 'basic-page'; $p->parent = $pages->get(1234); $p->title = 'Parent Page'; $p->save(); // create child $c = new Page(); $c->template = 'child-template'; $c->parent = $p;// new parent above $c->title = 'Child Page'; $c->save(); It seems to me though that your question is mainly related to getting info to create the child page after some event has occurred? if that's the case, please provide more information about the form submission and handling process.
-
Alternatively, you could use ProcessWire's API $files https://processwire.com/api/ref/wire-file-tools/ To find files in a folder, you can use $files->find(); https://processwire.com/api/ref/wire-file-tools/find/
-
Excellent! Glad it worked. By the way, if your articles don't change often, you could cache the results of DOMDocument operations so that subsequent article index are fetched from the cache instead. Whenever an article changed, you would call DOMDocument again and then cache the new output. Have a look at WireCache here if this might be of interest: https://processwire.com/api/ref/wire-cache/
-
I have read this several times and it's not sinking in. It seems to me though that you are probably over complicating the logic? Maybe best to break this down and get the functionality sorted first then adding to it. Suggested: Get the selectors right. I'd even do this on a template without any CSS, a blank page and Tracy keeping me for company. Am I getting the correct results? Is the ajax working OK? Still on a blank page, selectors to return paginated results. Do these methods work? PaginagedArray https://processwire.com/api/ref/paginated-array/ Bring in MarkupNav (or your own if custom). Does it work? https://processwire.com/api/ref/markup-pager-nav/ Do the footer search. Check Tracy to see if inputs are getting mixed up, etc.. If everything works, bring in the CSS and real template file ?
-
No, sorry. You'd have to code that yourself. What's your use case? Welcome to the forums ?
-
Your text is a string, not an object That's what the error is about. You can use PHP's DOMDocument Class and the method getElementsByTagName(). Here's a tutorial (with a h2 example :-)): https://codingreflections.com/php-parse-html/ I am not sure about performance issues with the class if it has to parse lots of text/HTML.
-
Hmm. That's very strange. I'll have a look. Thanks for reporting.