Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 14 min 52 sec ago

Promet Source: 6 Steps to Build a Solid Banner Component in Drupal 10

Thu, 2023/06/01 - 4:20am
We’re well familiar with the saying that “You never get a second chance to make a first impression.” Nowhere is that more true than on a web page. The banner component is an essential element in effectively conveying the brand and the culture within a framework for design flexibility. There’s a lot riding on getting it right.   The question is: what makes a banner work, and how do we build it properly so that it is reusable, responsive, configurable, aesthetically appealing, and useful? 
Categories:

Drupal Association blog: Drupal Association hires Alex Moreno

Wed, 2023/05/31 - 9:32pm

The Drupal Association is pleased to announce that Alex Moreno joined the team as of May 2023! We are thrilled to bring Alex’s talent and experience in the Drupal Community to the team.

Bringing Alex on continues the Drupal Association’s effort to become more global in our hiring.

Already very well known for his work in Drupal, Alex’s background includes a degree in Software Engineering with a major in Artificial Intelligence. For the past decade, he lived in London, working for big enterprise companies as a consultant and Technical Architect representing Acquia, Pantheon, The BBC, and Capgemini.

Additionally, Alex has a passion for journalism, communication, and marketing, which made him jump into a developer relations role during the past 12 months. At the Drupal Association, Alex works on the engineering team working on various projects. Considering himself a digital nomad, Alex lives between Madrid and his hometown near the Mediterranean Sea in Santa Pola. He enjoys anything related to the sea when in the Mediterranean, including windsurfing, kayaking, and sailing small dinghies.

When in Madrid, he swaps his passion for the sea with CrossFit and weightlifting! Recently, Alex got more into bodybuilding and healthy food habits, which made him lose around 15 kilograms in just a few months! He plans to promote healthy habits and exercise in the Drupal community as the biggest hack to improve productivity.

“Take care of your body. It’s the only place you have to live.” – Jim Rohn

Welcome to the Drupal Association team, Alex!

Categories:

Mike Herchel's Blog: Two DrupalCon Pittsburgh Sessions (plus a new job announcement!)

Wed, 2023/05/31 - 4:45pm
Two DrupalCon Pittsburgh Sessions (plus a new job announcement!) mherchel Wed, 05/31/2023 - 10:45
Categories:

Lullabot: Sponsoring Drupal Contributions at Lullabot

Wed, 2023/05/31 - 4:11pm

There are many good reasons for Drupal-focused organizations to contribute to Drupal, but for Lullabot, it comes down to these:

Categories:

Consensus Enterprises: Aegir5 + Pitch-burgh

Wed, 2023/05/31 - 2:00pm
See our recent Aegir5 Roadmapping series for more background! Recently, Dries announced an exciting event at the upcoming DrupalCon Pittsburgh: Shark Tank meets Drupal: pitch your best innovation ideas/): Announcing “Pitch-burgh”, an innovation contest at DrupalCon Pittsburgh, where members of the Drupal community can pitch their ideas to receive funding. […] The entrepreneurs give short 2-3 minute presentations in the hopes of securing funding for their idea. Since we’re actively pursuing partners and funding for Aegir5 development, this seemed like it could be a good opportunity.
Categories:

Golems GABB: Best Practices for Cross-Platform Development in 2023

Wed, 2023/05/31 - 12:54pm
Best Practices for Cross-Platform Development in 2023 Editor Wed, 05/31/2023 - 15:42

Cross-platform mobile application development continues to gain popularity. This is due to the sharp rise in the creation of native software products that do not always bring the expected results. For instance, a cross-platform application can run on multiple operating systems, including Windows, Linux, and Mac OS X. Below, we will discuss cross-platform development and the tools to create multi-platform applications. 
It is worth considering that creating a high-quality cross-platform application without high-level programming languages is impossible. Choosing the right development environment that supports conditional compilation is also crucial. The principle of multi-platform development is based on using a single code base, ensuring compatibility with different platforms. Stability is achieved by timely and correct translation of the application code under a certain operating procedure.

Categories:

The Drop Times: Drupal Presented the Ideal Platform for Me to Work with; Renato Gonçalves | DC Pittsburgh 23

