Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 06/13/2021 in Posts

  1. ProcessWire 3.0.180 contains 20 commits containing various minor new features, issue resolutions and pull requests. While there's no single major feature to write a big blog post around, combined there are a lot of worthwhile and useful updates so this version is definitely worth updating to. More details can be found in the dev branch commit log and at ProcessWire Weekly (issue #370 covered an addition to our $files API var). Yesterday the forums were running a little slow because we had our yearly DDOS’er pay the site a visit once again (remember last time?), and from an apparently unl
    21 points
  2. Hi there, I'm starting a small series of tutorials here. The first one(s) deal with the topic "How can I add a watermark to all pageimages of a site?" first episode "Tutorial how to add a site wide optional watermarking method to all pageimages" second episode "Second Episode: "How can I add a watermark to all pageimages of a site?"" This is targeted to all, - beginners, intermediate, pros, - but mainly to interested PW lovers. The fictitious starting situation could be that a website owner has been creating beautiful photos for many years and would like to show them on
    12 points
  3. Second Episode: "How can I add a watermark to all pageimages of a site?" first episode "Tutorial how to add a site wide optional watermarking method to all pageimages" second episode "Second Episode: "How can I add a watermark to all pageimages of a site?"" In the first episode we created a function that adds a watermark overlay to our original images. This function was hooked via the name "wm" to the pageimage object. We positioned a big centralized overlay to the original images. This suites right if you or your customer will not use cropped portions of the images somewhere d
    8 points
  4. Restaurant Blechnapf Neumünster - https://www.restaurant-blechnapf.de/ Fine culinary dining combined with a similar fine setup of design and webdev can be found at Blechnapf, Neumünster. One of our oldest partners in crime culinary highlights. Classic german dishes, experimental dishes based on classic dishes and even very own creations of all-time classics. Even though they are officially targetting your taste buds you can find a lot of more adventures there. They offer support for all kinds of experiences from readings, poetry slams, business meetings and even weddings (just in c
    8 points
  5. I'm posting this as an update to an earlier post created by @Hari KT: https://processwire.com/talk/topic/4958-composer-support-for-processwire/. Though that approach still (kind of) works (as does the one detailed in https://github.com/wireframe-framework/processwire-composer-installer), thanks to @d'Hinnisdaël there's now a better alternative: the official composer/installers project 🙂 An example repository implementing the things detailed in this post: GitHub repository: https://github.com/teppokoivula/HelloWorld Packagist entry: https://packagist.org/packages/teppokoivula/h
    7 points
  6. This peace of software is impressive to me. Just want to share: Althttpd is a simple webserver that has run the https://sqlite.org/ website since 2004. Althttpd strives for simplicity, security, and low resource usage. As of 2018, the althttpd instance for sqlite.org answers about 500,000 HTTP requests per day (about 5 or 6 per second) delivering about 50GB of content per day (about 4.6 megabits/second) on a $40/month Linode. The load average on this machine normally stays around 0.1 or 0.2. About 19% of the HTTP requests are CGI to various Fossil source-code repositories. ... h
    6 points
  7. Retrieve, collect and store geolocation data from external geocoding services. Under the hood, the module uses the great PHP Library geocoder-php by William Durand and Tobias Nyholm and adds some processwire magic. Download: Github: https://github.com/neuerituale/FieldtypeGeocoder Module directory: coming soon
    6 points
  8. In my opinion the best solution would be to use a ProFields Table field because it has less overhead than pages and everything is viewable inside a single compact inputfield. But if you go with a page-based approach (which will be just fine if not 100% optimal) then your options are: Repeater PageTable Child pages Another opinion: purchasing the ProFields bundle should be a no-brainer for any regular PW user. Any one of the Table, Repeater Matrix and Combo fieldtypes alone is worth the purchase price, but you get all of them, plus several more goodies which are just
    5 points
  9. A serializer module for ProcessWire Pages. This module will add a new method to all pages, called serializer(), which returns JSON. https://github.com/Luis85/FlowtiPageSerializer ## Dependecies symfony/serializer symfony/property-access ## Requirements ProcessWire 3.x Composer ## Installation cd site/modules git clone git@github.com:Luis85/FlowtiPageSerializer.git cd FlowtiPageSerializer composer install ## Usage $page->serialize() will return the serialized Page Object as a JSON string representation containing all accessable fi
    4 points
  10. Probably the easiest method would be having their clients each with their own page, and each report is it's own child page. One template for the client pages and one template for the pdf pages. You can add the necessary fields to the pdf template to facilitate searching. Personally, I shy away from building intelligence into a naming conventions. You might have your client person(s) doing the uploading select the client then select the pdf file, and enter any other necessary data associated with that report. If your client already has a data system from which the reports are generated at
    4 points
  11. Hello everyone, We're looking for someone to join our team full time as a User Experience Developer. This role is about evolving our UI design system in HTML/CSS/JS as we continuously improve our web sites (built on ProcessWire of course!), email marketing, and other digital channels. The ideal candidate will be a creative thinker who also understands how design choices impact SEO, performance, accessibility, and standards compliance. It's a great company (70+ years old, multi-generational family owned) with excellent pay and benefits, and we are remote friendly. Get more info and apply h
    4 points
  12. If you can build enough discipline in the way you write conditionals, you can avoid this by always putting the constant part first: if ('xx' == $page->template->name) { So if you accidentally miss an equals sign and do an assignment, you get an error from the runtime as you are trying to assign to a constant string literal. I've tried to build this habit over the years and sometimes remember to do this - but I'm not there yet.
    4 points
  13. Klippo Eutin - https://www.klippo-eutin.de/ "Is my child safe while walking around town?"... well at least in Eutin (Germany) children of all ages are safe now or at least they can find a spot in case they need help. Our client and partner Deutscher Kinderschutzbund Eutin e.V. (roughly translated to: German Child Protection Association Eutin) started a new initiative to help children finding a safespace while en route through town. No matter what - a missed transportation, low battery, in need of a toilet, or whatever. Certified partners of Klippo Eutin help children of all ages to
    4 points
  14. <?php $page->of(false); $page->yourfield->add("https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Processwire_logo.svg/2560px-Processwire_logo.svg.png"); $file = $page->getUnformatted('yourfield')->last(); $file->description = 'hello world'; $page->save(); getUnformatted ensures that you get the files as array and then retrieve the last file 🙂
    3 points
  15. Here's a hook that might help: $wire->addHookBefore('ProcessModule::executeEdit', function(HookEvent $event) { if($event->wire()->input->get('name') !== 'YourModuleName') return; $event->wire()->addHookBefore('InputfieldForm::render', function(HookEvent $event) { /** @var InputfieldForm $form */ $form = $event->object; if($form->id !== 'ModuleEditForm') return; $your_module = $event->wire()->modules->get('YourModuleName'); if($your_module->foo === 'bar') { $uninstall = $form->getChildByName('uninstall'); $uninstall->description('Y
    3 points
  16. One way is to tell them to have the Hannacodes side by side, just like the buttons would be [[special_button url='example1.com' label='Visit Example1.com']][[special_button url='example2.com' label='Visit Example2.com']] But this depends on the html code that you are generating for that Hanna code. For that to work, you would need the root html tag of each of those buttons to be displayed as "inline-block" on your CSS. Another option is to use a single Hanna Code for both buttons, and style them to be side by side. This would give you more control over the styling, since you can ha
    3 points
  17. Damn, what a noob. That was it. How does one make a full project, publish it, test it, and never see a broken pages or a piece of red text anywhere saying Hey, where's your <body> tag? A mistery. Thank you sir, beer's on me 🍻
    3 points
  18. I might be misunderstanding this, but I think you could be setting it in the wrong place. Could you change the array returned from getModuleInfo() based on the result of the condition? Like this; public static function getModuleInfo() { $module_info = [ 'title' => '', 'version' => 100, ... ... the other usual fields here ... 'permanent' => false, ]; $data = wire('modules')->getConfig('MyModuleName'); if (your_condition_based_on_settings($data)) { $module_info['permanent'] = true; } return $module_info
    3 points
  19. You can set the module as permanent, then it cannot be uninstalled. public static function getModuleInfo() { return array( 'title' => '', 'version' => 100, 'summary' => '', 'href' => '', 'author' => '', 'singular' => true, 'autoload' => true, 'permanent' => true // <-- PERMANENT ); } Or, if you need it conditionally set, you can check your condition and set the permanent state in the modules config function.(?) public static function getModuleInfo() { $conditionMatch = (bool) calculateSomeConditionH
    3 points
  20. I’ve taken your word for it and purchased ProFields for this project. To also show my support for the future of ProcessWire. 😁
    3 points
  21. 3 points
  22. Could you explain what your goal is? I mean — you're already handling dependencies via Composer, so that's a good start at least 🙂 If you want the module itself to be installable via Composer, the approach I'd currently recommend is detailed here: https://github.com/wireframe-framework/processwire-composer-installer. Change the "type" in your composer.json to "pw-module" and add wireframe-framework/processwire-composer-installer to your requires and that's just about it. In case you were wondering, ProcessWire doesn't currently have a way to handle Composer dependencies when a module
    2 points
  23. "data-phc" attribute is missing on body tag. Are you sure you have body at all?
    2 points
  24. Version 1.1.6 is out! 🥳 Changelog: Adds Router->registerErrorHandlers() Hook, that should allow you to overwrite the general error- and warning handlers of the module. That should fix the problem that @David Lumm mentioned above without breaking things for other users. Allows Apikey & Auth-token to be set as GET-params. That can be useful when it comes to loading images via api. Fixes a bug that made it possible to authenticate with the PHP session (cookie) even though token-auth was enabled. Adds Router->setCorsHeaders() Hook Updated Composer &
    2 points
  25. Interesting concept and super low power. I've always liked low power installs - I used to run our book warehouse pick-n-pack system from a android tablet wirelessly connected to a Raspberry Pi server running our warehouse software. There was a thermal label printer too, and all offset by the solar array on our roof - but nothing as teensy as the power budget of the system you linked to.
    2 points
  26. I implemented that previously. In my experience, if you create a page for each event (using child pages or repeater) you will end up with hundreds of thousands of pages quickly, and in each one you will recorded only a minimum data. I think that is very inefficient. Maybe using ProTable is a better solution. I finally ended up using a textarea and saved one event in each line, when I was going to show the timeline I parsed it with regex, as well to update the tracking info this is very easy. Maybe if I do that again, I would avoid parsing every request for the tracking info by saving/reading/u
    2 points
  27. Here are the step by step to install and setup ProcessWire with the help of a server management tool - https://cloudstick.io/ 1. Create your Vultr compute. 2. Select the Operating system Ubuntu 16.04/18.04/20.04 LTS >> Enter your server root password then click on Deploy now! 3. Create an account in CloudStick and connect your server: Click on connect server >> Enter your server login details >> Add this server. 4. Your server setup will be done in couple of minutes - The setup will finish less than 8 minutes. Then select your
    2 points
  28. @ryan, regarding the update to ProcessWireUpgrade, could you please add an option to skip this interstitial screen? Because it doesn't add much value and just requires an extra click. If you are visiting the Upgrades page it already implies that you want to load the latest core and module versions to check if there are any upgrades available and the few seconds needed isn't going to be a big deal to you. Thanks.
    2 points
  29. Hi all 👋 I made this searchable UIkit 3.x documentation site to share with everyone. The official doc is great but you can't search across the whole doc. Anyway, here is the URL: https://uikitdocs.netlify.app/ What's missing is the live examples. Perhaps some of you can contribute? Github repo link is on the website as well. Cheers
    1 point
  30. Shouldn't it be enough to associate the styles with the block page's id and make sure cloning a page also clones its associated styles? If you assign a unique id (pgrid_id) to each block but keep that around after cloning, you won't be able to edit the cloned page's styles without it affecting the original page's styles. Or maybe I'm missing a part of the picture here.
    1 point
  31. No, the layout did not include the ProcessWire namespace. I will try that. The version is 0.20.2 The namespace solved it. Was pretty sure i tested that, but must have missed it. Thanks Teppo!
    1 point
  32. Given how simple FieldtypeRuntimeOnly is, it might be good to avoid the dependency in your module and just render your own markup directly. I haven't looked closely at your module but it just seems like it would make sense to keep it self-contained and avoid any fragility due to the chance that FieldtypeRuntimeOnly changes in the future.
    1 point
  33. Excellent, thank you @bernhard! That was exactly what I needed. I’m glad I didn’t have to manually like them to files imported in bulk with filesManager->importFiles().
    1 point
  34. As I mentioned you have to check if the correct locale is installed first. Because if you set it in ProcessWires "C" setting to it_IT or it_IT@euro and the locale is not installed, then you don't get the localized dates. And I forgot that you have to use strftime to get a localized date. You can find a description later in this post. The easiest way to check what locales are installed is to run `locales -a` if you have shell access (SSH for example). If this is not possible, then you have to modify my script from the first post and insert different values for italian there. <?
    1 point
  35. Yes, that works!! Hook inside hook -> nice combination. That was exactly what I was looking for!! Problem solved!! 😃 Thanks!!!!!!
    1 point
  36. I've been meaning to revise PageimageSrcset for a while now, to remove some features that I felt were unnecessary and to implement a better rendering strategy. The result is PageimageSource. What does it do? It provides a configurable srcset method/property for Pageimage It allows WebP to be enabled for images it generates. It allows Pageimage:render() to return a <picture> element It provides a Textformatter that replaces <img> elements with the output of Pageimage:render() Although it is based on a current module, this should still be considered b
    1 point
  37. Hello netcarver Thanks very much for your reply. Sorry, we have just found it in the scripts folder here and changed it to HTTPS $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3: "https://www.reallawsolicitors.com/site/templates/mp3/january2013.mp3" })/*.jPlayer("play");*/ }/*, It all seems to work now. Thanks for taking the time to reply and offer of help. David
    1 point
  38. Have a look at the API docs for the $datetime variable (https://processwire.com/api/ref/wire-date-time/). Just insert the date form PW page as argument and convert it to the format you like.
    1 point
  39. Now solved. For the benefit of others, you need to set the sort property of the repeater rather than use a custom property. i.e. for each repeater page: $subPage->sort = $j; // where $j is the required sort index $subPage->save(); then after all 'subPages' have been set: $page->$repeaterName->sort('sort'); and save the page.
    1 point
  40. Not for an arduino, hence my question. I suspect it's too limited (at least an UNO) to do a full HTTP 1.1/2 implementation. A Raspi Zero on the other hand, should be fine.
    1 point
  41. Thank you for help. The "getInfo" method is useful. I found out where the issue was and "tomorrow" is a the easiest way to go here.
    1 point
  42. @Rob(AU) will find this on his own... some day... probably. 😂
    1 point
  43. Problem resolved, thanks to the above help. A basic error in that mod-rewrite was not enabled. Did not prove straightforward to enable it in the Alpine image I was using, but one of the provided links pointed me to several Docker containers that are already set up for pw. Using the joyofpw/docker container instead of the one I was using got me going within a few minutes. Many thanks for all the help.
    1 point
  44. To set a cache that will expire at midnight today: // Expiry time string $midnight = 'today 23:59:59'; // Alternatively, the start of tomorrow is midnight today // $midnight = 'tomorrow'; // Save the cache $cache->save('test-cache', 'Value for cache', $midnight); So, to achieve what you want (if I understand you correctly), you could use the get() method something like this: $midnight = 'tomorrow'; $str = $cache->get('test-cache', $midnight, function() { return "The next cache value"; }); By the way, if you haven't discovered it, the getInfo() function is really useful f
    1 point
  45. Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we’ll take a closer look at in this post— https://processwire.com/blog/posts/formbuilder-v50/
    1 point
  46. RF3 got a very nice little update today 😍 Aggregations Often we need to calculate sums or averages of table data quickly and efficiently. RockFinder3 makes that easy as well: $avg = $rockfinder->find("template=cat") ->addColumn('weight') ->getObject("SELECT AVG(weight)"); db($avg); $cats = $rockfinder ->find("template=cat") ->addColumns(['title', 'weight']); $cats->dump(); // dump finder data to tracy $obj = $cats->getObject("SELECT SUM(`weight`) AS `total`, COUNT(`id`) AS `cats`, SUM(`weight`)/COUNT(`id`) AS `avg`"); db($obj); // dump
    1 point
  47. It worth to mentions https://htmx.org/ the successor to intercooler.js.
    1 point
  48. Changelog for Wireframe 0.14.0: ### Added - New ComponentView class, as well as the ability for component views to access Component class public methods as properties, in the same way view files and layouts can access Controller class public methods. ### Changed - Hook related code moved from Wireframe module to separate Hooks class. - Accessing public class methods as properties in view files were moved into new trait MethodPropsTrait. This is used internally by Controller and Component classes. - Some minor improvements related to dependency injection within Wireframe objects (and Proce
    1 point
  49. The trick is to build up a string variable eg. $selector, based on the options chosen by the user and using that variable as part of something like: $images = $page->children($selector); This assumes of course that all your images are child pages of the main gallery page. You'll probably want $selector to end up being something like: sort=-camera_model, sort=resolution, sort=-size The way to build $selector can be seen in the Skyscraper's search.php file. For example, this section: if($input->get->keywords) { $value = $sanitizer->selectorValue($input->get->key
    1 point
×
×
  • Create New...