diff options
-rw-r--r-- | modules/blog.module | 3 | ||||
-rw-r--r-- | modules/blog/blog.module | 3 | ||||
-rw-r--r-- | modules/book.module | 3 | ||||
-rw-r--r-- | modules/book/book.module | 3 | ||||
-rw-r--r-- | modules/forum.module | 3 | ||||
-rw-r--r-- | modules/forum/forum.module | 3 | ||||
-rw-r--r-- | modules/node.module | 22 | ||||
-rw-r--r-- | modules/node/node.module | 22 | ||||
-rw-r--r-- | modules/page.module | 3 | ||||
-rw-r--r-- | modules/page/page.module | 3 | ||||
-rw-r--r-- | modules/poll.module | 3 | ||||
-rw-r--r-- | modules/poll/poll.module | 3 | ||||
-rw-r--r-- | modules/story.module | 3 | ||||
-rw-r--r-- | modules/story/story.module | 3 |
14 files changed, 56 insertions, 24 deletions
diff --git a/modules/blog.module b/modules/blog.module index d4bded863..39be32ae0 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -12,7 +12,8 @@ function blog_conf_options() { function blog_node($field) { global $user; - $info = array("name" => "personal blog"); + $info["name"] = t("personal blog"); + $info["description"] = t("A blog is your personal diary or journal. It is made up of individual entries that are time stamped and are typically arranged by the day, as normal a diary. Blogs often contain links to things you've seen, or on which you agree/disagree. Since a Blog is your personal, you and only you have full control on what you publish. The most insteresting blogs, or those blogs that fits the site's topic might get promoted to the front page."); return $info[$field]; } diff --git a/modules/blog/blog.module b/modules/blog/blog.module index d4bded863..39be32ae0 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -12,7 +12,8 @@ function blog_conf_options() { function blog_node($field) { global $user; - $info = array("name" => "personal blog"); + $info["name"] = t("personal blog"); + $info["description"] = t("A blog is your personal diary or journal. It is made up of individual entries that are time stamped and are typically arranged by the day, as normal a diary. Blogs often contain links to things you've seen, or on which you agree/disagree. Since a Blog is your personal, you and only you have full control on what you publish. The most insteresting blogs, or those blogs that fits the site's topic might get promoted to the front page."); return $info[$field]; } diff --git a/modules/book.module b/modules/book.module index 129857251..8cc5692e1 100644 --- a/modules/book.module +++ b/modules/book.module @@ -4,7 +4,8 @@ function book_node($field) { global $user; - $info = array("name" => "book page"); + $info["name"] = t("book page"); + $info["description"] = t("A book is a collaborative effort on a certain subject. Users collaborate writing the pages of the book, positioning the pages in the right order, and reviewing or modifying pages previously written. You can add a new book page or you can modify existing pages."); return $info[$field]; } diff --git a/modules/book/book.module b/modules/book/book.module index 129857251..8cc5692e1 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -4,7 +4,8 @@ function book_node($field) { global $user; - $info = array("name" => "book page"); + $info["name"] = t("book page"); + $info["description"] = t("A book is a collaborative effort on a certain subject. Users collaborate writing the pages of the book, positioning the pages in the right order, and reviewing or modifying pages previously written. You can add a new book page or you can modify existing pages."); return $info[$field]; } diff --git a/modules/forum.module b/modules/forum.module index e826fb95e..354b5ad37 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -2,7 +2,8 @@ // $Id$ function forum_node($field) { - $info = array("name" => "discussion forum"); + $info["name"] = t("discussion forum"); + $info["description"] = t("A forum is a threaded discussion, enabling users to communicate about a particular topic."); return $info[$field]; } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index e826fb95e..354b5ad37 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -2,7 +2,8 @@ // $Id$ function forum_node($field) { - $info = array("name" => "discussion forum"); + $info["name"] = t("discussion forum"); + $info["description"] = t("A forum is a threaded discussion, enabling users to communicate about a particular topic."); return $info[$field]; } diff --git a/modules/node.module b/modules/node.module index 2c1b6d3b1..aa9fdb942 100644 --- a/modules/node.module +++ b/modules/node.module @@ -67,7 +67,7 @@ function node_conf_options() { function node_conf_filters() { $output .= form_select(t("Enable HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Allow HTML and PHP tags in user-contributed content.")); - $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<A><B><BLOCKQUOTE><DD><DL><DT><I><LI><OL><U><UL>"), 64, 128, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped.")); + $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<a><b><blockquote><dd><dl><dt><i><li><ol><u><ul>"), 64, 128, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped.")); $output .= "<hr />"; $output .= form_select(t("Enable link tags"), "filter_link", variable_get("filter_link", 0), array("Disabled", "Enabled"), t("Substitute special [[nodesubject|text]] tags. Your browser will display 'text', and when you click on it your browser will open the node with the subject 'nodesubject'. Please be aware that you'll need to copy the subject of the target node exactly in order to use this feature.")); $output .= "<hr />"; @@ -153,7 +153,7 @@ function node_admin_settings($edit = array()) { foreach (module_list() as $name) { if (module_hook($name, "conf_options") && module_hook($name, "node")) { - $output .= "<h3>". t(ucfirst(module_invoke($name, "node", "name")) ." settings") ."</h3>"; + $output .= "<h3>". ucfirst(module_invoke($name, "node", "name") ." settings") ."</h3>"; $output .= module_invoke($name, "conf_options"); } } @@ -174,7 +174,7 @@ function node_admin_edit($node) { ** Edit node: */ - $output .= "<h3>". t("Edit node") ."</h3>"; + $output .= "<h3>". t("Edit") ." ". module_invoke($node->type, "node", "name") ."</h3>"; $output .= node_form($node); @@ -227,7 +227,7 @@ function node_admin_nodes() { $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; $output .= " <tr><th>title</th><th>type</th><th>author</th><th>status</th><th colspan=\"2\">operations</th></tr>\n"; while ($node = db_fetch_object($result)) { - $output .= "<tr><td><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></td><td>$node->type</td><td nowrap=\"nowrap\">". format_name($node) ."</td><td>". ($node->status ? t("published") : t("not published")) ."</td><td nowrap=\"nowrap\"><a href=\"node.php?id=$node->nid\">view node</a></td><td nowrap=\"nowrap\"><a href=\"admin.php?mod=node&op=edit&id=$node->nid\">edit node</a></td></tr>"; + $output .= "<tr><td><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></td><td>$node->type</td><td nowrap=\"nowrap\">". format_name($node) ."</td><td>". ($node->status ? t("published") : t("not published")) ."</td><td nowrap=\"nowrap\"><a href=\"admin.php?mod=node&op=edit&id=$node->nid\">". t("edit node") ."</a></td><td nowrap=\"nowrap\"><a href=\"admin.php?mod=node&op=delete&id=$node->nid\">". t("delete node") ."</a></td></tr>"; } $output .= "</table>"; @@ -365,6 +365,9 @@ function node_admin() { case "edit": print node_admin_edit($id); break; + case "delete": + print node_delete(array("nid" => $id)); + break; case "rollback revision": print node_revision_rollback(node_load(array("nid" => $id)), $revision); print node_admin_edit($id); @@ -613,13 +616,18 @@ function node_add($type) { else { $links = array(); + foreach (module_list() as $name) { - if (($info = module_invoke($name, "node", "name")) && node_access("create", array("type" => $name))) { - $links[] = "<a href=\"module.php?mod=node&op=add&type=$name\">". t($info) ."</a>"; + if (module_hook($name, "node") && node_access("create", array("type" => $name))) { + $output .= "<li>"; + $output .= " <a href=\"module.php?mod=node&op=add&type=$name\">". module_invoke($name, "node", "name") ."</a>"; + $output .= " <div style=\"margin-left: 20px;\">". module_invoke($name, "node", "description") ."</div>"; + $output .= "</li>"; } } - $output .= sprintf(t("Submit a %s."), implode(", ", $links)); + $output = t("Choose the appropriate item from the list:") ."<ul>$output</ul>"; + } return $output; diff --git a/modules/node/node.module b/modules/node/node.module index 2c1b6d3b1..aa9fdb942 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -67,7 +67,7 @@ function node_conf_options() { function node_conf_filters() { $output .= form_select(t("Enable HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Allow HTML and PHP tags in user-contributed content.")); - $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<A><B><BLOCKQUOTE><DD><DL><DT><I><LI><OL><U><UL>"), 64, 128, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped.")); + $output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<a><b><blockquote><dd><dl><dt><i><li><ol><u><ul>"), 64, 128, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped.")); $output .= "<hr />"; $output .= form_select(t("Enable link tags"), "filter_link", variable_get("filter_link", 0), array("Disabled", "Enabled"), t("Substitute special [[nodesubject|text]] tags. Your browser will display 'text', and when you click on it your browser will open the node with the subject 'nodesubject'. Please be aware that you'll need to copy the subject of the target node exactly in order to use this feature.")); $output .= "<hr />"; @@ -153,7 +153,7 @@ function node_admin_settings($edit = array()) { foreach (module_list() as $name) { if (module_hook($name, "conf_options") && module_hook($name, "node")) { - $output .= "<h3>". t(ucfirst(module_invoke($name, "node", "name")) ." settings") ."</h3>"; + $output .= "<h3>". ucfirst(module_invoke($name, "node", "name") ." settings") ."</h3>"; $output .= module_invoke($name, "conf_options"); } } @@ -174,7 +174,7 @@ function node_admin_edit($node) { ** Edit node: */ - $output .= "<h3>". t("Edit node") ."</h3>"; + $output .= "<h3>". t("Edit") ." ". module_invoke($node->type, "node", "name") ."</h3>"; $output .= node_form($node); @@ -227,7 +227,7 @@ function node_admin_nodes() { $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; $output .= " <tr><th>title</th><th>type</th><th>author</th><th>status</th><th colspan=\"2\">operations</th></tr>\n"; while ($node = db_fetch_object($result)) { - $output .= "<tr><td><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></td><td>$node->type</td><td nowrap=\"nowrap\">". format_name($node) ."</td><td>". ($node->status ? t("published") : t("not published")) ."</td><td nowrap=\"nowrap\"><a href=\"node.php?id=$node->nid\">view node</a></td><td nowrap=\"nowrap\"><a href=\"admin.php?mod=node&op=edit&id=$node->nid\">edit node</a></td></tr>"; + $output .= "<tr><td><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></td><td>$node->type</td><td nowrap=\"nowrap\">". format_name($node) ."</td><td>". ($node->status ? t("published") : t("not published")) ."</td><td nowrap=\"nowrap\"><a href=\"admin.php?mod=node&op=edit&id=$node->nid\">". t("edit node") ."</a></td><td nowrap=\"nowrap\"><a href=\"admin.php?mod=node&op=delete&id=$node->nid\">". t("delete node") ."</a></td></tr>"; } $output .= "</table>"; @@ -365,6 +365,9 @@ function node_admin() { case "edit": print node_admin_edit($id); break; + case "delete": + print node_delete(array("nid" => $id)); + break; case "rollback revision": print node_revision_rollback(node_load(array("nid" => $id)), $revision); print node_admin_edit($id); @@ -613,13 +616,18 @@ function node_add($type) { else { $links = array(); + foreach (module_list() as $name) { - if (($info = module_invoke($name, "node", "name")) && node_access("create", array("type" => $name))) { - $links[] = "<a href=\"module.php?mod=node&op=add&type=$name\">". t($info) ."</a>"; + if (module_hook($name, "node") && node_access("create", array("type" => $name))) { + $output .= "<li>"; + $output .= " <a href=\"module.php?mod=node&op=add&type=$name\">". module_invoke($name, "node", "name") ."</a>"; + $output .= " <div style=\"margin-left: 20px;\">". module_invoke($name, "node", "description") ."</div>"; + $output .= "</li>"; } } - $output .= sprintf(t("Submit a %s."), implode(", ", $links)); + $output = t("Choose the appropriate item from the list:") ."<ul>$output</ul>"; + } return $output; diff --git a/modules/page.module b/modules/page.module index a6f81a100..6e33db148 100644 --- a/modules/page.module +++ b/modules/page.module @@ -4,7 +4,8 @@ $GLOBALS["format"] = array(0 => "HTML", 1 => "PHP", 2 => "text"); function page_node($field) { - $info = array("name" => "static page"); + $info["name"] = t("static page"); + $info["description"] = t("If you just want to add a static page with a link in the menu to your site, this would be the best choice. Unlike a story, a page by-passes the submission queue."); return $info[$field]; } diff --git a/modules/page/page.module b/modules/page/page.module index a6f81a100..6e33db148 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -4,7 +4,8 @@ $GLOBALS["format"] = array(0 => "HTML", 1 => "PHP", 2 => "text"); function page_node($field) { - $info = array("name" => "static page"); + $info["name"] = t("static page"); + $info["description"] = t("If you just want to add a static page with a link in the menu to your site, this would be the best choice. Unlike a story, a page by-passes the submission queue."); return $info[$field]; } diff --git a/modules/poll.module b/modules/poll.module index 4f25544e9..13a20573e 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -1,6 +1,9 @@ <?php // $Id$ +// description: +// A multiple choice Poll allows you to submit a question to other users to which anyone can answer. To be published on Tipic, the Poll has to be approved by the moderators. + /* class Poll { diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 4f25544e9..13a20573e 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -1,6 +1,9 @@ <?php // $Id$ +// description: +// A multiple choice Poll allows you to submit a question to other users to which anyone can answer. To be published on Tipic, the Poll has to be approved by the moderators. + /* class Poll { diff --git a/modules/story.module b/modules/story.module index a611b3346..b2b004be3 100644 --- a/modules/story.module +++ b/modules/story.module @@ -9,7 +9,8 @@ function story_conf_options() { } function story_node($field) { - $info = array("name" => "story"); + $info["name"] = t("story"); + $info["description"] = t("A story is a post that is submitted to the attention of other users and is queued in the submission queue. Users and moderators vote on the posts they like or dislike, promoting or demoting them. When a post gets above a certain threshold it gets authomatically published to front page."); return $info[$field]; } diff --git a/modules/story/story.module b/modules/story/story.module index a611b3346..b2b004be3 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -9,7 +9,8 @@ function story_conf_options() { } function story_node($field) { - $info = array("name" => "story"); + $info["name"] = t("story"); + $info["description"] = t("A story is a post that is submitted to the attention of other users and is queued in the submission queue. Users and moderators vote on the posts they like or dislike, promoting or demoting them. When a post gets above a certain threshold it gets authomatically published to front page."); return $info[$field]; } |