blob: 66870c076f77fda36a627ff327c5cec34e54c5c3 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<?php
// $Id$
function story_node($field) {
$info = array("name" => "story");
return $info[$field];
}
function story_access($op, $node) {
if ($op == "view") {
return $node->nid && $node->status && !$node->moderate;
}
if ($op == "create") {
return 1;
}
if ($op == "update") {
return user_access("administer nodes");
}
if ($op == "delete") {
return user_access("adminster nodes");
}
}
function story_help() {
?>
/*
// TODO: update documentation, outdated
<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) {
return array();
}
else {
return array("promote" => 1, "moderate" => 1);
}
}
?>
|