Skip to content

rotator/openy_gated_content

 
 

Repository files navigation

Open Y Gated content

Development

This is just a set of drupal modules. Install it as you would do with any drupal module.

In development purposes, you might want a set of modules to be enabled. Use openy_gc_demo module for such purposes. Specify modules that you want to be enabled as dependencies of this module. The CI configuration automatially enables this modules, and all its dependencies.

Coding standards

PHPCS

Please find the PHPCS configuration in .phpcs.xml.

In order to use the configuration just run phpcs within the module directory.

eslint

Please find the esling configuration in js/gated-content/.eslintrc.js

To run the check execute npm install && npm lint-no-fix. See js/gated-content/package.json for details.

Automatic code fixing is available with npm lint.

With docksal for openy

The docksal configuration https://github.com/fivejars/docksal-for-openy/tree/openy-gc-builds is used to for building the PR builds.

In order to use it you have to install Docksal.

Follow the instruction below to get the working local environment that provides 4 local websites (1 for each base theme and not yet installed Open Y):

mkdir vymca
cd vymca
git clone --branch openy-gc-builds \
  [email protected]:fivejars/docksal-for-openy.git .docksal
git clone [email protected]:fivejars/openy_gated_content.git
mkdir -p docroot/libraries docroot/sites/default/config/staging
wget -N https://raw.githubusercontent.com/fivejars/openy-project/8.2.x-gated-content-ci/composer.json
docker volume create --name=composer_cache
fin init

Vimeo private videos

For videos, protected from embed by "Specific domains" you can have an issue with thumbnails download to drupal media. For fixing this issue use this code:

core/modules/media/src/OEmbed/ResourceFetcher.php

instead of

$response = $this->httpClient->get($url);

use

$response = $this->httpClient->get($url, [
  'headers' => [
    'Referer' => $_SERVER['HTTP_REFERER'],
  ],
]);

About

Virtual YMCA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 48.6%
  • Vue 32.2%
  • JavaScript 11.5%
  • CSS 7.4%
  • HTML 0.3%