Commit 4cd50477 authored by Dries's avatar Dries

- Patch #233301 by catch, skwashd: more blog module clean-up

parent d9f0476f
Drupal 8.0, xxxx-xx-xx (development version)
----------------------
- Removed modules from core
* The following modules have been removed from core, because contributed
modules with similar functionality are available:
* Blog
* Profile
Drupal 7.0, 2011-01-05
----------------------
......
......@@ -151,9 +151,6 @@ Aggregator module
Block module
- John Albin Wilkins 'JohnAlbin' <http://drupal.org/user/32095>
Blog module
- ?
Book module
- Peter Wolanin 'pwolanin' <http://drupal.org/user/49851>
......
......@@ -364,7 +364,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) {
BLOCK_VISIBILITY_NOTLISTED => t('All pages except those listed'),
BLOCK_VISIBILITY_LISTED => t('Only the listed pages'),
);
$description = t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
$description = t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are %user for the current user's page and %user-wildcard for every user page. %front is the front page.", array('%user' => 'user', '%user-wildcard' => 'user/*', '%front' => '<front>'));
if (module_exists('php') && $access) {
$options += array(BLOCK_VISIBILITY_PHP => t('Pages on which this PHP code returns <code>TRUE</code> (experts only)'));
......
......@@ -6,7 +6,7 @@
*
* When enabled, the Drupal comment module creates a discussion
* board for each Drupal node. Users can post comments to discuss
* a forum topic, weblog post, story, collaborative book page, etc.
* a forum topic, story, collaborative book page, etc.
*/
/**
......
......@@ -14,7 +14,7 @@ function dashboard_help($path, $arg) {
$output .= '<dt>' . t('Tracking user activity') . '</dt>';
$output .= '<dd>' . t("By enabling blocks such as <em>Who's online</em> and <em>Who's new</em>, site users can track who is logged in and new user signups at a centralized location.") . '</dd>';
$output .= '<dt>' . t('Tracking content activity') . '</dt>';
$output .= '<dd>' . t('By enabling blocks such as <em>Recent blog posts</em>, <em>New forum topics</em> and <em>Recent comments</em>, site users can view newly added site content at a glance.') . '</dd>';
$output .= '<dd>' . t('By enabling blocks such as <em>New forum topics</em> and <em>Recent comments</em>, site users can view newly added site content at a glance.') . '</dd>';
$output .= '</dl>';
return $output;
......
......@@ -792,7 +792,6 @@ function hook_node_submit($node, $form, &$form_state) {
* the RSS item generated for this node.
* For details on how this is used, see node_feed().
*
* @see blog_node_view()
* @see forum_node_view()
* @see comment_node_view()
*
......@@ -849,8 +848,8 @@ function hook_node_view_alter(&$build) {
* Define module-provided node types.
*
* This hook allows a module to define one or more of its own node types. For
* example, the blog module uses it to define a blog node-type named "Blog
* entry." The name and attributes of each desired node type are specified in
* example, the forum module uses it to define a forum node-type named "Forum
* topic." The name and attributes of each desired node type are specified in
* an array returned by the hook.
*
* Only module-provided node types should be defined through this hook. User-
......@@ -892,10 +891,11 @@ function hook_node_view_alter(&$build) {
*/
function hook_node_info() {
return array(
'blog' => array(
'name' => t('Blog entry'),
'base' => 'blog',
'description' => t('Use for multi-user blogs. Every user gets a personal blog.'),
'forum' => array(
'name' => t('Forum topic'),
'base' => 'forum',
'description' => t('A <em>forum topic</em> starts a new discussion thread within a forum.'),
'title_label' => t('Subject'),
)
);
}
......
......@@ -1319,8 +1319,8 @@ function node_view($node, $view_mode = 'full', $langcode = NULL) {
* Drupal core defines the following view modes for nodes, with the following
* default use cases:
* - full (default): node is being displayed on its own page (node/123)
* - teaser: node is being displayed on the default home page listing, on
* taxonomy listing pages, or on blog listing pages.
* - teaser: node is being displayed on the default home page listing, or on
* taxonomy listing pages.
* - rss: node displayed in an RSS feed.
* If search.module is enabled:
* - search_index: node is being indexed for search.
......
......@@ -24,7 +24,7 @@
* following:
* - node: The current template type, i.e., "theming hook".
* - node-[type]: The current node type. For example, if the node is a
* "Blog entry" it would result in "node-blog". Note that the machine
* "Article" it would result in "node-article". Note that the machine
* name will often be in a short form of the human readable label.
* - node-teaser: Nodes in teaser form.
* - node-preview: Nodes in preview mode.
......@@ -42,7 +42,7 @@
*
* Other variables:
* - $node: Full node object. Contains data that may not be safe.
* - $type: Node type, i.e. story, page, blog, etc.
* - $type: Node type, i.e. page, article, etc.
* - $comment_count: Number of comments attached to the node.
* - $uid: User ID of the node author.
* - $created: Time the node was published formatted in Unix timestamp.
......
......@@ -20,7 +20,7 @@
* @return
* A list of mapping structures, where each mapping is an associative array:
* - type: The name of an entity type (e.g., 'node', 'comment', and so on.)
* - bundle: The name of the bundle (e.g., 'page', 'blog', or
* - bundle: The name of the bundle (e.g., 'page', 'article', or
* RDF_DEFAULT_BUNDLE for default mappings.)
* - mapping: The mapping structure which applies to the entity type and
* bundle. A mapping structure is an array with keys corresponding to
......@@ -46,10 +46,10 @@
function hook_rdf_mapping() {
return array(
array(
'type' => 'node',
'bundle' => 'blog',
'type' => 'comment',
'bundle' => RDF_DEFAULT_BUNDLE,
'mapping' => array(
'rdftype' => array('sioct:Weblog'),
'rdftype' => array('sioc:Post', 'sioct:Comment'),
'title' => array(
'predicates' => array('dc:title'),
),
......@@ -58,9 +58,18 @@ function hook_rdf_mapping() {
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'body' => array(
'changed' => array(
'predicates' => array('dc:modified'),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'comment_body' => array(
'predicates' => array('content:encoded'),
),
'pid' => array(
'predicates' => array('sioc:reply_of'),
'type' => 'rel',
),
'uid' => array(
'predicates' => array('sioc:has_creator'),
'type' => 'rel',
......
......@@ -290,7 +290,7 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
}
/**
* Create a node of type blog and test whether the RDF mapping defined for
* Create a node of type article and test whether the RDF mapping defined for
* this node type in rdf_test.module is used in the node page.
*/
function testAttributesInMarkup1() {
......@@ -301,10 +301,10 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
// Ensure the default bundle mapping for node is used. These attributes come
// from the node default bundle definition.
$blog_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$blog_meta = $this->xpath("//div[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($blog_title), t('Property dc:title is present in meta tag.'));
$this->assertTrue(!empty($blog_meta), t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
$node_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$node_meta = $this->xpath("//div[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($node_title), t('Property dc:title is present in meta tag.'));
$this->assertTrue(!empty($node_meta), t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
}
/**
......
......@@ -295,11 +295,11 @@ function simpletest_log_read($test_id, $prefix, $test_class, $during_test = FALS
* structure is provided below.
*
* @code
* $groups['Blog'] => array(
* 'BlogTestCase' => array(
* 'name' => 'Blog functionality',
* 'description' => 'Create, view, edit, delete, ...',
* 'group' => 'Blog',
* $groups['Block'] => array(
* 'BlockTestCase' => array(
* 'name' => 'Block functionality',
* 'description' => 'Add, edit and delete custom block...',
* 'group' => 'Block',
* ),
* );
* @endcode
......
......@@ -55,18 +55,18 @@ class DrupalMatchPathTestCase extends DrupalWebTestCase {
private function drupalMatchPathTests() {
return array(
// Single absolute paths.
'blog/1' => array(
'blog/1' => TRUE,
'blog/2' => FALSE,
'example/1' => array(
'example/1' => TRUE,
'example/2' => FALSE,
'test' => FALSE,
),
// Single paths with wildcards.
'blog/*' => array(
'blog/1' => TRUE,
'blog/2' => TRUE,
'blog/3/edit' => TRUE,
'blog/' => TRUE,
'blog' => FALSE,
'example/*' => array(
'example/1' => TRUE,
'example/2' => TRUE,
'example/3/edit' => TRUE,
'example/' => TRUE,
'example' => FALSE,
'test' => FALSE,
),
// Single paths with multiple wildcards.
......@@ -102,14 +102,14 @@ class DrupalMatchPathTestCase extends DrupalWebTestCase {
'test/example' => FALSE,
),
// Multiple paths with the \r delimiter.
"user/*\rblog/*" => array(
"user/*\rexample/*" => array(
'user/1' => TRUE,
'blog/1' => TRUE,
'user/1/blog/1' => TRUE,
'user/blog' => TRUE,
'example/1' => TRUE,
'user/1/example/1' => TRUE,
'user/example' => TRUE,
'test/example' => FALSE,
'user' => FALSE,
'blog' => FALSE,
'example' => FALSE,
),
// Multiple paths with the \r\n delimiter.
"test\r\n<front>" => array(
......
......@@ -1202,15 +1202,15 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
* http://drupal.org/node/102338.
*/
function hook_menu() {
$items['blog'] = array(
'title' => 'blogs',
'page callback' => 'blog_page',
$items['example'] = array(
'title' => 'Example Page',
'page callback' => 'example_page',
'access arguments' => array('access content'),
'type' => MENU_SUGGESTED_ITEM,
);
$items['blog/feed'] = array(
'title' => 'RSS feed',
'page callback' => 'blog_feed',
$items['example/feed'] = array(
'title' => 'Example RSS feed',
'page callback' => 'example_feed',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
......@@ -1539,7 +1539,7 @@ function hook_menu_contextual_links_alter(&$links, $router_item, $root_path) {
* page. Some legacy modules may not return structured content at all: their
* pre-rendered markup will be located in $page['content']['main']['#markup'].
*
* Pages built by Drupal's core Node and Blog modules use a standard structure:
* Pages built by Drupal's core Node module use a standard structure:
*
* @code
* // Node body.
......
......@@ -327,14 +327,24 @@ function hook_user_logout($account) {
* @see hook_entity_view()
*/
function hook_user_view($account, $view_mode, $langcode) {
if (user_access('create blog content', $account)) {
$account->content['summary']['blog'] = array(
'#type' => 'user_profile_item',
'#title' => t('Blog'),
'#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($account)))))),
'#attributes' => array('class' => array('blog')),
);
$account->content['user_picture'] = array(
'#markup' => theme('user_picture', array('account' => $account)),
'#weight' => -10,
);
if (!isset($account->content['summary'])) {
$account->content['summary'] = array();
}
$account->content['summary'] += array(
'#type' => 'user_profile_category',
'#attributes' => array('class' => array('user-member')),
'#weight' => 5,
'#title' => t('History'),
);
$account->content['summary']['member_for'] = array(
'#type' => 'user_profile_item',
'#title' => t('Member for'),
'#markup' => format_interval(REQUEST_TIME - $account->created),
);
}
/**
......
......@@ -24,7 +24,7 @@
* following:
* - node: The current template type, i.e., "theming hook".
* - node-[type]: The current node type. For example, if the node is a
* "Blog entry" it would result in "node-blog". Note that the machine
* "Article" it would result in "node-article". Note that the machine
* name will often be in a short form of the human readable label.
* - node-teaser: Nodes in teaser form.
* - node-preview: Nodes in preview mode.
......@@ -42,7 +42,7 @@
*
* Other variables:
* - $node: Full node object. Contains data that may not be safe.
* - $type: Node type, i.e. story, page, blog, etc.
* - $type: Node type, i.e. page, article, etc.
* - $comment_count: Number of comments attached to the node.
* - $uid: User ID of the node author.
* - $created: Time the node was published formatted in Unix timestamp.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment