Jump to content

cwsoft

Members
  • Posts

    128
  • Joined

  • Last visited

  • Days Won

    3

cwsoft last won the day on November 12 2023

cwsoft had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cwsoft's Achievements

Sr. Member

Sr. Member (5/6)

160

Reputation

  1. Sorry. Just typed from my mobile out of my head to point you to a possible PHP solution using strtotime. From here one could check the PHP documentation for https://www.php.net/manual/de/function.strtotime.php, providing some examples combining different time offsets as text string.
  2. Have you tried „+ 14 days“ as second parameter? This at least works with PHP strtotime method.
  3. Why not simply adding a field with default text to the template, which you can overwrite on pages when needed. Then you just display the text of that field.
  4. I am developing on XAMPP too. Just added a little condition in my .htaccess, detecting if I am on localhost or live. When live, I redirect all request to non www with https. On localhost, I just use http. Only thing you need to remember, is that you can‘t set PW to force admin login to use https, as this would break login on localhost. Even wrote a small tutorial dealing with basic auth and https a while ago .
  5. @netcarverThanks for the link. Yes guess Database and WireRandom are both good places to learn about the code used to hash and set the user passwords in PW.
  6. Hi, can someone point me to the code base where user->pass property respective the user->save method is defined in code? I would like to study the PW password hashing and storing a bit more in detail. From what I read in the core User/Users/Page classes, the user->pass prop will be automatically hashed when the user object is saved. I would like to investigate exactly that code which fires up when saving the hashed version of the unhashed password set via the user->pass prop. Any hint or link to the relevant code base in the Github repo would be highly appreciated. Cheer
  7. I don‘t use jQuery in the frontend, unless I want/need to use a third party plugin, which uses jQuery as dependency. One of those repeating plugins I use quite often on the frontend for convenience is DataTables. Whenever I output structured data as data table on the frontend with more than 20 row (tr), I almost always make this table sortable by columns and filterable (only show matching rows) via this plugin. Simply to give the frontend user some intuitive options to quickly narrow down the relevant data. DataTables is powerful, well customizable and well tested. Of course I could implement that stuff with vanilla JS myself. However my next customer needs another feature I would need to manually add, where with DataTables I just switch of stuff I don‘t need for a specific customer via a simple config array (e.g. disable pagination, sorting, filtering, showing detail infos etc.). Same is for font awesome, CSS grids and so on. If I only need a handfull icons, I just go with png files or UTF8 code points instead of the full blown fa-suite. If I just want to collapse some paragraphs like an accordion, I normally go with some handmade vanilla TS/JS and SASS/CSS3. But if I need to spend lot‘s of time writing TS/JS for more serious work already supported by a jQuery plugin like DataTables, I don‘t spend too much time to reinvent the wheel and just go with the jQuery Plugin. Image sliders, hero headers etc. would be examples for using jQuery too. The best part of ProcessWire is, that Ryan give us all the freedom and options to use whatever we would like to use for a specific project in the Frontend with no predefined framework (like Bootstrap) one would need to use by design.
  8. @rastographicsBreaking HTML templates into blocks, sections or partial files is what Latte supports out of the bocks. Details see https://latte.nette.org/en/template-inheritance. Maybe you can a small writeup of your approach with htmx an PW once you made your way through.
  9. @rastographicsYou can find some additional infos in this post here. Meanwhile I used the 2nd approach shown in the linked tutorial with a slightly modified setup (e.g. proper namespaces, use statements, method names etc.) to implement Latte template engine in all my new projects so far. For Latte I would go with official Latte documentation linked above. In addition I would read the Custom Page Classes tutorial linked and watch Bernhards video. Then I would start off with a first project and use normal PW template files (like a controller), loading the required latte template (view) and implement my page specific methods via custom page classes. Nice part is, that you can call the specific page methods via {$page->myAwesomeMethod()} in Latte view too.
  10. Have you tried Content-Type: application/pdf (with space after colon)? Does it work with PW if you remove the .htaccess file? Have you tried different PDF and different browsers too?
  11. The line with the readfile command has three dots at the end which seems strange to me and then adds whatever is your $download variable. Have you checked that path e.g. via outputin template and checked if file is readable?
  12. @BoostGuess stability, security and privacy data protection. I don‘t like my IP send to CDN servers and for some of my customers this would be a no go at all.
  13. I do like to refine some of my code in little steps or to prompt the AI for specific questions on my own code, like I did in the past as part of a development team with my human colleagues. Thats where AI is really not so bad in my opinion, at least if you are working alone on projects and there are no human colleagues you could ask.
  14. Yepp. No big difference from copying code from Stackoverflow and executing it if you are not really understanding what it is doing or to clone and run stuff from Github repos you don‘t own or trust, or entering the NPM dependency hell for something which just pads a string with leading numbers loading other node packages to do the job for example.
×
×
  • Create New...