-
Posts
2,962 -
Joined
-
Last visited
-
Days Won
20
Everything posted by szabesz
-
Hello @bernhard! Thanks for sharing! Great and informative. Though, for complete newcomers to PW it might not be detailed enough, but if someone does not understand something then they can always ask :) BTW, your init() method is not static. Is there a reason for that? Since $pages->get("template=quote")->init(); returns the first such page PW finds, it does not matter which page is that. If it does not matter, then a static init() method would also do the trick, wouldn't it? At least it works for me that way, too. This init() method of yours does not initialize a page object as such, instead, it can be used to organize code which attach hooks related to the template class in question, and not related to a particular page (object). When dealing with a page object in the hook's functions, then that is a different matter, of course. Or is there anything else that (apart from attaching hooks) you sometimes put in this init() method?
-
KIOSK, One-Page Checkout Module for ProcessWire
szabesz replied to froot's topic in Module/Plugin Development
BTW, haven't you considered using PW's $session API variable instead? You could simplify your code considerably. -
KIOSK, One-Page Checkout Module for ProcessWire
szabesz replied to froot's topic in Module/Plugin Development
Yeah, later on I realized that I had been a little bit late to the party... -
KIOSK, One-Page Checkout Module for ProcessWire
szabesz replied to froot's topic in Module/Plugin Development
Thank you, @fruid! -
KIOSK, One-Page Checkout Module for ProcessWire
szabesz replied to froot's topic in Module/Plugin Development
I think @fruid wrote a good short introduction above, he just missed a short "birds-eye view intro" explaining the bigger picture. I skimmed through the code of the module(s) and it is not that hard to see what the module does in general. If someone is really interested in it, then it is best to install it on a site that loads UI-Kit 3 and try in out. What @fruid could really add to his intro above is a short video, showcasing what the module does in action. -
RockFrontend 🔥🚀 The Powerful Toolbox for ProcessWire Frontend Development
szabesz replied to bernhard's topic in RockFrontend
As we all know, Google's services are never free, we all pay by providing our own data to them: https://thehackernews.com/2022/01/german-court-rules-websites-embedding.html and we never know what they are using our data for, but this monkey business is quite profitable for them for sure. -
Hello, see: https://processwire.com/docs/front-end/output/markup-regions and https://processwire.com/talk/topic/23641-markup-regions-pw-vs-data-pw-different-behavior/#comment-201538 hope this helps
-
@kixe Thanks for sharing the module! Is there a related github issue perhaps? The only decimal field related issue is this one (as far as I know): https://github.com/processwire/processwire-issues/issues/1341
-
If you are OK with linking to posts of this forum, you could just simply include a line or two like: "You can read more about realted topics at 'here' and 'there' etc..."
- 11 replies
-
- 2
-
-
Old question but I have just had to do the same so for those looking for this answer in the future, you might want to do something like this: https://stackoverflow.com/questions/16251625/how-to-create-and-download-a-csv-file-from-php-script#answer-54433375 The key parts to implement are: the headers, handling the output buffer, fopen( 'php://output', 'w' ), and exiting at the end. The rest must be implemented as you see fit. EDIT: it might be better to export data into an excel file, for example when non-ASCII characters are in the text data. I found this package to export to excel with only two lines of code: https://github.com/shuchkin/simplexlsxgen (for CSV see its sister project https://github.com/shuchkin/simplecsv) $xlsx = SimpleXLSXGen::fromArray($array2D); //the array to be expored is prepared in advance $xlsx->downloadAs($filename); //initiates the download
-
Some notes on this topic: The example above in the spoiler does not seem to work as expected (ProcessWire 3.0.184). What works for me is this: https://github.com/processwire/processwire-issues/issues/675#issuecomment-420958397 Also worth reading this discussion: https://processwire.com/talk/topic/19781-issue-with-hooking-processpagesearchexecutefor-and-the-new-search-feature-in-pw-30108/
-
Note: the variable $process is undefined in my case, running PW 3.0.201. I used this instead: $page = $event->object->getPage(); // Page that was edited/saved
-
PW 3.0.203 – Core updates + custom fields for comments
szabesz replied to ryan's topic in News & Announcements
Besides being able to format docs easily and without too much confusion, the editor should be as "lightweight" as possible, JavaScript-wise. I mean that PW should be able to load a lot of editors into – for example – repeaters without ajax loading. Ajax loading should be a last resort option, let's say when more than 50 / 100 (perhaps?) editors must be loaded by a page. -
PW 3.0.203 – Core updates + custom fields for comments
szabesz replied to ryan's topic in News & Announcements
I would rather see CKE4 being replaced with https://easy-markdown-editor.tk/ as I and my clients really don't like the complexity of CKE4, and CKE5 is even more complex than version 4. I know that Easy MarkDown Editor is not as WYSIWYG as CKEditor but I could never set up CKEditor to be a true WYSIWYG editor anyway. Maybe it just my fault, I don't know. Anyway, at least Easy MarkDown Editor could be added to the core as an additional option. So in the end there would be CKEditor 5 and Easy MarkDown Editor, both being integrated as much as possible. -
To those who liked it: please do not forget add your thumbs up to the GitHub "issue".
-
Hello @adrian, I have just upgraded and old site along with this module. So I started to get lots of Unknown column 'field_user_phone.data_country' entries in the log. After seeing all those log entries I came here, just to find this old warning of yours. If I'm not mistaken, I should now update the database manually, but how? Could you please help me out?
-
Thanks for the info! I cannot answer that but a search engine that does not even list processwire.com on the first page is weird: https://yep.com/web?q=ProcessWire for this query, I get "processwire.com/blog/posts/pw-login-for-facebook/ " as the 19th item in the search result list, and that is the closest thing to finding "processwire.com". Sure, "github.com/processwire/processwire" on the top of the list but still...
- 1 reply
-
- 2
-
-
-
This one looks cool: https://www.autohaus-bendel.at/fahrzeuge/300862-citroen-citroen-xm/ Nice site, BTW!
-
New post: starting a site with the blank profile (10 June 2022)
szabesz replied to ryan's topic in News & Announcements
Part two with "Adding in relevant 3rd party or Pro modules" would certainly help newcomers as well, in addition to "Optimizing settings in /site/config.php". -
Like caniuse.com but for PHP, eg: https://caniphp.com/?s=null It is possible to support the project: https://ko-fi.com/magicroundabout https://github.com/rosswintle/can-i-php Happy coding! :)
-
- 6
-
-
+1 I am working on my first Unpoly driven frontend and loving it so far. With so little code one can do a lot! What I'm aiming at the most is this: no businness data validation / calculation / transformation / whatsoever on the frontend, only in PHP at server side! A lot of "hidden" features are lurking in the Unpoly docs, reveling that things can be quickly implemented by applying a few HTML attributes only, see for example "dependent selects": https://unpoly.com/input-up-switch Unpoly is what Bootstrap is for CSS but for JavaScript, so to speak.... This is an important remark, I think. What they solve (including Unpoly) is not exactly that, but one can code all the "businness data manipulation" on the server only, and use these JavaScript libraries to implement an app like behavior in the browser relatively easily (especially in the case of Unpoly). One still needs to find the "right" backend framework/CMS/CMF that fits ones need and implement the HTML rendering for the frontend as required by the chosen JavaScript framework.
-
Thank you for asking! Actually, I sometimes mix up the terminology of "nested repeaters" and "depth repeaters" by accident, or just simply forget about "nested repeaters" which I have not yet used. I need it for "depth repeaters" as that is the one which allows for free drag and drop, but for the user being totally free can be a drawback, just like in the case of a "page builder" setup. It is surely strange that no one has reported it before, but people seem to be trying/doing it differently, please see: https://github.com/processwire/processwire-requests/issues/440 https://processwire.com/talk/topic/27073-colours-in-repeater-matrix-items/#comment-223553 Maybe it is me who is trying to use this feature in a way in which it should not be used, I do not know: And the above results in the color value being seen as you can see in the screenshot I provided in the GitHub issue linked above, but it is also seen next to the fa-arrows icon of the InputfieldHeader.
-
anybody could show an example of how to use $config->ajax ?
szabesz replied to adrianmak's topic in Getting Started
@fruid I'm sorry for providing only small bits of help only but you can also consider using URL hooks instead of putting both "normal page rendering" and AJAX responses into the same template file. See: https://processwire.com/blog/posts/pw-3.0.173/ In one way it is cleaner and more flexible than putting both responses into the very same file, but of course, you have to "manage" the two different responses in different files in this way. Another way of separating AJAX request/responses from the page request is to use URL segments, but with URL hooks available since PW 3.0.173, I would not use that technique anymore. -
anybody could show an example of how to use $config->ajax ?
szabesz replied to adrianmak's topic in Getting Started
What about the "X-Requested-With: XMLHttpRequest" header? The $config->ajax call requires that to be sent.