diff --git a/og_demo/README.md b/og_demo/README.md new file mode 100644 index 00000000..d9e745b7 --- /dev/null +++ b/og_demo/README.md @@ -0,0 +1,26 @@ +# Organic Groups Demo Content + +This is an optional module that will provide some default content to help you get +started or to help you evaluate Organic Groups. + +If you enable this module and decide you do not want to use it, you will need to +delete the configuration and content manually. + +This modules does the following: + +1. Adds a content type called Group and adds the following OG fields: + - Group (allows this content type to be used a group for OG) + - Group Visibility (allows visibility configuration for each group) +2. Adds a content type called Group Content and adds the following OG field: + - Group Audience (allows site admin to assign content of this type to + specific groups) +3. Adds three Groups: + - Theme Developers (Public) + - Documentation (Public) + - Core Development (Private) +4. Adds six pieces of Group Content and assigns two pieces to each group +5. Adds two views to help display the demo content: + - OG Content Demo + - OG Groups Demo +6. Adds a layout 'Groups' that is set for use by all Groups with blocks to display + the above listed views. diff --git a/og_demo/config/field.instance.comment.comment_node_group.comment_body.json b/og_demo/config/field.instance.comment.comment_node_group.comment_body.json new file mode 100644 index 00000000..aa284abf --- /dev/null +++ b/og_demo/config/field.instance.comment.comment_node_group.comment_body.json @@ -0,0 +1,33 @@ +{ + "_config_name": "field.instance.comment.comment_node_group.comment_body", + "field_name": "comment_body", + "label": "Comment", + "entity_type": "comment", + "bundle": "comment_node_group", + "settings": { + "text_processing": 1, + "user_register_form": false + }, + "required": true, + "display": { + "default": { + "label": "hidden", + "type": "text_default", + "weight": 0, + "settings": [], + "module": "text" + } + }, + "description": "", + "deleted": 1, + "default_value": null, + "default_value_function": null, + "widget": { + "type": "text_textarea", + "settings": { + "rows": 5 + }, + "weight": 0, + "module": "text" + } +} diff --git a/og_demo/config/field.instance.comment.comment_node_group_content.comment_body.json b/og_demo/config/field.instance.comment.comment_node_group_content.comment_body.json new file mode 100644 index 00000000..f28ed60f --- /dev/null +++ b/og_demo/config/field.instance.comment.comment_node_group_content.comment_body.json @@ -0,0 +1,33 @@ +{ + "_config_name": "field.instance.comment.comment_node_group_content.comment_body", + "field_name": "comment_body", + "label": "Comment", + "entity_type": "comment", + "bundle": "comment_node_group_content", + "settings": { + "text_processing": 1, + "user_register_form": false + }, + "required": true, + "display": { + "default": { + "label": "hidden", + "type": "text_default", + "weight": 0, + "settings": [], + "module": "text" + } + }, + "description": "", + "deleted": 0, + "default_value": null, + "default_value_function": null, + "widget": { + "type": "text_textarea", + "settings": { + "rows": 5 + }, + "weight": 0, + "module": "text" + } +} diff --git a/og_demo/config/field.instance.node.group.body.json b/og_demo/config/field.instance.node.group.body.json new file mode 100644 index 00000000..41eb1995 --- /dev/null +++ b/og_demo/config/field.instance.node.group.body.json @@ -0,0 +1,44 @@ +{ + "_config_name": "field.instance.node.group.body", + "field_name": "body", + "entity_type": "node", + "bundle": "group", + "label": "Body", + "widget": { + "type": "text_textarea_with_summary", + "settings": { + "rows": 10, + "summary_rows": 5 + }, + "weight": 1, + "module": "text" + }, + "settings": { + "display_summary": true, + "text_processing": 1, + "user_register_form": false + }, + "display": { + "default": { + "label": "hidden", + "type": "text_default", + "settings": [], + "module": "text", + "weight": 1 + }, + "teaser": { + "label": "hidden", + "type": "text_summary_or_trimmed", + "settings": { + "trim_length": 600 + }, + "module": "text", + "weight": 1 + } + }, + "description": "", + "required": 0, + "deleted": 0, + "default_value": null, + "default_value_function": null +} diff --git a/og_demo/config/field.instance.node.group_content.body.json b/og_demo/config/field.instance.node.group_content.body.json new file mode 100644 index 00000000..49771a55 --- /dev/null +++ b/og_demo/config/field.instance.node.group_content.body.json @@ -0,0 +1,44 @@ +{ + "_config_name": "field.instance.node.group_content.body", + "field_name": "body", + "entity_type": "node", + "bundle": "group_content", + "label": "Body", + "widget": { + "type": "text_textarea_with_summary", + "settings": { + "rows": 10, + "summary_rows": 5 + }, + "weight": -3, + "module": "text" + }, + "settings": { + "display_summary": true, + "text_processing": 1, + "user_register_form": false + }, + "display": { + "default": { + "label": "hidden", + "type": "text_default", + "settings": [], + "module": "text", + "weight": 1 + }, + "teaser": { + "label": "hidden", + "type": "text_summary_or_trimmed", + "settings": { + "trim_length": 600 + }, + "module": "text", + "weight": 1 + } + }, + "description": "", + "required": 0, + "deleted": 0, + "default_value": null, + "default_value_function": null +} diff --git a/og_demo/config/layout.layout.groups.json b/og_demo/config/layout.layout.groups.json new file mode 100644 index 00000000..dd8368e1 --- /dev/null +++ b/og_demo/config/layout.layout.groups.json @@ -0,0 +1,288 @@ +{ + "_config_name": "layout.layout.groups", + "path": "node/%", + "name": "groups", + "title": "Groups", + "description": null, + "renderer_name": "standard", + "module": null, + "weight": 0, + "storage": 1, + "layout_template": "moscone_flipped", + "disabled": false, + "settings": { + "title": "", + "title_display": "default", + "title_block": null + }, + "positions": { + "header": [ + "10b99618-7f18-4552-8601-1d9e3f0966ab", + "f61dff87-2ade-4fce-9c4e-78b8c0104438" + ], + "top": [ + "92337cc8-2d88-46a5-9501-1ca974967249", + "25c6d0be-f5cd-4ba6-b500-0e53cb5446bc" + ], + "content": [ + "59ffb3af-86a4-4444-8202-2ccab27e10bf", + "5d2958ef-a8ac-4bd1-a805-5d8b8d4b4780" + ], + "sidebar": [ + "f3d44959-abc1-4a31-8000-f939cefedfa1" + ], + "bottom": [], + "footer": [ + "1c6d1805-0528-48f8-bd07-7d9efdedf1b4" + ], + "title": [] + }, + "contexts": [], + "relationships": [], + "content": { + "10b99618-7f18-4552-8601-1d9e3f0966ab": { + "plugin": "system:header", + "data": { + "status": 1, + "module": "system", + "delta": "header", + "settings": { + "title_display": "default", + "title": "", + "style": "default", + "block_settings": { + "menu": "user-menu", + "logo": 1, + "site_name": 1, + "site_slogan": 1 + }, + "contexts": [] + }, + "uuid": "10b99618-7f18-4552-8601-1d9e3f0966ab", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "f61dff87-2ade-4fce-9c4e-78b8c0104438": { + "plugin": "system:main-menu", + "data": { + "status": 1, + "module": "system", + "delta": "main-menu", + "settings": { + "title_display": "none", + "title": "", + "style": "default", + "block_settings": { + "style": "dropdown", + "level": 1, + "depth": 0 + }, + "contexts": [] + }, + "uuid": "f61dff87-2ade-4fce-9c4e-78b8c0104438", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "92337cc8-2d88-46a5-9501-1ca974967249": { + "plugin": "system:breadcrumb", + "data": { + "status": 1, + "module": "system", + "delta": "breadcrumb", + "settings": { + "title_display": "default", + "title": "", + "style": "default", + "block_settings": [], + "contexts": [] + }, + "uuid": "92337cc8-2d88-46a5-9501-1ca974967249", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "25c6d0be-f5cd-4ba6-b500-0e53cb5446bc": { + "plugin": "system:page_components:title_combo", + "data": { + "status": 1, + "module": "system", + "delta": "page_components", + "settings": { + "title_display": "default", + "title": "", + "style": "default", + "block_settings": [], + "contexts": [], + "title_tag": "h1", + "title_classes": "page-title", + "tab-type": "both", + "tab_type": "both" + }, + "uuid": "25c6d0be-f5cd-4ba6-b500-0e53cb5446bc", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "59ffb3af-86a4-4444-8202-2ccab27e10bf": { + "plugin": "system:main", + "data": { + "status": 1, + "module": "system", + "delta": "main", + "settings": { + "title_display": "default", + "title": "", + "style": "default", + "block_settings": [], + "contexts": [] + }, + "uuid": "59ffb3af-86a4-4444-8202-2ccab27e10bf", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "5d2958ef-a8ac-4bd1-a805-5d8b8d4b4780": { + "plugin": "views:og_content_demo-block_1", + "data": { + "status": 1, + "module": "views", + "delta": "og_content_demo-block_1", + "settings": { + "link_to_view": 0, + "more_link": false, + "use_pager": true, + "pager_id": 0, + "items_per_page": 10, + "offset": 0, + "path": null, + "fields_override": null, + "title_display": "default", + "title": "", + "style": "default", + "block_settings": [], + "contexts": [], + "allowed": [], + "path_override": false, + "exposed": [], + "admin_label": "", + "admin_description": "" + }, + "uuid": "5d2958ef-a8ac-4bd1-a805-5d8b8d4b4780", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "f3d44959-abc1-4a31-8000-f939cefedfa1": { + "plugin": "views:og_groups_demo-block", + "data": { + "status": 1, + "module": "views", + "delta": "og_groups_demo-block", + "settings": { + "link_to_view": 0, + "more_link": false, + "use_pager": false, + "pager_id": 0, + "items_per_page": "10", + "offset": 0, + "path": "groups", + "fields_override": null, + "title_display": "custom", + "title": "All Groups", + "style": "default", + "block_settings": [], + "contexts": [], + "allowed": [], + "path_override": false, + "exposed": [], + "admin_label": "", + "admin_description": "" + }, + "uuid": "f3d44959-abc1-4a31-8000-f939cefedfa1", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + }, + "1c6d1805-0528-48f8-bd07-7d9efdedf1b4": { + "plugin": "system:powered-by", + "data": { + "status": 1, + "module": "system", + "delta": "powered-by", + "settings": { + "title_display": "default", + "title": "", + "style": "default", + "block_settings": [], + "contexts": [] + }, + "uuid": "1c6d1805-0528-48f8-bd07-7d9efdedf1b4", + "style": { + "plugin": "default", + "data": { + "settings": { + "classes": "" + } + } + } + } + } + }, + "conditions": [ + { + "plugin": "node_type", + "data": { + "settings": { + "bundles": [ + "group" + ], + "load_condition_nojs": "Load condition" + } + } + } + ] +} diff --git a/og_demo/config/node.type.group.json b/og_demo/config/node.type.group.json new file mode 100644 index 00000000..5a02454f --- /dev/null +++ b/og_demo/config/node.type.group.json @@ -0,0 +1,50 @@ +{ + "_config_name": "node.type.group", + "type": "group", + "name": "Group", + "base": "node_content", + "module": "node", + "node_preview": "1", + "description": "Use to create groups. ", + "help": "", + "modified": true, + "disabled": false, + "has_title": true, + "title_label": "Title", + "settings": { + "comment_enabled": false, + "comment_default": "1", + "comment_per_page": "50", + "comment_mode": 1, + "comment_anonymous": 0, + "comment_subject_field": 0, + "comment_user_picture": true, + "comment_form_location": 1, + "comment_preview": "1", + "comment_close_enabled": 0, + "comment_close_days": "14", + "menu_default": 0, + "menu_options": { + "main-menu": "main-menu", + "user-menu": 0, + "management": 0 + }, + "menu_parent": "main-menu:0", + "status_default": 1, + "scheduling_enabled": 1, + "promote_enabled": 1, + "promote_default": 0, + "sticky_enabled": 1, + "sticky_default": 0, + "revision_enabled": 1, + "revision_default": 0, + "node_preview": "1", + "node_submitted": 0, + "node_submitted_format": "[node:created:medium] by [node:author]", + "node_user_picture": true, + "hidden_path": 0, + "language": 0, + "node_permissions": true + }, + "orig_type": "group" +} diff --git a/og_demo/config/node.type.group_content.json b/og_demo/config/node.type.group_content.json new file mode 100644 index 00000000..c2a629f2 --- /dev/null +++ b/og_demo/config/node.type.group_content.json @@ -0,0 +1,50 @@ +{ + "_config_name": "node.type.group_content", + "type": "group_content", + "name": "Group Content", + "base": "node_content", + "module": "node", + "node_preview": "1", + "description": "Use for content you would like connected to groups. ", + "help": "", + "modified": true, + "disabled": false, + "has_title": true, + "title_label": "Title", + "settings": { + "comment_enabled": false, + "comment_default": "1", + "comment_per_page": "50", + "comment_mode": 1, + "comment_anonymous": 0, + "comment_subject_field": 0, + "comment_user_picture": true, + "comment_form_location": 1, + "comment_preview": "1", + "comment_close_enabled": 0, + "comment_close_days": "14", + "menu_default": 0, + "menu_options": { + "user-menu": 0, + "management": 0, + "main-menu": 0 + }, + "menu_parent": "main-menu:0", + "status_default": 1, + "scheduling_enabled": 1, + "promote_enabled": 1, + "promote_default": 0, + "sticky_enabled": 1, + "sticky_default": 0, + "revision_enabled": 1, + "revision_default": 0, + "node_preview": "1", + "node_submitted": 0, + "node_submitted_format": "[node:created:medium] by [node:author]", + "node_user_picture": true, + "hidden_path": 0, + "language": 0, + "node_permissions": true + }, + "orig_type": "group_content" +} diff --git a/og_demo/config/views.view.og_content_demo.json b/og_demo/config/views.view.og_content_demo.json new file mode 100644 index 00000000..7cda626a --- /dev/null +++ b/og_demo/config/views.view.og_content_demo.json @@ -0,0 +1,175 @@ +{ + "_config_name": "views.view.og_content_demo", + "name": "og_content_demo", + "description": "Show all content (nodes) of a group.", + "tag": "og", + "disabled": false, + "base_table": "node", + "human_name": "OG content (demo)", + "core": "1", + "display": { + "default": { + "display_title": "Defaults", + "display_plugin": "default", + "display_options": { + "query": { + "type": "views_query", + "options": { + "query_comment": false + } + }, + "access": { + "type": "none" + }, + "cache": { + "type": "none" + }, + "exposed_form": { + "type": "basic" + }, + "pager": { + "type": "full" + }, + "style_plugin": "default", + "row_plugin": "node", + "row_options": { + "links": 1, + "comments": 0 + }, + "empty": { + "area": { + "id": "area", + "table": "views", + "field": "area", + "empty": false, + "content": "There is no content in this group." + } + }, + "relationships": { + "og_membership_rel": { + "id": "og_membership_rel", + "table": "node", + "field": "og_membership_rel", + "required": 0 + } + }, + "sorts": { + "created": { + "id": "created", + "table": "node", + "field": "created", + "order": "DESC" + } + }, + "arguments": { + "gid": { + "id": "gid", + "table": "og_membership", + "field": "gid", + "relationship": "og_membership_rel", + "group_type": "group", + "ui_name": "", + "default_action": "default", + "exception": { + "value": "all", + "title_enable": 0, + "title": "All" + }, + "title_enable": 0, + "title": "", + "breadcrumb_enable": 0, + "breadcrumb": "", + "default_argument_type": "og_context", + "default_argument_options": { + "group_type": "node", + "check_access": "1" + }, + "default_argument_skip_url": 0, + "summary_options": { + "base_path": "", + "count": "1", + "items_per_page": "25", + "override": 0 + }, + "summary": { + "sort_order": "asc", + "number_of_records": "0", + "format": "default_summary" + }, + "specify_validation": 1, + "validate": { + "type": "og", + "fail": "not found" + }, + "validate_options": { + "group_type": "node" + }, + "break_phrase": 0, + "not": 0 + } + }, + "filters": { + "status": { + "id": "status", + "table": "node", + "field": "status", + "value": "1" + }, + "group_type": { + "id": "group_type", + "table": "og_membership", + "field": "group_type", + "relationship": "none", + "group_type": "group", + "ui_name": "", + "operator": "in", + "value": { + "node": "node" + }, + "group": "1", + "exposed": false, + "expose": { + "operator_id": false, + "label": "", + "description": "", + "use_operator": false, + "operator": "", + "identifier": "", + "required": false, + "remember": false, + "multiple": false, + "remember_roles": { + "authenticated": "authenticated" + }, + "reduce": false + }, + "is_grouped": false, + "group_info": { + "label": "", + "description": "", + "identifier": "", + "optional": true, + "widget": "select", + "multiple": false, + "remember": 0, + "default_group": "All", + "default_group_multiple": [], + "group_items": [] + } + } + }, + "title": "" + } + }, + "block_1": { + "display_title": "Block", + "display_plugin": "block", + "display_options": { + "query": { + "type": "views_query", + "options": [] + } + } + } + } +} diff --git a/og_demo/config/views.view.og_groups_demo.json b/og_demo/config/views.view.og_groups_demo.json new file mode 100644 index 00000000..9270a6f6 --- /dev/null +++ b/og_demo/config/views.view.og_groups_demo.json @@ -0,0 +1,176 @@ +{ + "_config_name": "views.view.og_groups_demo", + "name": "og_groups_demo", + "description": "All groups (nodes)", + "module": "og", + "storage": 2, + "tag": "og", + "disabled": false, + "base_table": "node", + "human_name": "OG groups", + "core": "1", + "display": { + "default": { + "display_title": "Master", + "display_plugin": "default", + "display_options": { + "query": { + "type": "views_query", + "options": [] + }, + "access": { + "type": "perm", + "perm": "access content" + }, + "cache": { + "type": "none" + }, + "exposed_form": { + "type": "basic" + }, + "pager": { + "type": "some", + "options": { + "items_per_page": "10", + "offset": "0" + } + }, + "style_plugin": "default", + "row_plugin": "fields", + "fields": { + "title": { + "id": "title", + "table": "node", + "field": "title", + "label": "", + "alter": { + "alter_text": 0, + "make_link": 0, + "absolute": 0, + "trim": 0, + "word_boundary": 0, + "ellipsis": 0, + "strip_tags": 0, + "html": 0 + }, + "hide_empty": 0, + "empty_zero": 0, + "link_to_node": 1 + } + }, + "filters": { + "status": { + "value": 1, + "table": "node", + "field": "status", + "id": "status", + "expose": { + "operator": false + }, + "group": 1 + }, + "group_group_value": { + "id": "group_group_value", + "table": "field_data_group_group", + "field": "group_group_value", + "relationship": "none", + "group_type": "group", + "ui_name": "", + "operator": "or", + "value": { + "1": "1" + }, + "group": "1", + "exposed": false, + "expose": { + "operator_id": false, + "label": "", + "description": "", + "use_operator": false, + "operator": "", + "identifier": "", + "required": false, + "remember": false, + "multiple": false, + "remember_roles": { + "authenticated": "authenticated" + }, + "reduce": false + }, + "is_grouped": false, + "group_info": { + "label": "", + "description": "", + "identifier": "", + "optional": true, + "widget": "select", + "multiple": false, + "remember": 0, + "default_group": "All", + "default_group_multiple": [], + "group_items": [] + }, + "reduce_duplicates": 0 + } + }, + "sorts": { + "created": { + "id": "created", + "table": "node", + "field": "created", + "order": "DESC" + } + }, + "title": "Groups", + "filter_groups": { + "operator": "AND", + "groups": { + "1": "AND" + } + }, + "style_options": { + "grouping": [], + "row_class": "", + "default_row_class": 1, + "row_class_special": 1 + } + } + }, + "block": { + "display_title": "Block", + "display_plugin": "block", + "display_options": { + "query": { + "type": "views_query", + "options": [] + }, + "field": { + "title": { + "link_to_node": 1 + } + }, + "display_description": "" + } + }, + "page_1": { + "display_title": "Page", + "display_plugin": "page", + "display_options": { + "query": { + "type": "views_query", + "options": [] + }, + "path": "groups", + "menu": { + "type": "normal", + "title": "Groups", + "description": "", + "name": "main-menu", + "weight": "0", + "context": 0, + "context_only_inline": 0 + } + } + } + } +} diff --git a/og_demo/og_demo.info b/og_demo/og_demo.info new file mode 100644 index 00000000..6fb78979 --- /dev/null +++ b/og_demo/og_demo.info @@ -0,0 +1,9 @@ +name = Organic groups example +description = "Organic Groups example groups and group content to get started." +package = "Organic groups" +backdrop = 1.x +type = module + +dependencies[] = og +dependencies[] = og_context +dependencies[] = og_ui diff --git a/og_demo/og_demo.install b/og_demo/og_demo.install new file mode 100644 index 00000000..cdffb27a --- /dev/null +++ b/og_demo/og_demo.install @@ -0,0 +1,144 @@ + array( + 'title' => st('Theme Developers'), + 'body' => st('

This group is for folks working on new themes for Backdrop CMS.

'), + 'private' => '0', + ), + 'documentation' => array( + 'title' => st('Documentation'), + 'body' => st('

A place for folks to coordinate efforts at improving Backdrop CMS documentation.

'), + 'private' => '0', + ), + 'core_development' => array( + 'title' => st('Core Development'), + 'body' => st('

Join this group for the latest information about core development priorities.

'), + 'private' => '1', + ), + ); + + foreach ($groups as $group_id => $info) { + $group = new Node( + array( + 'title' => $info['title'], + 'body' => array( + LANGUAGE_NONE => array( + array( + 'value' => $info['body'], + 'format' => 'filtered_html', + ), + ), + ), + 'group_access' => array( + LANGUAGE_NONE => array( + array( + 'value' => $info['private'], + ), + ), + ), + 'uid' => 1, + 'status' => 1, + 'promote' => 0, + 'type' => 'group', + ) + ); + node_save($group); + $groups[$group_id]['nid'] = $group->nid; + } + + $group_content = array( + array( + 'title' => st('Refence Module in Core'), + 'body' => st('

Move the Entity Reference contrib module into core. It has been refactored to remove any external dependencies. Entity Reference is the most obvious candidate based on the following advantages:

  1. It has the highest install count.
  2. It has the most flexible API and number of extending modules.
  3. It is a proven solution and includes an upgrade path for D7 Entity Reference users.
  4. '), + 'group' => 'core_development', + ), + array( + 'title' => st('What is a theme?'), + 'body' => st('

    A theme is a collection of files which define the presentation layer of a Backdrop site. The theme determines the appearance of a site. You can also create one or more "sub-themes" or variations on a theme. Only the .info file is required, but most themes and sub-themes will use other files as well.

    On the surface, sub-themes behave just like any other theme. The only difference is that they inherit the resources from their parent themes. To create one, a "base theme" entry inside the .info file is needed. From there it will inherit the resources from its parent theme. There can be multiple levels of inheritance; i.e., a sub-theme can declare another sub-theme as its base. There are no hard set limits to this.

    '), + 'group' => 'theme_developers', + ), + array( + 'title' => st('Contribute to Documentation'), + 'body' => st('

    You can help the Backdrop community by contributing to the documentation on this site. Documentation of code is created by the API module from docblock comments within the code, so changes to code documentation are made by submitting a pull request as you would make for any other code change.

    '), + 'group' => 'documentation', + ), + array( + 'title' => st('The Backdrop CMS User Guide'), + 'body' => st('

    The User Guide is a detailed "How-To" for practically everything you need to know to create, customize, and manage a Backdrop website and is intended for people who may be new to content management systems in general and to the Backdrop CMS in particular.

    '), + 'group' => 'documentation', + ), + array( + 'title' => st('Core Developers'), + 'body' => st('

    Core developers should fight the urge to refactor, because small changes in core may result in large changes for contrib. Each major change will be weighed carefully against the principles of the project to determine if the improvements it offers are worth the cost of that change. If a decision is not immediately clear, the issue should be escalated to the Project Management Committee.

    '), + 'group' => 'core_development', + ), + array( + 'title' => st('Layouts'), + 'body' => st('

    The most important consideration when converting themes to Backdrop is the concept that your theme is no longer responsible for the layout of a site. This is because of the introduction of Layout module, Backdrop drag and drop page layout builder.

    Layout module now provides ten responsive layout templates including a multi-region stacked layout similar to what was provided in the Bartik theme for Drupal 7.

    In the Layouts interface, blocks are provided to place the site header, main navigation, search box, and so on. All these elements can be rearranged by dragging and dropping these blocks into the regions provided by the layout template.

    Porting a theme mainly now consists of the application of the old themes style to the new theme. Once this is understood, the conversion itself should be reasonably straightforward.

    '), + 'group' => 'theme_developers', + ), + ); + + foreach ($group_content as $info) { + $content = new Node( + array( + 'title' => $info['title'], + 'body' => array( + LANGUAGE_NONE => array( + array( + 'value' => $info['body'], + 'format' => 'filtered_html', + ), + ), + ), + 'og_group_ref' => array( + LANGUAGE_NONE => array( + array( + 'target_id' => $groups[$info['group']]['nid'], + ), + ), + ), + 'uid' => 1, + 'status' => 1, + 'promote' => 0, + 'type' => 'group_content', + ) + ); + node_save($content); + } + + // Update the menu router information. + menu_rebuild(); + + // Rebuild permissions + node_access_rebuild(); +} diff --git a/og_demo/og_demo.module b/og_demo/og_demo.module new file mode 100644 index 00000000..f4e38cce --- /dev/null +++ b/og_demo/og_demo.module @@ -0,0 +1,6 @@ +