Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 07/25/2019 in all areas

  1. 28 points
    Hope you guys are having a great week. I'll keep this week's update short since everything I'm working on is in-progress rather than ready to post. But I can tell you about a few things you'll likely see in next week's post: First is that I've got multi-page/paginated form support just about ready to release in FormBuilder. What this means is that you can take forms (especially long forms) and break them up into multiple paginations. This makes for multi-part forms that are more digestible and easy to use for users. The end of each pagination has "Next" and "Prev" buttons for navigation between them. FormBuilder validates each pagination independently as it is submitted so that any errors are taken care of as the user proceeds rather than all at the end. And these are true paginated forms, rather than a JS manipulation of existing forms. More on this next week. I'm also working here on a new Inputfield module called InputfieldToggle. It's an alternative to the core InputfieldCheckbox and the intention here is to make it a selectable alternative for FieldtypeCheckbox fields. Unlike InputfieldCheckbox, it is presented as two radio buttons for "on" and "off" states. (It's also possible to have a "no selection" state distinct from the "no" state, where supported). It comes predefined with several toggle types (Yes/No, On/Off, True/False, Enabled/Disabled), along with the ability to specify your own (multi-language too of course). Like a checkbox, because it is a toggle, it holds a value of either true (1) or false (0). There is also null for no selection. While this is a relatively simple Inputfield, it answers a common need (at least in my experience) and often can provide a better experience than a standard checkbox, depending on the input need. Not to mention, it's a lot more efficient than using an Options or Page field to accomplish the same thing. In addition to sites and apps running in ProcessWire, I think this particular Inputfield has a lot of potential use in the core and its administrative forms, so I might include it in the core, though not yet certain. I'm already using it quite a bit in forms I'm developing for clients in FormBuilder, where in many cases I find it a better fit than InputfieldCheckbox. Lastly, there are some nice UI enhancements just about ready for manipulating column widths of fields in ProcessWire. It makes it a much simpler and quicker job than it currently is, so I'll have more on that next week too. Have a great weekend!
  2. 19 points
    Core version 3.0.137 on the dev branch adds the ability to hook multiple methods at once, in a single call. This post details how it works and provides a useful example of how you might put it to use in your development environment. This version also refactors and improves upon several core classes— https://processwire.com/blog/posts/pw-3.0.137/
  3. 17 points
    I've spent the last while experimenting with srcset implementation - and PageimageSrcset is the result: PageimageSrcset Provides configurable srcset and sizes properties/methods for Pageimage. Overview The main purpose of this module is to make srcset implementation as simple as possible in your template code. It does not handle images rendered in CKEditor or similar fields. For an introduction to srcset and sizes, please read this Mozilla article about responsive images. Pageimage::srcset() // The property, which uses the set rules in the module configuration $srcset = $image->srcset; // A method call, using a set rules string // Delimiting with a newline (\n) would also work, but not as readable $srcset = $image->srcset("320, 480, 640x480 768w, 1240, 2048 2x"); // The same as above but using an indexed/sequential array $srcset = $image->srcset([ "320", "480", "640x480 768w", "1240", "2048 2x", ]); // The same as above but using an associative array // No rule checking is performed $srcset = $image->srcset([ "320w" => [320], "480w" => [480], "768w" => [640, 480], "1240w" => [1240], "2x" => [2048], ]); // Use the default set rules with portrait images generated for mobile/tablet devices $srcset = $image->srcset(true); // Return the srcset using all arguments $srcset = $image->srcset("320, 480, 640x480 768w, 1240, 2048 2x", [ "portrait" => "320, 640", ]); // The set rules above are a demonstration, not a recommendation! Image variations are only created for set rules which require a smaller image than the Pageimage itself. On large sites this may still result in a lot of images being generated. If you have limited storage, please use this module wisely. Portrait Mode In many situations, the ratio of the image does not need to change at different screen sizes. However, images that cover the entire viewport are an exception to this and are often the ones that benefit most from srcset implementation. The main problem with cover images is that they need to display landscape on desktop devices and portrait when this orientation is used on mobile and tablet devices. You can automatically generate portrait images by enabling portrait mode. It is recommended that you use this in combination with Pageimage::focus() so that the portrait variations retain the correct subject. The generated variations are HiDPI/Retina versions. Their height is determined by the portrait ratio (e.g. 9:16). Variations are always generated, regardless of whether the original image is smaller. Upscaling is disabled though, so you may find that some variations are actually smaller than they say they are in their filename. The sizes attribute should be used when portrait mode is enabled. Pageimage::sizes will return (orientation: portrait) and (max-width: {maxWidth}px) 50vw by default, which handles the use of these images for retina devices. The maximum width used in this rule is the largest set width. Pageimage::sizes() There is no option to configure default sizes because in most cases 100vw is all you need, and you do not need to output this anyway as it is inferred when using the srcset attribute. You can use the method for custom sizes though: // The property $sizes = $image->sizes; // Returns 100vw in most cases // Returns '(orientation: portrait) and (max-width: {maxWidth}px)50vw' if portrait mode enabled // A method call, using a mixture of integer widths and media query rules // Integer widths are treated as a min-width media query rule $sizes = $image->sizes([ 480 => 50, "(orientation: portrait) and (max-width: 640px)" => 100, 960 => 25, ]); // (min-width: 480px) 50vw, (orientation: portrait) and (max-width: 640px) 100vw, (min-width: 960px) 25vw // Determine widths by UIkit 'child-width' classes $sizes = $image->sizes([ "uk-child-width-1-2@s", "uk-child-width-1-3@l", ]); // (min-width: 640px) 50vw, (min-width: 1200px) 33.33vw // Determine widths by UIkit 'width' classes $sizes = $image->sizes([ "uk-width-1-2@m", "uk-width-1-3@xl", ]); // (min-width: 960px) 50vw, (min-width: 1600px) 33.33vw // Return the portrait size rule $sizes = $image->sizes(true); // (orientation: portrait) and (max-width: {maxWidth}px) 50vw // The arguments above are a demonstration, not a recommendation! Pageimage::render() This module extends the options available to this method with: srcset: When the module is installed, this will always be added, unless set to false. Any values in the formats described above can be passed. sizes: Only used if specified. Any values in the formats described above can be passed. uk-img: If passed, as either true or as a valid uk-img value, then this attribute will be added. The srcset attribute will also become data-srcset. Please refer to the API Reference for more information about this method. // Render an image using the default set rules echo $image->render(); // <img src='image.jpg' alt='' srcset='{default set rules}'> // Render an image using custom set rules echo $image->render(["srcset" => "480, 1240x640"]); // <img src='image.jpg' alt='' srcset='image.480x0-srcset.jpg 480w, image.1240x640-srcset.jpg 1240w'> // Render an image using custom set rules and sizes // Also use the `markup` argument echo $image->render("<img class='image' src='{url}' alt='Image'>", [ "srcset" => "480, 1240", "sizes" => [1240 => 50], ]); // <img class='image' src='image.jpg' alt='Image' srcset='image.480x0-srcset.jpg 480w, image.1240x640-srcset.jpg 1240w' sizes='(min-width: 1240px) 50vw'> // Render an image using custom set rules and sizes // Enable uk-img echo $image->render([ "srcset" => "480, 1240", "sizes" => ["uk-child-width-1-2@m"], "uk-img" => true, ]); // <img src='image.jpg' alt='' data-uk-img data-srcset='image.480x0-srcset.jpg 480w, image.1240x640-srcset.jpg 1240w' sizes='(min-width: 960px) 50vw'> // Render an image using portrait mode // Default rule sets used: 320, 640, 768, 1024, 1366, 1600 // Portrait widths used: 320, 640, 768 // Original image is 1000px wide // Not possible to use portrait mode and custom sets or portrait widths in render() // Sizes attribute automatically added echo $image->render(["srcset" => true]); // <img src='image.jpg' alt='' srcset='image.320x569-srcset-hidpi.jpg 320w, image.640x1138-srcset-hidpi.jpg 640w, image.768x1365-srcset-hidpi.jpg 768w, image.jpg 1024w' sizes='(orientation: portrait) and (max-width: 768px) 50vw'> Configuration To configure this module, go to Modules > Configure > PageimageSrcset. Set Rules These are the default set rules that will be used when none are specified, e.g. when calling the property: $image->srcset. Each set rule should be entered on a new line, in the format {width}x{height} {inherentwidth}w|{resolution}x. Not all arguments are required - you will probably find that specifying the width is sufficient for most cases. Here's a few examples of valid set rules and the sets they generate: Set Rule Set Generated Arguments Used 320 image.320x0-srcset.jpg 320w {width} 480x540 image.480x540-srcset.jpg 480w {width}x{height} 640x480 768w image.640x480-srcset.jpg 768w {width}x{height} {inherentwidth}w 2048 2x image.2048x0-srcset.jpg 2x {width} {resolution}x How you configure your rules is dependent on the needs of the site you are developing; there are no prescriptive rules that will meet the needs of most situations. This article gives a good overview of some of the things to consider. When you save your rules, a preview of the sets generated and an equivalent method call will be displayed to the right. Invalid rules will not be used, and you will be notified of this. Portrait Mode Set Widths A comma limited list of widths to create HiDPI/Retina portrait variations for. Crop Ratio The portrait ratio that should be used to crop the image. The default of 9:16 should be fine for most circumstances as this is the standard portrait ratio of most devices. However, you can specify something different if you want. If you add a landscape ratio, it will be switched to portrait when used. Any crops in the set rules ({width}x{height}) are ignored for portrait mode variations as this ratio is used instead. UIkit Widths If your website theme uses UIkit, you can pass an array of UIkit width classes to Pageimage::sizes to be converted to sizes. The values stored here are used to do this. If you have customised the breakpoints on your theme, you should also customise them here. Please note that only 1- widths are evaluated by Pageimage::sizes, e.g. uk-width-2-3 will not work. Remove Variations If checked, the image variations generated by this module are cleared on Submit. On large sites, this may take a while. It makes sense to run this after you have made changes to the set rules. Image Suffix You will see this field when Remove Variations is checked. The value is appended to the name of the images generated by this module and is used to identify variations. You should not encounter any issues with the default suffix, but if you find that it conflicts with any other functionality on your site, you can set a custom suffix instead. Debug Mode When this is enabled, a range of information is logged to pageimage-srcset. PageimageSrcsetDebug.js is also added to the <head> of your HTML pages. This will console.log a range of information about the images and nodes using srcset on your page after a window.onresize event is triggered. This can assist you in debugging your implementation. The browser will always use the highest resolution image it has loaded or has cached. You may need to disable browser caching to determine whether your set rules are working, and it makes sense to work from a small screen size and up. If you do it the other way, the browser is going to continue to use the higher resolution image it loaded first. UIkit Features This module implements some additional features that are tailored towards UIkit being used as the front-end theme framework, but this is not required to use the module. Installation Download the zip file at Github or clone the repo into your site/modules directory. If you downloaded the zip file, extract it in your sites/modules directory. In your admin, go to Modules > Refresh, then Modules > New, then click on the Install button for this module. ProcessWire >= 3.0.123 is required to use this module.
  4. 17 points
    Just a quick update this week. I’ve got a good post in the works that I thought I’d have ready for today, but didn’t have quite enough time to finish it, so going to save it for next week. Though there's a module that's part of the post, and since it is ready, I've posted it below. We’ll look at ProcessWire 3.0.138 next week as well. I do have a couple of non-core updates to mention this week though. First is that I’ve released a new Textformatter module that converts any image references in your CKEditor/textarea fields to WEBP images on-the-fly as pages are rendered. If you are implementing WEBP on your site, you’ll find that the images placed in rich text fields are the most tricky ones to serve as WEBP, so this module takes care of that task for you. It's in the modules directory or at GitHub: https://github.com/ryancramerdesign/TextformatterWebpImages I’ve also released new development versions of the ListerPro and Export CSV modules, both of which are available to subscribers in the ListerPro support board. Some of the new features are actually built into the core, but currently only utilized by ListerPro. There’s quite a bit of new stuff, so there’s also an ~18 minute screencast that walks you through them, which can also be found in the ListerPro board.
  5. 17 points
    ProcessWire 3.0.136 upgrades the version of CKEditor from 4.10.1 to 4.12.1. While that might look like a minor version bump, it’s actually 5 versions ahead and includes quite a lot of new features, changes and fixes. See the CKEditor release notes for more details on all that's been added and changed in the last 5 versions. It was a year or two ago where it seemed like CKEditor was going to be phasing out CKE 4 in favor of CKE 5. But interestingly it now seems like there is a new focus in CKE 4 from the CKEditor folks, so I’m going to have to start watching the version updates more often. Of course, I remain interested in CKE 5 too, but it’s nice to see CKE 4 (my favorite editor for a long time) going so strong and getting new features and attention, which is also a nice benefit for all of us PW users. I’m looking forward to working with some of the new stuff they’ve added in recent versions as well. For instance, the autocomplete feature sounds like it has nice potential for inserting Hanna codes or links to other PW pages, among other things. Also new in 3.0.136 is a new Debug::backtrace() static method in the core. I often use PHP’s debug_backtrace() method when debugging (and it appears in PW’s fatal exceptions), but the reality is it gives me a lot of stuff I just don’t want… all the hook method calls and such that aren’t usually relevant to what I’m trying to find. So the new built in Debug::backtrace() method returns a much simpler array than PHP does, and it also excludes all of the [likely] irrelevant internal hook method calls, and is just generally more focused on what you are likely to need from a backtrace in ProcessWire. It’s very convenient to plug into a ProcessWire $wire->message(Debug::backtrace()), or a Tracy Debugger bd(Debug::backtrace()); or even an echo '<pre>' . print_r(Debug::backtrace(), true); call. Though please consider this new method a work in progress, as it’s just a start at the moment and is likely to get additional updates. At some point, PW’s fatal exceptions will likely use the output from this method as well. Since this is kind of a short post, I’m just posting in the forums rather than creating a new blog post. More core updates on the way next week. Hope you all have a great weekend!
  6. 16 points
    ProcessWire added WebP image support this year and many have been adopting it enthusiastically in existing projects. In this post we’ll look at a process used for migrating an existing website to use WebP images. We’ll cover everything from preliminary considerations to implementation and testing, with lots of tips and tricks along the way— https://processwire.com/blog/posts/webp-images-on-an-existing-site/
  7. 13 points
    Hello everyone, Recently I spent some time researching how I can update my workflow. I really enjoy working with TailwindCSS however, when it comes to Javascript, I often find myself having to search around to find a good package. Often I find myself having a package for lazy loading, a package for sliders, a package for animation, a package for parallax and a package for ajax. Before you know it, you are worrying about dependicies, conflicts and vunrabilities for many different packages. Since the push is to get rid of jQuery and use native javascript, often each will have their own utility classes, some of which do the same thing. This adds a lot of bulk to the website. This is what I love about UIKit, it provides plenty of functionality for a small ~130KB unminified. Not many know this, but the UIKit helper classes are exposed via the API too. So it means you will not have to worry about your javascript working cross-browser (https://github.com/uikit/uikit-site/blob/feature/js-utils/docs/pages/javascript-utilities.md). The perfect thing would be to combine UIKit and TailwindCSS, but the best way to achieve this is up for grabs. I personally use TailwindCSS base and implement components from UIKit. I then use PurgeCSS on the CSS file to make sure anything unused by either UIKit or Tailwind isn't making it to production. I do this using Parcel JS. I have used Webpack and Gulp previously, but I find Parcel is a simple and easy way to get a project started (and it's fast!). The next thing I've found is UIKit is not always the answer. There are now more than ever better ways of achieving things in browser. Such as CSS Grid, `position: sticky`, and `object-fit` try to use these CSS alternatives where possible. Purge will always make sure that you get the smallest possible file size, so avoid using the uk-grid element where possible and use CSS Grid. I have setup a github starter template (https://github.com/TomS-/UIKit-TailwindCSS/tree/master) if you want to have a look at it. CSS Grid will introduce intrinsic design (https://www.youtube.com/watch?v=lZ2JX_6SGNI - Great series) Next will be to use WebP, there is plenty going around on the blogs now about this, but this will make a massive improvement to your Google Page Insight rating (https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.tikari.co.uk%2F&tab=desktop). I would love to hear your web manifesto - and ask me anything about mine 🙂
  8. 12 points
    Hi Jeevanish, For the most point some of these are just buzz words. Headless CMS is basically the CMS exists away from the website and talks via an API such as JSON / XML / GraphQL (This allows you to use the data anywhere on the web or an internet connected drive, lets say for an APP) Hybrid CMS is something that seems relatively new, and it seems to be that Headless CMS doesn't have great editor functionality, hybrid seems to be a buzz word around it's a great easy to use CMS with Headless functionality, I guess if you installed GraphQL to ProcessWire it would be considered hybrid. Digital Experience Platform seems to be a platform that all talks to each other using different mediums. Lets say you have a train station, that system lets you book a ticket, that then updates a message board letting them know how many tickets are left, which updates their website and also sends to the ticket attendents which shows that the ticket is for that train. This is just an example. This system can be accomplished with Headless or Hybrid.
  9. 11 points
    Hello folks! Recently we published a new website for Brightline, a Project Management Institute (PMI) initiative together with leading global organizations dedicated to helping executives bridge the expensive and unproductive gap between strategy design and delivery. The previous website was made in Hugo as in the beginning it was a very simple website, but as the business needs changed, I decided to build this version in ProcessWire. Nothing fancy occurs behind the curtains, the need was more on getting some data in a way that makes it easier to create reports and to give access to PW's great admin to another team member. For the other website, that you can see here, I didn't implement a CMS on top of Hugo because for me it was quicker to edit the files and push to the repository. Some content is still being copied but 98% is done. A quick list of modules used: - ProCache, FormBuilder, ProFields, SeoMaestro, PageHits, TracyDebugger, MenuBuilder, AutoSmush, and other custom ones. I'm biased, but there a lot of good and useful content created by us and also by partners and all is free to download. :)
  10. 11 points
    Definitely, I would recommend PW. In my case, the client didn't like the tree structure of pages, so I had to create separate Process modules for managing news, tags, banners, categories. I have found that it's much easier to control permissions and workflow via custom modules.
  11. 11 points
    Not sure if this a topic for the dev talk area or perhaps rather the pub, but just wanted to share this little gem. It's a small part of the new Twitter web site/app. I'm not quite sure what's going on with that site – but whatever it is, it's getting out hand, and that might have something to do with current craze with components within components within components within... you know the drill 🙂 For the record, I was trying to figure out what that weird star-icon in the top right corner is/does. Turns out it's some kind of "top tweets on" button (whatever that means), but to learn that you'd first have to a) just randomly click it and see what happens, or b) dig through a whole lot of messy markup to get to the aria-label. Another thing I found interesting is that when you hover the icon, it gets a background colour. Now, there's nothing particularly interesting in that alone – we have the :hover and :focus states in CSS exactly for that purpose – but the thing is that when you hover over the icon, JS adds the blatantly obvious "r-zv2cs0" class to one of it's parents, which in turn results in that slight shade of blue you see on the site. I'm glad they've made the effort to make that mess of a markup accessible by applying aria properties and all, but is this really the direction we want the web to go? The obvious ugliness of the markup is one thing, but when you have to explain to the browser things like "this particular div here, buried ~20 levels deep in other divs, is actually a button you can focus on"... that feels wrong on so many levels 😄 (And sorry for the clickbait title, by the way.)
  12. 10 points
    Paginated forms: Looking > Forward > To > This > Alot. Thank-you!
  13. 10 points
    You will need: ProcessWire (of course) ProcessWire ProCache ProcessWire Modules as you like and need Netlify Account (in my case, you can use any other hosting or Github pages) Git Account (Gihub, Gitlab, Bitbucket) ScreamingFrog (free version should fit most needs) Things to keep in mind FormBuilder will not work (out of the box) 40x/50x must be defined separately Redirects must be defined separately Module-based functionality will not work GDPR/Opt-in/Cookie consent must be added differently Avoid using core/module files (UIKIT, jQuery, CSS, etc.) Where to save files and how to address them Most content and design related files can be saved in ProcessWire itself. Logos, favicon, trust icons and whatsoever. Some files can't be stored in ProcessWire - or shouldn't be stored in it - fonts and sitemaps (XML) in my case. While developing the overall site always use relative paths and URLs. Fonts and other assets need to be addressed by their web-root-based path (/site/templates/myassets/font.ttf and so on). Internal linking should be relative as well. Otherwise you have to change those link URLs manually which is PITA. Which files to copy and where you find them As we use ProcessWire we want and should use everything we can to make our webdev life easier here. Let ProcessWire and some modules do the work while harvesting the results for our benefits. While ProCache takes care of generating minified CSS and JS, SEO Maestro generates a nice and handy sitemap.xml. Depending of your installed modules you want to (at least) double check the output and results in your static site. As already mentioned FormBuilder and Simple Contact Form will not work, 404 management and redirects by the awesome Jumplinks modules will not work, too. Instead you have to create your very own .htaccess file with all redirects and error documents. Other modules like MenuBuilder, SEO Maestro and some other modules do a pretty good job even in your static site as their benefits result in already rendered HTML/pages. Autolinks, Automatically link page titles and Share buttons are some modules that will work as well. While it didn't work for me it may work for you - the Cookie Management Banner module. I had some issues and decided to install and use Cookie Consent manually. The Workflow First of all build your site. Make it perfect. Do whatever you or the client wants or needs. Whenever possible look into your rendered HTML and cached pages. Take a closer look at all the URLs and paths. It's already a good idea to run ScreamingFrog and find out if there are any files missing, links broken or pages missing. When everything is done, clear all cached files, all minified JS and CSS. Start a ScreamingFrog session and let it run. It will visit each and every page on your site it can find. Hidden pages, orphaned pages and of course drafts and pages behind JS-links will not be found and therefore cached by ProCache. Look into /site/assets/ProCache-XXX/ and /site/assets/pwpc/ now and double check that there are your pages and JS/CSS files. You will need those afterwards. If everything is fine you have to copy things around now. The Setup - folders and structure In my case the easiest way to go was setting up two local sites - one with ProcessWire and another one with the static files, assets and other things I needed. In the examples below only relevant parts are listed. project.pw.test (ProcessWire) /sitemap.xml (Generated by SEO Maestro) /site/assets/files/ (copy the whole path) /site/assets/pwpc/ (copy the whole path) /site/assets/ProCache-XXX/* (copy only the content of this folder - all files and folders) /site/templates/myassets/ (copy the whole path) project.sv.test (Static version) .htaccess (for redirects and 40x/50x error pages) 40x.html 50x.html /sitemap.xml /site/assets/files/ /site/assets/pwpc/ /site/templates/myassets/ all files and folders from /site/assets/ProCache-XXX/ As you can see there are only a few things to copy. When you're done with copying these files to the static version of your project, open it up in your browser. Check for missing files and test it. Let ScreamingFrog do the most work and check for any kinds of errors. Fix them in your ProcessWire-site and copy and test again. Check your 404s, your redirects and everything else you would normaly test. Create checkafterupdate.txt and write down whatever went wrong in your first try. This will be a great checklist later. The Final Step As everything is copied now and at its correct place you can upload it to your host. In my case the static version is a private git repository on github.com. I can commit and push my changes there and Netlify takes care of publishing the new version - most of the time within seconds. The benefit of using git - compared to S/FTP - you always have some kind of control if something brakes and you have to revert and check changes. In my case it's Netlify but you can use Github pages or any other hosting solution you want/the client pays for. Be careful with GDPR-related things as DPAs. You have to have them in most cases - Netlify did a great job here and I found everything I needed, while Github disqualified itself back then due to missing documents and kind of a sluggish support. Questions? Ask.
  14. 9 points
    This module will log information about all mails that are sent via WireMail to the PW logs https://github.com/BernhardBaumrock/RockMailLogger https://modules.processwire.com/modules/rock-mail-logger/
  15. 9 points
    AdminBar 2.0.1 released: Plenty of updates behind the scenes. So far "end user" functionality remains largely the same, though. New options for hooking – decent support for modifying generated output and adding all-new links and other features programmatically. Extended theming support: the module now comes with three built-in themes ("original", "tires" per the theme submitted earlier by @tires, and "uikit"). Uikit is an adapted version of the top bar in admin, and it's now the default theme for the module. Each theme may include its own settings (Uikit, for an example, allows displaying/hiding some or all of its icons and the ProcessWire mark). Custom theme support is still there, but requires a few modifications: custom theme needs to be selected via module config screen, you need to provide a directory where theme files live, and this directory has to contain (at least) a theme.css file (but optionally also theme.js for custom JS, theme.php for hooks, and config.php for custom module config settings). Oh, and the module is installable via Composer now – just run "composer require teppokoivula/admin-bar" in your sites root directory, or the /site/ directory. New requirements for 2.0.1 are ProcessWire >= 3.0.112 and PHP >= 7.1.0. For earlier version of ProcessWire or PHP, use release 1.1.5 (this version won't be updated anymore, but should work in ancient version of PW and PHP). Below is a screenshot of the "Uikit" theme in action on the Wireframe website. In this case I've disabled the icons from the left side of the Admin Bar – by default each action there would have its own icon as well.
  16. 8 points
    Yeah - I've too often had to build complicated RockFinder queries and came up with this quick&easy solution one day and couldn't believe I didn't think of it earlier 😄 Don't tell anybody, but I've just started developing RockFinder2 with a new syntax that will be even easier to use and more intuitive and powerful 😉
  17. 7 points
    Hi @ryan, This is indeed an ingenious little helper! Thx for sharing this idea with us! One problem though: When I'm only in the backend, the url and filename methods get never called. Could you please make the setFilename method hookable so that this method also works when the page is just edited in the backend? It would then only need this simple hook and all files are downloaded on demand: $wire->addHookAfter('Pagefile::setFilename', function($event) { $file = $event->object->filename(); if(!file_exists($file)) { // download file from source if it doesn't exist here $src = 'https://example.com/site/assets/files/'; $url = str_replace($this->config->paths->files, $src, $file); $http = new WireHttp(); $http->download($url, $file); } }); Or is there a better way of doing it?
  18. 7 points
    That's great news right there. Not sure how things have progressed since then, but the last I checked it seemed there were a lot of perceived problems with version 5, and the answer was always "this will be really difficult because we use this new data model". I'm sure that 5 will become a great editor, but whether it will become a great editor for HTML still remains to be seen 🙂 I'm tempted to draw lines from the CKE5 to another work-in-progress content editor that has been in the headlines lately: Gutenberg. In both cases it appears that the team is pushing an idea they wholeheartedly believe in, while a notable percentage of their existing users are telling them that it's a massive mistake. Interesting times 😅
  19. 6 points
    Fixed! Not completely sure why, but switching: $mail = new WireMail(); to this: $mail = $this->wire('mail')->new(); in the LoginRegister module did the trick — line 684. Now Gmail's sending my registration emails too 🙂 Gotta say, I am hugely grateful for Processwire. Ryan, and all you fantastic moderators and commenters—this is such a great place to learn, and goddamn if the sky doesn't seem to be the limit.
  20. 6 points
    https://www.comedywildlifephoto.com
  21. 6 points
    UPDATE 2019-08-08 The module has made hug steps forward and we are nearing a first beta release version. So for those of you who are interested, I wanted to let you know what happened in the meantime 🙂 The dashboard interface was refined. Currency selector for switching dashboard currency (based on your currency fields) Added dashboard sections for managing Orders, Customers and Products Added a WireTabs interface to easily switch between the different dashboard sections. Orders, Customers and Product-details are opened and edited in ProcessWire Panels Added further properties to SnipCart product anchors like: categories, product dimensions, weight, and so on. Added field selector to SnipWire settings for choosing the desired field (FieldtypePage) to be used for categories handling. Refinded caching behavior. *) *) the proper caching of SnipCart data fetched through their REST API is giving me headaches. I'm still not sure what to cache and how long. For example, think of retrieving the list of purchase orders and creating a pagination. Every single page has to be cached. What if new orders are added when flipping backwards? Then the page numbers could get out of hand. (this only as an example). As SnipCart has relativ slow API response times (about 1.8-2.5 seconds for a request), I'm even thinking about developing a separate background job runner which continuously fetches data from SnipCart and caches it locally. Our SnipWire module could then only use locally stored data only. What needs to be done: As SnipCart has a totally broken presentation of multi currency values in it's dashboard (for example: they simply sum up order values in different currencies!) I need to calculate performance values manually. And this will be a huge job as the data comes from different REST API calls... Orders, Customers and Products detail editors (order status update, setting the order tracking number, add metadata information, creating notifications on the specified orders, ...) Order refunds handling through the SnipWire dashboard Integration of external shipping providers Integration of external taxes providers Subscription handling through the SnipWire dashboard Discount creation and handling through the SnipWire dashboard Documentation, documentation, documentation! and much more ... Here are some fresh screens:
  22. 6 points
    super user.s required to create fielders y templatos purposefulness of super user this.is with out such purpose is not.super
  23. 6 points
    I'd first look into setting up SAML integration. Overall I think that a SAML powered SSO solution is always easier and more user-friendly approach. SAML Auth handles this quite nicely, though it may take a bit of configuring to get everything right, and it also looks like the module hasn't been updated in a couple of years – so I'd first make sure that there are no issues with the bundled OneLogin's SAML PHP Toolkit. ... and if there are, perhaps you could try updating it and submitting a pull request? 🙂 There are some LDAP modules as well, and I actually have one just sitting on my local machine that I'd really like to share. It's a module I built in my last job for a client project, and I know it's powering at least one production site already, but I just haven't had the time to add the last finishing touches on it yet. Also, I don't really have a need for LDAP stuff in my personal projects, so there's that 😅 Anyway, I can't give a specific timeframe but I'll make a note to get the module finished and published.
  24. 5 points
    https://www.fieggen.com/shoelace/index.htm Website I bookmarked some time ago.
  25. 5 points
    https://github.com/processwire/processwire-issues/issues/252#issuecomment-467473684 Quote: "If a page is saved (in the admin) and errors are generated by the page editor form, the page receives a Page::statusIncomplete status, indicating something may be missing on the page. When the page is saved without error, this status is removed." There is more about it in the GitHub issue.
  26. 5 points
    The notes on the Settings tab of Page Edit are a good summary of what the statuses mean: Hidden and unpublished pages are both excluded from selectors (unless you override this) - the difference is that a hidden page is viewable if the URL is known, whereas an unpublished page cannot be viewed unless the user is logged in and has edit access for the page.
  27. 5 points
    The newest version of RockGrid now supports RockFinder2 as data source 😎 $finder = new RockFinder2(); $finder->find('template=basic-page'); $finder->addColumns([ 'title', 'body' ]); $this->setData($finder); Data is available on the JS side via the RockFinder2 property in the GridItem object:
  28. 5 points
    Hey folks – a quick update: Wireframe 0.5.0 was released couple of days ago. Compared to 0.4.x this version mainly fixes bugs and improves performance – nothing particularly major, but if you're using Wireframe, it's a recommended update. On a loosely related note, Tracy Debugger has been really helpful in figuring things out, identifying bottlenecks, etc. Brilliant module 🙂
  29. 5 points
    Also quite helpful in such scenarios is PW's page-edit-created permission that prevents editors from editing each others articles.
  30. 5 points
    Hi @kixe, additionally to what @jploch said above, and when you are already at it ;-), it would be very helpful to have the option for auto-backup on login! The real life usage of auto backup on logout is not consistent because some users simply leave the backend without logout process. So I would prefer to switch to auto backup on login process. :-) (Login process can not be skipped like Logout process!)
  31. 5 points
    Well... why don't you rename your module to ZekaProcessDashboard?
  32. 5 points
    There are several places that 128 is forced: https://github.com/processwire/processwire/blob/649d2569abc10bac43e98ca98db474dd3d6603ca/wire/core/Sanitizer.php#L415 https://github.com/processwire/processwire/blob/649d2569abc10bac43e98ca98db474dd3d6603ca/wire/core/Pages.php#L85 https://github.com/processwire/processwire/blob/649d2569abc10bac43e98ca98db474dd3d6603ca/wire/core/PagesNames.php#L49 https://github.com/processwire/processwire/blob/649d2569abc10bac43e98ca98db474dd3d6603ca/wire/core/PagesNames.php#L314 https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/wire/modules/Inputfield/InputfieldPageName/InputfieldPageName.js#L60 https://github.com/processwire/processwire/blob/649d2569abc10bac43e98ca98db474dd3d6603ca/wire/modules/Inputfield/InputfieldText.module#L258 When creating a new page, it's the JS file that kicks in first and truncates it as the title is typed. You could override the JS one pretty easily (look at my PageRenameOptions for hints on how to do this), and also deal with the sanitizer by setting the name in a hook and resaving, and you could hook into InputfildText::processInput to deal with the dirty length truncation. I think the hardest but might be dealing with nameMaxLength constants that get used in PagesNames.php in the pageNameFromFormat() method. Definitely much easier to see if Ryan might relax the limit, or make it configurable 🙂
  33. 5 points
    no argumentas needeed what.u wants is event->return wire()->addHookAfter('Page::render', function (HookEvent $event) { $page = $event->return; });
  34. 5 points
    Debian 10 (codename Buster) stable version has been released on July 6. Around a week later it was available for download at my server provider. Yesterday I put myself in good mood … 🙄and I decided to update my VPS. As Debian 10 comes with PHP 7.3.4-2 bundled, I wanted to take the opportunity to upgrade from PHP 7.0. The process of updating from Debian 9 to Debian 10 was quite smooth. I just had to manually check some configuration files that I previously changed, in particular openssh, sysctl, postfixadmin, and dovecot. All small fixes. I just encountered two issues: emails were not accessible in remote and network.service did not start. The first one was depending from dovecot configuration files, while the second was a bit more tricky to solve. 🤬 I installed PHP 7.3.4-2 FPM/FastCGI and updated the virtual hosts accordingly. So far I did not encounter issues. There were only some incompatibility problems of PhpMyAdmin 4.6.6 (the version that comes from Debian) with PHP 7.3. As I am not in a hurry to update it, for the time being I just reverted its dedicated virtual host to PHP 7.0. And finally let's come to ProcessWire (3.0.123). After the update everything seems to be working well. 😀 I only had an issue with one of my custom classes. As of PHP 7.2 the word "object" has become a reserved word! 🤪It took a bit of patience to find, as even with display errors enabled in php.ini you do not get any error (not even in logs) but just the blank screen. 😱 So far so good! If I encounter any issue I will let you know. Wish you a nice weekend!
  35. 5 points
    I think the reasoning for the above is quite plain: The web becomes a deployment target. "Proper" HTML is not a business goal at all. Performance/Accessibility/Maintenance/… are. For twitter there's probably also in more detail: Is it easily maintainable with many devs/teams even with high developer fluctuation and potentially ones, which are not super knowledgable in the realms of "proper html"? Are components/design guidelines enforceable over all of their platforms? Can components be widely/easily reused? Removing as many bytes at compile time out of the markup because compile time stuff is cheap. Removing nested divs is dangerous at compile time. Using short unreadable classes on the other hand is simple if you have all markup/css at hand. Sure accessibility sometimes comes for free with semantic html, but I guess at the scale of twitter even bugs/inconsistencies between the accessibility implementations of browsers will surface and simply doing everything on your own might give you the ability to work around those issues. And twitter likely has the manpower to do so, which is probably not true for anyone here. We struggle with styling those damn html inputs, twitter has probably more obscure browser inconsistencies to care about. All those things make companies like twitter/google/facebook kinda like the worst examples to follow. The tradeoffs those companies do will hardly ever match with the tradeoffs smaller agencies/companies/single developers should/would choose. I see similarities to go and google. Go was created because google had problems with getting young, unexperienced, directly out of college developers up to speed. Therefore they created the a simple to grok C like language with a GC and easy concurrency. Their proper error handling is literally a truck load of if statements. It's nowhere near what more experienced people would expect from a programming language. But it does what it was created for very well and as it's stuff on the server nobody cares if it's particularly verbose or not very abstract. If you want "beautiful" server side applications rather look for a handful of senior erlang developers than a whole can of go developers.
  36. 5 points
    In the hot topic of "View source", the CKEditor folks recently commented that they will support version 4 until 2023.
  37. 4 points
    Please do – the core would definitely benefit from this 🙂
  38. 4 points
    A neat new Github feature: https://help.github.com/en/articles/navigating-code-on-github And while I'm at it: If you're frequently navigating through GH repos, I can highly recommend this browser add-on: https://www.octotree.io/
  39. 4 points
    /* * Example of how to clone a locked page, remove the lock on the copy, and clear the value of a field in the copy. * Reset stockCode Field when copying a page using a specific template, also remove locked status. * This code is included in the /site/ready.php file. */ $wire->addHookAfter('Pages::cloned', function($event) { /* * Important: The event arguments include both the copied page and the newly created page. * Don't use $event->arguments('page') as this returns the page that is being cloned rather than the cloned copy. * Instead use $event->arguments(1) which correctly refers to the new copy. */ $currentPage = $event->arguments(1); if ($currentPage->template == 'bom') { $currentPage->stockCode = ''; $currentPage->status = $currentPage->status & ~Page::statusLocked; //probably better to use removeStatus(Page::statusLocked) $currentPage->save(array('quiet' => true)); } }); Here's my documented example of how I got this to work.
  40. 4 points
    For simple markdown/plain text notes with tagging, I use https://simplenote.com/ made by http://automattic.com/. It also has a mobile app. For more complex notes with images and tagging, I use Evernote.
  41. 4 points
    I have enjoyed Notion over the last few weeks. However, I do use ClickUp for project management etc, and it has a built in note feature which I use more often (simply because you can convert a note to a task).
  42. 4 points
    No, it's still not an exaggeration (and probably never will be...). If one can get be paid for maintenance works, then WP is a "perfect" platform; a great time killer in this area.
  43. 4 points
    The validation/publishing is easily setup with users that can create and edit, but not publish permissions. About Jetpack, that I don't know, maybe just Google Analytics? I'd use AdminOnSteroids adjustments for CKEditor. I have a magazine project with some friends running around a 1,000 articles for a couple years, 30k visits a months or more, and the only maintenance I give is new features, in a Wordpress site you'd have to be updating everything like every couple weeks or less and praying nothing dies (maybe it's an exaggeration by this point? but has happened to me when I still used WP for a couple project. )
  44. 4 points
    Hello, It all depends on your experience, but naturally I would recommend ProcessWire 🙂 If you pick PW, ProDrafts is worth considering: https://processwire.com/store/pro-drafts/ Quote: "With ProDrafts installed, such users can now edit a draft of the published page, even if they can't publish the draft. This provides some very useful workflow potential for sites having multiple editors and access levels." There are some (one or two, perhaps?) basic free modules for basic analytics, and they can be used as the bases of further development, or you can integrate Matomo with PW, for example. Until you get more answers to this question, you might want to browse these sources: https://processwire.com/talk/forum/9-showcase/ https://processwire.com/talk/forum/16-case-studies/ https://processwire.com/sites/ Hope this helps.
  45. 4 points
    Hey folks! Just released AdminBar 2.2.0. Here's what's new: New module config settings for selecting items displayed in the Admin Bar. New items, disabled/hidden by default: "profile" (simple profile edit link) and "user" (basically the same concept as the profile edit dropdown menu in Admin). If "user" is displayed, there's a config setting for items displayed under it as well. New hookable method ___getData(). The returned array is converted to an object and stored as JSON (data-adminbar) on the Admin Bar element. This was mainly added for future JS features, but can be used by themes etc. as well. Hookable methods and their primary purposes are now also documented in the README.md file. Quite a bit of code was rewritten – again. I've been splitting some methods to smaller ones to improve maintainability, fixing small issues, improving accessibility to some degree (still needs a lot of work though), etc. Hopefully didn't cause too many new problems in the process... 🙂 Here's a screenshot with new items enabled, though one probably wouldn't want to enable profile and user (and all the user dropdown items) at the same time – and yes, my user name on this site is "admin", so it looks a bit silly when there's an "admin" link before and below it as well 😞 --- Thanks! This will be the next item on my list 🙂
  46. 4 points
    Hi Mitlesh, this is the clone of a thread you've opened yesterday, asking more or less the same. That being said if you want another image, wherever you want, you just have to output it inside your code, like you've done with the one you've referenced. Don't forget: 1) you have docs at your disposal. 2) it's august and many of us are away for vacation, so if none replies at your first thread be patient and search the forum for an answer.
  47. 4 points
    Thanks for pointing these out. Latest release (2.1.0) includes improvements to spacings and the position of the triangle. Just for the record, the positioning is of the triangle was actually intended to be consistent with Admin Theme Uikit, where it's also off-centre, but I've now centered it in Admin Bar anyway 🙂 In 2.1.0 the problem with "add new" button has been fixed. My initial idea was indeed to leave these buttons out if they have no purpose, but opted to leave them as-is, because that's how it's always been. For the same reason I was slightly hesitant to remove the full stop: this change will break existing translations. I've now done it anyway, since it's a relatively small thing. Note that 2.1.0 is actually bigger update than I anticipated. Class names have changed a bit, all themes had to be updated slightly, there's new JS, layout is now based on flexbox instead of floats, etc. So far things seem to work as expected (better than before), but let me know if there are any new issues 😅
  48. 4 points
    Just throwing it out there and not the answer to all PW static site situations, but a PWA like https://www.pwabuilder.com/ may help. In my experience, there can be glitches between PWABuilder depending on the config chosen, and ProCache with too much unsynched caching. Definitely not the answer if your site has lots of forms and/or dynamic content, but for static sites that have dodgy internet connections it's definitely worth investigating.
  49. 4 points
    Not an answer really, but technically just having ProCache could help with situations like these. The idea is to bypass PHP and MySQL entirely, after all. In fact in the past I've had a situation where MySQL was dead but the site I was monitoring kept working due to ProCache, so the issue didn't become apparent for quite a while... 😅 Another thing to consider would be something like Cloudflare ("always on" feature in particular), or adding Squid or Varnish (or some other proxy/cache/accelerator) in front of the site.
  50. 4 points
    Welcome to the wonderful world of "modern" SPA frameworks (React et al) !
×
×
  • Create New...