Jetpack 9.0 to Introduce New Feature for Publishing WordPress Posts to Twitter as Threads

Jetpack 9.0, coming on October 6, will debut a new feature that allows users to share blog posts as Twitter threads in multiples tweets. A recent version of Jetpack introduced the ability to import and unroll tweetstorms for publishing inside a post. The 9.0 release will run it back the other way so the content originates in WordPress, yet still reaps all the same benefits of circulation on Twitter as a thread.

The new Twitter threads feature is being added as part of Jetpack’s Publicize module under the Twitter settings. After linking up a Twitter account, the Jetpack sidebar options for Publicize allow users to publish to Twitter as a link to the blog or a set of threaded tweets. It’s not just limited to text content – the threads feature will also upload and attach any images and videos included in the post.

When first introduced to the idea of publishing a Twitter thread from WordPress, I wondered if threads might lose their trademark pithy punch, since users aren’t forced to keep each segment to the standard length of a tweet. Would each tweet be separated in an odd, unreadable way? The Jetpack team anticipated this, so the thread option adds more information to the block editor to show where the paragraphs will be split into multiple tweets.

“Threads are wildly underused on Twitter,” Gary Pendergast said in a post introducing the feature. “I think a big part of that is the UI for writing threads: while it’s suited to writing a thread as a series of related tweet-sized chunks, it doesn’t lend itself to writing, revising, and editing anything more complex.” The tool Pendergast has been working on for Jetpack gives users the best of both worlds.

In response to a comment requesting Automattic “concentrate on tools to get people off social media,” Pendergast said, “If we’re also able to improve the quality of conversations on social media, I think it’d be remiss of us to not do so.” He also credits IndieWeb discussions on Tweetstorms and POSSE (Publish (on your) Own Site, Syndicate Elsewhere) as inspirations for the feature.

For years, blogging advocates have tried to convince those who post lengthy tweetstorms to switch to a publishing medium that is more suitable to the length of their thoughts. The problem is that Twitter users lose so much of the immediate feedback and momentum that their thoughts would have generated when composed as a tweetstorm.

Instead of lecturing people about how they should really be blogging instead of tweetstorming, Jetpack is taking a fresh approach by enabling full content ownership with effortless social syndication. You can test out the experience for yourself by adding the Jetpack Beta Testers plugin and running the 9.0 RC version on your site.

RegEx: Get Text from HTML Attribute Tags

I need to get the values from below following html snippet. So far I came up with this regex which helps me trim it down to the values I needed, but to automate this I need to join 2 regex statements to get the result "18" which is where I am stuck at. Or Please suggest a better method for me get the values.

First Regex Statement

(?s)(?<=attribute bathroom).+?(?=\/span)

Result:

" title="Bathrooms" style="  ">
                    <span class="value" style="  ">18<

Second Regex Statement

(?s)(?<=<span class="value" style="  ">).+?(?=<)

Result:

18

HTML snippet

<ul class="iconContainer" style="  ">
                <li class="attribute propertyId">
                    <span class="value">xxx1</span>
                </li>
                <li class="attribute propertyType">
                    <span class="value">Factory</span>
                </li>
                <li class="attribute bathroom" title="Bathrooms" style="  ">
                    <span class="value" style="  ">18</span>
                </li>
                <li class="attribute carspace" title="Car Spaces" style="  ">
                    <span class="value" style=" ">18</span>
                </li>
                <li class="attribute landArea">
                        <span title="Land Area">
                            <span class="value">5,010</span><span class="m2"><span class="unit">m<b class="superscript">2</b></span></span>
                        </span>
                    <span>|</span>
                        <span title="Floor Area">
                            <span class="value">9,270</span><span class="m2"><span class="unit">m<b class="superscript">2</b></span></span>
                        </span>
                </li>
        </ul>

Twilio Announces Platform Additions to Support Digital Engagement

Today at SIGNAL, Twilio's annual developer conference, the company announced three new products that aim to support its customers increased need for seamless digital experiences. The new products, Twilio Video Web RTC Go, Twilio Frontline, and the Event Streams API offer examples of how organizations that use an API-led approach can respond in an agile way to new challenges in the marketplace. 

Ask the Bartender: How To WordPress in a Block World?

I love your articles. And now, in the middle of the WordPress revolution, I realized I’m constantly searching for an answer regarding WP these days.

So many things are being said, so many previsions of the future, problems, etc., but, right now, I think I, as a designer, just want to understand one thing that seemed answered already but it’s never clear:

Is WordPress a good choice to build a client’s template where he just has to insert the info that will show in the frontend where I want to? And he doesn’t have to worry about formatting blocks? I love blocks, don’t get me wrong, but will normal templating end?

I just think that having a super CMS, HTML, CSS, and being able to play with a database with ACF is so powerful, that I’m wondering if it’s lost. After so much reading, I still don’t understand if this paradigm is going to disappear.

Right now, I don’t know if it’s best to stop making websites as I used to and adopt block patterns instead.

Ricardo

WordPress is definitely changing. Over the past two years, we have seen much of it reshaped into something different from the previous decade and more. However, this is not new. WordPress has always been a constantly-changing platform. It just feels far too different this time around, almost foreign to many. The platform had to make a leap. Otherwise, it would have started falling behind.

And, it is a big ask of the existing community to come along with it, to take that leap together.

It can be scary as a developer whose livelihood has depended on things working a certain way or who has built tools and systems around pre-block WordPress. Many freelancers and agencies had their world turned upside down with the launch of the block editor. It is perfectly OK to feel a bit lost.

Now, it is time for a little tough love. It has been two years. As a professional, you need to have a plan in place already. Whether that is an educational plan for yourself or a transitional plan for your clients, you should already be tackling projects that leverage the block editor. If you are at a point where you have not been building with blocks, you are now behind. However, you can still catch up and continue advancing in your WordPress career.

There are so many changes coming down the pipeline that anyone who plans to develop for WordPress will be in continual education mode for years to come.

When building for clients, the biggest thing to remember is that it is not about you. It is about getting something into the hands of your clients that addresses their specific needs. Freelancers and agencies need to often be the Jacks and Jills of all trades. Sometimes, this even means having a backup CMS or two that you can use that are not named WordPress. It helps to be well-rounded enough to jump around when needed, especially if you are not a point in your career where you can demand specific work and pass on jobs that would put food on the table.

It is also easy to look at every job as a nail and WordPress as the hammer. Or, even specific plugins as the tool that will always get the job done. I have seen developers in the past rely on tools like ACF, CMB2, or Meta Box but could not code a custom metadata solution when necessary to save their life. Sometimes a bigger toolbox is necessary.

Every WordPress developer needs a solid, foundational understanding of the languages that WordPress uses. Gone are the days of skating by on HTML, CSS, and PHP knowledge. You need to learn JavaScript deeply. Matt Mullenweg, the co-founder of WordPress, was not joking around when he said this back in 2015. It holds true more and more each day. In another five years, it will tough to be a developer in the WordPress world without knowing JavaScript, at least for backend work.

It also depends on what types of sites you are building. If you are primarily handling front-end design, you will likely be able to get by with a lower skill level. You will just need to know the “WordPress way” of building themes.

