Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/22/2024 in all areas

  1. This week there is a new version of the Site Profile Exporter module released (ProcessExportProfile). This is the module that was used to export last week's Invoices Application Site Profile. While this module has been around for a decade now, this latest version makes some nice improvements, which I'll cover below. @bernhard pointed out to me that he's using the module to make a new site profile, but he found it cumbersome to enter all the profile information every time he wanted to export the profile. So this new version now lets you update an existing profile with 1-click, making it much easier to re-export a profile. This version also adds a preview of what your profile will look like in the ProcessWire installer (the part where the user would select it for installation). Lastly, this version has several other small improvements and fixes as well. If you've ever thought of building a site profile, this module now makes it that much easier. This week I've also been starting to focus on the next long term client project, which is kind of a different and unique one that I look forward to. That's in part because I expect it will also involve a lot of improvements to the ProcessWire core and ProFields modules as part of it. Some of my favorite ProcessWire improvements have accompanied projects like this. There just isn't any substitute for real-life, large-scale projects when it comes to improving and optimizing the core and modules. Next week will be a shortened week here, so I'll likely post the usual weekly update Thursday rather than Friday. Thanks for reading and have a great weekend!
    15 points
  2. This exact module helped me to build and maintain all my starters for clients and sideprojects for a very long time now. So this update is highly appreciated! ?
    2 points
  3. @ryan great to see this module updated. Would you consider adding this feature to the next version: https://github.com/ryancramerdesign/ProcessExportProfile/issues/15
    2 points
  4. Hi @wbmnfktrThanks for your answer. I'm indeed using the TemplateEngineLatte module, but I think my issue is more related to the point mentionned by @BillH regarding the "sort=sort" parameter nested pages. I ended up adopting a recursive approach to solve my problem as shown below : <?php // In init.php $catalogue_root = $pages->get(1027); $view->categories = getOrderedCategories($catalogue_root->id); function getOrderedCategories($current_category_id, &$categories = []) { $current_categories = wire()->pages->get($current_category_id)->children('template=category'); foreach($current_categories as $category) { $categories[] = $category; // populate the reponse with category page object getOrderedCategories($category->id, $categories); // proceed with sub categories } return $categories; }
    2 points
  5. A module for generating and serving AVIF files:
    2 points
  6. After a previous request for Webp support (6 years ago, times flies…) that Horst and Ryan kindly introduced in PW 3.0.132, I'm back with another request for a new image file format, AVIF, which has landed in almost all browsers. I'm actually surprised no one here in the PW community has been asking for AVIF support in ProcessWire as it seems to be provide much more consistent gains in compression and greater relative quality over Webp, and of course over good old JPEG. My experience using it definitely confirms this. I've been using Cloudinary to serve AVIF images to the browsers that support it, but of course I'd rather not use a third-party service, and use it natively in ProcessWire. Imagemagick supports AVIF if I'm not mistaken. Anyone else is interested?
    1 point
  7. UPDATE 2022 Simple and powerful - put this at the end of your config.php file: $localConfig = __DIR__ . "/config-local.php"; if (is_file($localConfig)) include $localConfig; Then put all local settings into config-local.php (same concept for DEV/STAGING/PRODUCTION): <?php namespace ProcessWire; /** @var Config $config */ $config->debug = true; $config->advanced = true; $config->dbName = 'db'; $config->dbUser = 'db'; $config->dbPass = 'db'; $config->dbHost = 'db'; $config->userAuthSalt = '1234'; $config->tableSalt = '1234'; $config->httpHosts = ['xyz.ddev.site']; // this prevents logout when switching between // desktop and mobile in chrome devtools $config->sessionFingerprint = false; // RockFrontend $config->livereload = 1; // RockMigrations // $config->filesOnDemand = 'https://your-live.site/'; $config->rockmigrations = [ 'syncSnippets' => true, ]; // tracy config for ddev development $config->tracy = [ 'outputMode' => 'development', 'guestForceDevelopmentLocal' => true, 'forceIsLocal' => true, 'localRootPath' => '/Users/xyz/code/yourproject/', 'numLogEntries' => 100, // for RockMigrations ]; $config->rockpagebuilder = [ "createView" => "latte", ]; -------------------- OLD POST from 2018: Have you ever come across the situation where you needed to change your config.php file for local development? Have you ever come across this warning? Say goodbye to this little annoying tasks Some of you might know that you can have a separate config-dev.php file for local development. This is nice, but also needs some setup (for example excluding this file for git upload) and there is still some danger of uploading this file to a place where it should not be... The other option was to keep the database settings for your live and dev server in sync - also not easy and maybe not the best... My solution is as simple, fast and I think it should be even safer than the other options. Just put these lines at the end of your config.php file: if(strpos($config->paths->root, 'C:/www/') === 0) { $config->dbUser = 'root'; $config->dbPass = ''; $config->httpHosts = [$_SERVER[HTTP_HOST]]; $config->debug = true; } elseif(strpos($config->paths->root, '/var/www/vhosts/') === 0) { $config->httpHosts = []; $config->dbUser = 'XXX'; $config->dbPass = 'XXX'; $config->debug = false; /** * Redirect to HTTPS * ATTENTION: This will NOT work with ProCache enabled! Use .htaccess instead */ if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){ $redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $redirect); exit(); } } else die('wrong config.php'); Having a separate config-dev.php file also makes it necessary to keep both files in sync. That was my first idea: To include the original config and then overwrite settings. But it's just simpler the other way round: Using the default config.php file and overwriting settings there.
    1 point
  8. @bernhard Thanks again for your help! I finally managed to also get SSH keys to work under Windows with WSL2 and with DDEV installed in Windows, so that now I am able to use RockShell how it's meant to be ? The key point, why I struggled with the ssh keys was, because I had put the key files in the ~/.ssh folder on the WSL2-Linux installation. But as I am using the Windows version of DDEV and using the command line from the windows side, the ssh keys must be placed in C:\Users\YourNameHere\.ssh After that, one can simply use this command, which will copy the ssh keys into one's web container: ddev auth ssh Then one can use e.g. the following RockShell command like so: ddev php RockShell/rock db:pull * * * * * And here is how to add a shell function under Windows, when using PowerShell 5: # test, if the PowerShell profile, where you can store custom shell functions, already exists Test-Path $PROFILE # if not, create the PowerShell profile New-Item -path $PROFILE -type file -force # Open the profile file with an editor. it's located here: # Path: C:\Users\YourNameHere\Documents\WindowsPowerShell # Name: Microsoft.PowerShell_profile.ps1 # Add the shell function to the profile file: function rockshell { param( [string]$Command ) ddev exec php RockShell/rock $Command } After that, save the file, restart PowerShell, and now it is possible to use RockShell like so: rockshell db:pull Many thanks @bernhard for creating RockShell, and for your help!
    1 point
  9. I just installed and played around with AdminStyleRock and AdminThemeBoss to be a little bit prepared. Good points! I agree with you. I think it makes sense to design all action related things (mostly buttons) with the same striking color. Normal mode and dark mode should IMO be separated from the color contrast topic. Normal mode bright and friendly. Dark mode to work more relaxed in the dark and to generate less ambient light. Just seen.. with AdminStyleRock the Offcanvas mobile menu looks as if it was not styled. Is that intentional? In any case, the colors are very contrasting. Looking forward to see in a few minutes! Sebastian
    1 point
  10. @BrendonKoz could you elaborate more on the difficulties? And why having a 12 grid system and preset 2/3/4/6 column sizes, which you could assign to the matrix items, does not fit you?
    1 point
  11. I will also attend to the meeting. Looking forward to see you guys
    1 point
  12. Following from @wbmnfktr's suggestion, note that the documentation for sort=sort states "But note that if the results have multiple parents, the resulting order isn't likely to be that useful." I find that in cases like yours something along the lines suggested in this post is often what I need:
    1 point
  13. HA! It's ProCache's markup minification! First test with ProCache on (html minification for guests): Second test with ProCache off: I'll post that into the ProCache forum! Thx for your help guys!
    1 point
  14. Ok great, let's do 22.3. @ 11:00 GMT+1 (Vienna) @ meet.baumrock.com (also no download or registration) Yes, the meeting will be in German!
    1 point
  15. Nice, @Zeka I was curious and tried that out ? $langIds = []; foreach($languages as $lang) $langIds[] = $lang->isDefault() ? '' : $lang->id; $field = "title"; $field = "$field.data".implode("|$field.data", $langIds); db($field, 'field selector'); db($pages->find("template=person,$field*=schön")->each('title'), "search 'schön'"); db($pages->find("template=person,$field*=beautiful")->each('title'), "search 'beautiful'");
    1 point
  16. No, it's not in the directory. You should really take a look at @netcarver's awesome: https://pwgeeks.com/ - just type "cache" in there and you'll find some other cache related tools. Thanks for the rundown of differences - that will be really helpful.
    1 point
×
×
  • Create New...