diff options
-rw-r--r-- | modules/drupal.module | 14 | ||||
-rw-r--r-- | modules/drupal/drupal.module | 14 | ||||
-rw-r--r-- | modules/node.module | 8 | ||||
-rw-r--r-- | modules/node/node.module | 8 | ||||
-rw-r--r-- | modules/statistics.module | 38 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 38 | ||||
-rw-r--r-- | modules/system.module | 8 | ||||
-rw-r--r-- | modules/system/system.module | 8 |
8 files changed, 88 insertions, 48 deletions
diff --git a/modules/drupal.module b/modules/drupal.module index 3ffbf1776..a5da33f5c 100644 --- a/modules/drupal.module +++ b/modules/drupal.module @@ -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@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(); diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 3ffbf1776..a5da33f5c 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -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@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(); diff --git a/modules/node.module b/modules/node.module index 001e9b351..1d3981310 100644 --- a/modules/node.module +++ b/modules/node.module @@ -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; } diff --git a/modules/node/node.module b/modules/node/node.module index 001e9b351..1d3981310 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -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; } diff --git a/modules/statistics.module b/modules/statistics.module index d23e7b22c..f5acfaacc 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -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; diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index d23e7b22c..f5acfaacc 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -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; diff --git a/modules/system.module b/modules/system.module index 7f9981727..77f0013e4 100644 --- a/modules/system.module +++ b/modules/system.module @@ -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"; diff --git a/modules/system/system.module b/modules/system/system.module index 7f9981727..77f0013e4 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -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"; |