Within the next year, you should be able to build just about any theme design with decent CSS and HTML knowledge along with an understanding of how the block system works. Full-site editing and block-based themes will change how we build the front end of the web. It is going to be a challenging transition at first, especially for those of us who are steeped in traditional theme development, but client sites will often be far easier to build. I highly recommend the twice-monthly block-based themes meetings if your focus is on the front end.

Block Templates

Based on your question, I am going to make some assumptions. You have a history of essentially building out meta boxes via ACF where the client just pops in their data. Then, you format that data on the front end. You are likely mixing this with custom post types (CPTs). This is a fairly common scenario.

One of the great things about the block system is that you can lock the post editor for individual CPTs. WordPress already has you covered with its block templates feature, which allows you to define just what a post should look like. You can set up which blocks you want to appear and have the client drop their content in. At the moment, this feature is limited to the post type level. However, it should grow more robust over time, particularly when it works alongside the traditional “page templates” system.

Block templates are a powerful tool in the ol’ toolbox that will come in handy when building client sites.

Block Patterns

You do not have to stop making websites as you are accustomed to at the moment. However, you should start leveraging new block features as they become available and make sense for a specific project. I am a fanatic when it comes to block patterns, so my bias will definitely show.

The biggest thing with block patterns and clients is education. For the uninitiated, you will need to spend some time teaching them how to insert a pattern and how it can be used to their advantage. That is the hurdle you must jump.

For many of the users that I have seen introduced to well-designed patterns, they have fallen in love with the feature. Even many who were reluctant to switch to the block editor became far more comfortable working with it after learning how patterns worked. This is not the case for every user or client, but it has been a good introduction point to the block editor for many.

To answer your question regarding patterns: yes, you should absolutely begin to adopt them.

ACF Is Evolving

Because you are accustomed to ACF, you should be aware that the framework is evolving to keep up with the block editor. Version 5.8.0 introduced a PHP framework for creating custom blocks over a year ago. And, it has been improving ever since. There are even projects like ACF Blocks, which will provide even more tools for your arsenal.

It is important to learn from what some of the larger agencies are doing. Read up on how WebDevStudios is tackling block development. The company also has an open-source block library for ACF.

Solving Problems

Your job as a developer is to be a problem solver. Whatever system you are building with is merely a part of your toolset. You need to be able to solve issues regardless of what tool you are using. At the end of the day, it is just code. If you can learn HTML, you can learn CSS. If you can learn those, you can learn PHP. And, if you can manage PHP, you can certainly pick up JavaScript.

A decade or two from now, you will need to learn something else to stay relevant in your career. Web technology changes. You must change with it. Always consider yourself a student and continue your education. Surround yourself and learn from those who are more advanced than you. Emulate, borrow, and steal good ideas. Use what you have learned to make them great.

There is no answer I can give that will be perfect for every scenario. Each client is unique, and you will need to decide the best direction for each.

However, yes, you should already be on the path to building with a block-first mindset if you plan to continue working with WordPress for the long haul. Immerse yourself in the system. Read, study, and build something any chance you get.

This is the first post in the Ask the Bartender series. Have a question of your own? Shoot it over.

#286: New Homepage

Show Description

Marie and Chris talk about the recent changes to your homepage on CodePen – the one you see when you’re logged in and looking for inspiration. What’s new with the Trending, Following, and Your Work tabs?

Time Jumps

  • 01:00 What should we talk about on the podcast?
  • 01:53 What’s new on the homepage?
  • 13:32 Sponsor: imgix
  • 14:51 Trending feature
  • 19:43 Your Work
  • 26:33 Ideas around Streams
  • 29:07 One more thing about feature flags

Sponsor imgix

imgix is the API for fast, responsive, beautifully optimized images.

Your images create complex challenges with web performance, user experience, conversion rates, SEO, and responsive design. Our APIs solve them.

Visit imgix.com/codepen and signup to receive a $300 account credit.

Show Links

CodePen Links

The post #286: New Homepage appeared first on CodePen Blog.

Need help with sorting data in an external file for CS NEA

leaderboard = open("scores.txt", "r")
scores = leaderboard.readlines()
rawscores = []
for lines in scores:
  details = lines.rstrip("\n") #removes empty space
  details = details.split(",") #splits apart data with a comma at each space
  details[0] = int(details[0])
  rawscores.append(details)
  rawscores.sort(key=lambda x: x[0], reverse=True) #sorts data from highest to lowest
  print("1. "+str(rawscores[0][0]),"done by",str(rawscores[0][1]))
  print("2. "+str(rawscores[1][0]),"done by",str(rawscores[1][1]))
  print("3. "+str(rawscores[2][0]),"done by",str(rawscores[2][1]))
  print("4. "+str(rawscores[3][0]),"done by",str(rawscores[3][1]))
  print("5. "+str(rawscores[4][0]),"done by",str(rawscores[4][1]))

Achieving Vertical Alignment (Thanks, Subgrid!)

Our tools for vertical alignment have gotten a lot better as of late. My early days as a website designer involved laying out 960px wide homepage designs and aligning things horizontally across a page using a 12-column grid. Media queries came along which required a serious mental shift. It solved some big problems, of course, but introduced new ones, like dealing with alignment when elements wrap or are otherwise moved around in the layout. 

Let’s take a look at just one particular scenario: a “bar” with some buttons in it. There are two groups of these buttons, each contained within a <fieldset> with a <legend>

On a large screen, we’re all set:

Two groups of two bright pink buttons set on a dark background.

And here’s a very basic CSS method that accomplishes that layout, and also breaks down onto two “rows” at a mobile breakpoint:

.accessibility-tools fieldset {
  width: 48%;
  float: left;
  margin-right: 1%;
}


/* Mobile */
@media only screen and (max-width: 480px) {
  .accessibility-tools fieldset {
    width: 100%;
  }
}

On a small screen, we end up with this:

The same two groups of two pink buttons, with one group of buttons stacked on top of the other, showing the buttons are uneven in width.

This is the problem: lack of vertical alignment. Let’s say we want to align those buttons into a more pleasing arrangement where the button edges align with each other nicely.

To begin, we could go for fixed-width, pixel-based CSS solutions to force elements to line up nicely at various breakpoints, using magic numbers like this:

/* Mobile */
@media only screen and (max-width: 480px) {
  legend {
    width: 160px;
  }
  button {
    width: 130px;
  }
}
the same two groups of pink buttons but where the buttons all have the same consistent width and line up evenly.

That does the trick.

But… this is not exactly a flexible solution to the problem. Aside from the magic numbers (fixed-pixel values based on specific content), it also relied on the use of media queries which I am trying to move away from when I can. I discussed this in a post called “Stepping away from Sass” on my blog.

As I moved towards some of the more modern features of CSS the need to target specific screen sizes with unique code was removed.

What I need is each button and label to respond to:

  1. the space available
  2. their content 

and!

  1. Other elements around them

Available space

The problem with using media queries is that they don’t take into account the space around the elements that are being realigned — a point perfectly demonstrated in this image from “The Flexbox holy albatross” by Heydon Pickering:

Three browsers side-by-side. The first shows three black rectangles in a single row, the second shows three black rectangles stacked vertically, and the third shows three black rectangles set to the right hand of the screen.

What I really want is for the second <fieldset> to wrap under the first only when they can no longer fit neatly on one row.

Can we get this done with flexbox?

A key selling point for flexbox is its ability to create elements that respond to the space around them. Components can “flex” to fill additional space and shrink to fit into smaller spaces. 

For this situation, the flex-wrap property is set to wrap. This means as soon as both <fieldset> elements no longer fit on one line, they will wrap onto a second line.

.wrapper--accessibility-tools {
  display: flex;
  flex-wrap: wrap;
} 

The flex-wrap property has three available values. The default value is nowrap, leaving items on one line. The wrap value allows elements to flow onto multiple lines. Then there’s wrap-reverse, which allows items to wrap but — wait for it — in reverse (it is weird to see: when elements wrap, they go above the previous row in left-to-right situations).

Using flexbox stops the layout from being quite as rigid, but a min-width value is still needed to remove the vertical alignment problem. So: close but no cigar.

Can grid help us? 

CSS Grid is the very first CSS module created specifically to solve the ongoing layout problems faced by web designers and developers. It is not a direct replacement for flexbox; rather the two modules usually work pretty well together.

Like flexbox, grid can be used to allow each <fieldset> to occupy as much or as little space as they need. Getting right to it, we can leverage the auto-fill and auto-fit keywords (within a repeat() function) to allow grid items to flow onto multiple lines without the need for media queries. The difference is a bit subtle, but well-explained in “Auto-Sizing Columns in CSS Grid: auto-fill vs auto-fit” by Sara Soueidan. Let’s use auto-fit:

.wrapper--accessibility-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, 450px);
  grid-gap: 10px;
}

Like the flexbox example, I still need to set an absolute value for the width of the label to align the <fieldset> elements as they stack.

Another approach with grid

CSS Grid also allows elements to respond based on their content using flexible grid tracks. In addition to other length values like percentages, relative units, or pixels, CSS Grid accepts a Fractional Unit (fr), where 1fr will take up one part of the available space, 2fr will take up two parts of the available space, and so on. Let’s set up two equal columns here:

.wrapper--accessibility-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
}

There’s also a minmax() function which creates grid tracks that flex to the available space, but also don’t shrink narrower than a specified size.

.wrapper--accessibility-tools {
  display: grid;
  grid-template-columns: minmax(auto, max-content) minmax(auto, max-content);
  grid-gap: 10px;
}

Both of these demos work, and are free from any absolute values or device specific CSS. The results are far from ideal though, each grid now responds at different points. Maybe not a huge problem, but certainly not great.

This happens because when adding display: grid to a container, only the direct children of that container become grid items. This means the intrinsic sizing units we used only relate to elements in the same grid. 

Using subgrid

To really achieve my goal, I need the buttons and labels to react to elements in sibling grid containers. CSS Grid Level 2 includes the subgrid feature. Although we have always been able to nest grids, the elements within each grid container have been independent. With subgrid, we get to set up nested (child) grids that use parent grids tracks.

This makes a number patterns that were previously difficult much easier, in particular the “card” pattern which seems to be the most popular example to show the benefits of subgrid. Without subgrid, each card is defined as an independent grid, meaning track sizing in the first card cannot respond to a change of height in the second. Pulling from an example Rachel Andrew used, here’s a simple group of cards:

Showing three columns of cards where each card has a headers with a dark blue background and white text, content with a white background, and a footer with a dark blue background. The cards are uneven because some of them have more content that others.
Credit: Rachel Andrew

Subgrid allows the cards to use the rows defined in the parent grid, meaning they can react to content in surrounding cards.

The same three columns of cards, but with each card perfectly aligned with the others.
Credit: Rachel Andrew

Each card in this example still spans three row tracks, but those rows are now defined on the parent grid, allowing each card to occupy the same amount of vertical space.

For the example we’ve been working with, we do not need to use rows. Instead, we need to size columns based on content from sibling grids. First, let’s set the parent grid to contain the two <fieldset> elements. This is similar to the code we previously look at in the auto-fit demo.

.wrapper--accessibility-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 10px;
}

Then we position each subgrid onto the parent grid.

.sub-grid {
  display: grid;
  grid-column: span 3;
  grid-template-columns: subgrid;
  align-items: center;
}
Showing the two groups of bright pink buttons with both groups on the same row and all the buttons have a consistent width.

All of the labels and buttons are now aligned to the tracks of their parent grid, keeping them consistent. They will each have an equal width based on the space that is available. If there is not enough space for each nested grid on one line, the second will wrap onto a new line.

The two groups of buttons vertically stacked and the buttons are all consistently aligned with the same width.

This time, the two nested grid items align perfectly. The grid is also flexible if we introduce a longer title on a one of the buttons, the other elements will respond accordingly.

Browser compatibility

Support for subgrid is not great at the time of writing. It is only supported in Firefox 71+, although there are positive signals from other browsers. CSS feature queries can be used to provide alternative styling to Chrome and Edge.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

Desktop

ChromeFirefoxIEEdgeSafari
No71NoNoNo

Mobile / Tablet

Android ChromeAndroid FirefoxAndroidiOS Safari
No79NoNo

Note that I am using an extra wrapper around the fieldsets in these demos. This is to combat a bug with form elements and grid and flexbox.

<fieldset class="accessibility-tools__colour-theme">
  <div class="wrapper"></div>
</fieldset>

The layout CSS is applied to the wrapper with the fieldset being set to display: contents.

.accessibility-tools fieldset {
  display: contents;
  border: 0;
} 

Other writing on the subject


The post Achieving Vertical Alignment (Thanks, Subgrid!) appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

10 Great One Page Website Templates

Looking for an easy, time-saving way to kick off your next project? Why not try using one of these one page website templates, if the project calls for one? What follows is a collection of some of the best single page templates we’ve found. They are inexpensive, and will save you a significant amount of time, bypassing the mockup process and initial coding. All you have to do is customize the template of your choice to match your project’s branding. So have a look at these great examples and see if any of them captivates your imagination.

ODIN – Simple & Easy Creative One Page Template 

one page templates - Odin

A simple and extremely easy to use one page HTML5 template with Responsive & Retina ready layout. A perfect tool for anyone to create a very simple & sweet one page website.

Featuring 10 home page variants with additional pages, Slider Revolution (Premium), Filterable AJAX expanding media portfolio, Unlimited Colors, Easy to edit layout, Fullscreen Image Sliders, Fullscreen Video, Parallax, Animations, Google Web Fonts integration and Unlimited Content Carousels & Sliders with Touch Support. Also includes additional pages such as single project, error pages etc. with a working contact form PHP email sending. A neatly explained user-guide is provided with 35+ pages (PDF).

B-One – One Page HTML Template

one page website templates - B-One

B-one is a beautiful HTML Template, with carefully crafted demos to ensure that a clean and modern design is carried through.

Frost – Multipurpose Responsive One Page

one page website templates - Frost

Frost is an awesome looking one page and multipage HTML5 Template with a unique portfolio which. It is suitable for artists, photographers, creative agencies, digital studios, personal freelancers, and any kind of business owners that would like to showcase their portfolio beautifully.

Frost was built with awesome Twitter Bootstrap v3 and it features 20 cool HTML5 pages with 7 color options. Since it is responsive, the layout will adapt to different screen sizes.

One Click – Parallax One Page HTML Template

one page website templates - One Click

One Click is a portfolio concept for creative agencies and freelancers. Graphic designers, illustrators, photographers or any kind of creative is now able to create a quick & easy portfolio to showcase their work with a distinctive and creative touch.

RIVAL One Page Vcard Template

one page website templates - Rival

RIVAL V-card is an easily customizable v-card/portfolio/mini website template made 95% with html and CSS.  It allows you to introduce yourself with the most important information to your clients or employers. The template is responsive that’s allows it to view it in the mobile devices also. All of the HTML, CSS, JavaScript code is well organized and commented to make any change easy to do.

coloriT – Colorful Single Page HTML Template

one page website templates - coloriT

ColoriT is coded with the latest HTML5 & CSS3 and is a one page website template that allows you to create stylish, vibrant, colorful websites. Whether it’s displaying your portfolio or showcasing your business in a creative manner coloriT is one of the best choices.

Spectral – Agency One Page HTML5 Template

Spectral

Spectral is an elegant, luxury and trendy Business & Agency HTML5 One Page template. It is a very simple, clean, and minimalist template. It is perfectly suited for the website of Business, Agency, Portfolio, or blog. The template looks great and it will appeal to fans of minimalist style. Template content is based on Bootstrap.

FinWin – One Page Business Finance Template

FinWin

FinWin is a creative, Mobile First Startup Landing Page with stylish parallax effect. Template uses Bootstrap 4 grid system so it’s responsive on every device. You can choose from 8 different homepage designs.

Start.ly — Agency One Page Parallax Template

Start.ly

Start.ly is a creative, modern and minimal One Page Parallax Website Template created for Startups and Agencies built with the latest Bootstrap 4 Framework.

Creatic – One Page Parallax HTML Template

Creatic

Creatic is a one page creative parallax HTML Template suitable for any creative agency, corporate business, startups, personal portfolio or web studios. It has the perfect layout to display all your major services and show your skills. It can be also used for both small and large-scale businesses.

Use These One Page Website Templates Right Now

What we’ve shown you in this collection is just a sampling of the some of the best one page website templates you can download and use on Envato Elements. For a single monthly subscription price starting at only $16.50 per month you can get all of these templates along with millions of other assets you can use in your projects. Be sure to check out our other collections here at 1WD to find other assets and inspiration for your projects.

Creating Mirrors in React-Three-Fiber and Three.js

This tutorial is inspired by Claudio Guglieri’s new personal website that features a collection of playful 3D scenes. What we’ll do today is to explore the “Don’t” scene that is composed of rotating mirrors:

We’ll be using Three.js with react-three-fiber v5, drei and use-cannon and we’ll assume that you have some basic knowledge on how to set up a scene and work with Three.js.

Since real-time reflections would be extremely performance-heave, we’ll employ a few neat tricks!

All these libraries are part of Poimandres, a collection of libraries for creative coding. Follow Poimandres on Twitter to get the latest updates:

Drawing sharp text in 3D Space

To make our text look as sharp as possible, we use drei’s Text component, which is a wrapper around Troika Three Text. This library allows us to draw any webfont using signed distance fields and antialiasing:

import { Text } from '@react-three/drei'

function Title() {
   return <Text material-toneMapped={false}>My Title</Text>
}

The `material-toneMapped={false}` tells three.js to ignore our material when doing tone mapping. Since react-three-fiber v5 uses sRGB by default, our text would otherwise be more grey than white.

Mirrors

The mirrors are simple Box objects positioned in 3D Space by loading the positions from a JSON file. We use `useResource` to store a reference to the materials and re-use them in the single Mirror components, meaning we will only instance the materials once.

To make the mirrors pop out of the black backdrop, we added a thin film effect by David Lenaerts.

import { useResource } from 'react-three-fiber'

function Mirrors({ envMap }) {
  const sideMaterial = useResource();
  const reflectionMaterial = useResource();
  const [thinFilmFresnelMap] = useState(new ThinFilmFresnelMap());

  return (
    <>
      <meshLambertMaterial ref={sideMaterial} map={thinFilmFresnelMap} color={0xaaaaaa} />
      <meshLambertMaterial ref={reflectionMaterial} map={thinFilmFresnelMap} envMap={envMap} />

      {mirrorsData.mirrors.map((mirror, index) => (
        <Mirror
          key={`mirror-${index}`}
          {...mirror}
          sideMaterial={sideMaterial.current}
          reflectionMaterial={reflectionMaterial.current}
        />
      ))}
    </>
  );
}

For the single mirrors, we assigned a material to each face by setting the material prop as an array with 6 values (a material for each of the 6 faces of the Box geometry):

function Mirror({ sideMaterial, reflectionMaterial, args, ...props }) {
  const ref = useRef()

  useFrame(() => {
    ref.current.rotation.y += 0.001
    ref.current.rotation.z += 0.01
  })
  
  return (
    <Box {...props} 
      ref={ref} 
      args={args}
      material={[
        sideMaterial,
        sideMaterial,
        sideMaterial,
        sideMaterial,
        reflectionMaterial,
        reflectionMaterial
      ]}
    />
  )
}

The mirrors are rotated each frame on the y and z axis to create interesting movements in the reflected image.

Reflections

As you noticed, we are using an envMap property on our mirror materials. The envMap is used to show reflections on metallic objects. But how can we create one for our scene?

Enter cubeCamera, a Three.js object that creates 6 perspective cameras and makes a cube texture out of them:

// 1. we create a CubeRenderTarget
const [renderTarget] = useState(new THREE.WebGLCubeRenderTarget(1024))

// 2. we get a reference to our cubeCamera
const cubeCamera = useRef()
  
// 3. we update the camera each frame
useFrame(({ gl, scene }) => {
  cubeCamera.current.update(gl, scene)
})

return (
   <cubeCamera 
     layers={[11]} 
     name="cubeCamera" 
     ref={cubeCamera} 
     position={[0, 0, 0]} 
     // i. notice how the renderTarget is passed as a constructor argument of the cubeCamera object
     args={[0.1, 100, renderTarget]} 
  />
)

In this basic example, we setup cubeCamera that helps us bring the sky reflections on our physical material.

Right now, our scene doesn’t really have much else than the mirrors, so we use a magic trick to create interesting reflections:

function TitleCopies({ layers }) {
  const vertices = useMemo(() => {
    const y = new THREE.IcosahedronGeometry(8)
    return y.vertices
  }, [])

  return <group name="titleCopies">{vertices.map((vertex,i) => <Title name={"titleCopy-" + i} position={vertex} layers={layers} />)}</group>
}

We create an IcosahedronGeometry (20 faces) and use its vertices to create copies of our title, so that our cubeCamera has something to look at. To make sure the text is always visible, we also make it rotate to look at the center of the scene, where our camera is positioned.

Since we don’t want the fake text copies to be visible in the main scene, but only in the reflections, we use the layers system of Three.js. 

By assigning layer 11 to our cubeCamera, only objects that share the same layer would be visible to it. This is what our cubeCamera is going to see (and thus what we are going to get on the mirrors).

Fun fact: Claudio was kind enough to show us that he also used the same technique to make the reflections more interesting.

Finishing touches

To finish it up, we added a simple mouse interaction that really helps selling the reflections on the mirrors. We wrapped our whole scene in a <group> and animated it using the mouse position:

import { useFrame } from "react-three-fiber";

function Scene() {
  const group = useRef();
  const rotationEuler = new THREE.Euler(0, 0, 0);
  const rotationQuaternion = new THREE.Quaternion(0, 0, 0, 0);
  const { viewport } = useThree();

  useFrame(({ mouse }) => {
    const x = (mouse.x * viewport.width) / 100;
    const y = (mouse.y * viewport.height) / 100;

    rotationEuler.set(y, x, 0);
    rotationQuaternion.setFromEuler(rotationEuler);

    group.current.quaternion.slerp(rotationQuaternion, 0.1);
  });

  return <group ref={group}>...</group>;
}

We create the Euler and Quaternion objects outside of the useFrame loop, since object creation on every frame would hinder performance.
To make a smooth rotation, we first set the rotation angle from mouse x and y, then slerp (which sounds funny but actually means spherical linear interpolation) the group’s quaternion to our new quaternion.

Bonus Points: Cannon!

Our second variation on this theme involves some simple physics simulation using use-cannon, another library in the react-three-fiber’s ecosystem.

For this scene, we setup a wall of cubes that use the same materials setup of our mirrors:

import { useBox } from '@react-three/cannon'

function Mirror({ envMap, fresnel, ...props }) {
  const [ref, api] = useBox(() => props)
  
  return (
    <Box ref={ref} args={props.args} 
      onClick={() => api.applyImpulse([0, 0, -50], [0, 0, 0])} 
      receiveShadow castShadow material={[...]} 
    />
  )
}

The useBox hook from use-cannon creates a physical box that is then bound to the Box mesh using the given ref, meaning that any change in position of the physical box will also be applied to our mesh.

We also added two physical planes, one for the floor and one for the back wall. Then we only render the floor with a ShadowMaterial:

import { usePlane } from '@react-three/cannon'

function PhysicalWalls(props) {
  // ground
  usePlane(() => ({ ...props }))

  // back wall
  usePlane(() => ({ position: [0, 0, -20] }))

  return (
    <Plane args={[1000, 1000]} {...props} receiveShadow>
      <shadowMaterial transparent opacity={0.2} />
    </Plane>
  )
}

To make everything magically work, we wrap it in the <Physics> provider:

import { Physics } from '@react-three/cannon'

<Physics gravity={[0, -10, 0]} >
  <Mirrors envMap={renderTarget.texture} />
  <PhysicalWalls rotation={[-Math.PI/2, 0, 0]} position={[0, -2, 0]}/>
</Physics>

Here is a simplified version of the physical scene we used:

And here we go with some DESTRUCTION:

And just so you know… Panna, Olga and Pedro are the names of Gianmarco’s bunny (Panna) and Marco’s cats (Olga and Pedro) 🙂

The post Creating Mirrors in React-Three-Fiber and Three.js appeared first on Codrops.

5 Ways Google Analytics Helps Web Developers In UI/UX Design

Google Analytics is one of the most popular marketing analytics platforms out there — and not just because its standard version is free. More than a million organizations worldwide use this platform to gain better insights on user behavior on their websites.

However, for most web developers, their involvement with Google Analytics ends with just installing the base code for pageviews. This code usually looks like this, when using the gtag.js version of the code:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-35169008-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-35169008-1');
</script>

Or it looks like this, with the analytics.js implementation:

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->

While there’s already many data points made available with this basic implementation, they end up missing out on other key features. Due to the lack of available data to consult, there have even been cases where web developers or designers choose to remove a specific feature on the site, without realizing that most users use that feature regularly.

Hence, here are five of the most important features in Google Analytics that you can utilize to improve user experience — and separate you from the rest of the web developers and designers out there:

1. Use Events To Identify User Interactions On Specific Parts Of Your Website

As stated above, the basic Google Analytics code only tracks pageviews by default. If you want to track actions on your website, such as button clicks or form submissions, you’ll need to fire a separate Google Analytics event. These events can be implemented by adding the following code with the appropriate Event Category, Action, and Label information:

ga('send', {
  hitType: 'event',
  eventCategory: 'Event Category',
  eventAction: 'Event Action',
  eventLabel: 'Event Label'
});

A shorthand version of the code is also available in this format:

ga('send', 'event', 'Event Category', 'Event Action', 'Event Label');

Once the events are set up, they will show up in the Google Analytics UI under the Behavior > Events > Top Events report:

As a best practice, you can use Event Category to group events based on a specific function (ex. Page Engagement, Ecommerce). Meanwhile, you can use Event Action to identify the exact action the user made (Click, Scroll, Form Submission) while you can use Event Label to get the URL where the event was fired.

Alternatively, a better way to implement these events would be to use Google Tag Manager instead. In lieu of the actual Google Analytics code, you will need to install the Google Tag Manager code instead:

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5PLFVFV');</script>
<!-- End Google Tag Manager -->

Then once Google Tag Manager is set up, all you need to do is to set up the Google Analytics Page View tag and the Event tags you need. Simply create a new Tag by clicking the “New” button, then click on Tag Configuration, and Google Analytics will be one of the default options available:

You’ll then be able to select between the different Google Analytics tag types, which includes “Event” as one of them. Once you’ve filled in the Tag Configuration details, you’ll just need to set up the appropriate trigger to fire the event. There are already built-in triggers such as clicks on Google Tag Manager; you’ll just need to select the one suitable for your event.

Don’t forget to test the tag in Google Tag Manager’s preview mode, then click publish once the set up is complete.

Take note that it’s important to be careful when you’re implementing events via Google Tag Manager or by adding the actual code for events via Google Analytics. Whatever approach you choose for implementation should be the same all throughout the site. Either you go all the way with Google Tag Manager or with hard-coding the actual event code.

Otherwise, you may end up tracking the same website action twice — once by adding the event code, another via Google Tag Manager — and recording duplicate data inside Google Analytics.

Adding events even become more important when it comes to setting up Ecommerce and Enhanced Ecommerce tracking for Google Analytics. While you do need to turn on these settings in the Google Analytics interface, you’ll need to go back to your tracking and add separate ecommerce events. These events are needed to send the complete set of e-commerce data back to the Google Analytics servers.

2. Learn How Far Users Scroll Down The Page With Scroll Tracking Events

Other than tracking clicks and form submissions, events in Google Analytics can be also used for scroll tracking. This can be done by adding the Google Analytics event code to fire once a specific element appears in the viewport. You can also set the code to fire if the user has scrolled a specific percentage down the screen.

Alternatively, in Google Tag Manager, scroll tracking can be implemented much easier by using the Scroll Depth trigger. All you need to do is to create a new trigger, select the “Scroll Depth” trigger type, then fill in the necessary details.

So how can this feature help you in terms of user experience? For starters, this obviously can help you determine up to what part of the page are users willing to scroll down. Since that data is in Google Analytics, you can segment that data based on device or browser, time of day, location, etc.

That way, if you’re deciding whether you can place a specific widget for a specific kind of user, you have some data to back up your decision. This can also eliminate the need to purchase separate scroll tracking software, as all you’ll need is a bit of time to implement this feature.

3. Get An Estimate Of How Much Time They Actually Spend On Your Website

Learning up to where people scroll is one thing; finding out how much time they spend on the site is another. Thankfully that’s also possible to measure with Google Analytics.

By default, after installing the Google Analytics pageview tag, users can already get a metric called Avg. Session Duration. This metric is generally understood to measure the amount of time that a user spends on each visit to your website (a session).

However, this metric can be inaccurate at times. After all, Google Analytics really only measures Avg. Session Duration based on the timestamps of the data (hits) that it receives.

This also explains why most bounces — or visits on the website with either only one pageview or event in them — have an Avg. Session Duration of 00:00:00.

So how would you get around this limitation? By firing timing hits. These can help accurately calculate the amount of time a user spends on a page without recording another pageview or event. You just need to send the timing hits by implementing this code to fire at specific intervals on your site:

ga('send', 'timing', [timingCategory], [timingVar], [timingValue], [timingLabel], [fieldsObject]);

A more detailed description of each field is available on the Google Developers’ site.

Once implemented, these hits will be visible in the Behavior > Site Speed > User Timings section in Google Analytics.

Alternatively, since timing hits have a cap of 10,000 hits per day, you can create custom events that fire at specific intervals instead. Like other regular events, these would then be visible in the Behavior > Events > Top Events section.

A word of caution when setting up timing hits, however: make sure to add a “timeout” of sorts for them. That way these hits won’t continuously fire — and the data sent to Google Analytics — for too long, if the page was just left open on an unattended browser.

4. Find Out Where Users Get Stuck Or Other Pain Points On The Website

Once you’ve implemented events and timing hits on Google Analytics, you’d see them in the different sections of the platform. However, this introduces a new challenge: how can you unite these different data points into one report that shows the entire user journey on your website?

That’s where the Behavior Flow report in Google Analytics comes into play. This report, which appears as a flowchart, shows how users arrive at the site and the subsequent pageviews or actions they take before dropping off.

By default, the Behavior Flow report uses the Landing Page and the specific pages that groups of users go to.

You can also change the Behavior Flow report to focus more on events. Simply click to the dropdown menu below the report’s header and select “Events” or “Pages and Events.”

A little caveat with using the Behavior Flow reports, however: when looking at data for larger websites, such as those with millions of pageviews, sampling may occur. This sampling is set in place to help Google Analytics crunch through all the data in a specific amount of time.

To minimize sampling, you can adjust the date range covered by the Behavior Flow report to reduce the amount of data that Google Analytics needs to analyze. In addition, you can also adjust the granularity of your analysis by clicking on the “Level of Detail” dropdown and setting it to “Show fewer connections.”

If the Behavior Flow report is not enough, you can also set up Custom Reports in Google Analytics. To set these up, go to Customization > Custom Reports, then click the “New Custom Report” button.

Custom Reports can come in three different formats:

  • Explorer, which looks similar to the default Google Analytics reports.
  • Flat Table.
  • Map, best for geographic overlays.

You can also adjust the settings to filter based on specific metrics using exact match or regular expressions.

That said, some dimensions and metrics may appear off when combined with each other. This may be due to these metrics having different scopes--one metric may be measured at the user level, while another metric may be measured at the session (website visit) level. For more information about Google Analytics scopes, you can check out the Processing section of this Google Analytics Help Center article.

5. Discover The Kinds Of User Behavior That Lead To Conversions And Which Actions Don’t

At the end of the day, a client or your employer is having a website made to achieve a tangible objective. This can be as diverse as selling your company’s products online (ecommerce), generating sign-ups for a service (lead generation), or even just to promote the company’s services (awareness).

That’s where the true strength of Google Analytics lies. By collecting data based on a combination of pageviews and different events, you can get more in-depth insights into what users actually do on your website. In addition, you can isolate specific key actions as conversions on your website by creating goals.

To do so, simply go to Admin > Goals, and then click New Goal. You can then choose from a template or set up a custom goal based on a destination ‘pageview of a specific page), events, duration, or even a number of pageviews.

Once you’ve set up your goals, you can then use Google Analytics segments to analyze the actions that users with conversions have, versus those who did not convert. This is available by default — simply select the Converters or the Non-Converters segments to apply on your reports.

If you want more specific segments regarding conversions, you can click on the Actions option to copy the segment and add your own criteria. For example, you can add age, gender, location, or language for further filtering based on demographics. You can also create segments based on how users got to your site (source and medium), the device they’re using, or even based on the chain of actions they took on your site (under Advanced > Sequences).

Of course, you can always create segments from scratch in Google Analytics. Simply open the Segments dropdown then click on the red New Segment button to make your own.

With all these features available for free, Google Analytics is truly one of the most powerful tools that any web developer or designer can utilize. However, adding these features to your site is just the tip of the iceberg. There are so many other functionalities there to explore, such as the Measurement Protocol that allows Google Analytics to collect data from IoT devices.

To know more about Google Analytics, you can check out these official Google resources:

Lastly, before implementing Google Analytics, make sure to double-check the data privacy regulations in your region to avoid any unintentional violations. For more information about ensuring compliance with these regulations, please consult this Google Support article.

By balancing the end user’s data privacy rights plus the need to collect data for actionable insights, Google Analytics is definitely one of the finest tools for UI/UX design that’s out in the market.

Upgrade From QB2017 to QB2020

Hi everyone!

i have QB2017 installed on my laptop. As QB-2017 is now an old version, I'd like to know if there is a way to upgrade directly to QB-2020, with no risk (I mean no data loss, in particular my /home dir)..

Can you help me?

In any case I've put an17.0 version, but I'm scared to try install it from the DVD and lose my most important data.

What is your advice(s)? Thanks in advance dear fellows!

How to Upload Files from a WordPress Form to Google Drive

Do you want to send files from a WordPress contact form to Google Drive?

Normally, your form plugins will upload any files directly to your WordPress site. However, you may want to automatically upload them to Google Drive as well for safekeeping and easier sharing.

In this article, we’ll show you how to easily upload files from a WordPress form to Google Drive.

Uploading files from a WordPress form to Google Drive

Why Upload Files From Your WordPress Form to Google Drive?

Normally, you can use your WordPress form builder plugin to add a file upload field and keep the uploaded files on your website.

But what if you wanted to share the uploaded files with someone who does not have access to the WordPress admin area?

This is where Google Drive comes in. Google Drive allows you to store files on the cloud and easily share them with anyone. It also allows you to easily access files from any device without logging into your WordPress site.

For instance, if you create a job application form and ask for resumes, then you can automatically upload those files directly to Google Drive and share it with others in your team.

Another scenario is when you run a contest where users upload photos or submit articles to participate.

Sending those submissions directly to Google Drive saves disk space on your website. At the same time, it keeps those files safe in a remote cloud location.

That being said, let’s take a look at how to easily send WordPress form uploads to Google Drive.

Creating and Preparing Your WordPress Form in WPForms

For this tutorial, we will be using WPForms. It’s the most popular contact form plugin for WordPress with over 3 million active installs. It comes with a simple drag and drop interface that lets you easily create any kind of form.

Then, we are going to use a tool called Zapier to connect WPForms with Google Drive.

