You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2005/08/30 07:14:20 UTC
svn commit: r264708 - in /httpd/mod_mbox/branches/httpd-mbox-if:
data/style.css module-2.0/mod_mbox.c module-2.0/mod_mbox.h
module-2.0/mod_mbox_index.c module-2.0/mod_mbox_out.c
Author: maxime
Date: Mon Aug 29 22:14:12 2005
New Revision: 264708
URL: http://svn.apache.org/viewcvs?rev=264708&view=rev
Log:
Added the 'Site Index' feature (originally implemented in trunk/ by
justin in r231187). The new MboxRootPath directive gives the path to
the archives depot, for example :
MboxRootPath /archives/
* module-2.0/mod_mbox.c, module-2.0/mod_mbox.h:
Added directive handling.
* module-2.0/mod_mbox_index.c, module-2.0/mod_mbox_out.c:
Added 'Site Index' links.
* data/style.css:
Added h5 style properties.
Modified:
httpd/mod_mbox/branches/httpd-mbox-if/data/style.css
httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.c
httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.h
httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c
httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c
Modified: httpd/mod_mbox/branches/httpd-mbox-if/data/style.css
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/data/style.css?rev=264708&r1=264707&r2=264708&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/data/style.css (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/data/style.css Mon Aug 29 22:14:12 2005
@@ -16,8 +16,16 @@
h1
{
font-size: x-large;
- margin: 1em 2% 0.5em 2%;
+ margin: 1em 2% 0.4em 2%;
padding: 0;
+}
+
+h5
+{
+ margin: 0 2%;
+ padding: 0;
+ font-size: 90%;
+ font-style: italic;
}
p#lastupdated
Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.c?rev=264708&r1=264707&r2=264708&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.c Mon Aug 29 22:14:12 2005
@@ -57,6 +57,7 @@
conf->enabled = 0;
conf->hide_empty = 0;
+ conf->root_path = NULL;
conf->search_path = NULL;
conf->style_path = NULL;
conf->script_path = NULL;
@@ -96,6 +97,17 @@
to->antispam = from->antispam;
}
+ /* Update 'root_path' */
+ if (merge->root_path != NULL) {
+ to->root_path = apr_pstrdup(p, merge->root_path);
+ }
+ else if (from->root_path != NULL) {
+ to->root_path = apr_pstrdup(p, from->root_path);
+ }
+ else {
+ to->root_path = NULL;
+ }
+
/* Update 'search_path' */
if (merge->search_path != NULL) {
to->search_path = apr_pstrdup(p, merge->search_path);
@@ -197,6 +209,9 @@
AP_INIT_TAKE1("mboxsearch", ap_set_string_slot,
(void *)APR_OFFSETOF(mbox_dir_cfg_t, search_path), OR_INDEXES,
"Set the Directory that contains Search Data"),
+ AP_INIT_TAKE1("mboxrootpath", ap_set_string_slot,
+ (void *)APR_OFFSETOF(mbox_dir_cfg_t, root_path), OR_INDEXES,
+ "Set the path to the site index."),
AP_INIT_TAKE1("mboxstyle", ap_set_string_slot,
(void *)APR_OFFSETOF(mbox_dir_cfg_t, style_path), OR_INDEXES,
"Set the path to Css stylesheet file."),
Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.h
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.h?rev=264708&r1=264707&r2=264708&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.h (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox.h Mon Aug 29 22:14:12 2005
@@ -72,6 +72,7 @@
int enabled;
int antispam;
int hide_empty;
+ const char *root_path;
const char *search_path;
const char *style_path;
const char *script_path;
Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c?rev=264708&r1=264707&r2=264708&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_index.c Mon Aug 29 22:14:12 2005
@@ -145,9 +145,15 @@
ap_rputs(" </head>\n\n", r);
ap_rputs(" <body id=\"archives\" onload=\"indexLinks ();\">\n", r);
- ap_rprintf(r, " <h1>Mailing list archives: %s@%s</h1>\n\n",
+ ap_rprintf(r, " <h1>Mailing list archives: %s@%s</h1>\n",
ESCAPE_OR_BLANK(r->pool, mli->list),
ESCAPE_OR_BLANK(r->pool, mli->domain));
+
+ if (conf->root_path) {
+ ap_rprintf(r, " <h5><a href=\"%s\" title=\"Back to the archives depot\">"
+ "Site index</a></h5>\n\n",
+ conf->root_path);
+ }
/* Output header and list information */
ap_rputs(" <table id=\"listinfo\">\n", r);
Modified: httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c?rev=264708&r1=264707&r2=264708&view=diff
==============================================================================
--- httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c (original)
+++ httpd/mod_mbox/branches/httpd-mbox-if/module-2.0/mod_mbox_out.c Mon Aug 29 22:14:12 2005
@@ -624,6 +624,12 @@
strlen(".mbox") - 2), 2)) - 1][1],
baseURI + (strlen(baseURI) - strlen(".mbox") - 6));
+ if (conf->root_path) {
+ ap_rprintf(r, " <h5><a href=\"%s\" title=\"Back to the archives depot\">"
+ "Site index</a></h5>\n\n",
+ conf->root_path);
+ }
+
ap_rputs(" <table id=\"msglist\">\n", r);
ap_rputs(" <thead><tr><th class=\"title\"><a href=\"browser\">Message list</a></th>", r);
@@ -739,6 +745,12 @@
ap_rprintf(r, " <body id=\"archives\" onload=\"javascript:loadBrowser ('%s');\">\n", baseURI);
ap_rputs(" <h1>Mailing list archives</h1>\n\n", r);
+
+ if (conf->root_path) {
+ ap_rprintf(r, " <h5><a href=\"%s\" title=\"Back to the archives depot\">"
+ "Site index</a></h5>\n\n",
+ conf->root_path);
+ }
/* Output a small notice if no MboxScriptPath configuration
directive was specified. */