Wed, 2023/05/31 - 10:59am
TDT speaks to Renato to hear from him about his journey with Drupal. Keeping DrupalCon in mind, TDT also got to ask a few questions about his session, CI&T's Drupal Competence Office (DCO) and his advice on receiving Acquia certifications
Categories:

Community posts: Introducing the Updated Drupal Community Code of Conduct

Wed, 2023/05/31 - 4:30am

The Drupal Community Working Group (CWG) is excited to announce the release of an updated Code of Conduct for the Drupal community. It will take effect on July 1, 2023. 

This new version is designed to reflect the growth of the Drupal community since the original Code of Conduct was adopted in 2010 and to help foster a safer, more inclusive, and harassment-free environment for everyone. While it retains the same basic structure as the previous document, much of the text was rewritten to make it easier to read. It also includes new elements inspired by other widely-used open source codes of conduct.

Some of the highlights of the updated Code of Conduct include:

  • Improved Readability: The new document has shorter sentences and paragraphs than the previous version, making it easier to read and comprehend. It is also written in a less formal tone.
  • Increased Clarity: The updated version includes more detail about where the Code of Conduct applies and the consequences of violating it. It emphasizes the shared responsibility of maintaining a welcoming community.
  • More Specificity: Examples of positive and unacceptable behaviors have been added to each section to help community members better understand the expectations and guidelines for their conduct within the Drupal community
  • Inclusivity and Diversity: The updated Code of Conduct places a stronger emphasis on fostering an inclusive and diverse environment for people of all backgrounds and identities, and is more consistent with Drupal’s Values and Principles.
  • More Actionable: Instructions for reporting Code of Conduct violations are now broken out in an alert box to make them easier for people to find.

The process of updating the Code of Conduct began in earnest in the summer of 2022, building upon community feedback gathered by the CWG since 2017. It was spearheaded by a subgroup of the CWG’s Community Health Team, who gathered feedback and shared drafts with a diverse group of stakeholders across our global community. A draft was then shared publicly with the community for additional feedback and revision. Finally, the document was reviewed and approved by the CWG’s Conflict Resolution Team and Review Panel. If you will be attending the Community Summit at DrupalCon Pittsburgh, members of the team will be sharing additional  details at the “How We Updated the Drupal Code of Conduct” session.

We would like to express our gratitude to everyone who contributed to the development of the updated Code of Conduct. Your input and dedication have been invaluable in creating a more inclusive and welcoming environment for all community members.

We encourage all community members to read and familiarize themselves with the updated Code of Conduct. Drupal.org users will also be alerted to the new language when it goes into effect July 1.

If you have any questions or concerns, please do not hesitate to file an issue in the CWG’s issue queue. If you would prefer to reach out privately, you can also send an email to drupal-cwg@drupal.org. Your feedback is always welcome as we continue to improve and adapt our Code of Conduct to the evolving needs of our community.

Thank you for being a part of the Drupal community, and for your commitment to making it a welcoming and inclusive place for everyone.
 

Categories:

Four Kitchens: A more modern, sustainable approach to higher ed websites with YaleSites

Tue, 2023/05/30 - 9:29pm

Jim Vomero

Senior Engineer

As a tech lead, Jim works with clients through the full project cycle, translating their business requirements into actionable development work and working with them to find technical solutions to their challenges.

January 1, 1970

Running the digital experience is a large-scale operation for most higher ed institutions. Whether your architecture was established five or 15 years ago, the departments, offices, and entities you need to manage may add up to hundreds or even thousands of websites. And each new addition is increasingly challenging to maintain.

Some sites use shared modules, while others do not. If you want to make an update to one website, you have to cross your fingers and hope it doesn’t break something on 500 others. Every day, another stakeholder presents a new request in support of an upcoming project.

Facing all these compounding issues, the IT department at Yale understood that a lift-and-shift of their existing sites was impossible. Upgrading their digital platform presented an opportunity to reset their architecture and processes to start fresh.

In a preview of our upcoming presentation at DrupalCon 2023, here’s what happened next — and what your institution can learn from it.

Why reinvention makes sense for higher ed institutions

Universities are facing significant challenges related to budgets, economic uncertainty, and reduced admissions applications. The pandemic introduced further uncertainty balanced with an increased need to sharpen digital presentations.