Zapier acts as a bridge to send data between two different apps, without you needing to use any code. It seamlessly integrates with over 2000+ apps.

Note: You need the Pro version or higher to access the Zapier addon for WPForms.

Creating a File Upload Form in WPForms

First, you need to install and activate the WPForms plugin on your website. For more details, see our step by step guide on how to install a WordPress plugin.

Next, you need a form that your website visitors can use to send you files. If you don’t already have a form set up, check out our step by step guide on creating a file upload form in WordPress.

Important: This method will only work with a single file. It will not work with multiple files from one form submission.

Once you have set up your form, you need to add it to your website. To do this, simply edit the post or page where you want the form.

On the post edit screen, click on the + button to add a new block. After that, search for the WPForms block and add it to your content area.

Adding a WPForms block to a post or page

Then, publish your page or post to put your form live. Once you’ve done so, go ahead and create a test entry. This will be used to set up and test the connection between WPForms and Google Drive.

Here’s our test entry:

The completed upload form, including a photo (.jpg)

Preparing to Connect WPForms with Zapier

We are going to use Zapier as a bridge between WPForms and Google Drive. To do this, you need to install and activate the WPForms Zapier addon.

In your WordPress admin, go to the WPForms » Addons page and find the Zapier addon. Go ahead and click the ‘Install Addon’ link to install and activate it:

Installing the Zapier addon for WPForms

Next, you need to visit the WPForms » Settings » Integrations page. Simply click on the Zapier logo to get your Zapier API key. You will need this in order to connect Zapier with WPForms.

Getting the Zapier API key from WPForms

Copy the API key somewhere safe or keep this tab open. You will need the API key in a later step.

Creating a Zap to Send Files from Your Website Form to Google Drive

Once you have your form ready, go to the Zapier website. You need to create a free account or log in to your existing account.

In your Zapier dashboard, simply click the ‘Make a Zap’ button to get started. This will open the configuration wizard.

Note: Zapier uses the word ‘zap’ for a process with a trigger and an action. Our trigger will be a visitor filling in the form, and our action will be sending the file(s) attached to the form to Google Drive.

At the top of the screen, you need to choose a name for your zap. Once you’ve done that, it’s time to set up the trigger.

First, you need to select WPForms in the ‘Choose App & Event’ box. Just type ‘WPForms’ into the search bar to find it:

Choosing the WPForms app in Zapier

You will now be prompted to select a trigger event. This will default to ‘New Form Entry’ so all you need to do here is click the ‘Continue’ button.

Choosing a trigger event in Zapier

Now, Zapier will ask you to sign into WPForms. Go ahead and click the ‘Sign in to WPForms’ button.

Click the button to sign into WPForms

You should then see a popup window. Here, you need to enter the API key that you found earlier.

You also need to add your website’s URL (domain name).

Enter your API key from WPForms and the URL of your website

After you’ve entered those details, just click on the ‘Yes, Continue’ button to move on.

Next, Zapier will ask you to select your file upload form from a dropdown list. Go ahead and click on the name of your form:

Select your file upload form from the dropdown in Zapier

Once you’ve selected the correct form, you need to click the ‘Test trigger’ button to make sure that Zapier has connected to your form correctly.

Testing your trigger in Zapier

After clicking that button, you should see a message that Zapier has found a test entry. You will see the data on the screen:

Viewing the data for the test WPForms entry

Click the ‘Continue’ button to move on to the Action part of the Zap. Here, you need to choose your second app, Google Drive.

Choosing the Google Drive app as the action for the zap

Next, you will see the dropdown for choosing an action event. Here, you need to select the ‘Upload File’ option and then click to continue.

Choosing 'Upload File' as the action for the zap

Zapier will now prompt you to sign into your Google Drive account:

Signing into Google Drive when prompted by Zapier

Once you’ve done so, click the Continue button to move on:

Zapier and Google Drive are now connected

Now, it’s time to set up where you want the files to go in your Google Drive. Simply click on the Drive dropdown to select whether you want to use your personal drive or a shared drive.

Then, click on the Folder dropdown to select the folder you want to use.

Select the Google Drive you want to use plus the folder to put the uploaded files in

Next, you need to tell Zapier which file(s) to upload. Under the File dropdown, select the upload field on your form:

Choose the correct field (the file upload field) from your form based on the test data

After that, you can leave the other settings blank and click the continue button to move on.

Zapier will now prompt you to test your Zap by sending an upload file to Google Drive. Simply click the Test and Continue button to do so:

Sending the test file to Google Drive using Zapier

This will send Google Drive the files you uploaded in your test form entry. Go ahead and check your Google Drive folder for the files:

Viewing the uploaded file in Google Drive

Once you’re confident that your zap is working as intended, simply click the ‘Turn on Zap’ button to make it live:

Turn on your zap once you're ready

Now, all files sent through your file upload form will automatically be uploaded to your chosen Google Drive folder.

WPForms will always keep a backup of all files on your WordPress hosting account in case the Zapier API experiences any outages.

Please keep in mind that if you get a lot of form submissions with large files, then this will take up increased storage space in your Google Drive. In our business, we use G Suite Business plan to get Unlimited storage space.

We hope this article helped you learn how to upload files from a WordPress form to Google Drive. You might also like our article on how to use user generated content to grow your business, and our collection of the must have WordPress plugins for all sites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Upload Files from a WordPress Form to Google Drive appeared first on WPBeginner.

GPU display issue with 2 5k2k LG monitors UWM

So I recently purchased 2 5k2k monitors to improve workflow for game development. I noticed once I run both displays the GPU gets hot and eventually the display goes black and the GPU fans go crazy. I also noticed that before that happens the GPU fans do not turn on to cool it down. Could this be an issue that can be fixed through an option the GPU might have? Or is the GPU not enough to keep both displays on?

The GPU starts getting hot and as soon as I display both screens, even though I dont run heavy GPU applications and sometimes it does before I do run them or minutes after I run something like Photoshop.

GPU is an RTX 1080 Ti.

If this the GPU isnt powerful enough, do you think an RTX 3080 might be enough?
Or if I use 1070ti to focus only on the displays and dedicate the 3080 GPU to the heavy applications.

Sorry for my ignorance in advance, I havent encounter this issue before so Ive never really looked into any of this.

A Forminator Quiz Is the Answer to Collecting Emails and Generating Leads

Collecting leads has never been as much fun! Thanks to our free 5-star plugin, Forminator, you can now create engaging quizzes and capture emails simultaneously.

Plus, you can easily manage your leads, integrate the emails with a 3rd party app (like Mailchimp, Aweber, etc.), automatically run submission reports, and more!

Quizzes are highly engaging, can offer personalized feedback, are interactive, and entertaining. Combine all of these elements with Forminator –the best form builder for WordPress– and you have a powerful and creative way to generate leads in just a few simple steps.

In this article, we’ll be going over how to:

  1. Set Up a Quiz in Forminator to Gather Leads
  2. Customize the Lead Generation Form to Your Specifications
  3. Adjust the Quiz Module Editor
  4. Set Up Email Notifications and Integrations
  5. Implement Quizzes on Your WordPress Site
  6. Easily View Submissions

You’ll have your lead generating quiz up quickly and added to your WordPress site in no time.

