first commit

This commit is contained in:
2024-07-15 12:33:27 +02:00
commit ce50ae282b
22084 changed files with 2623791 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="alternate" href="photo_flickr.json"
type="application/json+oembed" title="Druplicon FTW!">
</head>
<body></body>
</html>

View File

@@ -0,0 +1,12 @@
{
"type": "photo",
"title": "Druplicon FTW!",
"width": "88",
"height": "100",
"url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_width": 88,
"thumbnail_height": 100,
"provider_name": "Flickr",
"version": "1.0"
}

View File

@@ -0,0 +1,10 @@
{
"type": "photo",
"title": "Druplicon FTW!",
"url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_width": 88,
"thumbnail_height": 100,
"provider_name": "Flickr",
"version": "1.0"
}

View File

@@ -0,0 +1,105 @@
[
{
"provider_name": "Vimeo",
"provider_url": "https:\/\/vimeo.com\/",
"endpoints": [
{
"schemes": [
"https:\/\/vimeo.com\/*",
"https:\/\/vimeo.com\/album\/*\/video\/*",
"https:\/\/vimeo.com\/channels\/*\/*",
"https:\/\/vimeo.com\/groups\/*\/videos\/*",
"https:\/\/vimeo.com\/ondemand\/*\/*",
"https:\/\/player.vimeo.com\/video\/*"
],
"url": "https:\/\/vimeo.com\/api\/oembed.{format}",
"discovery": true
}
]
},
{
"provider_name": "Twitter",
"provider_url": "http:\/\/www.twitter.com\/",
"endpoints": [
{
"schemes": [
"https:\/\/twitter.com\/*\/status\/*",
"https:\/\/*.twitter.com\/*\/status\/*"
],
"url": "https:\/\/publish.twitter.com\/oembed"
}
]
},
{
"provider_name": "Dailymotion",
"provider_url": "https:\/\/www.dailymotion.com\/",
"endpoints": [
{
"schemes": [
"https:\/\/www.dailymotion.com\/video\/*"
],
"url": "https:\/\/www.dailymotion.com\/services\/oembed",
"discovery": true
}
]
},
{
"provider_name": "Flickr",
"provider_url": "http:\/\/www.flickr.com\/",
"endpoints": [
{
"schemes": [
"http:\/\/*.flickr.com\/photos\/*",
"http:\/\/flic.kr\/p\/*"
],
"url": "http:\/\/www.flickr.com\/services\/oembed\/",
"discovery": true
}
]
},
{
"provider_name": "YouTube",
"provider_url": "https://www.youtube.com/",
"endpoints": [
{
"schemes": [
"https://*.youtube.com/watch*",
"https://*.youtube.com/v/*\"",
"https://youtu.be/*"
],
"url": "https://www.youtube.com/oembed",
"discovery": true
}
]
},
{
"provider_name": "Facebook",
"provider_url": "https:\/\/www.facebook.com\/",
"endpoints": [
{
"schemes": [
"https:\/\/www.facebook.com\/*\/posts\/*",
"https:\/\/www.facebook.com\/photos\/*",
"https:\/\/www.facebook.com\/*\/photos\/*",
"https:\/\/www.facebook.com\/photo.php*",
"https:\/\/www.facebook.com\/photo.php",
"https:\/\/www.facebook.com\/*\/activity\/*",
"https:\/\/www.facebook.com\/permalink.php",
"https:\/\/www.facebook.com\/media\/set?set=*",
"https:\/\/www.facebook.com\/questions\/*",
"https:\/\/www.facebook.com\/notes\/*\/*\/*"
],
"url": "https:\/\/www.facebook.com\/plugins\/post\/oembed.json",
"discovery": true
},
{
"schemes": [
"https:\/\/www.facebook.com\/*\/videos\/*",
"https:\/\/www.facebook.com\/video.php"
],
"url": "https:\/\/www.facebook.com\/plugins\/video\/oembed.json",
"discovery": true
}
]
}
]

View File

@@ -0,0 +1,13 @@
{
"url": "https:\/\/twitter.com\/drupaldevdays\/status\/935643039741202432",
"author_name": "Drupal Dev Days",
"author_url": "https:\/\/twitter.com\/drupaldevdays",
"html": "<h1>Twitter works!</h1>",
"width": 550,
"height": null,
"type": "rich",
"cache_age": "3153600000",
"provider_name": "Twitter",
"provider_url": "https:\/\/twitter.com",
"version": "1.0"
}

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="alternate" href="video_dailymotion.xml"
type="application/xml+oembed" title="#d8rules - Support the Rules module for Drupal 8">
</head>
<body></body>
</html>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
<type>video</type>
<version>1.0</version>
<title>#d8rules - Support the Rules module for Drupal 8</title>
<https/>
<author_name>Leepchic</author_name>
<author_url>https://www.dailymotion.com/leepchic</author_url>
<provider_name>Dailymotion</provider_name>
<provider_url>https://www.dailymotion.com</provider_url>
<width>610</width>
<height>343</height>
<html><h1>Dailymotion works!</h1>
</html>
<!-- The thumbnail URL does not contain a file extension, so we use
this to test the oEmbed source plugin's thumbnail handling;
see \Drupal\Tests\media\FunctionalJavascript\MediaSourceOEmbedVideoTest. -->
<thumbnail_url>internal:/media_test_oembed/thumbnail</thumbnail_url>
<thumbnail_width>88</thumbnail_width>
<thumbnail_height>100</thumbnail_height>
</oembed>

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="alternate" href="video_vimeo-no-title.json"
type="application/json+oembed" title="">
</head>
<body></body>
</html>

View File

@@ -0,0 +1,16 @@
{
"type": "video",
"version": "1.0",
"provider_name": "Vimeo",
"provider_url": "https:\/\/vimeo.com\/",
"title": "",
"author_name": "Tendenci - The Open Source AMS",
"author_url": "https:\/\/vimeo.com\/schipul",
"html": "<iframe width=\"480\">Vimeo works!</iframe>",
"width": 480,
"height": 360,
"description": "Special thanks to Tendenci, formerly Schipul for sponsoring this video with training, equipment and time. The open source way. All creative however was self directed by the individuals - A. Hughes (www.schipul.com\/ahughes) featuring QCait (www.schipul.com\/qcait) - Hands On Drupal\n\nDrupal is a free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website.\n\nNeed a little Drupal help or just want to geek out with us? Visit our www.schipul.com\/drupal for more info - we'd love to connect!\n\nGo here for Drupal Common Terms and Suggested Modules : http:\/\/schipul.com\/en\/helpfiles\/v\/229",
"thumbnail_url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_width": 295,
"thumbnail_height": 221
}

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="alternate" href="video_vimeo-resized.json"
type="application/json+oembed" title="Drupal Rap Video - Schipulcon09">
</head>
<body></body>
</html>

View File

@@ -0,0 +1,16 @@
{
"type": "video",
"version": "1.0",
"provider_name": "Vimeo",
"provider_url": "https:\/\/vimeo.com\/",
"title": "Drupal Rap Video - Schipulcon09",
"author_name": "Tendenci - The Open Source AMS",
"author_url": "https:\/\/vimeo.com\/schipul",
"html": "<iframe width=\"100\">By the power of Grayskull, Vimeo works!</iframe>",
"width": 100,
"height": 67,
"description": "Special thanks to Tendenci, formerly Schipul for sponsoring this video with training, equipment and time. The open source way. All creative however was self directed by the individuals - A. Hughes (www.schipul.com\/ahughes) featuring QCait (www.schipul.com\/qcait) - Hands On Drupal\n\nDrupal is a free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website.\n\nNeed a little Drupal help or just want to geek out with us? Visit our www.schipul.com\/drupal for more info - we'd love to connect!\n\nGo here for Drupal Common Terms and Suggested Modules : http:\/\/schipul.com\/en\/helpfiles\/v\/229",
"thumbnail_url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_width": 100,
"thumbnail_height": 67
}

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="alternate" href="video_vimeo.json"
type="application/json+oembed" title="Drupal Rap Video - Schipulcon09">
</head>
<body></body>
</html>

View File

@@ -0,0 +1,16 @@
{
"type": "video",
"version": "1.0",
"provider_name": "Vimeo",
"provider_url": "https:\/\/vimeo.com\/",
"title": "Drupal Rap Video - Schipulcon09",
"author_name": "Tendenci - The Open Source AMS",
"author_url": "https:\/\/vimeo.com\/schipul",
"html": "<iframe width=\"480\">Vimeo works!</iframe>",
"width": 480,
"height": 360,
"description": "Special thanks to Tendenci, formerly Schipul for sponsoring this video with training, equipment and time. The open source way. All creative however was self directed by the individuals - A. Hughes (www.schipul.com\/ahughes) featuring QCait (www.schipul.com\/qcait) - Hands On Drupal\n\nDrupal is a free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website.\n\nNeed a little Drupal help or just want to geek out with us? Visit our www.schipul.com\/drupal for more info - we'd love to connect!\n\nGo here for Drupal Common Terms and Suggested Modules : http:\/\/schipul.com\/en\/helpfiles\/v\/229",
"thumbnail_url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_width": 295,
"thumbnail_height": 221
}

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html lang="nl">
<head>
<link rel="alternate" href="video_youtube.json"
type="application/json+oembed" title="Everyday I'm Drupalin' Drupal Rap (Rick Ross - Hustlin)">
</head>
<body></body>
</html>