As one of the most prestigious institutions in the world, Yale needed to find a new, more sustainable way to manage its digital needs. The institution had stretched the limits of a very mature Drupal 7 site with more than a decade’s worth of modules, themes, and custom code.

It was difficult for the IT team to test with confidence, because they manage more than 1,100 sites that were all created in different ways. In addition, the more impressive a new site looked, the more other offices and departments wanted to emulate it.

The unintended consequences of an overtaxed website platform

With the university’s website system at critical mass, Yale’s teams lacked incentive to add new features to its legacy platform. Consequently, some larger departments found the platform inflexible, leading them to Wix and Squarespace for new projects. If the university didn’t find a workable platform solution, it ran the risk of increased site errors, design inconsistencies, and a diminished user experience.

Resetting Yale’s approach to digital required a sizable upfront capital investment. As the work comes to fruition, the organization is gaining a flexible, scalable platform that will benefit every department into the next decade — and beyond.

YaleSites: A transformational approach to higher ed websites

YaleSites is the product of years of examining the university’s needs. Through our previous work with the institution’s cybersecurity office and the Schwarzman Center, we developed a new platform that incorporated the following elements:

A unified brand identity and design system

YaleSites offers many departments the ability to create unique digital experiences that are aligned with the institution’s overall design. Instead of a conventional CMS, Yale’s team uses a customized drag-and-drop page builder drawn from a library of proven components powered by Emulsify.

The YaleSites Welcome page Inclusive and accessible development for all customers and devices

Institutions like Yale need to offer an equitable digital experience for every audience. YaleSites upholds and prioritizes the university’s accessibility standards by making sure every content block follows best practices for usability and accessibility.

User-focused experience and design

YaleSites prioritizes the needs of the organization’s audience and its end users. Across the organization, content authors of every skill level can access a full library of templates, starter kits, and media libraries to produce what they need.

Adding blocks in the YaleSites administrative interface. Standardized practices for development

The organization’s development process has been streamlined. Rather than asking “What do you need in a website?”, work begins with the question, “How can our tools help with your strategy?” Developers don’t have to reinvent the wheel for a new site. Instead, they have the support of a system that’s performant, on-brand, and secure.

Sustainable governance

We implemented YaleSites with an eye toward thoughtful and sustainable growth. Universities often set digital priorities based on the loudest or most powerful voices in the organization. Now, Yale uses processes that enable them to focus on the organization’s most pressing needs. Plus, a core group meets regularly to collect feedback, respond to requests, and adjust priorities as needed.

Shifting from a project-based to a product-based perspective

After launching YaleSites, the institution will enter the maintenance phase of protecting its system. The university’s new platform required a significant financial investment — now it must invest in the long-term work of governance.

The success of Yale’s platform hinges on a seismic internal shift. YaleSites isn’t a project that concludes with a specific end date. It’s a product that the organization must refine and support in perpetuity.

Since YaleSites is a product, its resources are finite. For example, if IT plans to add six new features in a quarter, any new request is a negotiation. Something may need to get bumped from the product roadmap. Rather than rushing a new feature into development for a short-term need, the organization follows a multiyear roadmap and measures the needs against all of the priorities in the queue.

Eliminate deadline pressure by focusing on constant improvement

Thinking long-term about your organization’s website removes the need to squeeze as many improvements as possible into a project’s deadline. Following the principles of Agile development frees your team from solving every use case before launch. Instead, you can launch a minimally functional feature like an events calendar, see how people use it, and refine how it works according to actionable feedback.

YaleSites allows the institution to implement site improvements with confidence. Rather than working on whatever makes sense in the moment, they see their work progress from ideation to development, testing, and release.

From the flexibility of its digital tools to a more managed, Agile-driven approach to website improvements, YaleSites marks a dramatic shift for the better. If this sounds like a shift that would benefit how your organization works, we should talk. We can help you view your site and its planning from a new perspective.

Megan Bygness Bradley and the Yale team contributed to this post.

The post A more modern, sustainable approach to higher ed websites with YaleSites appeared first on Four Kitchens.

Categories:

Chromatic: Drupal 7 End-of-Life Ep 08: Building a Bridge to Drupal 7 with Matt Glaman

