diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-01-26 22:59:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-01-26 22:59:41 +0000 |
commit | 7415e0b1c8330741cac39f3b10b2b728d8755e72 (patch) | |
tree | 102a6e7c00250a885506b587b1c1ef4421d56b50 /modules/story/story.module | |
parent | e3268ba79b17ca92ba688b8f57bedee0ef164204 (diff) | |
download | brdo-7415e0b1c8330741cac39f3b10b2b728d8755e72.tar.gz brdo-7415e0b1c8330741cac39f3b10b2b728d8755e72.tar.bz2 |
- 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.
Diffstat (limited to 'modules/story/story.module')
-rw-r--r-- | modules/story/story.module | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/modules/story/story.module b/modules/story/story.module index 0a6dedf2b..4394f5f44 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -13,28 +13,14 @@ function story_help($section) { switch ($section) { case 'admin/modules#description': return t('Enables users to submit stories, articles or similar content.'); - case 'admin/settings/story': - return t("Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles."); case 'admin/help#story': return t("Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles. By default, no menu item, or navigation element is created for a story. An extra feature of a story is, that an administrator can specify a submission guideline and enforce a minimum word count for user submitted stories"); - case 'node/add/story': - return variable_get('story_help', ''); case 'node/add#story': return t('Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles.'); } } /** - * Implementation of hook_settings(). - */ -function story_settings() { - $output .= form_textarea(t('Explanation or submission guidelines'), 'story_help', variable_get('story_help', ''), 70, 5, t('This text will be displayed at the top of the story submission form. It is useful for helping or instructing your users.')); - $output .= form_select(t('Minimum number of words'), 'minimum_story_size', variable_get('minimum_story_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t('The minimum number of words a story must be to be considered valid. This can be 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(). */ function story_node_name($node) { @@ -80,17 +66,6 @@ function story_menu($may_cache) { } /** - * Implementation of hook_validate(). - * - * Ensures the story is of adequate length. - */ -function story_validate(&$node) { - if (isset($node->body) && count(explode(' ', $node->body)) < variable_get('minimum_story_size', 0)) { - form_set_error('body', t('The body of your story is too short. You need at least %words words to submit your story.', array('%words' => variable_get('minimum_story_size', 0)))); - } -} - -/** * Implementation of hook_form(). */ function story_form(&$node) { |