summaryrefslogtreecommitdiff
path: root/modules/story.module
blob: 91bb9ef817a09c054d9c1f917c07244e20b33aad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
// $Id$

function story_help() {
 ?>
  <P>Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at.  Moderators vote whether or not a story should be posted to the front page for discussion.</P>
  <P>Posted stories: published stories accessible to all visitors.</P>
  <P>Dumped stories: rejected stories that are no longer available to visitors.</P>
 <?php
}

function story_form($node) {

  $output = form_textarea(t("Body"), "body", $node->body, 60, 15, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")));

  return $output;
}

function story_save($node) {
  if ($node->nid) {
    if (user_access("administer nodes")) {
      return array();
    }
    else {
      return 0;
    }
  }
  else {
    /*
    ** By default, stories get promoted to the front page and they are
    ** subject to moderation.
    */
    return array("promote" => 1, "moderate" => 1);
  }
}

?>