Tue, 2023/05/30 - 8:16pm
Matt Glaman joins us! Mark, Dave, and Matt examine how Drupal 7’s end-of-life challenges are symptomatic of a widespread approach to development. Matt dives deep into the drawbacks behind software maintenance, and unveils his plans to release Drupal Bridge by DrupalCon 2023.
Categories:

Tag1 Consulting: On 20 Years of Drupal: an interview with Matthew Saunders

Tue, 2023/05/30 - 3:09pm

In continuing our 20 years of Drupal series, Tag1 Consulting's, Managing Director Michael Meyers interviews leaders from the Drupal Community who have been instrumental in creating one of the largest open-source communities and one of the most popular Content Management Systems that powers over 3% of the Internet. In this installment, join us for our talk with prolific contributor Matthew Saunders. Currently at Pfizer, Matthew shares his journey into technology by way of the Arts, where he discovered his passion for technology after becoming a Webmaster for an experimental dance company back in 1995. With over 15 years of continuous involvement in the Drupal Community - former board member of the Drupal Association and long-time organizer of Drupalcamp Colorado, we hope you will enjoy this trip down memory lane. --- For a transcript of this video, see On 20 Years of Drupal with Matthew Saunders. --- Photo by Jason Hafso on Unsplash

Read more michaelemeyers Tue, 05/30/2023 - 06:15
Categories:

Matt Glaman: Factories and dependency injection

Tue, 2023/05/30 - 3:08pm

Last week I wrote about dependency injection anti-patterns in Drupal. These anti-patterns occur when your service's constructor has logic that interacts with the injected dependent services beyond assigning them to properties. These anti-patterns include creating a new object from a factory or retrieving an object from a stack. However, Symfony's service container supports defining services built from factories. This can streamline your code and follow best practices when using dependency injection. Drupal uses this factory service design pattern for cache bins, loggers, and the HTTP client service.

Categories:

Peoples Blog: Drupal LMS Features for Your Education Business

Tue, 2023/05/30 - 5:45am
If you're running an education business and considering Drupal as the platform for your Learning Management System (LMS), there are several features and capabilities you should look for to ensure a robust and effective solution. Here are some key Drupal LMS features to consider: Course Management: A Drupal LMS should provide comprehensive course management capabilities. This includes the ab
Categories:

Talking Drupal: Talking Drupal #401 - HTTP Headers

Mon, 2023/05/29 - 8:00pm

Today we are talking about HTTP Headers with our hosts.

For show notes visit: www.talkingDrupal.com/401

Topics
  • What are HTTP Headers
  • Why are they important
  • Exploring headers
  • Types of headers
  • What can you discover from headers
  • Modifying headers
  • Tools to validate
Resources Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Stephen Cross - stephencross.com @stephencross Martin Anderson-Clutz - @mandclu

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Content-Security-Policy Adds a Content-Security-Policy header which allows your Drupal site to inform browsers of trusted sources for JavaScript, CSS, and other external resources.

Categories:

LN Webworks: The Ultimate Drupal Security Checklist to Safeguard Your Website

Mon, 2023/05/29 - 9:13am

Cyber threats are escalating, and individuals are actively prioritizing their online safety by verifying website authenticity and safeguarding private data. Even with considerable efforts, websites are not immune to malware, brute force attacks, SQL injections, and DDoS attacks, posing a constant risk of unauthorized access and the compromise of customer information.

Hackers don't just target large corporations, but according to a report by AdvisorSmith, 42% of small-medium businesses are affected by these cyber attacks. That's why following a proven Drupal security checklist is imperative to safeguard your business against hackers or other malicious actors. With the right strategy and careful planning, you can make your website robust and avoid these potential threats. Read the full article, consider these 17 security checklists, and thrive in your business.

Categories:

The Drop Times: A Journey of Growth and Transformation

Mon, 2023/05/29 - 8:27am

Today, let us deeply explore life's journey and the various phases we all experience. Like a captivating story, life unfolds through diverse chapters that offer unique lessons, challenges, and opportunities for personal growth and transformation. Let's embark on this exploration together and discover the beauty in embracing the different phases of life.

The Spring of Youth: Embracing Boundless Possibilities

Youth—the phase of exuberance and discovery. During this period, we plant the seeds of our dreams and ambitions, exploring the world with curiosity and an unyielding spirit. Let's celebrate the energy and potential of youth and cherish the memories we create along the way.

