summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-10-11 08:19:43 (GMT)
committer webchick2012-10-11 08:19:43 (GMT)
commite8df54a0a94656dadc737e5c970ed1e2bf707a2c (patch)
tree7b06c5f99cf4523b5181511317d28390b9c2bd26
parentada22d1637334b57638ad86e61100f79b3e55771 (diff)
I dunno why, but for some reason creating demo content from spark_demo isn't working and I'm too tired to troubleshoot it. Whatever.8.x-1.0-alpha2
-rw-r--r--modules/spark_demo/spark_demo.install2
-rw-r--r--spark.info2
-rw-r--r--spark.install63
3 files changed, 65 insertions, 2 deletions
diff --git a/modules/spark_demo/spark_demo.install b/modules/spark_demo/spark_demo.install
index 158025b..16ecbfd 100644
--- a/modules/spark_demo/spark_demo.install
+++ b/modules/spark_demo/spark_demo.install
@@ -72,6 +72,6 @@ We hope you enjoy playing with Spark! We greatly welcome collaboration; join us
),
);
- $node->save();
+ node_save($node);
}
diff --git a/spark.info b/spark.info
index bce50dc..6287754 100644
--- a/spark.info
+++ b/spark.info
@@ -50,4 +50,4 @@ dependencies[] = gridbuilder
dependencies[] = region
dependencies[] = bunnypoint
;dependencies[] = navbar
-dependencies[] = spark_demo
+;dependencies[] = spark_demo
diff --git a/spark.install b/spark.install
index b5e6de9..1e74fe8 100644
--- a/spark.install
+++ b/spark.install
@@ -456,4 +456,67 @@ Completely synergize resource sucking relationships via premier niche markets. P
);
node_save($node);
+
+ // Create a new 'article' node for testing editing.
+ $node = entity_create('node', array());
+ $node->uid = 1;
+ $node->type = 'article';
+ $node->status = 1;
+ $node->promote = 1;
+
+ // Title and body.
+ // @todo: It would be great to just show this as full node rather than having
+ // to do this "Read More" business. Blocked by http://drupal.org/node/1723126.
+ $node->title = $t('Welcome to Spark!');
+ $node->body['und'][0]['value'] = $t('Welcome to a pre-release version of the <a href="@spark-project-url">Spark distribution</a>! This distribution ties together all of our current D8 core and contrib work into a single distribution to it off. Our goal is to greatly improve the authoring experience of Drupal, through a Drupal 7 distribution that can be used today, but can also be proposed as Drupal 8 core improvements for tomorrow. You can read more about it at <a href="@spark-announce-url">the official announcement</a> or at <a href="@spark-microsite-url">www.sparkdrupal.com</a>. Read on for more info!
+
+<img src="http://drupal.org/files/imagecache/grid-3/project-images/spark_logo.png" alt="Spark Logo" width="193" height="100" data-caption="The Spark logo, complete with a lovely image caption." data-align="right">
+
+Here are the current features of Spark D8:
+
+<ul>
+ <li><strong>"True" WYSIWYG</strong>, courtesy of <a href="@aloha-url">Aloha Editor</a>. Just click "Edit" on this node to check it out. See http://drupal.org/node/1706688 for the "meta" issue on this, for ways in which you can help!</li>
+ <li><strong>Responsive Layout Builder</strong>, courtesy of the <a href="@module-layout-url">Layout</a>, <a href="@module-region-url">Region</a>, <a href="@module-bunnypoint-url">Bunnypoint</a>, and <a href="@module-grid-url">Gridbuilder</a> modules. While core doesn\'t currently have anything to tie these layouts to (we\'re working on the underpinnings in http://drupal.org/node/1787634 — please join us!), you can play around with these modules under Administer >> Structure.</li>
+ <li><strong>Mobile-friendly toolbar</strong> Hey, speaking of navigating, there\'s a new toolbar design from http://drupal.org/node/1137920, intended to work well with mobile browsers and desktops alike! Check it out. :)</li>
+</ul>
+
+We hope you enjoy playing with Spark! We greatly welcome collaboration; join us in the <a href="@spark-issues-url">issue queue</a>!', array(
+ '@spark-project-url' => 'http://drupal.org/project/spark',
+ '@spark-announce-url' => 'http://buytaert.net/announcing-spark-authoring-improvements-for-drupal-7-and-drupal-8',
+ '@spark-microsite-url' => 'http://www.sparkdrupal.com/',
+ '@spark-issues-url' => 'http://drupal.org/project/issues/spark',
+ '@module-edit-url' => 'http://drupal.org/project/edit',
+ '@module-layout-url' => 'http://drupal.org/project/layout',
+ '@module-region-url' => 'http://drupal.org/project/region',
+ '@module-bunnypoint-url' => 'http://drupal.org/project/bunnypoint',
+ '@module-grid-url' => 'http://drupal.org/project/gridbuilder',
+ '@theme-ember-url' => 'http://drupal.org/project/ember',
+ '@aloha-url' => 'http://aloha-editor.org/',
+ '@admin-layout-url' => url('admin/structure/panels/layouts/list/default/edit'),
+));
+ $node->body['und'][0]['format'] = 'filtered_html';
+
+ // Taxonomy.
+ $node->field_tags['und'] = array(
+ array(
+ 'tid' => 'autocreate',
+ 'vid' => 1,
+ 'name' => 'tag 1',
+ 'vocabulary_machine_name' => 'tags',
+ ),
+ array(
+ 'tid' => 'autocreate',
+ 'vid' => 1,
+ 'name' => 'another tag',
+ 'vocabulary_machine_name' => 'tags',
+ ),
+ array(
+ 'tid' => 'autocreate',
+ 'vid' => 1,
+ 'name' => 'yet another tag',
+ 'vocabulary_machine_name' => 'tags',
+ ),
+ );
+
+ node_save($node);
}