story.module 996 Bytes
Newer Older
Dries's avatar
   
Dries committed
1
<?php
2
// $Id$
Dries's avatar
 
Dries committed
3

Dries's avatar
   
Dries committed
4
5
function story_help() {
 ?>
Dries's avatar
   
Dries committed
6
7
8
  <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>
Dries's avatar
   
Dries committed
9
 <?php
Dries's avatar
   
Dries committed
10
11
}

Dries's avatar
   
Dries committed
12
function story_form($node) {
Dries's avatar
   
Dries committed
13

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

Dries's avatar
   
Dries committed
16
  return $output;
Dries's avatar
   
Dries committed
17
18
}

Dries's avatar
   
Dries committed
19
20
21
22
23
24
25
26
function story_save($node) {
  if ($node->nid) {
    if (user_access("administer nodes")) {
      return array();
    }
    else {
      return 0;
    }
Dries's avatar
   
Dries committed
27
  }
Dries's avatar
   
Dries committed
28
29
30
31
32
33
  else {
    /*
    ** By default, stories get promoted to the front page and they are
    ** subject to moderation.
    */
    return array("promote" => 1, "moderate" => 1);
Dries's avatar
   
Dries committed
34
  }
Dries's avatar
   
Dries committed
35
36
}

Dries's avatar
   
Dries committed
37
?>