The Summer of Exploration: Embracing Self-Discovery

As we transition into adulthood, we enter the summer of our lives. This phase invites us to embark on a journey of self-discovery, to dive deep into our identities, values, and aspirations. It's a time to explore various paths, make important life choices, and build the foundation for our future. Let's embrace this season of exploration and savor the joy of discovering who we indeed are.

The Autumn of Wisdom: Embracing Growth and Reflection

In the autumn of life, we find ourselves at a crossroads—a time of introspection and reflection. This phase offers an opportunity to reap the wisdom accumulated through experiences, reflect on our achievements, and redefine our priorities. Let's celebrate the wealth of knowledge we have acquired and embrace the beauty of personal growth that continues to unfold.

The Winter of Serenity: Embracing Transformation and Legacy

Winter, a season marked by serenity and introspection, represents the later stages of life. During this phase, we reflect on our accomplishments, pass down our wisdom to future generations, and leave a lasting legacy. Let's embrace the winter of life with grace, appreciating the profound impact we can make and the beauty of our journey.

As we navigate these phases, it's important to remember that life is not a linear path but a cycle of growth and transformation. Each stage brings challenges and rewards; by embracing them, we can fully appreciate the richness of our existence.

Now, Let's dive into the essential picks from the past week.

Last week, The Drop Times was privileged to conduct two insightful interviews. Our first interview was with Martin Anderson-Clutz, a distinguished speaker at EvolveDrupal in Montreal. In this interview, Martin shares his valuable insights on the challenges and prospects of Drupal. The second interview was with Marcin Maruszewski, an experienced Drupal professional. Marcin graciously shared his personal journey and extensive Drupal experience, offering valuable perspectives for newcomers and seasoned practitioners.

Kwall blog post delved into the intricacies of two of the most popular platforms in the web development realm: Drupal and WordPress. RS Websols published an informative blog titled "The Benefits of Using Drupal: Unleashing its Potential for Web Development."

A recently released research report focusing on the Content Management Systems (CMS) market for 2023-2030 provides valuable insights into the fundamental dynamics driving the sector. AltaGrade, a leading web development company, has published an informative blog post titled "Upgrading to Drupal 10: Why It's Important and How AltaGrade Can Help."

Drupar, a reliable source of Drupal tutorials, recently shared a step-by-step guide demonstrating how to create a new text format in Drupal without relying on CKEditor. DrupalCon, the premier conference for the Drupal community, has announced an enticing giveaway exclusively for attendees of DrupalCon Pittsburgh 2023. To know more information, visit here.

In a recently shared blog post, Drupal India highlights the compelling reasons for choosing Drupal CMS when developing fully functional and easily navigable travel agency websites. SystemSeed, a trusted source of Drupal expertise, has published a blog post offering tips and tricks for finding the ideal Drupal maintenance partner.

Stay tuned for more updates, interviews, and informative articles in the upcoming editions of The Drop Times. Feel free to contact us if you have any suggestions, contributions, or feedback. Thank you for being a part of our community!

That is all for the week.
Your's sincerely,

Kazima Abbas
Sub-Editor, TheDropTimes

Categories:

#! code: Drupal 10: Using A Lazy Builder To Create A Dynamic Button

Sun, 2023/05/28 - 7:30pm

Adding dynamic and interactive elements to a web page can be a challenge, and there are a few techniques available in Drupal to allow for this.

One solution might be to add a form to the page, but this can cause problems with the cache system. Adding forms actually makes it slightly difficult to cache the page properly and you can easily see poor caching levels from pages containing forms.

Rather than adding a form to the site (and the complexities that come with that) it is possible to create a fully dynamic element that can be used to perform actions by the user. This is done using a combination of different techniques, all of which are built into Drupal and just need to be plugged together.

In this article I will look at using lazy builders to create a dynamic button that won't cause problems with the page cache, and will even work for anonymous users.

The Problem

For some context I thought I would talk about some of the work that went into putting this example together.

I was recently tasked to create a button on an Event content type that would act as the registration action for that event. The button needed to take into account different factors like the role of the user, the type of event, and the remaining capacity of the room. When the user clicked on the button they would be booked onto the event and the content of the button would change to inform them of this.

