Leaderboard
Popular Content
Showing content with the highest reputation on 07/28/2019 in all areas
-
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.)3 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!2 points
-
Welcome to the wonderful world of "modern" SPA frameworks (React et al) !2 points
-
What a beauty!* I have seen some of these art pieces in the past and they seem to increase each and every day. Flip through those landing page gallery sites and dig into some of them. They often look pretty on the outside but later on when you look closer they aren't. At least not in terms of code quality. I call it the "Bootcamp Coding Style". Whenever I see those amazing examples they come in most cases from developers that did some kind of Web Development Bootcamp where they were taught "Do whatever is necessary!". So this example is even more frustrating. But those aren't the only ones. There are even more in the Wordpress/Elementor/Divi and webflow cosmos. Holy cow. * I can feel your pain. I wish more people would think about their frontend code more carefully like the guys from Stripe.2 points
-
2 points
-
Hey folks! I'm happy to finally introduce a project I've been working on for quite a while now: it's called Wireframe, and it is an output framework for ProcessWire. Note that I'm posting this in the module development area, maily because this project is still in rather early stage. I've built a couple of sites with it myself, and parts of the codebase have been powering some pretty big and complex sites for many years now, but this should still be considered a soft launch ? -- Long story short, Wireframe is a module that provides the "backbone" for building sites (and apps) with ProcessWire using an MVC (or perhaps MVVM... one of those three or four letter acronyms anyway) inspired methodology. You could say that it's an output strategy, but I prefer the term "output framework", since in my mind the word "strategy" means something less tangible. A way of doing things, rather than a tool that actually does things. Wireframe (the module) provides a basic implementation for some familiar MVC concepts, such as Controllers and a View layer – the latter of which consists of layouts, partials, and template-specific views. There's no "model" layer, since in this context ProcessWire is the model. As a module Wireframe is actually quite simple – not even nearly the biggest one I've built – but there's still quite a bit of stuff to "get", so I've put together a demo & documentation site for it at https://wireframe-framework.com/. In addition to the core module, I'm also working on a couple of site profiles based on it. My current idea is actually to keep the module very light-weight, and implement most of the "opinionated" stuff in site profiles and/or companion modules. For an example MarkupMenu (which I released a while ago) was developed as one of those "companion modules" when I needed a menu module to use on the site profiles. Currently there are two public site profiles based on Wireframe: site-wireframe-docs is the demo&docs site mentioned above, just with placeholder content replaced with placeholder content. It's not a particularly complex site, but I believe it's still a pretty nice way to dig into the Wireframe module. site-wireframe-boilerplate is a boilerplate (or starter) site profile based on the docs site. This is still very much a work in progress, but essentially I'm trying to build a flexible yet full-featured starter profile you can just grab and start building upon. There will be a proper build process for resources, it will include most of the basic features one tends to need from site to site, etc. -- Requirements and getting started: Wireframe can be installed just like any ProcessWire module. Just clone or download it to your site/modules/ directory and install. It doesn't, though, do a whole lot of stuff on itself – please check out the documentation site for a step-by-step guide on setting up the directory structure, adding the "bootstrap file", etc. You may find it easier to install one of the site profiles mentioned above, but note that this process involves the use of Composer. In the case of the site profiles you can install ProcessWire as usual and download or clone the site profile directory into your setup, but after that you should run "composer install" to get all the dependencies – including the Wireframe module – in place. Hard requirements for Wireframe are ProcessWire 3.0.112 and PHP 7.1+. The codebase is authored with current PHP versions in mind, and while running it on 7.0 may be possible, anything below that definitely won't work. A feature I added just today to the Wireframe module is that in case ProcessWire has write access to your site/templates/ directory, you can use the module settings screen to create the expected directories automatically. Currently that's all, and the module won't – for an example – create Controllers or layouts for you, so you should check out the site profiles for examples on these. (I'm probably going to include some additional helper features in the near future.) -- This project is loosely based on an earlier project called pw-mvc, i.e. the main concepts (such as Controllers and the View layer) are very similar. That being said, Wireframe is a major upgrade in terms of both functionality and architecture: namespaces and autoloader support are now baked in, the codebase requires PHP 7, Controllers are classes extending \Wireframe\Controller (instead of regular "flat" PHP files), implementation based on a module instead of a collection of drop-in files, etc. While Wireframe is indeed still in a relatively early stage (0.3.0 was launched today, in case version numbers matter) for the most part I'm happy with the way it works, and likely won't change it too drastically anytime soon – so feel free to give it a try, and if you do, please let me know how it went. I will continue building upon this project, and I am also constantly working on various side projects, such as the site profiles and a few unannounced helper modules. I should probably add that while Wireframe is not hard to use, it is more geared towards those interested in "software development" type methodology. With future updates to the module, the site profiles, and the docs I hope to lower the learning curve, but certain level of "developer focus" will remain. Although of course the optimal outcome would be if I could use this project to lure more folks towards that end of the spectrum... ? -- Please let me know what you think – and thanks in advance!1 point
-
Article 6 is a good point, but its most important part is section f). The big problem of getting consent is that you need to deal with all the follow up responsibilities of people having the right to revoke their consent. While if you go with Art. 6 f) and you can clearly state that saving the commenters IP for a set amount of hours/days to detect spammers and prevent their acting does not outweight "the interests or fundamental rights and freedoms of the data subject which require protection of personal data, in particular where the data subject is a child." you can just add a paragraph to your privacy documents, which your users can read, but be fine otherwise. You should only need to document the above and how you weight in the interests of the company vs the ones of the persons you save the IPs of. This is also a place where a good lawyer can be of great help. For the given case: IP addresses of people in a private (not corporate) contexts are rarely static. So to get to the real person behind the IP after certain timeframes you'd need to go to an ISP and ask them which connection had this IP at a give time and present a good reason for why you're asking. Also you might not even store the IP super long as more than 7/14/30 days is not really needed to be able to act on spam. On the other hand a proper spam attack can be a real risk to the business depending on the website. To the worst extend the website might make users buy stuff from scammers and therefore harm other users of your website. So I thinks there are quite a few arguments to weight against, which might resolve in a case where consent can be left out. Please keep in mind that the above is only from my own research and if you want to be sure about stuff talk to a lawyer.1 point
-
Sure, why not? Perhaps you don't even need a module for this. Just some custom HTML with an anchor .pw-modal which opens your page. With one of the three "runtime markup" modules that would be easy to do, I guess: https://processwire.com/talk/topic/21982-rockmarkup-inputfield-to-easily-include-any-phphtmljscss-in-the-pw-admin/ (this is the latest one of this kind, afaik). Is your general goal to have something like a central image library for often-used assets?1 point
-
1 point
-
1 point
-
Hey @teppo - sorry for the delayed reply here. This can definitely be done. Good work with the composer installer - haven't been around for a while now, so didn't see it pop up. ? Hey @Lance O. - You're very welcome - glad you like the module! ? I don't think your issue is related to the URL validator, as the filter does say that URL is valid, as expected. This leads me to think that it's a spelling issue with the field name, though that seems unlikely. Would you mind doing a little debugging and checking to see if the URL does indeed get knocked out at https://gitlab.com/rockettpw/seo/markup-sitemap/blob/master/MarkupSitemap.module.php#L447?1 point
-
Hi, I'm a UK based freelance developer that predominately uses Processwire for our CMS client work. I often have overflow work that needs completing, and am looking for some other Processwire Devs assist in overflow work and projects. Please PM me if you're freelance or a small agency who wants to help out. Thanks in advance.1 point
-
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!1 point
-
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 ?1 point
-
Are you familiar with page reference fields? Are you already using them? Assuming you are already using them, I guess you want cross-references in both directions. In that case, take a look at this module: https://modules.processwire.com/modules/connect-page-fields/ From the API side, there's also this relatively new method: https://processwire.com/api/ref/page/references/1 point
-
Holiday bookings - here's a video (no sound, so might have to guess what I was doing in places!) showing backend management of calendars (so in this example two holiday cottages/apartments) and different fee structures per cottage/apartment throughout the year for different seasons (though I'd probably approach that differently now). For the backend I made it possible to click and drag so you can select an odd number of days for a booking as a member of a sales team if you're taking a booking over the phone. On the frontend calendar (not in this video) the customer can only pick from pre-defined dates that are availble. You'll see some dates has bookings (Burlingham - my surname) and clicking on those takes you to the booking details - obviously customers viewing the frontend wouldn't see the other booking details ? It doesn't show the whole parment process but I think that was because it wasn't working with the Reno admin theme at the time I last looked at this code in 2016. I think to be honest I'd forgotten how interesting some of the things were that I'd done on here that the event calendar is probably the one to do first, followed by this accomodation booking one.1 point
-
1 point