Leaderboard
Popular Content
Showing content with the highest reputation on 01/26/2019 in all areas
-
We're finally launching a redesign of our website! Doesn't feel like it to us, but our previous design was already from 2013 ? https://ed-works.com/ We like to keep things simple, so the only third-party modules that we installed were Tracy debugger, Admin on steroids and Admin Theme Boss, which we tweaked a little bit to our taste. All in all, there's not much going on inside PW. Our main concern was to serve the frontend with responsive images with a close quality to the originals, and for this, it's important that PW allows us to use ImageMagick for resizing them. We also love to use PW's image tags to add classes to the images. In this case, we use them to display the images with three different sizes. We also had to change the templates to serve the projects to the homepage via Ajax. We hope you guys like our new baby ? Edit: I forgot to refer that we also changed our logo and tweaked our name to ED works.6 points
-
Thanks for the updates @ryan! Going forward, what do you think should be done about the sanitizer methods included in the PhpDoc of WireInputData? These sanitizer methods are also the basis for what gets an entry in the API documentation for WireInputData. As noted in this request the sanitizer methods included in the WireInputData PhpDoc were already out of date (i.e. incomplete). The new $santitizer methods added in 3.0.125 are also not included there. Do you think the PhpDoc of WireInputData should just aim to keep pace with new $sanitizer methods as they are added? Or now that multiple methods can be chained together... // access sanitizer on $input as method $q = $input->get->text50_entities('q'); ...in a way that couldn't be handled as lines in the PhpDoc, perhaps it would be better to drop the list of sanitizer methods and instead include some general note about how $sanitizer methods (with a link to the $sanitizer documentation) can be used/chained with $input?6 points
-
You can set the default sort via a hook in /site/ready.php: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { /* @var ProcessPageLister $lister */ $lister = $event->object; // Only for Users lister if($lister->parent->id !== 29) return; // Set the sort to whatever $lister->defaultSort = 'email'; }); Note that the user can change the sort within the lister, and this will persist for the current session. So to get back to the default sort you are setting in the hook the user would need to reset the lister: Or if you want the default sort to apply every time the Users lister is visited (but still allow the user to change the sort while they are using the lister) then you could do this: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { /* @var ProcessPageLister $lister */ $lister = $event->object; // Only for Users lister if($lister->parent->id !== 29) return; // Reset the sort when the lister is first loaded if(!$event->config->ajax) $lister->sessionSet('sort', ''); // Set the sort to whatever $lister->defaultSort = 'email'; });4 points
-
ProcessWire 3.0.125 has several useful new $sanitizer methods and options, as well as new ways to access them directly from the $input API variable. This makes dealing with user input even easier than it was before. This version also brings updates to our translation functions and improvements to our API documentation: https://processwire.com/blog/posts/pw-3.0.125/2 points
-
2 points
-
I know, however, @sforsman seems to have abandoned the project as he does not pay attention to our pings, while @arjen stated that he is happy to maintain his/their fork. ...and in the end, one will probably reinvent the decimal. The same goes for the module being recommended ?2 points
-
@teppo totally agree. It's definitely not the answer to accessibility for the visually impaired. All sites should be readable by screen-readers. It's just another tool in toolbox and a nice addition ?2 points
-
That's a nice find, and I believe that a tool like this would indeed be a nice addition for users that don't generally require a screen reader. That being said, those who do require such assistive technology will already most likely have their own individual setups, and a separate tool won't really help – so the accessibility argument is somewhat questionable. Perhaps even misguided, since it may give some folks an impression that this is enough to take care of all screen reader related accessibility needs. Accessibility, particularly referring to screen reader users, is not just about enabling "text-to-speech voice for the relevant content" (at least the way I understand their selling point), but rather about making sure that the entire user experience takes screen reader users into account. In other words: providing a read-out-loud button for the main content is not enough, if some users can't even navigate the site with ease ?2 points
-
That only works well for a single currency. If you need to support any currency you should really use decimals, as different currencies are differently subdivided.2 points
-
We ran into issues after a few days (luckily we noticed the errors ourselves) so we were pretty quick to use the Decimal field by sforsman. We didn't use floats for money luckily. We pinged Ryan back in the day to implement this in the core or at least throw a warning when someone uses the float field. We also needed to make a distinguish between empty and 0 values so the client could use this in ListerPro to filter on. That is why there a fork. You can see more discussion here -> https://github.com/processwire/processwire-requests/issues/126.2 points
-
---DEPRECATED--- Please use RockSkinUikit Just install the module and you can change the look&feel of your admin instantly by changing only one color: Download: https://modules.processwire.com/modules/rock-skin-uikit/ https://github.com/BernhardBaumrock/RockSkinUikit I'd be very happy if any of the CSS pro's could do some final improvements to the default.less theme - though I'm already very happy with the result! Happy Admin-Theming ? PS: At the moment this downloads a fork of the original AdminThemeUikit module because one method is not yet hookable. You can support this request here: https://github.com/ryancramerdesign/AdminThemeUikit/pull/77 and then I can update my module to pull the original theme from ryan.1 point
-
I can confirm this. Just stumbled over this today myself. @ryan I wonder if there's a central place where we can report such outdated links? (like a JIRA ticketing system) I pointed to a (probably forgotten) Hanna-Code in the docs a few days ago, which was supposed to load an iFrame or screenshot from somewhere (but nothing was rendered anymore), but I guess it was overlooked. On another doc page there is a TOC link which isn't valid anymore*; where can we post such issues and can make sure you will actually see it? I fully understand that a scattered bunch of forum posts is not the ideal way to handle such scenarios. * Example: https://processwire.com/docs/fields/dependencies/#themes - the corresponding chapter is not there anymore.1 point
-
Also, on https://processwire.com/docs/fields/dependencies/ you have a couple of links to the form builder module, but these are linking to http://modules.processwire.com/modules/form-builder/ instead of the new https://processwire.com/store/form-builder/1 point
-
1 point
-
??? The more often you write it, the easier it gets. ?1 point
-
Backup all your work on an external hard drive, sync your data in iCloud, do a Time Machine Backup, then restore your macbook. Once restored, change the default DNS settings to the Cloudfare/APNIC own (1.1.1.1 and 1.0.0.1), try your wifi adapter by downloading a large file (like an OS Linux ISO file), or even torrent files. If everything work fine, its time/the occasion to prepare your macbook with all the dev env, apps and copy/organize back your works files. Once finished, do a Time Machine Backup before doing everything with your mac. If it didn't work, I would follow @pwired advice to buy a new wifi adapter. ConEmu, even on Windows Server.1 point
-
My acer laptop wifi started to behave similar and doesn´t work properly anymore with a lot of hotspots I weekly visit. It connects to the routers all right but no internet. And yes others around me at the same time always have internet. I want to share a simple working solution I found with a D-Link usb wifi adapter: This little thingy made everything work again. Note: I tried a TP-Link before but it had installer drivers instead of direct inf drivers. The TP-Link installer drivers never worked. So I changed it with this D-Link which comes delivered with direct inf drivers which are simple to add and simply do work. (Not affiliated, just want to share something that works)1 point
-
Sorry guys, problem fixed and my understanding of WireData set() and get() methods is kinda stable now! ? Setting the module property values from outside the module did in fact work as expected from the beginning (the correct values are represented in module data array). I simply updated the properties in the wrong place (after the Ajax part). To leave a reference for others I have to add/correct a few things I was told here (without stepping on anyone's toes): I'm not sure that this is correct (at least it doesn't matter). I simply can update properties from outside a module without extending the module class. I only need to instantiate the module. $mymodule = $this->wire('modules')->get('MyModule'); $mymodule->foo = 'bar'; // This correctly updates the property "foo" in MyModule! // Looking at the WireData class $mymodule->foo = 'bar'; // gets internally translated to $this->set('foo', 'bar'); So, If you like to have modules with simple configurable properties it seems to be the best to use the set() and get() methods of WireData instead of creating your own getter and setter methods. Please correct me if I'm wrong. And thanks all for your help!1 point
-
@wbmnfktr (had to copy the username ? ) pointed up important questions. The other questions I may think are crucial to the developing effort are: 1 - Are the content updates very frequent and on all sites to justify a single database? 2 - Will be the content of the website entered in parallel? Or maybe one site is fully edited and can be copied to the other ones before people start working on them.1 point
-
JSON in the description field is detected if the first character is { and the last character is }, or if the first character is [ and the last character is ]. See here. So one workaround could be to prefix the JSON with some character... *{"json": "here"} ...and then trim the first character before the module decodes the JSON.1 point
-
For money stuff you may stick to regular integer field, just calculate in Cent and divide by 100 for display. Easy, stable, reliable and fast. Of course less convenient compared to Fieldtype Decimal.1 point
-
You are correct,, it was 6 significant digits I had 15248.01 that changed and rounded to 15248. But I wrongly used 15248.25 in my example. I'm using the decimal field from now on. But I'm very frustrated that for some reason this is not stated very clearly anywhere in ProcessWire. I've used lot's of float fields in the past 5 years, also for webshop transaction data saved in PW. Luckily the total amounts were never greater than 10000, but it could have been worse... Just stumbled upon it when revamping an invoicing system and porting it's data to PW. I've literally been shortchanged ?1 point
-
Version 1.2.3 as new master version available All information about the changelog and bug fixings in the first post.1 point
-
1 point
-
Found this today: Wild, weird and out there, it's a big bonus to making PW sites more accessible... https://websitevoice.com/ Talk to me ProcessWire ?1 point
-
Hi bernhart ;-), thanks, that did the trick! Here's my code, if someone also needs to do this: wire()->addHookAfter('ProcessPageEdit::buildForm', function (HookEvent $e) { // skip the whole thing and return, if the user has not the proper role if (!wire('user')->hasRole('superuser') && !wire('user')->hasRole('useradmin')) return; $form = $e->return; $boxes = ['privacy', 'consent']; foreach ($boxes as $box) { $boxfield = $form->getChildByName($box); if($boxfield){ $boxfield->required = false; } } });1 point
-
Hi Torsden, try to use ProcessPageEdit::buildForm, do a google search for this exact phrase and see if you can get examples. Sorry, on mobile ? The principle is to get the right field in the hook and then just change the "required" setting.1 point
-
I have already mentioned this in the comment section of the very first blogpost of Ryan showcasing it. Luckily I use the Dark Reader chrome extension to browse most sites anyway, but it would be nice to see a lot less contrast. Better yet, a native dark mode for the site would be welcome. We have just been presented with a nice example: https://processwire.com/talk/topic/20584-schwarzdesign/ (click the sun icon of the site in the top right corner).1 point
-
The new website is OK, but the docs are unreadable for me. The contrast of the black code background with the white pages make my eyes hurt like crazy... Fix that please!1 point
-
Interesting concept, you could offer a license for the people that did fund you and it will give you some enthusiasm, but may of course hold you to deadlines, ha ha. Putting my cards on the table, I am not sure if I would ever use Padloper, I would love to but the need hasn't come up yet. The only thing I like about WordPress is the speed you can get WooCommerce to market. However I probably would Kickstart it as I know it would make a great addition to PW. There may be many like me, so if you offer up the license to people who do fund, you are not missing out on anything, only they are if they don't use the license. Great thinking HMCB.1 point
-
Just a few days before christmas we relaunched our own agency website at schwarzdesign.de using ProcessWire! The old Drupal-based site was getting a bit outdated, we wanted to rebuilt it with fewer, more focused content pages, clean & minimalistic design and better performance for mobile visitors. Note that the site copy is only available in German. After a couple of successful ProcessWire projects such as Engfer Consulting and Joachim Kobuss, we decided to use it for our own site as well, mostly for it's small footprint and developer-focused API. We also have a dedicated ProcessWire page on our new site, check it out here! Modules used ProFields Automatically Link Page Titles TinyPNG Image Compression Color Tracy Debugger Sitemap Duplicator ALIF - Admin Links In Frontend A focus on content We went for a minimalistic approach with a limited set of design elements to highlight our content, which is mostly copy about our services and approach to web design. The two-column layout is built with a single Repeater Matrix section with fields for left and right copy, left and right images and a couple of display options for column width and alignment. Other Repeater Matrix types include a full-width image with some additional links (used on the homepage), teaser sections for current news and projects as well as a list of services. We used dedicated page types (templates) for services, projects and news. This allowed us to use those as taxonomies for our reference projects, and create cross-references to those pages in one go. For this purpose, there's also a dedicated CMS template and pages for all Content-Management-Systems we use, allowing us to categorize our projects and news in regards to the CMS used and show appropriate pages in the recommended content sections. Performance Loading times become ever more important with the rising amount of mobile traffic, both for the bounce rate and for SEO purposes. For client-side performance, we got rid of all external libraries (CSS and JavaScript). All CSS is written in SASS; we use a very stripped down version of Bootstrap 4 that includes only the grid system, the utility classes and a select few of the components. We also avoided the components requiring jQuery, allowing us to get rid of jQuery entirely. The few interactive parts of the site (flyout menus, the theme switch, adding the blur filter for the background image on scroll) are written in simple vanilla JavaScript. Server-side, we use the ProcessWire page cache to minimize server response times, as well as Cache-Control headers and GZIP compression to make sure all assets are as lightweight as possible and cached client-side. One problem we had were the large header images requiring transparency. We ended up combining a couple of approaches to minimize image loading times: SVG assets where possible (for example, all the service pages (Kompetenzen) use SVG for the header images. Responsive images to serve the smallest possible image for each device. PNG compression using the TinyPNG service and the TinyPNG module. This had possibly the highest impact, sometimes reducing the image size by about 80%! Design highlights One of the adornments of the site are the large, variable sized header images. Position and size can be controlled through the backend: We built display settings for size in viewport width or height, vertical and horizontal alignment as well as optional offsets. The header images are fixed to the viewport, so they always stay in the background. The blurred background uses CSS filters, with a fallback to a simple opacity reduction for older browsers. As a gimmick, there is a light and a dark theme for the website, the latter being the default. You can switch between themes using the sun icon in the menu. On the technical sides, both themes have their own stylesheets, compiled using the same SASS source files with different variables. Only the active theme's CSS is directly loaded on the site, the other is included as a preloaded asset. The active theme is saved in the session, so it stays active for the duration of the browser session. For our reference projects (Referenzen), we replaced the background color with the primary color of the project (each project has a color field for that purpose). We determine the luminance of the primary color programmatically to find if the color has higher contrast to black or white, and use the light or dark theme accordingly. Screenshots1 point
-
1 point
-
Modules > Core > ProcessUser > What fields should be displayed in the page listing?1 point