The button, therefore, needed to be fully dynamic for the user and the page they were visiting. In order to allow the button to be unique to each user and event I used a lazy builder to offset the generation of the button so that it wouldn't interfere with the caching of the page.

Read more

Categories:

Lisa Streeter: Payment by Purchase Order

Sat, 2023/05/27 - 5:44pm
Payment by Purchase Order Saturday 27, May 2023 Lisa Streeter Sat, 05/27/2023 - 11:04 The Goal

A Drupal Commerce website may want to offer the same payment terms provided to customers purchasing products offline. If up-front payment is not required, then we need to create an option for customers to complete checkout without providing payment. Additional information may need to be collected during checkout for the "payment on account" option in lieu of a traditional payment method. For our business needs, this additional information takes the form of a Purchase Order number entered by the customer.

Categories:

Quant Drupal Planet Blog Posts: Join us at DrupalCon Pittsburgh 2023 from June 5 to 8

Sat, 2023/05/27 - 12:30am
Join us at DrupalCon Pittsburgh 2023 from June 5 to 8

We are excited to be speaking next week at DrupalCon Pittsburgh 2023 about decoupled and static website solutions, Drupal community events, and how to make big things happen in Drupal.

kristen.pol Sat, 05/27/2023 - 08:30 June 01, 2023
Categories:

DrupalEasy: Drupal's OpenAI / ChatGPT / AI Search Integration contrib module - initial impressions

Thu, 2023/05/25 - 3:56pm

Ever since it was announced, I've been itching to play with the new OpenAI / ChatGPT / AI Search Integration contrib module. From what I had read about it from Kevin Quillen, it was being written in a way that was going to make it flexible and with an eye toward customization. 

On a self-serving note, one of our clients is interested in an AI-based solution for a task we're working on for them, so I had an agenda; test-driving this module for content-related tasks. 

My initial impressions came from using version 1.0.0-alpha10 and within the first 20 minutes:

  • The module only supports text fields (so far…)
  • The module is only compatible with Drupal 10.
  • There's not too much documentation yet - which isn't super-surprising considering it's being actively developed (and is still in alpha state). 

While the module includes nine(!) sub-modules, I decided to focus on only three of them - all related to content generation and manipulation.

While there is a free OpenAI API tier, it is important to note that the experiments below were all made with a paid OpenAI API account - the total cost was less than $0.25 USD.

A note about OpenAI API keys

My OpenAI account has two organizations - my Personal organization and an organization created by our DrupalEasy client. My Personal organization is not yet on a paid plan, but our client's organization is. When creating an API key be sure to select the Default organization first, and then click to create a new API key. It appears that API keys are somehow associated with the organization.

Before I figured this out, none of my initial testing worked, I would always get a OpenAI\Exceptions\ErrorException or a You exceeded your quota… error because my personal account's initial credit has expired ☹️

OpenAI ChatGPT Devel Generate

Being able to generate realistic sample content is the dream (or not) of many Drupal developers - this submodule promises to provide this functionality. Via the Configuration | Generate | Generate content from ChatGPT admin menu item, this allows developers to select the content type, Profile (which is provided as part of the prompt provided to the OpenAI API), and text fields to populate with the OpenAI response. With the following Profile, I was able to populate the Title and Body fields with content.

Profile: Your task is to generate content. I would like you to generate content about Batman.

Sample node content:

Title: The Gadgets and Tech of Batman: Examining the Caped Crusader's Arsenal

Body: Batman is known for his impressive arsenal of gadgets and technology, which he uses to fight crime and protect the citizens of Gotham City. From his iconic Batarangs to his high-tech Batmobile, Batman's gadgets are an essential part of his crime-fighting persona. One of Batman's most famous gadgets is the utility belt, which contains a variety of tools and weapons that he can use in a pinch. These include smoke pellets, grappling hooks, and even a miniature explosive charge…

The content generation process is much slower than standard Devel Generate (for obvious reasons), but it does result in much more engaging sample content. 

OpenAI Content Tools

This submodule provides some interesting tools for updating content. Once enabled, the module provides some options in the sidebar of the Drupal add/edit content page.

