Skip to content

Commit fb62f01

Browse files
committed
Updating some text and removing default post
1 parent 10a0c06 commit fb62f01

File tree

4 files changed

+35
-11
lines changed

4 files changed

+35
-11
lines changed

content/500.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<p>This is a post.</p>
2+
3+
<p>A <em>Post</em> is a type of content ideal for timely information about what is important to your organization. Press releases, news articles, and site announcements are often created as Posts. A Post will also display the date it was created, and the name of the person who created it.&nbsp;By default, a Post may include a comment form.</p>
4+
5+
<p>The Welcome module includes a view of recent 'promoted' posts on the front page, a view of the five most recent pieces of content (including posts) in the footer, and a paginated view of all posts on the 'News' page.</p>

content/501.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<p>This is a post.</p>
22

3-
<p>This post is displayed as part of a <em>view</em> of "promoted content" on the front page.</p>
3+
<p>This post is displayed on the home page as part of a <em>view</em> of "promoted content".</p>
44

5-
<p>You can decide which types of content are able to be promoted and then decide which individual pieces of content you wish to promote. At this time, Posts are promoted by default, but you can change that setting in the Publishing settings on configuration page for each content type (<em>/admin/structure/types/manage/post</em>).</p>
5+
<p>You can decide which types of content are able to be promoted and then decide which individual pieces of content you wish to promote. At this time, Posts are promoted by default, but you can change that setting in the Publishing settings on configuration page for each Content Type (<em>/admin/structure/types/manage/post</em>).</p>
66

77
<p>&nbsp;</p>
88

content/503.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<p><a href="https://events.backdropcms.org/">Backdrop LIVE</a> is an online global event for people who use Backdrop CMS, or want to learn more about it.</p>
22

3+
<p><img alt="" src="https://simplo.site/files/backdrop-live.png" /></p>
4+
35
<p>Backdrop LIVE is a dynamic and interactive event, designed to facilitate the sharing of information and lessons learned, as well as an opportunity to build the Backdrop community and plan for the future.</p>
46

57
<p>The goal of this event is for everyone to participate conversations. The discussions are not recorded. Facilitators for each discussion are asked to lead the conversation, but slides and presentations are discouraged.</p>

welcome.install

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,33 @@
2121
node_save($page);
2222
}
2323

24+
// Checking to see if "Your first post" node still exists
25+
$query = new EntityFieldQuery();
26+
$entities = $query->entityCondition('entity_type', 'node')
27+
->propertyCondition('type', 'post')
28+
->propertyCondition('title', 'Your first post!')
29+
->propertyCondition('status', 1)
30+
->range(0,1)
31+
->execute();
32+
33+
if (!empty($entities['node'])) {
34+
$about = node_load(array_shift(array_keys($entities['node'])));
35+
}
36+
// If default post still exists, unpublish it.
37+
if (!empty($about)) {
38+
$post = node_load($about->nid);
39+
$post->status = '0';
40+
node_save($post);
41+
}
42+
2443
$pages = array(
44+
'500' => array(
45+
'title' => st('What are posts?'),
46+
'body' => '500',
47+
'type' => 'post',
48+
'promote' => '1',
49+
'tags' => array('Promoted Content','Posts'),
50+
),
2551
'501' => array(
2652
'title' => st('Promoted Content'),
2753
'body' => '501',
@@ -197,15 +223,6 @@
197223
config_set('filter.format.filtered_html', 'filters.video_filter.weight', '-2');
198224
config_set('filter.format.filtered_html', 'filters.filter_url.weight', '-1');
199225

200-
// Changing the text in the default post provided by standard install profile
201-
$nodes = node_load_multiple(NULL, array("title" => "Your first post!"));
202-
$node = current($nodes);
203-
$content = file_get_contents($module_path . '/content/post.txt');
204-
$node->body[LANGUAGE_NONE][0]['value'] = $content;
205-
$node->created = time() - '2600000';
206-
node_save($node);
207-
208-
209226
// Prepping new image to use in hero block of front page.
210227
$field_image_dir = 'public://hero';
211228
file_prepare_directory($field_image_dir, FILE_CREATE_DIRECTORY);

0 commit comments

Comments
 (0)