Leaderboard
Popular Content
Showing content with the highest reputation on 07/28/2023 in all areas
-
Hello, I was originally going to include this as part of my forthcoming AdminStyleChroma module but decided to roll it out as its own module. https://github.com/solonmedia/ImageColorThief Please check out the readme for a deeper explanation - but the short version here for now: This module adds two new methods to the Pageimage class, allowing you to extract the main dominant color or a palette of prevalent colors from an image. You can use the entire image to evaluate color dominance, or you can use a select swatch from the image based on inset rectangles from the edges, blocks at each corner, or a swatch centered on the focus point if you choose to use it. You can also select the granularity of the quantization to get more accurate color results. This is not an eyedropper algorithm - the colors are close approximates. Great if you have color schemes you'd like to coordinate with the headliner or seasonal images, or if you'd like to be able to sort a gallery of images by dominant color, etc. Looks real nice, for example if you are running a ken burns style image fade background and the images are sorted by a channel, etc. How to sort them? Ugh that's something I haven't tackled - yet: https://www.alanzucconi.com/2015/09/30/colour-sorting/ It works on JPG, GIF, PNG and WEBP images. It outputs RGB, HEX, RGB Integer, raw Array with R, G, B elements or an object. Once I've got myself registered and whatnot I'll submit it to the Modules Directory. Installs from zip for now: https://github.com/solonmedia/ImageColorThief/archive/refs/heads/main.zip I'd consider it Beta - the underlying libraries are pretty stable but I'd like to run a few more tests on input. Let me know if you have any questions/thoughts.12 points
-
In a recent GitHub issue report, I was asked about output formatting in ProcessWire, and where more information could be found about it. I know I've written about it numerous times, and went to locate the documentation page, only to find we didn't have one! Output formatting is such an important topic, so here is everything you need to know. I hope you'll find it simple enough, but also useful and thorough— https://processwire.com/blog/posts/output-formatting/9 points
-
3 points
-
Hi @theoretic Without details about how "big" the database is, I do not see any risks to upgrade to InnoDB. You should read the introduction made by @teppo and the post written by @ryan https://weekly.pw/issue/223/ https://processwire.com/blog/posts/using-innodb-with-processwire/ A nice and short explanation by @clsource : https://github.com/joyofpw/how-to-install-processwire#which-engine-is-better-myisam-or-innodb And of course, ingesting the official mysql dev doc (choose the right version according to your setup): https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html You might need to adjust some buffer settings, to get a first insight of it, you could run mysql-tuner, it take seconds to install and run, in order to get an easy to read report (steps below). ### Install wget (mandatory) ``` apt-get update apt-get install -y wget ``` ### Download mysqltuner ``` wget http://mysqltuner.pl/ -O mysqltuner.pl wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv ``` ### Run MySQLTuner ``` chmod u+x mysqltuner.pl ./mysqltuner.pl --user $MYSQL_USER --pass $MYSQL_PASSWORD ```3 points
-
You could use the Find Merge module and supply it with two selectors: one for products without an archived ancestor and one for products with an archived ancestor. You'd probably start by finding the archived categories, then your selectors would include "has_parent!=$archived" and "has_parent=$archived".3 points
-
@lele_ballack, Ryan has fixed the issue in a recent commit on the dev branch.2 points
-
Does this help? https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all Found here:2 points
-
You can find here the release of wire-cli, successor to wire shell, a powerful command-line interface (CLI) tool designed specifically for ProcessWire developers. Optimize your workflow, automate repetitive tasks, and manage your ProcessWire projects with ease. Wire-cli leverages the Symfony Console Component to provide a robust CLI experience, offering a wide range of features and commands to enhance your development process. From creating new projects and managing fields, templates, roles, and users, to performing database backups and serving your ProcessWire projects with a built-in web-server. Still in development, there might be some glitch, I will continuously improve and expand its functionality based on the feedback and needs of the ProcessWire community. Also mentioning that we will be probably working towards merging the features of wire-cli and rockshell to provide a unified CLI solution for ProcessWire. To get started with wire-cli, check out the GitHub repository or simply install it now from your terminal using Composer: composer global require wirecli/wire-cli Contributions are welcome. If you encounter any issues or have suggestions for improvements, please submit an issue, a pull request or post it here.1 point
-
Session Info Lists information about active sessions in a similar way to SessionHandlerDB, but for file-based sessions. Only install the module if you are not already using SessionHandlerDB. Installation 1. If you want to be able to see the pages that are being viewed by active sessions then set... $config->sessionHistory = 1; ...in /site/config.php If you have already set $config->sessionHistory to a higher number then you can leave it unchanged: 1 is the minimum needed for use in the Session Info module. 2. Install the Session Info module. A helper module named "Session Extras" will be automatically installed also. 3. If you want to be able to see the IP address and/or user agent for active sessions then visit the module config page for Session Extras and tick the relevant checkboxes. 4. You can now view information about active sessions at Access > Sessions. Screenshots With $config->sessionHistory set to 1 or higher: Additional information is listed when IP address and user agent tracking are enabled in Session Extras: https://github.com/Toutouwai/ProcessSessionInfo https://processwire.com/modules/process-session-info/1 point
-
I don't know if "Woah... impressive!" or "WOW!" is the right answer to this.1 point
-
Absolutely. That makes it possible to delete Pages - as long as they have no children.1 point
-
Hi friends! And thanks for Processwire! While supporting a 5-years-old Processwire project I found that there are both InnoDB and MyISAM tables there. Personally I think that InnoDB is better for Processwire. MyISAM tables came from some modules written years before. Since I like websites to be fast, I altered all MyISAM tables to InnoDB. At first glance, it was a good solution, website is running fast and smooth. Could there be caveats? Maybe I'm taking some implicit risks? I Would like to discuss this.1 point
-
This might be of use to you. https://processwire.com/talk/topic/25268-unable-to-save-an-image-or-file-pw-websites-hosted-on-dreamhost-solved/1 point
-
I can't find any documentation at this moment that shows this working, and I don't have any sites that come to mind where I could test this, but I think it works... If your search is only searching pages that have a template of 'product' (or whatever your product template is), I believe you can use this: sort=-parent.archived This assumes that the value of archived is 1, if it is indeed archived.1 point
-
Correct. Don't know, similar code works for me here. Trying to set a plain WireArray to a Page Reference field looks wrong to me. The acceptable value to set to a Page Reference field is a Page or PageArray. There is some example code in the post below that can help deal with Page Reference field values from before the module was installed:1 point
-
Hi @joer80! AFAIK this feature is still missing due to the way ProcessWire works with files. It has been requested and discussed lot of times thought. Read this whole thread for example. There is a module that claims to help with AWS S3. Haven't tried it myself.1 point
-
1 point
-
Thank you, I'm actually sending the information in handelSubmit. You first have to hide them, but it's still required.1 point
-
1 point
-
1 point
-
But pageClass doesn't work on pages. I see you're calling it on $template though. So I think we want to populate "class" on both the page and template info sections which required different approaches. Please try the attached and let me if you're getting what you need in the Page Info and Template Info sections. RequestInfoPanel.php1 point
-
1 point
-
Hey @adrian could the request info panel please also show the page's pageClass? Or is that information somewhere else? See here, where it's a quite essential information that the current page is of type "\RockCRM\Invoice", which is obvious in the dump but not in the request info panel: Thx in advance!1 point