Skip to content

Instantly share code, notes, and snippets.

@ultimike
ultimike / style.css
Last active February 10, 2016 18:28
.section-taxonomy h1 {
color: #000;
}
.pane-term-description {
font-size: 0.9em;
font-style: italic;
}
.pane-views-panes h2 {
name: My custom migration
type: module
description: Defines custom migration for external articles.
core: 8.x
package: Custom
dependencies:
- migrate_drupal
- migrate_plus
id: d6_node
label: Nodes
migration_tags:
- Drupal 6
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
source:
plugin: d6_node
process:
nid: nid
vid: vid
id: external_articles
label: External articles
migration_tags:
- Drupal 6
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
migration_group: mygroup
source:
plugin: d6_node
node_type: ext_article
process:
@ultimike
ultimike / bookmarklet.js
Created April 15, 2016 15:19
reddit.com/r/drupaleasypodcast bookmarklet
javascript:(function(){t=document.querySelector('meta[itemprop="name"]');if(!t){t=document.title||""}else{t=t.content}m="http://www.reddit.com/r/drupaleasypodcast/submit?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(t);w=window.open(m,"addwindow");setTimeout(function(){w.focus()},250)})()
id: mygroup
label: My Group
description: Legacy content to be migrated to Drupal 8.
source_type: Drupal 6.
shared_configuration:
source:
key: legacy
$databases['legacy']['default'] = array (
'database' => 'legacy_drupal6site',
'username' => 'db_username',
'password' => 'db_password',
'prefix' => '',
'host' => '127.0.0.1',
'port' => '33067',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
id: internal_article_file
label: Internal article file
migration_tags:
- Drupal 6
migration_group: mygroup
source:
plugin: internal_article_files
process:
# fid: fid
filename: filename
<?php
/**
* @file
* Contains \Drupal\mymodule\Plugin\migrate\source\internalArticleFiles.
*/
namespace Drupal\mymodule\Plugin\migrate\source;
use Drupal\file\Plugin\migrate\source\d6\file;
id: internal_article
label: Internal articles
migration_tags:
- Drupal 6
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
migration_group: vtcoe
source:
plugin: d6_node
node_type: int_article
process: