Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by szabesz

  1. @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
  2. 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..."
  3. 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
  4. 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/
  5. 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
  6. Something like this is already supported by @adrian's Module Settings Import / Export module which I recommend.
  7. 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.
  8. 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.
  9. To those who liked it: please do not forget add your thumbs up to the GitHub "issue".
  10. 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?
  11. 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...
  12. This one looks cool: https://www.autohaus-bendel.at/fahrzeuge/300862-citroen-citroen-xm/ Nice site, BTW!
  13. 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".
  14. 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! :)
  15. +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.
  16. 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.
  17. @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.
  18. What about the "X-Requested-With: XMLHttpRequest" header? The $config->ajax call requires that to be sent.
  19. Worth noting: https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-this-gt-halt-method-for-use-in-template-files quote: "Now you can call return $this->halt(); from within any template file, and it will prevent further output from that template file (and anything that comes after it, like an appendTemplateFile). This enables output to stop, but PW's normal execution and shutdown process to proceed normally. Please note that return $this->halt(); must be called from directly within the template file, outside of any function or class scope."
  20. While we are at it, I am particularly interested in possible Repeater Matrix features that were mentioned or just partially implemented: 22 October 2021 Blog post: "...the ability to control what item types are allowed where, kind of like the Family settings on page templates." 3 December 2021 Blog post: "...specify a background color for RepeaterMatrix item labels with a hex color code in your repeater matrix item labels." Currently, getting the label of a matrix item results in the added the hex value being revealed to the user, which means that even in the admin the user sees things like "block one #FF0000", "block two #FFFF00", etc... I think Repeater Matrix should trim the color value form the end, so that this feature can actually be used. The "Family like settings" would be especially useful for "page builder" like use-cases, but I do need it for a "product configurator" I am currently working on, where various properties of a product can be defined by organizing Repeater Matrix items. The only problem with such a setup is that currently the user can create configurations which do not make sense. I could "validate" what the user has done upon saving the page and spit out some admin message to inform the user what the issues are with what she has done, but it would be better to prevent her from messing things up in the first place, by applying "Family like settings" to repeater items.
  21. For those who do no have access to the Pro fields support forum, Ryan expains a similar issue like this: "One thing about repeaters is that they sometimes have extra pages in them called "ready pages", which are basically abandoned new items that are saved for the next time you need to add an item to the repeater. So in your loop that iterates the repeater items, you'll want to check that the items are published and/or not hidden before considering them valid for your calculations. if($child->isUnpublished() || $child->isHidden()) continue." see: https://processwire.com/talk/topic/24967-hook-says-there-are-twice-as-much-repeater-items/?do=findComment&comment=210451
  22. Thank you for this quick report, Ryan! Have a great weekend, everyone! Why not 3.1 for that matter? Are there any particular requirements that qualify for 3.1, BTW?
  23. Hi @adrian Have a great vacation and take care! I see. I will probably ask for help at the Unpoly repo first to figure out more and next ask the Nette devs as you suggested. Thanks!
  24. Hello Adrian, I am working on my very first Unpoly 2 driven frontend and found that either Tracy's or Unpoly's JavaScript break in some cases. I get errors in the console like this: Uncaught TypeError: this.elem is null Panel http://mydomain.test/products/?_tracy_bar=js&v=2.9.1&XDEBUG_SESSION_STOP=1:29 loadAjax http://mydomain.test/products/?_tracy_bar=js&v=2.9.1&XDEBUG_SESSION_STOP=1:444 loadAjax http://mydomain.test/products/?_tracy_bar=js&v=2.9.1&XDEBUG_SESSION_STOP=1:442 <anonymous> http://mydomain.test/products/?_tracy_bar=content-ajax.5de8b397b6_2&XDEBUG_SESSION_STOP=1&v=0.44454897717264863:1 The above example starts happening when I first use the browser's back feature. I tried to relocate unpoly.js to body's end from the head but to no avail. Either Unpoly breaks or Tracy's JS, depending on the loading order. Note, that Unpoly recommends using its own event handling methods: https://unpoly.com/up.compiler as its automated event handling might interfere with "random JavaScript", as we probably see in this example. Are you willing to deal with this issue? If so, what else should I do to help you make them work together? Thanks in advance,
  25. Sorry, I fixed the URL above which was a wrong one. This is the one I was referring to: https://github.com/processwire/processwire-requests/issues/230
  • Create New...