How to create Paragraph type via programming

My requirement is to create a Paragraph type Paragraph module (https://prnt.sc/voys9a) with some fields textbox and text area. I am thinking to create a simple module which create my paragraph type which i can use every where where my module available. so please guide me how can i create Paragraph type via programming.

Installing Open Social Distribution

I referenced this page https://www.drupal.org/docs/distributions/open-social/installing-open-so... when installing open social distribution.

I performed these steps

1. forked open social source

2. Cloned my repo to my local machine

3. Downloaded and downgraded Composer to 1.9.0 due to lock compatibility issues

How to limit the Message to a role ?

I installed the Message module on my site. I want to set up ads for certain roles. I want to create messages and select the roles that can see the message.

How to limit messages to a role? I don't want to limit the type of message, I want to limit only the message.

How to add field timer field

Hello, 

https://www.drupal.org/project/field_timer

"

  1. Download the module.
  2. To be able to use County and jQuery Countdown plugins download them to libraries/county and libraries/jquery.countdown. This module supports jQuery Countdown 2.1.0.
  3. Enable the module using admin module page or drush."

I followed the steps for D8. Downloaded the libraries as well. Enabled the module (extends > module > enable) Did not use drush. 

How do I darken the background when I click the button ?

I have a button on my site, when I click on it, the background should be darkened.

https://ibb.co/NWCpxpj

It works on all pages of the site :

https://dev.s1biose.com/fr/produit

But it doesn't work on the homepage :

https://dev.s1biose.com/fr

How to make it work on all pages ? Here are my files :

style.css :

How to create a module for password protected pages

Hi,

I'm very new to custom modules and was wondering if it's possible to create a module that basically runs a quick script.

Basically - I want to check if the URL the user is on contains certain things and if so, check for a token (or cookie or something), and if that exists grant access to the page. But if the token doesn't exist send them to a login page where they simply enter a password, and if the password is correct, add the token and grant them access.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x