So…

I think that’s the best answer, too.

1. Set Up a Quiz in Forminator to Gather Leads

It takes only a switch of a button to get the lead generator feature on your next quiz.

From the Forminator dashboard, simply click Create, name the quiz, and pick whether you want to create a knowledge or personality quiz. When you hit Continue, activate the option for collecting email leads in one-click.

One-click and your quiz is primed for collecting leads.

It’s that simple! There’s nothing more to get your lead generating quiz started.

From here, you’re ready to…

2. Customize the Default Lead Generation Form to Your Specifications

When it comes to adjusting your quiz, you’ll see all of the available options in the Edit section of the dashboard.

Since we’ve covered the basics already on creating a quiz in other articles (check out the quiz section in Getting the Most Out of Forminator for more details), we’ll jump down to Leads.

When you’re in this section, the Lead Generation Form area is where you can customize the default lead generation form. To edit, just click on the pencil in the container that shows the quiz’s name, and it will open up in a new tab.

The lead generation form.
This example is named ‘Test Quiz.’

When you open the new tab, you’ll find the default fields are already in place. These include:

  • HTML
  • Email Address
  • First Name
  • GDPR
Where you edit the fields.
These fields are an excellent start for creating a quiz with lead generation.

Add as many fields as you feel are necessary by clicking Insert Fields. Also, adjust the default ones by clicking on each area’s gear icon.

With Forminator’s drag-and-drop functionality, you can arrange the fields any way you want. Also, delete any fields with one-click.

When it comes to editing the rest of the form, you’ll notice that Email Notifications and Integrations are locked. That’s because these are shared settings between the quiz and form modules. They’re configured back in the quiz editor (which we’ll get to in a moment).

The unaccessable areas to edit.
You can’t access Email Notifications or Integrations from here.

Everything else is accessible and editable.

In the Appearance section, you can pick the form container’s design style, change colors of separate areas, use custom fonts, create an optional border, adjust the spacing, and even add custom CSS.

Blue? Bold? Want a new font? You can do it all from here.

Choose what you want to happen after a form is successfully submitted in the Submission Behavior section.

In terms of validation, you decide if you want validation checks when the user submits the form using Ajax (which is recommended). The live method will inspect fields at the same time as the user fills them out.

Plus, you can enable inline validation with one-click.

Also, the Submission Indicator can be activated to show a loader on your form until it’s submitted.

The submission behavior area.
Choose your validation method and whether you’d like a submission indicator to be displayed.

You can enable autofill, boost security by enabling Honeypot protection & enabling logged in submissions only, and set the life span of the form for submissions.

We’ll add some added protection to this quiz with Honeypot.

In the Settings area, it’s possible to disable the store submissions in your database.

Also, determine how long you want to retain the form’s submission form by the number of days, customize how you’d like to handle erasure requests, and, if your form contains files, decide if the file gets deleted with deleted submissions.

The privacy area where you can edit submissions.
Customize exactly how long you want to retain your form’s submission and more.

The global privacy settings can also be accessed from here, where you can adjust however you’d like.

The global privacy settings.
When clicking the global privacy settings, it opens up in a new tab, and you can adjust.

You’ll also notice that the status is Published. That’s because when created, it’s automatically connected to the quiz module.

The status says it's published.
The status tells you it’s published.

Since it’s published, all you need to do is save any changes by clicking on Update.

Where you'll update to save changes.
Clicking update will save all of your changes.

You can adjust the settings at any time if you ever need to make changes.

3. Adjust the Quiz Module Editor

Now that we have the default lead generation form set up, you can hop back over to the tab that has the quiz editor, and you’ll be able to adjust additional settings.

In the Leads section, you’ll notice that you now have Form Placement and Skip Form options.

Where you'll edit the form placement.
You now have two more areas to adjust since editing the default lead generation form.

Form Placement is where you want to embed the lead generation form. You can choose between the beginning of the quiz or before showing the results.

If you want to give users the option to skip the form, you can enable the Skip Form feature.

Enter a customized message when you enable the Skip Form feature.

You can configure the Appearance and Behavior of the quiz, too. For help with this, please refer to our documentation on Appearance and Behavior.

4. Setting Up Email Notifications and Integrations

We can now get back into the Email Notifications and Integrations area since we set up the lead generation default. They were locked, but are now accessible. This is where we’ll set up email notifications every time a user opts into the quiz.

In the Email Notifications area, set up the Admin Notification and Participant’s Notification.

Where you can adjust the email notifications.
The admin’s email is also displayed here.

In terms of setting up, both of these fields function the same.

You can edit the message to the admin & participants that will go out after opting in, edit what emails the message goes out to, create advanced customizations with the email (e.g. CC & BCC), and add conditions.

Customize email notifications the way you want them.

Plus, in our new form data dropdown list, you can add quiz and form data in the body of your emails.

Add any specific piece of data in the emails that you’d like.

If you have any 3rd party apps integrated with Forminator, you can connect them in the Integrations area. Just click on the plus sign, and that particular app will walk you through on how to connect.

A view of the integrations area.
Easily sync your quiz up with MailChimp, Zapier, and more!

Once connected, you can start collecting the quiz’s data with any supported integrated app.

5. Implement Quizzes on Your WordPress Site

Once you have your quiz set up the way you’d like, hit Publish. Then, Forminator will give you a shortcode that you can use on any post, page, or acceptable widget.

Forminator hands over the shortcode as quick as that. 

Simply copy and paste the code, and that’s it. Your quiz is now ready to collect leads!

6. Easily Viewing Submissions

Viewing and monitoring submissions is quick and easy. The Quizzes dashboard gives you an immediate glimpse of activity.

You can see when the last submission was made, the number of submissions in the last 30 days, and easily access the submissions for a specific quiz.

Forminator's quizzes dashboard.
You can create a new quiz, view submissions, and edit quizzes in Forminator’s dashboard.

To see submissions from a specific quiz, locate the name of the quiz, tap on the gear icon, and then View Submissions.

Where you'll view submissions.
View submissions and much more from the gear icon.

Once you click View Submissions, Forminator brings up all the submissions to that particular quiz. It shows the submission date & time, email address, first name, and information from other fields you included.

Individual submissions display.
The submissions are also numbered by the submission date.

By clicking on the dropdown on individual submissions, you can view detailed information, quiz results, and any details on 3rd party integrations.

All of the field information is displayed here and quiz results.

Want to download the data? That’s a click away.

Click on Export and you can download a CSV file. Plus, you can apply submission filters and schedule exports by specific times, making them automatically emailed directly to you.

Manually or schedule exporting the data.

Q: What’s the Best Lead Generating Quiz Maker Out There?

A: With a 5-star rating and many tens of thousands of active downloads, we have to side with our four-eyed friend as the best lead generating quiz maker because he makes it quick, easy, and free to do.

Plus, Forminator can create contact & registration forms, collect payments, make polls, perform calculations, and much more. He’s continuously updated, thanks to Forminator’s awesome team of developers and designers.

To check out what else is coming out with Forminator, check out our Roadmap. And to learn more, you can always refer to Forminator’s documentation.

Finally, for a quick overview of what we just covered, be sure to watch this short video:

Need a recap? Check out this video.

Happy lead-generating quiz making!