View File

@@ -0,0 +1,15 @@
{
"type": "video",
"version": "1.0",
"provider_name": "YouTube",
"provider_url": "https:\/\/www.youtube.com\/",
"title": "Everyday I'm Drupalin' Drupal Rap (Rick Ross - Hustlin)",
"author_name": "Mirakolous",
"author_url": "https:\/\/www.youtube.com\/user\/Mirakolous",
"html": "<h1>YouTube works!</h1>",
"width": 480,
"height": 270,
"thumbnail_url": "internal:\/core\/misc\/druplicon.png",
"thumbnail_width": 480,
"thumbnail_height": 360
}

View File

@@ -0,0 +1,83 @@
<?php
/**
* @file
* Test oembed update by adding an oembed field display without config.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Add a remote video media type.
$media_type = [];
$media_type['langcode'] = 'en';
$media_type['status'] = TRUE;
$media_type['dependencies'] = [];
$media_type['id'] = 'remote_video';
$media_type['uuid'] = 'c86d3b5c-b788-49ab-a06c-257895e47731';
$media_type['label'] = 'Remote video';
$media_type['description'] = 'A remotely hosted video from YouTube or Vimeo.';
$media_type['source'] = 'oembed:video';
$media_type['queue_thumbnail_downloads'] = FALSE;
$media_type['new_revision'] = TRUE;
$media_type['source_configuration'] = [
'source_field' => 'field_media_oembed_video',
'thumbnails_directory' => 'public://oembed_thumbnails/[date:custom:Y-m]',
'providers' => [
'YouTube',
'Vimeo',
],
];
$media_type['field_map'] = [
'title' => 'name',
];
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'media.type.remote_video',
'data' => serialize($media_type),
])
->execute();
// Add a remote video view display.
$display = [];
$display['langcode'] = 'en';
$display['status'] = TRUE;
$display['dependencies']['config'][] = 'media.type.remote_video';
$display['dependencies']['module'][] = 'media';
$display['id'] = 'media.remote_video.default';
$display['uuid'] = 'ff13f7fb-d493-4d45-a56d-31a1a0762df7';
$display['targetEntityType'] = 'media';
$display['bundle'] = 'remote_video';
$display['mode'] = 'default';
$display['content']['field_media_oembed_video'] = [
'type' => 'oembed',
'label' => 'hidden',
'settings' => [
'max_width' => 0,
'max_height' => 0,
],
'third_party_settings' => [],
'weight' => 0,
'region' => 'content',
];
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'core.entity_view_display.media.remote_video.default',
'data' => serialize($display),
])
->execute();

View File

@@ -0,0 +1,70 @@
<?php
// phpcs:ignoreFile
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Set the schema version.
$connection->merge('key_value')
->fields([
'value' => 'i:8700;',
'name' => 'media',
'collection' => 'system.schema',
])
->condition('collection', 'system.schema')
->condition('name', 'media')
->execute();
// Update core.extension.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$extensions['module']['media'] = 0;
$connection->update('config')
->fields(['data' => serialize($extensions)])
->condition('collection', '')
->condition('name', 'core.extension')
->execute();
// Add all media_removed_post_updates() as existing updates.
require_once __DIR__ . '/../../../../media/media.post_update.php';
$existing_updates = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'post_update')
->condition('name', 'existing_updates')
->execute()
->fetchField();
$existing_updates = unserialize($existing_updates);
$existing_updates = array_merge(
$existing_updates,
array_keys(media_removed_post_updates())
);
$connection->update('key_value')
->fields(['value' => serialize($existing_updates)])
->condition('collection', 'post_update')
->condition('name', 'existing_updates')
->execute();
// Create media.settings.
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'media.settings',
'data' => serialize([
'icon_base_uri' => 'public://media-icons/generic',
'iframe_domain' => '',
'oembed_providers_url' => 'https://oembed.com/providers.json',
'standalone_url' => FALSE,
]),
])
->execute();