From 7415e0b1c8330741cac39f3b10b2b728d8755e72 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 26 Jan 2005 22:59:41 +0000 Subject: - Patch #16192 by Neil: moved the submission guidelines found in forum, story, and blog and the minimum number of words found in story and blog (blog had a slight bug) into the node module. --- modules/blog/blog.module | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'modules/blog/blog.module') diff --git a/modules/blog/blog.module b/modules/blog/blog.module index dc40360c5..304852177 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -6,15 +6,6 @@ * Enables keeping an easily and regularly updated web page or a blog. */ -/** - * Implementation of hook_settings(). - */ -function blog_settings() { - $output = form_textarea(t('Explanation or submission guidelines'), 'blog_help', variable_get('blog_help', ''), 70, 5, t('This text will be displayed at the top of the blog submission form. It is useful for helping or instructing your users.')); - $output .= form_select(t('Minimum number of words in a blog entry'), 'minimum_blog_size', variable_get('minimum_blog_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts.")); - return $output; -} - /** * Implementation of hook_node_name(). */ @@ -68,10 +59,6 @@ function blog_help($section) {

If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link (b) next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.

", array('%scripting-com' => 'http://www.scripting.com/')); case 'admin/modules#description': return t('Enables keeping an easily and regularly updated web page or a blog.'); - case 'admin/settings/blog': - return t("

A weblog is a running journal of a user's ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form.

"); - case 'node/add/blog': - return variable_get('blog_help', ''); case 'node/add#blog': return t("A blog is a regularly updated journal or diary made up of individual posts shown in reversed chronological order. A blog is tightly coupled to the author so each user will have his 'own' blog."); } @@ -192,17 +179,6 @@ function blog_page_last() { print theme('page', $output); } -/** - * Implementation of hook_validate(). - * - * Ensures the blog entry is of adequate length. - */ -function blog_validate(&$node) { - if (isset($node->body) && count(explode(' ', $node->body)) < variable_get('minimum_blog_size', 0)) { - form_set_error('body', t('The body of your blog is too short. You need at least %words words to submit your blog.', array('%words' => variable_get('minimum_story_size', 0)))); - } -} - /** * Implementation of hook_form(). */ -- cgit v1.2.3