Process plugin: substr

The substr plugin is used to return part of a string.

process:
  new_text_field
    plugin: substr
    source: some_text_field
      start: 2
      length: 7

The PHP equivalent of this would be:

$destination['new_text_field'] = substr($source['soume_text_field'], 6, 10)

If some_text_field was 'Marie Skłodowska Curie' then $destination['new_text_field'] would be Skłodowska.

Reaction module

Overview

Reaction module provides ability to react on content. Inspired by facebook reactions.

Technically the module will provide the field reaction field type, where this field can be added to any entity type(like Content type, Comment type etc).

How to install the module?

Create a Zen 8.x-7.x sub-theme - Manually (Tested with D8.17, 'zen-8.x-7.0-alpha14' / 'zen-8.x-7.x-dev [2016-Jul-14]')

 

The base Zen theme is designed to be easily extended by its sub-themes. You should Not modify any of the files in the Zen base-theme folder 'zen' at [D8-root]/themes/zen, but, instead, create a sub-theme located outside of the 'zen' base-theme folder. Put you subtheme at [D8-root]/themes/my_zen_subtheme_location.

Moving all PHP files out of the docroot

Traditionally all Drupal core, vendor and module PHP files are in the webserver accessible document root folder. This is a security weakness because it is not necessary to have code files in the docroot. It is possible to run a Drupal 8 site with a clean docroot folder that does not contain code files.

Directory setup

Assuming you have a Drupal 8 folder like this:

Set Windows to "Show hidden files, folders, or drives", and to NOT "Hide extensions for known file types"

If you are using Windows,
it is important that you
set Windows to display hidden files.
And it is even more important
that you display all file extensions.

By default, Windows hides certain files
that it has classified as worthy of being 'hidden'.
And, by default, Windows does not display
certain file extensions.

I have no doubt that MicroSoft did this
to reduce the burden upon
their telephone support department
by reducing the number of calls
from parents whose 2- and 3-year-olds
play 'drums' on the keyboard.

This is, however,
a completely unacceptable situation
for you as you work on your Drupal site,
and you should adjust Windows
to display all files,
and all file extensions.

Pages

Subscribe with RSS Subscribe to RSS - Intermediate