Commit 43db9cf8 authored by Dries's avatar Dries

- common.inc:
   + Made '$na' translatable on popular demand.

- node.module:
   + replaced a confusing configuration description, as suggested by
     Remco.

- statistics.module:
   + Added a 'most recent referers'-table sorted by timestamp.

- drupal.module:
   + Small update of the links.
parent 6a21940c
......@@ -13,20 +13,22 @@ function drupal_page() {
$theme->header();
$output = " <P>Drupal is the English pronunciation for the Dutch word 'druppel' which stands for 'drop'. Drupal is a full-featured <I>content management/discussion engine</I> suitable to setup a news-driven community or portal site. Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design Drupal is flexible and easy to adapt or extend.</P>\n";
$output = " <P>Drupal is the English pronunciation for the Dutch word '<A HREF=\"http://www.drupal.org/\">druppel</A>' which stands for '<A HREF=\"http://www.drop.org/\">drop</A>'. Drupal is a full-featured <I>content management/discussion engine</I> suitable to setup a news-driven community or portal site. Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design Drupal is flexible and easy to adapt or extend.</P>\n";
$output .= " <P>Drupal is primarily written by Dries Buytaert (dries&#64;drop.org) and built after <A HREF=\"http://slashcode.com/\">Slash</A> and <A HREF=\"http://scoop.kuro5hin.org/\">Scoop</A>. Drupal uses <A HREF=\"http://www.php.net/\">PHP</A> and <A HREF=\"http://www.mysql.com/\">MySQL</A> and is a valuable alternative for <A HREF=\"http://phpnuke.org/\">PHP-Nuke</A>, <A HREF=\"http://thatware.org/\">ThatWare</A>, <A HREF=\"http://geeklog.org/\">GeekLog</A> and so on. The source code is available under terms of GNU General Public License (GPL).</P>\n";
$output .= " <P>We don't have a real demo site yet but Drupal is used by (and created for) <A HREF=\"http://drop.org/\">http://drop.org/</A>. Create an account, play with it for a bit, read the <A HREF=\"node.php?title=drupal+handbook\">documentation</A> and spend some time getting used to it.</P>\n";
$output .= " <P>We don't have a real demo site yet but Drupal is used by (and created for) <A HREF=\"http://www.drop.org/\">http://www.drop.org/</A>. Create an account, play with it for a bit, read the <A HREF=\"node.php?title=drupal+handbook\">documentation</A> and spend some time getting used to it.</P>\n";
$theme->box("Drupal", $output);
$output = "<H3>Download Drupal</H3>\n";
$output .= " <LI><A HREF=\"drupal/drupal-2.00.tgz\">Drupal 2.00</A> (2001/03/15 - latest version)</LI>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/drupal/drupal-2.00.tgz\">Drupal 2.00</A> (2001/03/15 - latest version)</LI>\n";
$output .= " <LI>Drupal 1.00 (2001/01/15)</LI>\n";
$output .= "<H3>Drupal website</H3>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/\">http://www.drupal.org/</A></LI>\n";
$output .= "<H3>Drupal documentation</H3>\n";
$output .= " <LI><A HREF=\"node.php?title=drupal+handbook\">Drupal handbook</A></LI>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/node.php?title=drupal+handbook\">Drupal handbook</A></LI>\n";
$output .= "<H3>Drupal mailing lists</H3>\n";
$output .= " <LI><A HREF=\"node.php?title=mailing+lists\">Mailing list information</A></LI>";
$output .= " <LI><A HREF=\"http://www.drupal.org/node.php?title=mailing+lists\">Mailing list information</A></LI>";
$output .= "<H3>Drupal development</H3>\n";
$output .= " <LI><A HREF=\"node.php?title=development\">Development information</A>, <A HREF=\"node.php?title=CVS\">CVS instructions</A>, <A HREF=\"module.php?mod=cvs\">CVS log messages</A></LI>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/node.php?title=development\">Development information</A>, <A HREF=\"http://www.drupal.org/node.php?title=CVS\">CVS instructions</A>, <A HREF=\"http://www.drupal.org/module.php?mod=cvs\">CVS log messages</A></LI>\n";
$theme->box("Drupal support and development", $output);
$theme->footer();
......
......@@ -13,20 +13,22 @@ function drupal_page() {
$theme->header();
$output = " <P>Drupal is the English pronunciation for the Dutch word 'druppel' which stands for 'drop'. Drupal is a full-featured <I>content management/discussion engine</I> suitable to setup a news-driven community or portal site. Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design Drupal is flexible and easy to adapt or extend.</P>\n";
$output = " <P>Drupal is the English pronunciation for the Dutch word '<A HREF=\"http://www.drupal.org/\">druppel</A>' which stands for '<A HREF=\"http://www.drop.org/\">drop</A>'. Drupal is a full-featured <I>content management/discussion engine</I> suitable to setup a news-driven community or portal site. Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design Drupal is flexible and easy to adapt or extend.</P>\n";
$output .= " <P>Drupal is primarily written by Dries Buytaert (dries&#64;drop.org) and built after <A HREF=\"http://slashcode.com/\">Slash</A> and <A HREF=\"http://scoop.kuro5hin.org/\">Scoop</A>. Drupal uses <A HREF=\"http://www.php.net/\">PHP</A> and <A HREF=\"http://www.mysql.com/\">MySQL</A> and is a valuable alternative for <A HREF=\"http://phpnuke.org/\">PHP-Nuke</A>, <A HREF=\"http://thatware.org/\">ThatWare</A>, <A HREF=\"http://geeklog.org/\">GeekLog</A> and so on. The source code is available under terms of GNU General Public License (GPL).</P>\n";
$output .= " <P>We don't have a real demo site yet but Drupal is used by (and created for) <A HREF=\"http://drop.org/\">http://drop.org/</A>. Create an account, play with it for a bit, read the <A HREF=\"node.php?title=drupal+handbook\">documentation</A> and spend some time getting used to it.</P>\n";
$output .= " <P>We don't have a real demo site yet but Drupal is used by (and created for) <A HREF=\"http://www.drop.org/\">http://www.drop.org/</A>. Create an account, play with it for a bit, read the <A HREF=\"node.php?title=drupal+handbook\">documentation</A> and spend some time getting used to it.</P>\n";
$theme->box("Drupal", $output);
$output = "<H3>Download Drupal</H3>\n";
$output .= " <LI><A HREF=\"drupal/drupal-2.00.tgz\">Drupal 2.00</A> (2001/03/15 - latest version)</LI>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/drupal/drupal-2.00.tgz\">Drupal 2.00</A> (2001/03/15 - latest version)</LI>\n";
$output .= " <LI>Drupal 1.00 (2001/01/15)</LI>\n";
$output .= "<H3>Drupal website</H3>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/\">http://www.drupal.org/</A></LI>\n";
$output .= "<H3>Drupal documentation</H3>\n";
$output .= " <LI><A HREF=\"node.php?title=drupal+handbook\">Drupal handbook</A></LI>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/node.php?title=drupal+handbook\">Drupal handbook</A></LI>\n";
$output .= "<H3>Drupal mailing lists</H3>\n";
$output .= " <LI><A HREF=\"node.php?title=mailing+lists\">Mailing list information</A></LI>";
$output .= " <LI><A HREF=\"http://www.drupal.org/node.php?title=mailing+lists\">Mailing list information</A></LI>";
$output .= "<H3>Drupal development</H3>\n";
$output .= " <LI><A HREF=\"node.php?title=development\">Development information</A>, <A HREF=\"node.php?title=CVS\">CVS instructions</A>, <A HREF=\"module.php?mod=cvs\">CVS log messages</A></LI>\n";
$output .= " <LI><A HREF=\"http://www.drupal.org/node.php?title=development\">Development information</A>, <A HREF=\"http://www.drupal.org/node.php?title=CVS\">CVS instructions</A>, <A HREF=\"http://www.drupal.org/module.php?mod=cvs\">CVS log messages</A></LI>\n";
$theme->box("Drupal support and development", $output);
$theme->footer();
......
......@@ -31,15 +31,15 @@ function node_perm() {
}
function node_conf_options() {
$output .= form_select(t("Default number of nodes to display"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of nodes to display on the main page."));
$output .= form_select("Default number of nodes to display", "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), "The default maximum number of nodes to display on the main page.");
return $output;
}
function node_conf_filters() {
$output .= form_select(t("Enable HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Strip HTML and PHP tags."));
$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_select("Enable HTML tags", "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), "Allow HTML and PHP tags in user-contributed content.");
$output .= form_textfield("Allowed HTML tags", "allowed_html", variable_get("allowed_html", "<A><B><BLOCKQUOTE><DD><DL><DT><I><LI><OL><U><UL>"), 64, 128, "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 [[link]] tags."));
$output .= form_select("Enable link tags", "filter_link", variable_get("filter_link", 0), array("Disabled", "Enabled"), "Substitute special [[link]] tags.");
$output .= "<HR>";
return $output;
}
......
......@@ -31,15 +31,15 @@ function node_perm() {
}
function node_conf_options() {
$output .= form_select(t("Default number of nodes to display"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of nodes to display on the main page."));
$output .= form_select("Default number of nodes to display", "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), "The default maximum number of nodes to display on the main page.");
return $output;
}
function node_conf_filters() {
$output .= form_select(t("Enable HTML tags"), "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), t("Strip HTML and PHP tags."));
$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_select("Enable HTML tags", "filter_html", variable_get("filter_html", 0), array("Disabled", "Enabled"), "Allow HTML and PHP tags in user-contributed content.");
$output .= form_textfield("Allowed HTML tags", "allowed_html", variable_get("allowed_html", "<A><B><BLOCKQUOTE><DD><DL><DT><I><LI><OL><U><UL>"), 64, 128, "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 [[link]] tags."));
$output .= form_select("Enable link tags", "filter_link", variable_get("filter_link", 0), array("Disabled", "Enabled"), "Substitute special [[link]] tags.");
$output .= "<HR>";
return $output;
}
......
......@@ -29,25 +29,21 @@ function statistics_conf_options() {
return $output;
}
function statistics_referer_internal() {
$result = db_query("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
$output .= "<P>Internal referers of the last ". format_interval(variable_get("referer_clear", 604800)) .":</P>\n";
function statistics_table_1($query) {
$result = db_query($query);
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>URL</TH><TH>number</TH></TR>\n";
$output .= " <TR><TH>URL</TH><TH>date</TH></TR>\n";
while ($referer = db_fetch_object($result)) {
$output .= "<TR><TD><A HREF=\"". check_output($referer->url) ."\">". substr(check_output($referer->url), 0, 100) ."</A></TD><TD>". check_output($referer->count) ."</TD></TR>";
$output .= "<TR><TD><A HREF=\"". check_output($referer->url) ."\">". substr(check_output($referer->url), 0, 100) ."</A></TD><TD>". format_date($referer->timestamp, "small") ."</TD></TR>";
}
$output .= "</TABLE>\n";
return $output;
}
function statistics_referer_external() {
$result = db_query("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
$output .= "<P>External referers of the last ". format_interval(variable_get("referer_clear", 604800)) .":</P>\n";
function statistics_table_2($query) {
$result = db_query($query);
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>URL</TH><TH>number</TH></TR>\n";
......@@ -59,6 +55,28 @@ function statistics_referer_external() {
return $output;
}
function statistics_referer_internal() {
$output .= "<H3>Most recent referers</H3>\n";
$output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url LIKE '". path_uri() ."%' ORDER BY timestamp DESC LIMIT 15");
$output .= "<H3>Referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</H3>\n";
$output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
return $output;
}
function statistics_referer_external() {
$result = db_query("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
$output .= "<H3>Most recent referers</H3>\n";
$output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url NOT LIKE '". path_uri() ."%' ORDER BY timestamp DESC LIMIT 15");
$output .= "<H3>Referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</H3>\n";
$output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
return $output;
}
function statistics_admin() {
global $type;
......
......@@ -29,25 +29,21 @@ function statistics_conf_options() {
return $output;
}
function statistics_referer_internal() {
$result = db_query("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
$output .= "<P>Internal referers of the last ". format_interval(variable_get("referer_clear", 604800)) .":</P>\n";
function statistics_table_1($query) {
$result = db_query($query);
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>URL</TH><TH>number</TH></TR>\n";
$output .= " <TR><TH>URL</TH><TH>date</TH></TR>\n";
while ($referer = db_fetch_object($result)) {
$output .= "<TR><TD><A HREF=\"". check_output($referer->url) ."\">". substr(check_output($referer->url), 0, 100) ."</A></TD><TD>". check_output($referer->count) ."</TD></TR>";
$output .= "<TR><TD><A HREF=\"". check_output($referer->url) ."\">". substr(check_output($referer->url), 0, 100) ."</A></TD><TD>". format_date($referer->timestamp, "small") ."</TD></TR>";
}
$output .= "</TABLE>\n";
return $output;
}
function statistics_referer_external() {
$result = db_query("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
$output .= "<P>External referers of the last ". format_interval(variable_get("referer_clear", 604800)) .":</P>\n";
function statistics_table_2($query) {
$result = db_query($query);
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>URL</TH><TH>number</TH></TR>\n";
......@@ -59,6 +55,28 @@ function statistics_referer_external() {
return $output;
}
function statistics_referer_internal() {
$output .= "<H3>Most recent referers</H3>\n";
$output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url LIKE '". path_uri() ."%' ORDER BY timestamp DESC LIMIT 15");
$output .= "<H3>Referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</H3>\n";
$output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
return $output;
}
function statistics_referer_external() {
$result = db_query("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
$output .= "<H3>Most recent referers</H3>\n";
$output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url NOT LIKE '". path_uri() ."%' ORDER BY timestamp DESC LIMIT 15");
$output .= "<H3>Referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</H3>\n";
$output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '". path_uri() ."%' GROUP BY url ORDER BY count DESC");
return $output;
}
function statistics_admin() {
global $type;
......
......@@ -13,12 +13,12 @@ function system_help() {
}
function system_perm() {
return array("administer system settings");
return array("administer settings and filters");
}
function system_link($type) {
if ($type == "admin" && user_access("administer system settings")) {
$links[] = "<a href=\"admin.php?mod=system\">system settings</a>";
if ($type == "admin" && user_access("administer settings and filters")) {
$links[] = "<a href=\"admin.php?mod=system\">settings and filters</a>";
}
return $links ? $links : array();
......@@ -129,7 +129,7 @@ function system_modules() {
function system_admin() {
global $edit, $op, $type;
if (user_access("administer system settings")) {
if (user_access("administer settings and filters")) {
print "<SMALL><A HREF=\"admin.php?mod=system&type=options\">site settings</A> | <A HREF=\"admin.php?mod=system&type=filter\">content filters</A> | <A HREF=\"admin.php?mod=system&op=modules\">modules</A> | <A HREF=\"admin.php?mod=system&op=help\">help</A></SMALL><HR>\n";
......
......@@ -13,12 +13,12 @@ function system_help() {
}
function system_perm() {
return array("administer system settings");
return array("administer settings and filters");
}
function system_link($type) {
if ($type == "admin" && user_access("administer system settings")) {
$links[] = "<a href=\"admin.php?mod=system\">system settings</a>";
if ($type == "admin" && user_access("administer settings and filters")) {
$links[] = "<a href=\"admin.php?mod=system\">settings and filters</a>";
}
return $links ? $links : array();
......@@ -129,7 +129,7 @@ function system_modules() {
function system_admin() {
global $edit, $op, $type;
if (user_access("administer system settings")) {
if (user_access("administer settings and filters")) {
print "<SMALL><A HREF=\"admin.php?mod=system&type=options\">site settings</A> | <A HREF=\"admin.php?mod=system&type=filter\">content filters</A> | <A HREF=\"admin.php?mod=system&op=modules\">modules</A> | <A HREF=\"admin.php?mod=system&op=help\">help</A></SMALL><HR>\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment