Jump to content

szabesz

Members
  • Posts

    2,910
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by szabesz

  1. @franciccio-ITALIANO Can you please also wrap your code in the "Spolier" block as I requested? Very long posts make it pretty hard to see through a thread. The "Spolier" block hides its content in an accordion so that we can manually open it at will.
  2. Hello, You should paste in here the exact code of your _main.php, preferably hidden in a spoiler block of this editor (use both the "eye" and the "code" icons of the toolbar). That way we can have a better understanding of the issue and ask further questions.
  3. FORMATTED VERSION: in my config.php file $config->contentTypes = array_merge($config->contentTypes, array( 'css' => 'text/css' ) ); this adds the css file type in your template "files" tab / content-type select then, on top of my bibicss.php file <?php namespace ProcessWire; header("Content-type: text/css; charset: UTF-8"); header("Charset:utf-8"); and i linked to my bibicss page the usual way in the head of the pages that need it and it worked fine i think that would be the same for js files with a simple 'js' => 'text/javascript' and the correct headers Content-type in the template in case it helps have a nice day
  4. Hello, You can do this: https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-copies-of-the-same-module Maybe I'm missing something, but how can one accidentally upgrade a module? Besides, if you think that is an issues, your backups and/or git versions, etc... should cover you, shouldn't they?
  5. related: https://codingpad.maryspad.com/2013/07/19/interview-with-ryan-cramer-processwire-cms-founder-and-lead-developer/
  6. Currently, the site I mostly work on is running ProcessWire 3.0.213 and PHP 8.0.x with 62 third party modules. I do not have a single issue which is worth mentioning, so I'd say this is certainly a "Peace-of-Mind Setup". Note that around ProcessWire 3.0.214 and ProcessWire 3.0.215 Ryan has started some heavy refactoring in the core so I would not call current dev versions "Peace-of-Mind" even thought he has fixed a lot of newly introduced bugs since then.
  7. Thanks for sharing! As always, your contribution to ProcessWire and its community rocks!
  8. In a perfect life, yes. But is it perfect? :) Jokes aside, as PHP development has been speeding up recently, I do not think it is realistic to expect Ryan and module developers to keep up with that pace. Luckily, I do not have such an experience but I would blame hosting companies for being so rigid. It is not they who have the burden to upgrade PHP websites to be able to run on PHP 8.1 or higher, so why do they force anyone to do that in the first place? I would also blame the PHP core team for not providing security fixes beyond one year: https://www.php.net/supported-versions.php While I agree that new features in PHP are welcome, I do not think they are so essential that I could not live without them for a few years more, if I wanted to. "if it ain't broke, don't fix it"
  9. I would not recommend setting ProcessWire's PHP requirements too high. Why would that help? If anyone wants to use PHP 8.1 or higher then that's fine but why should we "punish" those who cannot switch just yet? Why would "unifying" the required minimum PHP version help in any way? You cannot "force" module developers (who share their modules for free) do that. Am I missing the point, perhaps? BTW, I always use ProcessWire two versions behind the up to date major version of PHP because I do not want to deal with deprecated issues. I do not have time for that, and it saves me tons of time not to hurry just because...
  10. Hello guys, Read the forum rules please: https://processwire.com/talk/topic/8234-community-rules-guidelines/ I am thinking of this: "The forum language is English. We really appreciate the effort everyone makes from countries around the world to post in English. After careful consideration and experience on other forums, it makes sense to have one common language for discussion here so that ideas can be shared and not missed in language-specific forums - the same applies for debates that might get out of hand as we do not want to miss those either."
  11. @Inxentas Another option for the frontend is https://unpoly.com/ which I use these days. Using Unpoly one has to write less code compared to using HTML+Alpine.js.
  12. Hello @monollonom, I updated the site I'm using this module of yours from v1.1.8 to the this RC version and could not notice any difference. I do not know if it makes any difference or not, but I'm using the module with the "Bypass cache for superusers?" option turned on, because as a superuser, I will ever be the only one to have the module convert MJML to HTML. It is because I am using it for generating HTML templates for transactional emails which are only changed by me. I implemented a simple interface in the admin for rendering and previewing requested MJML templates which are first saved as HTML files and after that parsed for some simple "custom template tags" I made up, so that tags can be populated with actual values and the whole email can be sent in the end. So these MJML templates rarely change (except during development, of course) and that's why I do not use caching at all. When sending a transactional email, its saved HTML template is used. cheers Szabesz
  13. I also have a 100% working spam protection technique I always use (and nothing more). See it working here: https://www.szepelet.com/about-us/contact-us/ Human Detection is a pure PHP random number, rendered by :after {content: attr(data-attr);} and the css class is deliberately not named with a related term, just to make it more obscure. No bots have been smart enough to crack it so far.
  14. Sure, until I bought PphStorm years ago, which spots this (and more...) and warms me right away.
  15. Thanks for the detailed reply! I see now that such a feature would not be feasible. You must be right. I was just wondering if it is always a good idea to let the module kick in no "matter what".
  16. Thank you Ryan, reading the blog post I have one question: is it possible to somehow create a white/blacklist of roles/users/templates/fields so that we could fine tune when the restoring the operation should be offered in the first place?
  17. Hello Bernhard, Find Any File (FAF) http://apps.tempel.org/FindAnyFile/ EasyFind: https://www.devontechnologies.com/apps/freeware Usually, I use Find Any File (to me FAF performs better over the network than EasyFind does) but keep EasyFind on my Mac just in case.
  18. Sure, there is. As always :) Thanks in advance. Have a great weekend everyone!
  19. Sure, you need to understand at least the basics of CSS and SCSS before moving on to bootstrap or similar. To begin with, you might want to learn about how to shape page layouts with CSS as that is an essential part of website design.
  20. It also has issues like fields not having edit rights make conditions not being evaluated properly. Also, Presentation settings like "Open + Locked (not editable)" and others make it fail to work. The way it is implemented in the core is half baked, has not been taken care of for years and based on the probably wrong design decision that it can be done with JavaScript only. @Robin SYour module is a lifesaver indeed. Thanks a million!
  21. Hi, When including css/script files, I recommend some cache busting technique, like: /** * Adds file modified date as query string and returns URL to given asset. * <script src="<?= assetUrl("assets/js/site-global.js") ?>"></script> * * @param $relPath string File path relative to /site/templates/, such as "assets/css/site.css" * @return string URL with cache busting query parameter */ function assetUrl($relPath) { $fullPath = wire()->config->paths->templates . $relPath; $modified = ""; if (file_exists($fullPath)) { $modified = "?v=" . filemtime($fullPath); } else { wire('log')->error("CUSTOM WARNING: assetUrl() reports: file of {$fullPath} is missing! (current page ID: " . page() . ")", Notice::debug); } $url = wire()->config->urls->templates . $relPath . $modified; return $url; } Add such a utility function to your init.php (or _init.php if you are using it with $config->prependTemplateFile) and call it like shown in the comment above. Whenever possible, instead of <?php echo ?> use <?= ?> I think that helps a lot. Also, good IDE and a good color theme can visually make things a lot easier on the eyes. I have PhpStorm for example which even highlights HTML/CSS/JavaScript properly in PHP strings/literals so it helps me a lot in this and other areas as well (for example writing proper comments and a lot more).
  22. Perhaps, next time you need to present the list of modules used do not show the /module/ page under the admin, instead, show /setup/upgrades/ (Upgrades module). The Upgrades module has a LINKS column with links to either support, details or/and directory. Based on that, maybe with some clever deducting logic, rows of modules in this list can be labelled (by coloring, adding additional column, tooltip) according to their "author type". Provided the list is hookable...
  23. @daniel712 You might find these informative: https://processwire.com/talk/topic/21364-legacy-or-second-database-with-processwire/#comment-184482 https://processwire.com/talk/topic/3987-cmscritic-development-case-study Also, site localized googling can be helpful: https://www.google.hu/search?q=external+database+site%3Aprocesswire.com%2Ftalk Hope this helps.
  24. Mostly because of that. For example I wanted to use https://bootstrap-table.com/ and some other smaller interface elements, as well. Also, its docs are better than the UIKit's, I think. While Bootstrap 4 was not something I considered moving to, Bootstrap 5 has matured a lot, so that is why I started to looking into using it in the first place. Also, Bootstrap is more of a "low level LEGO" solution compared to UIKit, which can be a good thing at times. (For this reason, it is easier for beginners to start with UIKit 3, I believe.) I am also a fan of Unpoly and jQuery so I do not need yet another similar helper. uikit.min.js is 139Kb while the full version of jQuery is 90Kb so it looks like the UIKit developers had to (at least partially) reinvent the wheel just to get rid of jQuery. (I have never used UIkit.util too much, so I cannot say for sure, but looking at the docs they have overlapping features.) Also, Unpoly and jQuery has overlapping features, too, but I am still not ashamed of using jQuery even in 2023 :) I'm mostly using it for its powerful "selecting" capabilities, which are concise and have matured throughout the years.
×
×
  • Create New...