Each of the three tools demonstrated below provide their results directly in the sidebar - it is up to the author to copy/paste the results into the appropriate fields in the node's add/edit form. It seems that there are contribution opportunities for further integration. For example, it would be useful to automatically add the summary text to the Summary sub-field, should it exist (with consideration for what, if any summary text already exists…)

Adjust content tone

This allows the author to change the tone of the body text by selecting one of the default options: Friendly, Professional, Helpful, High school level reader, College level reader, and Explain it like I'm 5.

For example, with the original text of:

But we’ve met before. That was a long time ago, I was a kid at St. Swithin’s, it used to be funded by the Wayne Foundation.

The Friendly option returned:

Oh wow! We've actually met before, haven't we? That was such a long time ago when I was a youngster at St. Swithins. I remember it was funded by the Wayne Foundation back then!

The College level reader option returned:

We've met before. That was quite a while ago - when I was a student at St. Swithins. It was funded by the Wayne Foundation back then.

Extending the module to include additional options looks to be currently possible via a hook_form_alter().

Summarize text

This option summarizes the original text as:

The speaker and the listener have met before, when the speaker was a child attending the St. Swithins school. The school was funded by the Wayne Foundation.

When testing with much longer body text (~45,000 words) a summary was provided, but due to limitations of the API, only the first 3,900 characters of the body text were provided to the API. 

Suggest taxonomy

Using the same original text, OpenAI provides the following taxonomy term suggestions:

Funded, Kid, St. Swithins, Wayne, Long

Taking a quick peek at the code, the prompt used is Suggest five words to classify the following text. The words must be nouns or adjectives in a comma delimited list.

Again, poking around the source code for a few minutes showed that there are potential options to extend the current functionality. This includes the ability to add additional content tone and taxonomy term generations options.

OpenAI CKEditor integration

This submodule provides a new OpenAI button that can be placed on any CKEditor toolbar. For this example, I added it to the default Basic HTML text format toolbar (be sure to also enable the OpenAI tools option in the CKEditor 5 plugin settings area for each text format!)

Text completion

When selected, a text field is displayed for the author to provide the prompt to generate text based on (much like ChatGPT). I tested it with the prompt:

Who is Batman's best friend?

The response:

Batman's best friend is his loyal butler, Alfred Pennyworth.

The response is added directly in the text field at the current cursor position. 

Adjust tone/voice

Allows the author to provide an adjective to adjust the tone/voice of the entire (or selected portion of) body field. This is very similar to the OpenAI Content Tools module's Adjust content tone option, but allows for a freeform prompt.

Original text:

Bruce Wayne, eccentric billionaire. I'll be standing where l belong. Between you and the peopIe of Gotham. Does it come in black? No guns, no killing. It's ends here. Hero can be anyone. Even a man knowing something as simple and reassuring as putting a coat around a young boy shoulders to let him know the world hadn't ended.

Using formal resulted in the original text being replaced with:

Bruce Wayne, eccentric billionaire. I'll be standing where I belong - between you and the people of Gotham. Does it come in black? No guns, no violence. Let's put an end to this. Heroes come in all shapes and sizes - even a man who can show a young boy that the world is still a safe and comforting place, simply by draping a coat around his shoulders.

Summarize

Same as the option provided by the OpenAI Content Tools submodule. 

Reformat/correct HTML

Not tested.

Translate

Allows the author to provide language to translate the contents of the body field. Using Flemish on the same original text as above resulted in the original text being replaced with:

Bruce Wayne, excentrieke miljardair. Ik zal staan waar ik hoort. Tussen jou en de mensen van Gotham. Komt het in het zwart? Geen wapens, geen doden. Het eindigt hier. Een held kan iedereen zijn. Zelfs een man die iets zo simpels en geruststellends doet als een jongen een jas omhangen om hem te laten weten dat de wereld niet was geëindigd.

I'm not a native Flemish speaker, but both Google translate and a close-to-fluent Flemish speaker agree that the translation is sound.

Summary

Overall, once I got past the API and (minor) configuration hurdles, the submodules I tested performed as I expected. I did poke around the code a bit with an eye toward expandability/customization to support our client's requests and was not surprised by the high quality of the code.

I continue to think about how scary it is to generate quality content based on a short(ish) prompt - I really worry about the implications of relying on potentially low-quality content generated purely by AI.

I look forward to seeing how this module develops in the next few months. 
 

Categories: