- node system:

+ Added the "delete node"-link: apparently it got lost during the last
     commit.  Odd.

   + Changed "Edit node" to "Edit <node_name>" on the 'edit node'-page of
     the admin section.  (There a 4 "Node"s that still need to be removed
     though.)

   + Updated the initial submission page (the old submit.php) to include
     some descriptions.
4.0.x
Dries Buytaert 2001-11-07 18:14:46 +00:00
parent 74a1fe5718
commit 234b40b253
14 changed files with 56 additions and 24 deletions

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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;

View File

@ -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;

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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];
}

View File

@ -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];
}