Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 17 hours 45 min ago

ARREA-Systems: Jitsi in Drupal

Sat, 2020-05-23 22:14
Jitsi in Drupal Integration module of Jitsi video conferencing service. Allows to point to a Jitsi Meet server, start a new video session or join existing directly from a Drupal 8 site.
Categories: FLOSS Project Planets

eiriksm.dev: Walktrough: How I am using Github for my blog comments

Sat, 2020-05-23 05:04

My last blog post was about my journey towards "getting rid" of Disqus as a comment provider, and moving over to hosting my comments on Github. The blog post was rather light on technical details, so here is the full technical walkthrough with code examples and all.

Since I already explained most of the reasoning and architectural choices in that post I will just go ahead with a step by step of the technical parts I think is interesting. If that means I end up skipping over something important, please let me know in the (Github) comments!

Step 0: Have a Gatsby.js site that pulls it's content from a Drupal site

This tutorial does not cover that, since many people have written such tutorials. As mentioned in my article "Geography in web page performance", I really like this tutorial from Lullabot, and Gatsby.js even has an official page about using Drupal with Gatsby.js.

Step 1: Create a repo to use for comments

The first step was to create an actual repository to act as a placeholder for the comments to be. It should be public, since we want anyone to be able to comment. I opted for the repo https://github.com/eiriksm/eiriksm.dev-comments. To create a repository on GitHub, you need an account, and then just visit https://github.com/new

Step 2: Associate blog posts with issues

The second step is to have a way to indicate which issue is connected to which blog post. Luckily I am still using Drupal, so I can just go ahead and create a field called "Issue id". Then, for each post I write, I create an issue on said repo, and take a note of the issue id. For example, this blog post has a corresponding issue at https://github.com/eiriksm/eiriksm.dev-comments/issues/6, so I just go ahead and write "6" in my issue id field.

Step 3: Fetch all the issues and their comments to Gatsby.js

This is an important part. To be able to render the comments at build time, the most robust approach is to actually "download" the comments and have them available in graphql. To do that you can try to use the source plugin for GitHub, but I opted for getting the relevant issues and comments and creating the source myself. Why, you may ask? Well the main reason is because then I can more easily control how the issue comments are stored, and by extension also store the drupal ID of the node along with the comments.

To achieve this, I went ahead and used the same JSONAPI source as Gatsby will use under the hood, and then I am fetching the issue comment contents of each of the nodes that has an issue ID reference. This will then go into the gatsby-node.js file, to make the data we fetch available to the static rendering. Something along these lines:

exports.sourceNodes = async({ actions, createNodeId, createContentDigest }) => { const { createNode } = actions try { // My build steps knows the basic auth for my API endpoint. const login = process.env.BASIC_AUTH_USERNAME const password = process.env.BASIC_AUTH_PASSWORD // API_URL holds the base URL of my Drupal site. Like so: // API_URL=https://example.com/ let data = await fetch(process.env.API_URL + 'jsonapi/node/article', { headers: new fetch.Headers({ "Authorization": `Basic ${new Buffer(`${login}:${password}`).toString('base64')}` }) }) let json = await data.json() // Create a job to download each of the corresponding issues and their comments. let jobs = json.data.map(async (drupalNode) => { // Here you can see the name of my field. Change this to whatever your field name is. if (!drupalNode.attributes.field_issue_comment_id) { return } let issueId = drupalNode.attributes.field_issue_comment_id // Initialize the data we want to store. let myData = { drupalId: drupalNode.id, issueId, comments: [] } // As you can see, this is hardcoded to the repo in question. You might want to change this. let url = `https://api.github.com/repos/eiriksm/eiriksm.dev-comments/issues/${issueId}/comments` // We need a Github token to make sure we do not hit any rate limiting for anonymous API // usage. const githubToken = process.env.GITHUB_TOKEN let githubData = await fetch(url, { headers: new fetch.Headers({ // Hardcoded to my own username. This probably will not work for you. "Authorization": `Basic ${new Buffer(`eiriksm:${githubToken}`).toString('base64')}` }) }) let githubJson = await githubData.json() myData.comments = githubJson // This last part is more or less taken from the API docs for Gatsby.js: // https://www.gatsbyjs.org/docs/node-apis/#sourceNodes let nodeMeta = { id: createNodeId(`github-comments-${myData.drupalId}`), parent: null, mediaType: "application/json", children: [], internal: { type: `github__comment`, content: JSON.stringify(myData) } } let node = Object.assign({}, myData, nodeMeta) node.internal.contentDigest = createContentDigest(node) createNode(node) }) // Run all of the jobs async. await Promise.all(jobs) } catch (err) { // Make sure we crash if something goes wrong. throw err } }

After we have set this up, we can build the site and start exploring the data in graphql. For example by running npm run develop, and visiting the graphql endpoint in the browser, in my case http://localhost:8000/___graphql:

$ npm run develop > eiriksm.dev@0.0.0 develop /home/eirik/github/eiriksm.dev > gatsby develop # ... # Bunch of output # ... ⠀ You can now view eiriksm.dev in the browser. ⠀ http://localhost:8000/ ⠀ View GraphiQL, an in-browser IDE, to explore your site's data and schema ⠀ http://localhost:8000/___graphql

This way we can now find Github comments with graphql queries, and filter by their Drupal ID. See example animation below, where I find the comments belonging to my blog post "Reflections on my migration journey from Disqus comments".

In the end I ended up with the following graphql query, which I then can use in the blogpost component:

allGithubComment(filter: { drupalId: { eq: $drupal_id } }) { nodes { drupalId comments { body id created_at user { login } } } }

This gives me all Github comments that are associated with the Drupal ID of the current page. Convenient.

After this it's only a matter of using this inside of the blog post component. Since this site mix and match comment types a bit (I have a mix of Disqus exported comments and Github comments), it looks something like this:

let data = this.props.data if ( data.allGithubComment && data.allGithubComment.nodes && data.allGithubComment.nodes[0] && data.allGithubComment.nodes[0].comments ) { // Do something with the comments. } Step 4: Make it possible to fetch the comments client side

This is the part that makes it feel real-time. Since the above code with the graphql storing of comments only runs when I deploy this blog, comments can get quickly outdated. And from a UX perspective, you would want to see your own comment instantly after posting it. This means that even if we could rebuild and deploy every time someone posted a comment, this would not be instant enough to make sure a person actually sees their own comment. Enter client side fetching.

In the blog post component, I also make sure to do another check to github when you are viewing the page in a browser. This is because it is not necessary for the build step to fetch it once again, but I want the user to see the latest updates to the comments. So in the componentDidMount function I have something like this:

componentDidMount() { if ( typeof window !== `undefined` && // Again, only doing this if the article references a github comment id. And again, this // references the field name, and the field name for me is field_issue_comment_id. this.props.data.nodeArticle.field_issue_comment_id ) { // Fetch the latest comments using Githubs open API. This means the person using it will // use from their own API limit, and I do not have to expose any API keys client side. window .fetch( "https://api.github.com/repos/eiriksm/eiriksm.dev-comments/issues/" + this.props.data.nodeArticle.field_issue_comment_id + "/comments" ) .then(async response => { let json = await response.json() // Now we have the comments, do some more work mixing them with the stored ones, // and render. }) } } Step 5 (bonus): Substitute with Gitlab

Ressa asked in a (Github) comment on my last blogpost about doing this comment setup with Gitlab:

Do you know if something like this is possible with Gitlab?

Fair question. Gitlab is an alternative to Github, but differs in that the software it uses is itself Open Source, and you can self-host your own version of Gitlab. So let's see if we can substitute the moving parts with Gitlab somehow? Well, turns out we can!

The first parts of the project is the same: Create a field, have an account on Gitlab, create a repo for the comments. Then, to source the comment nodes, all I had to change was this:

--- a/gatsby-node.js +++ b/gatsby-node.js @@ -125,15 +125,25 @@ exports.sourceNodes = async({ actions, createNodeId, createContentDigest }) => { issueId, comments: [] } - let url = `https://api.github.com/repos/eiriksm/eiriksm.dev-comments/issues/${issueId}/comments` - const githubToken = process.env.GITHUB_TOKEN + let url = `https://gitlab.com/api/v4/projects/eiriksm%2Feiriksm.dev-comments/issues/${issueId}/notes` + const githubToken = process.env.GITLAB_TOKEN let githubData = await fetch(url, { headers: new fetch.Headers({ - "Authorization": `Basic ${new Buffer(`eiriksm:${githubToken}`).toString('base64')}` + "PRIVATE-TOKEN": githubToken }) }) let githubJson = await githubData.json() + if (!githubJson[0]) { + return + } myData.comments = githubJson + // Normalize it slightly. + myData.comments = myData.comments.map(comment => { + comment.user = { + login: comment.author.username + } + return comment + }) let nodeMeta = { id: createNodeId(`github-comments-${myData.drupalId}`), parent: null,

As you might see, I took a shortcut and re-used some variables, meaning the graphql is querying against GithubComment. Which is a bad name for a bunch of Gitlab comments. But I think cleaning those things up would be an exercise for the reader. The last part with client side updates was not possible to do in a similar way. The API for that requires authenticating the request. Much like the above code from sourcing the comments. But while the sourcing happens at build time, client side updates happens in the browser. Which would mean that for this to work, there would be a secret token in your JavaScript for everyone to see. So that is not a good option. But it is indeed theoretically possible, and could for example be achieved with a small proxy server, or serverless function.

The even cooler part is that the exact same code also works for a self-hosted Gitlab instance. So you can indeed run open source software and own your own data with this approach. That being said, not using a server was one of the requirements for me, so that would defeat the purpose. In such a way, one might as well use Drupal as a headless comment storage.

I would still like to finish with it all working in Gitlab too though. In an animated gif, as I always end my posts. Even though you are not allowed to test it yourself (since, you know, the token is exposed in the JavaScript), I think it serves as an illustration. And feel free to (Github) comment if you have any questions or feel I left something out.

Categories: FLOSS Project Planets

Danny Englander: Drupal 8 Architecture: How to Add Custom HTML Data Attributes to Menus

Sat, 2020-05-23 05:00

In a new Drupal 8 build that I am working on, there is a use case for some menu items to have an abbreviation underneath. I wanted to create a content editor friendly way of achieving this in the Drupal menu admin UI. Since I have already implemented the Drupal 8 Link Attributes widget module, I got to thinking that perhaps I could extend the module to handle these abbreviations.

Extending the Link Attributes widget

I was happy to discover that Link Attributes can be extended to any kind of additional HTML attribute you might need for your menu. I came up with the idea that if I could add a new field for the abbreviation, I could turn it into an HTML data attribute for a menu item and then output it with a little jQuery.

There are two pieces to extending the widget within a custom module, my_module.

...
Categories: FLOSS Project Planets

Lullabot: 5 Steps to a More Accessible Website

Thu, 2020-05-21 11:09

Whether you're a developer or a designer, everyone has a role to play in making websites more accessible and usable for site visitors. Our design and development teams got together to create this checklist of high-priority tasks you can execute to make your site more accessible. These are some of the issues that affect users of assistive technologies the most, so they should be first on your list when you're forming a plan to improve website accessibility.

Categories: FLOSS Project Planets

wishdesk.com: Drupal 9 upgrade: making your website ready with the latest tools

Thu, 2020-05-21 10:52
Drupal 9 release is more than just round the corner — the 9th version is already knocking at our doors. Today, let’s discover how to prepare your website for the Drupal 9 upgrade with the help of the latest tools.
Categories: FLOSS Project Planets

Evolving Web: 7 Design Considerations for Accessibility  

Thu, 2020-05-21 09:16

Designing an attractive and highly functional website has a lot of important considerations, like whether users would intuitively connect more with turquoise or cyan, and whether it works with the branding. However, one often overlooked but important consideration is accessible design, and since it's always easier to fix things that you uncover in the design process, it is best to consider accessible design upfront in the design process.

Here are seven design elements to keep in mind when designing your website so it'll not only look great, but be easy to use for everyone.   

1. Colour Contrast

Colour contrast is important for both low-sighted and color blind users. I also appreciate good contrast when I'm trying to read my phone by the pool in the bright sun at noon after three margaritas. Furthermore, according to WebAIM, poor text contrast is the number one accessibility error in the top 1 million visited sites. For AAA standards, text and background need to be black and white. For AA standards, there is a 4.5:1 ratio to background for text and 3:1 for headings, as well as a 3:1 ratio for non-text contrast. 

The following tools can help you analyze your colour contrast: my preferred contrast checker, aptly named Contrast Checker and the Webaim one, and a browser extension for Firefox and Chrome.  

2. Hierarchy and Layout

Keep the hierarchy and layout of your page logical and organized and everyone will thank you. Make sure key information is visible at a glance and follows a logical hierarchy. There is nothing more frustrating than to have to scroll through an entire page or click a ton of links to get to the important information. It can be even more annoying on a screen reader. If you're not sure on how to proceed, here are some tips on layout on creating accessible layout. And remember, a good general rule is less is more. Cut the clutter and find your inner Marie Kondo.   

3. Fonts

Use a sans-serif font. Sans-serif fonts are clearer and legible at any size, not to mention they scream bold and modern design. Sans-serif fonts are so cool that I once watched an hour-long documentary on Helvetica titled the same. Or maybe that just shows how cool I am? Either way, sans-serif fonts are where it's at because they're simply easier to read. Also, make sure your text is large enough to read; have a text size of at last 16 px. If you need to emphasize information, bold is easier to read than italic or uppercase. Lastly, don't use stylized fonts outside of your logo. This page from Penn State provides a nice list of accessible fonts.   

4. Enable Text Resizing

Ensure your text is resizable so users who have just had their glasses trampled by their obese Saint Bernard can zoom in on your content while looking up opticians. Most modern day browsers support scalability, however be sure not to inadvertently turn off user scalability as a function. Check to make sure your site scales properly. You can easily achieve scalability by using relative sizes such as percent or ems rather than absolute sizes like pixels or points. The Yale accessibility site has a nice guide on how to ensure text is resizable.   

5. Text Spacing

Serifs are out, space is in. Think lovely Scandinavian minimalism. Leaving enough space between lines of text and images helps the user focus more on what is important. Ensure that the line height is at least 1.5 times the font size and that the spacing following paragraphs is two times the font size. Letter spacing (tracking) should be at least 0.12 times the font size and word spacing at least 0.16 times the font size. If I still haven't convinced you of the importance of text spacing, this page might, along with providing more tips.   

6. Links

Ensure links are distinguishable by something other than colour. An underline is standard and does the job. Also, name them something useful, short and descriptive. And definitely not 'Click Here.' All links linking to the same page should have the same description. Be sure to mention if the link opens a new tab or triggers a download, in which case indicate the file type and size, too. Again, the Yale accessibility site has a nice guide on how to make links accessible.   

7. Style Focus

Browsers display a focus ring around currently focused elements. Often, this is turned off because designers find it visually unappealing but it can be essential to those using a keyboard to navigate your site. If you are going to remove the default style focus, then be sure to replace it with something else to denote the focus. Or alternatively, have a style focus which is activated only when using the keyboard to navigate and not the mouse. Here are some more tips on how to implement style focus.   

Need More Accessibility Guidance?

If you follow these seven tips, you'll be well on your way to having a site that is accessible and enjoyable for everyone. And if you need a hand figuring all this out, take our Web Accessibility training, which guides you through this step-by-step. Also, I hear retro is in. Just think how cool your site can be with a sleek retro aesthetic and accessible design.

+ more awesome articles by Evolving Web
Categories: FLOSS Project Planets

Promet Source: Today is Global Accessibility Awareness Day

Thu, 2020-05-21 00:34
"Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it's the only thing that ever has.”         - Margaret Mead  
Categories: FLOSS Project Planets

Drupal.org blog: What's new on Drupal.org? - April 2020

Wed, 2020-05-20 17:52

Read our roadmap to understand how this work falls into priorities set by the Drupal Association with direction and collaboration from the Board and community. You can also review the Drupal project roadmap.

Project News Drupal 9 will be released on June 3rd, 2020

Despite the disruption of a global pandemic, the Drupal community has beaten the odds and Drupal 9.0 is on time for it's scheduled release window on June 3rd, 2020.

Drupal 9 represents the culmination of all of the features developed over the course of the Drupal 8 lifecycle, as well as the realization of the project's commitment to easy upgrades.

Drupal 9 beta 3 is available now, and the first release candidate will be available soon. We encourage you to participate in the Drupal beta test program, to help us ensure a smooth release.

Drupal 9 porting weekend from May 22-23

With the release of Drupal 9 only a couple weeks away, the community is coming together to support the effort to get modules ready for Drupal 9. After a successful Drupal 9 porting on April 28th, nearly 75% of the top 200 most used modules are already Drupal 9 compatible. Never before has so much of the contributed module ecosystem been ready even before the new release.

If you'd like to join in on the Drupal 9 module porting weekend, community member @kristen_pol has written a guide to the event.

New Drupal Brand assets available

The Drupal Association was very pleased to announce a new evergreen Drupal brand in time for the release of Drupal 9.

What does 'evergreen' mean?

The new branding is evergreen in the sense that it is no longer tied to a specific major version of Drupal. Whether for Drupal 9, Drupal 10, and beyond this new brand can remain the consistent identity for Drupal. This parallels the Drupal project's own development philosophy, where major version upgrades should no longer be a difficult process for end users.

With these new brand materials we hope to be able to unify the presentation of Drupal throughout the ecosystem, and help reintroduce Drupal to the world when the project inevitably gains more attention during Drupal 9's release.

We encourage you to begin using the new brand within your own materials as well - to support this effort.

Automated Deprecation Patches to port your module to Drupal 9

The Drupal Association is working together with the Drupal Rector team from Palantir and contributor Tedbow from Acquia to provide automatically generated Drupal Rector patches for all the projects on Drupal.org.

As of April, these patches are already available through DrupalCI. In May we hope to begin having a bot automatically post these fix patches to Drupal.org issues

More Drupal 9 Readiness tools Drupal.org Updates Events listing feature on Drupal.org

As we spoke about in last month's update, we've been working on a Event Listing Content Type on Drupal.org to help replace the aging Groups.Drupal.org subsite, and to support our global community by providing a central repository of events.

The new event listings are nearly ready for user submissions, and to feed existing community tools like Drupical.com.

If you'd like to add your events, reach out to rachel@association.drupal.org to be added as an early event editor for this new feature.

Respectful Advertising

The COVID pandemic and its impact on DrupalCon has only emphasized the need for the Drupal Association to further diversify its revenue sources. We've made significant strides over the last several years, but as we've heard from many of you, that work must accelerate.

We've made a few changes over the course of April to start accelerating this revenue diversification:

In the most noticeable change, we've partnered with CarbonAds, a network that focuses on advertising to technical audiences, to create placements on Drupal.org.

These placements are hidden for Drupal Association members, so this program also helps promote DA membership as well, and does not put advertising in the workspace of our committed supporters.

Enhanced Membership Options

Speaking of membership - we also made some major overhauls to the Drupal Association membership program during the #DrupalCares campaign. Many members of the community reached out to us asking for more options for supporting the Drupal Association through membership, and we were happy to accommodate those requests.

There are now new membership levels for annual renewal, and we've also added a monthly membership option, which is now the default. We hope to continue to expand the membership program and its benefits to further support our fiscal stability in the future. 

A special thanks

———

As always, we’d like to say thanks to all the volunteers who work with us, and to the Drupal Association Supporters, who make it possible for us to work on these projects. In particular, we want to thank:

If you would like to support our work as an individual or an organization, consider becoming a member of the Drupal Association.

Follow us on Twitter for regular updates: @drupal_org, @drupal_infra

Categories: FLOSS Project Planets

Bounteous.com: Drupal Hosting Solutions: Acquia vs On-Premise

Wed, 2020-05-20 14:06
Acquia offers a purpose-built Drupal hosting solution that lets you focus on the most important part – your users.
Categories: FLOSS Project Planets

myDropWizard.com: Drupal 6 core security update for SA-CORE-2020-002

Wed, 2020-05-20 12:17

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Moderately Critical security release for Drupal core to fix a vulnerability in jQuery. You can learn more in the security advisory:

Drupal core - Moderately Critical - Cross Site Scripting - SA-CORE-2020-002

Here you can download the Drupal 6 patch to fix, or a full release ZIP or TAR.GZ.

If you have a Drupal 6 site, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

FYI, there was another Drupal core security release made today (SA-CORE-2020-003) but that one doesn't affect Drupal 6.

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

Categories: FLOSS Project Planets

Amazee Labs: Web maintenance is a mindset, not a milestone. Getting more out of what you have already built.

Wed, 2020-05-20 12:08
It is easy to forget that your website or application is quite fundamentally the result of a software ecosystem. In the simplest case, a developer uses an IDE to code HTML, CSS, and these days possibly JavaScript. They presumably use a tool to upload the result to a web server, and ultimately the web server serves your website to your audience's web browser.   
Categories: FLOSS Project Planets

Security advisories: Drupal core - Moderately critical - Open Redirect - SA-CORE-2020-003

Wed, 2020-05-20 11:22
Project: Drupal coreDate: 2020-May-20Security risk: Moderately critical 10∕25 AC:Basic/A:None/CI:None/II:None/E:Theoretical/TD:AllVulnerability: Open RedirectDescription: 

Drupal 7 has an Open Redirect vulnerability. For example, a user could be tricked into visiting a specially crafted link which would redirect them to an arbitrary external URL.

The vulnerability is caused by insufficient validation of the destination query parameter in the drupal_goto() function.

Other versions of Drupal core are not vulnerable.

Solution: 

Install the latest version:

Reported By: Fixed By: 
Categories: FLOSS Project Planets

Security advisories: Drupal core - Moderately critical - Cross Site Scripting - SA-CORE-2020-002

Wed, 2020-05-20 11:18
Project: Drupal coreDate: 2020-May-20Security risk: Moderately critical 10∕25 AC:Complex/A:Admin/CI:Some/II:Some/E:Theoretical/TD:UncommonVulnerability: Cross Site ScriptingDescription: 

The jQuery project released version 3.5.0, and as part of that, disclosed two security vulnerabilities that affect all prior versions. As mentioned in the jQuery blog, both are

[...] security issues in jQuery’s DOM manipulation methods, as in .html(), .append(), and the others. Security advisories for both of these issues have been published on GitHub.

Those advisories are:

These vulnerabilities may be exploitable on some Drupal sites. This Drupal security release backports the fixes to the relevant jQuery functions, without making any other changes to the jQuery version that is included in Drupal core or running on the site via some other module such as jQuery Update. It is not necessary to update jquery_update on Drupal 7 sites that have the module installed.

Backwards-compatibility code has also been added to minimize regressions to Drupal sites that might rely on jQuery's prior behavior. With jQuery 3.5, incorrect self-closing HTML tags in JavaScript for elements where end tags are normally required will encounter a change in what jQuery returns or inserts. To minimize that disruption in 8.8.x and earlier, this security release retains jQuery's prior behavior for most safe tags. There may still be regressions for edge cases, including invalidly self-closed custom elements on Internet Explorer.

(Note: the backwards compatibility layer will not be included in the upcoming Drupal 8.9 and 9.0 releases, so Drupal 8 and 9 modules, themes, and sites should correct tags in JavaScript to properly use closing tags.)

If you find a regression caused by the jQuery changes, please report it in Drupal core's issue queue (or that of the relevant contrib project). However, if you believe you have found a security issue, please report it privately to the Drupal Security Team.

Solution: 

Install the latest version:

Versions of Drupal 8 prior to 8.7 are end-of-life and do not receive security coverage. Sites on 8.6 or earlier should update to 8.7.14.

The pre-release Drupal versions (8.9 and 9.0) have been updated jQuery to version 3.5.1 as of 8.9.0-beta3 and 9.0.0-beta3.

Reported By: Fixed By: 
Categories: FLOSS Project Planets

InternetDevels: Notify users about new posts on a Drupal website and boost engagement

Wed, 2020-05-20 10:45

For every website, irrespective of the industry, a blog is a powerful magnet that attracts both visitors and search engines. In order to keep your website fresh, you need to regularly treat your audience to new and tasty content.

Among the tricks to increase blog engagement is to notify users about new posts. Let’s see how to set up content email notifications on a Drupal website.

Read more
Categories: FLOSS Project Planets

TEN7 Blog's Drupal Posts: Drupal Association: Building Tools to Empower the Drupal Community

Wed, 2020-05-20 09:00
Summary

Heather Rocker and Tim Lehnen discuss the multiple missions of the Drupal Association, turning DrupalCon Global 2020, and the upcoming Drupal 9 release.

Guest

Heather Rocker and Tim Lehnen of the Drupal Association

Categories: FLOSS Project Planets

Drupal blog: Drupal in COVID-19 Series: Mayor’s Office of the 15th District Budapest

Wed, 2020-05-20 05:00

Continuing our short series of articles highlighting ways that the Drupal software and its community are building solutions to help combat the effect of COVID-19, today we hear from Peter Oroszvari of Cheppers. Here, he describes their project at the Mayor’s Office of the 15th District of Budapest, Hungary.

The coronavirus pandemic triggered a critical situation in Hungary that forced local government authorities to move fast in the digitalization of services. Cheppers, a Drupal-focused development company has already been working with local governments on e-government solutions, supporting authorities in their digital transformation. 

As the Hungarian government ordered restrictions on free movement in March 2020, organizing care for the elderly and persons in need became the responsibility of local authorities. The Mayor’s Office of Budapest’s 15th District called upon Cheppers to build a mobile application and website that serves as a platform for locals in difficult situations to ask for help from the Mayor’s Office, while supporting the Office in tracking requests filed through various platforms. A Drupal-based solution seemed fitting for three reasons:

  • A Drupal-based backend simultaneously provides content for various end points while operating as a suitable platform to store incoming requests. 
  • Compliance with personal data security measures is a key requirement in the public sector. As Drupal conforms to the OWASP standards, its application guarantees the prevention of hazards to citizens’ personal data. 
  • Fast response to the challenges triggered by the pandemic was essential. Thus speed was one of the main reasons we built the Covid Helper tool in Drupal: the website and the first version of the mobile app was ready in less than 3 weeks using Drupal Contribution and core functionalities. 

Covid Helper registered more than 100 requests and 1000 visitors per day right after its release. As the pandemic evolved, the District Mayor’s Office came back with a demand for extended functionalities: version 2 allows for the registration of volunteer helpers, reducing pressure on the District Mayor’s Office. 

Due to the severe economic crisis triggered by the pandemic, many of the requests registered on the platform were applications for financial aid. This induced the digitalization of the financial aid application process in the District, which will be also available through the Covid Helper website. 

The District Mayor’s Office issued a marketing campaign informing citizens about the Covid Helper tool on city billboards and through an animated video.

Besides all the challenges, covid-19 does seem to have kicked off the digitalization process at government authorities and public services. Tools developed to solve the current situation may be the source of best practices to create an effective e-government system in the near future. 
 

Categories: FLOSS Project Planets

qed42.com: Cohesion - a low code enterprise-grade, Drupal website building platform.

Wed, 2020-05-20 04:11
Cohesion - a low code enterprise-grade, Drupal website building platform. Body

Drupal has witnessed a healthy growth over these years, with ample scope to expedite this growth. One way to achieve this is via a tool that makes the site creator’s life easy. A CMS platform should invariably be extremely user friendly and easy in maintaining as well as building. The wait is over! Cohesion DX8 is a site builder tool which allows a site maintainer/site configurator to create/maintain the site with low coding and more configuration.

Benefits of Cohesion 
  1. Low code 
  2. Highly configurable
  3. Easy maintainable
  4. Easily modifiable 
  5. Highly scalable
  6. Component-based driven
  7. Less developer dependent
Cohesion

Cohesion DX8 provides a contributed module and theme which needs to be installed in Drupal, quite similar to the way we install other modules and themes. However, to use this service, it is required to purchase a cohesion package that provides us with an API Key, Agency Key, Site ID, and an API Server URL which needs to be inserted in the Account Settings form.

Here are the settings and key features of Cohesion DX8:

  1. Website Settings
  2. Style Settings
  3. Components
  4. Templates

Cohesion DX8 provides an in-site configuration form which takes care of your branding requirements. You can add your own branding elements like fonts, colours, icons, grid settings, SCSS variables, etc. directly onto the site. And there is absolutely no need to make any changes in the theme folder as well as the theme settings. Doesn’t this sound cool! Your basic frontend settings would be handy to you and you can modify it directly from the site without asking for help from a developer.

Website Settings

Style Settings

It’s not over yet, with Cohesion DX8 you can create/modify styles of a site. Cohesion DX8 provides settings to update the base style or to create custom styles. 

And this is how the default preview and configuration pane looks like.

Now let’s understand what comes under Base styling and Custom styling

Base styling - Styling which is going to be consistent throughout the site, e.g., font-size of body. Font formatting of Headings, Style of a button, style of link, etc. Custom styling - Styling which will be different for each instance or as a variation of base style. E.g., Big button, Small button, Read More Link, Consistent layout related styles (Padding Top & Bottom Large, Padding Top & Bottom Small), Social icons theming, etc.

Let’s look at the example of CTA link styling.

  • CTA style structure
    • Link styling
    • After pseudo-element styling
    • On hover pseudo-element styling
  • Style properties required for CTA link and those properties are added in the config form through properties button on the top right corner of the styling pane
  • Styling properties required for pseudo-element styling
  • Styling properties required for pseudo-element after hover

Component Builder

Now let’s introduce the coolest feature of the Cohesion Dx8 -  a Component Builder. Cohesion Dx8 follows a complete component-based development approach. So, what is the component-based development approach? 

Cohesion Dx8 provides a list of elements. By using these elements even simple and complex components can be created and be made configurable by creating a component form. The amazing part is that everything can be built by mere drag and drop. Doesn’t it sound super user friendly?

Let’s look at an example of a Hero Component and figure out which elements could be part of this component?  Let’s create a list of elements(atoms).

  • Hero Image
  • Hero Title
  • Hero Description
  • CTA button

Let’s consider the below-displayed hero component that we are trying to achieve.

Based on the Hero component design, the hero component structure would look similar as described in the below image.

A component will be created which will have the above-mentioned elements. But what about styling? This is the real beauty of Cohesion Dx8. It allows us to create a base style as well as a custom style and those can be appended to the component. Doesn’t it sound fascinating?

Here would like to take you back to the styling part of the section where we have styled CTA link. Now, here in the above component CTA link element can directly assign the style which has been created under custom style. And as per image, styling can be appended to CTA Link element.

Layout

There are multiple ways to create different layouts. Here, with Cohesion DX8, the layout can be defined by a Layout Category component and also component dropzone element can be provided to add other components. 

Does it mean? Woah! Yes, it means nesting use of the component is also possible. I won’t provide the screenshot for this example right now.

Template

There are four main templates:

  • Master Template
  • Content Template
  • Views Template
  • Menu Template

The template names clearly state the use of each template, but, I am sure you must have some questions related to master templates. 

What will it hold? The thumb rule is, this template should be least modifiable, means, it should not be updated frequently. We can ensure this by using only consistent section/components/regions added to it.

I hope this blog was helpful to understand the basic outline of Cohesion Dx8. Stay tuned! We have an upcoming blog that will talk about the advanced usage of templates. 

Vidit Anjaria Wed, 05/20/2020 - 13:41
Categories: FLOSS Project Planets

Oliver Davies: Migrating to Drupal 8: Introduction

Tue, 2020-05-19 21:07
Migrating to Drupal 8: Introduction opdavies Wed, 20/05/2020 - 01:07

I recently finished porting this website from a static site generator to Drupal 8, meaning that this site has now been powered by three different major versions of Drupal (6, 7 and 8) as well as by two static site generators since it was first launched in early 2010.

The majority of the content was imported using migrations from JSON feeds that I created. This included:

  • Blog tags
  • Blog posts
  • Talks
  • Redirects

In some follow-up posts, I'll be looking at each migration separately, describing any issues and look at how it was used to import its respective content.

I'll update this post with the links to the follow-up posts, and they are also available from the blog series' page.

Tags drupal drupal-8 drupal-planet
Categories: FLOSS Project Planets

Pages