Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/15/2026 in all areas

  1. 1 point
  2. Hi everyone, Every site I've launched eventually had a database incident — corrupted table, failed migration, bad deploy. Having a reliable backup system that runs automatically and stores offsite is non-negotiable. This module is what I use in production. GitHub: https://github.com/mxmsmnv/ProcessDbBackup What it does: Three independent backup types — Regular, Weekly, Monthly — each with its own LazyCron schedule and retention count Admin home widget — shows status (🟢 OK / 🟡 Outdated / 🔴 No backups) per type with "Create now" buttons Backblaze B2 upload — optional offsite storage after every backup, keep or delete local copy Chunked upload — upload .sql.gz from your computer in 2MB chunks, bypasses upload_max_filesize entirely Streaming restore — reads .gz line-by-line, flat memory usage regardless of dump size Partial restore — select individual tables from a backup Pre-restore auto-backup — safety backup of current DB before any restore Backup integrity verification — gzip check + SQL structure validation Lock file — prevents concurrent backup processes Exclude tables — skip cache, sessions etc. from all backups Storage protected with .htaccess deny-all Backup methods: mysqldump (preferred, InnoDB-safe hot backup) with PHP PDO fallback. Restore via mysql CLI with PHP PDO streaming fallback. Requirements: ProcessWire 3.0+, PHP 8.0+, zlib, PDO. mysqldump/mysql CLI optional but recommended for large databases. MIT License.
    1 point
  3. I remember that there were some attempts to create courses on PW, but none of them really stuck in my memory. I think it is better to make one's way through tutorials and read through the docs. There are some videos that can be useful. These come to mind: https://www.youtube.com/watch?v=IHqnLQy9R1A - a really dated walkthrough I have once started with; everything looks different but the essence is the same) https://www.youtube.com/playlist?list=PLOrdUWNK38ibz8U_5Vq4zSPZfvFKzUuiT - a comparaison to WP
    1 point
  4. I feel that! But it became way better than it was a few years back when the world was going nuts. The things I changed in the last 12-18 months: getting all the regular vitamins and supplements for someone my age getting additional supplements that help my brain to keep working checking in on gut health and eating less/none heavily processed foods checking calories and protein in-take - fixing both and removing empty carbs and calories getting back to the gym - first only cardio, now additional strength training All the above helped me to not being stressed out everytime and all the time. I couldn't care less about things thrown at me these days. A full day with meetings, a workshop, and a coffee with friend somewhere in-between, and of course the usual time at the desk don't affect me in a negative way anymore. I don't know how the math works here, but these days I have enough hours each day to have plenty of time, even time to balance everything out. PLUS the weekends for side-projects, fun, friends, family, and just things.
    1 point
  5. I feel the same way when things I'm used to change. E.g. the switch from XD to Figma a few years ago felt unfamiliar at first and it slowed me down. Mainly because I had a lot of things stored in my head that turned out to be different. Now it's the other way around and I could never go back to working with XD. I was also pissed at apple when they updated the OS to use the new Liquid Glass design system, now everyone seems to love it and designers copy it (still not the biggest fan, but I can live with it now) 🙂. I hope the new theme will grow on people. The simpler color scheme (compared to the original Uikit theme) and CSS variables make theming much easier. You can quite easiely customise it to your taste if you don't like the defaults. And it shares some concepts with AdminThemeCanvas like the fixed header and a more minimal modern aesthetic that fit very well for a web app like PW in my opnion. I am using the Konkat theme for all my new projects. @diogo has already sent detailed documentation for the Konkat theme to Ryan, which he will hopefully publish on the site soon. The new docs are especially interesting for module developers. @maximus has also done a great job with the style system guide. I think that will also help demonstrate the benefits of the new theming system. The theme now also supports UIkit components out of the box. We will have to wait a bit for Ryan to decide where those docs will be published. AdminTheme Canvas has served me well for many years, and I’m glad so many of you have used it! If anyone wants to take it over, feel free to send me a DM. But I think it’s better to use the core theme as a replacement.
    1 point
  6. I've been using PW for quite a while, now, so I would like to give back to the community that helped me so many times. I had this customer that wanted to use the Google Translate API to automatically translate the site, so I built this function that takes advantage of it without the need to use the API on every page cycle. I put it on a file that gets called on the _init.php, so that I can use it on every template. Here it is: <?php function googleAutoTranslate($page, $field) { // Turn off outputFormatting $page->of(false); // Get current language and field content for this language $current_language = wire('user')->language->name; $field_content = $page->getLanguageValue($current_language, $field); // Is there any content for this language? if($field_content != '') { // Do nothing! } else { // No content, lets translate... // Get default language text $text = $page->getLanguageValue('default', $field); // Translate only if there's content in the default language if($text != '') { // Translate it $apiKey = 'YOUR API KEY HERE'; $default_language = 'pt'; // Your default language here! $url = 'https://www.googleapis.com/language/translate/v2?key=' . $apiKey .'&q=' . rawurlencode($text) . '&source=' . $default_language . '&target=' . $current_language; $json = json_decode(file_get_contents($url)); $field_content = $json->data->translations[0]->translatedText; // Save translated text $page->$field->setLanguageValue($current_language, $field_content); $page->save(); } } // Turn on outputFormatting $page->of(true); // Return result return $field_content; } ?> Whenever you use a field on a template that should be auto translated, just call the function with a page object and the field name, like so: echo googleAutoTranslate($page, 'body'); Features: Translation occurs only once per field, so you don't need to keep paying translations (it stores the translation into the field language); You can correct the translation in the admin area and it won't be overwritten; If you need the translation to be made again, just delete the field content in the needed language. For the translation to occur, content must exist in the default language. I had to fight a little to get this working, so I hope this helps anyone, who comes across this particular need. Nice Things To Have If someone wants to give it a shot to make this into a module, please do. It would be nice to have a checkbox "Enable Google auto translate for this field", when you edit a field input features. Don't Spend Too Much Mind you that the Google translate is a payed service! and needs a Credit Card to get it going (even with $300 free credit); With a relatively small site (and the tests made to get this to work) I already spent about 80.000 translated characters = $3, Hope this helps someone!
    1 point
×
×
  • Create New...