This is a new liveblogging module for the Drupal distribution Thunder.
This module concentrates on providing the best User Experience for the editor as possible.
The Liveblog consists of following structure:
- A lead article at the top
- Followed by the liveblog, which consists of
- individual entries/items,
- with different content types (Text/Image/Twitter...),
- which updates automatically
It is recommended to apply a patch for the Inline Entity Form module:
- Issue: Entities are not updated during buildEntity() phase
- Patch https://www.drupal.org/files/issues/ief_building.patch
The default method to push new posts to your users is via the Pusher service.
You have to register an account for it here: https://pusher.com/. Please note down
the App ID, Key and Secret.
You also need the pusher library. See here for instructions: https://github.com/pusher/pusher-http-php
If you are not using a composer workflow, you can download the library here: https://github.com/pusher/pusher-http-php/releases.
Extract it into your libraries folder (libraries
or sites/<domain>/libraries
) and rename it to pusher
.
The library should contain the path lib/Pusher.php
- Activate the Liveblog and the Liveblog Pusher modules.
- optionally activate Liveblog Paragraphs for a preconfigured paragraphs integration
- Navigate to http://example.com/admin/config/content/liveblog
- configure the pusher service with the information given by Pusher
- Create a new Liveblog content type.
- Select which default highlights the editors can choose
- Set how much posts should be loaded on initial load and on lazyloading.
- Click on save.
- When you are logged in and view the liveblog, you will see a form and below that, the stream.
- Fill out the form
- Preview it
- Save it
- The post appears in the stream immediately
You can view all posts on your site by navigating to http://example.com/admin/content/liveblog_posts
You can manage the fields of the liveblog posts at http://example.com/admin/structure/liveblog_post_settings/fields (in menu: Structure -> Liveblog posts)
Highlights add a class to the post, according to the selected one, e.g. when you
select Breaking News, the class
liveblog-post--highlight-breaking-news
will be added to the post in the DOM.
They can then be styled via css in your theme.
You can add your own highlights to the Highlight taxonomy.
Make sure to use your DB connection details for the SIMPLETEST_DB and the URL to your local Drupal installation for SIMPLETEST_BASE_URL.
cd /path/to/drupal-8/core
export SIMPLETEST_DB=mysql://drupal-8:password@localhost/drupal-8
export SIMPLETEST_BASE_URL=http://drupal-8.localhost
../vendor/bin/phpunit ../modules/liveblog
See https://www.drupal.org/docs/8/phpunit/running-phpunit-tests (Section: Run kernel test and browser tests) for more details.