Bug 34014 - mod_autoindex style patch
Summary: mod_autoindex style patch
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_autoindex (show other bugs)
Version: 2.5-HEAD
Hardware: All other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://opcenter.de/pub/misc/
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2005-03-14 23:22 UTC by Soenke J. Peters
Modified: 2017-03-11 15:23 UTC (History)
0 users



Attachments
mod_autoindex style enhancement patch (9.27 KB, patch)
2005-03-17 18:00 UTC, Soenke J. Peters
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Soenke J. Peters 2005-03-14 23:22:48 UTC
This patch adds some css styling improvements to mod_autoindex.

It is based on the IndexStyleSheet functionality found in the current development version (originally from http://force-elite.com/~chip/patches/httpd/mod_autoindex/).

The patch introduces the directiveIndexStyleSheet to specify the URL of a style sheet (this one is already in Apache httpd 2.1-head) and adds some css classes to html elements.
Additionally, there is a new IndexOption AddAltClass which appends the "alt" text information to class names allowing different appearances of the listing of files or file types.

Patch:
http://opcenter.de/pub/misc/httpd-2.0.53-mod_autoindex-style.diff

Live example:
http://opcenter.de/pub/
Comment 1 Paul Querna 2005-03-14 23:31:59 UTC
can you make a patch against 2.1-dev?
Comment 2 Soenke J. Peters 2005-03-17 18:00:14 UTC
Created attachment 14512 [details]
mod_autoindex style enhancement patch

This patch does some enhancements to the HTML output to allow styling via CSS.
It adds a new IndexOption AddAltClass which appends the "alt" text information
of a file/directory to its CSS class name allwong for further styling
possibilities.
Comment 3 Soenke J. Peters 2005-03-17 18:01:19 UTC
(In reply to comment #1)
> can you make a patch against 2.1-dev?

A patch against 2.1 trunk is attached (or see http://opcenter.de/pub/misc/httpd-2.1trunk-mod_autoindex-style.diff).
Comment 4 Paul Querna 2005-06-03 00:50:36 UTC
I think we should just always output the additional IDs, even if a Style Sheet
isnt set.  I will take a look at adapting the submmited patch to do that...
Comment 5 William A. Rowe Jr. 2005-12-09 02:01:23 UTC
I would concur that style choices are always useful, however...

we have to consider that some programmers may be slurping the contents of the
current table results.  Therefore;

 * default to table style, css annotated in the general distribution
 * introduce the new flag to turn off css decorate for html tables.

OR (and this is a better solution)...

 Add a format type 3 for decorated html, and type 4 for strict XHTML/XML if we
 want to help authors.  So 0, plain, 1, fixed, 2, html, 3, useful html,
 and then a 4/5 later on if we want to use strict semantics (this may get
 tricky handling text and arbitrary text/html header/readme contents, if
 they don't conform to XHTML/XML strict).

Comment 6 Rich Bowen 2010-01-26 05:03:30 UTC
Thanks. Patch applied, r903052
Comment 7 Eric Covener 2017-03-11 15:23:12 UTC
whoops, this old patch also changed the date format

@@ -1823,11 +1843,11 @@
                     apr_time_exp_t ts;
                     apr_time_exp_lt(&ts, ar[x]->lm);
                     apr_strftime(time_str, &rv, MAX_STRING_LEN,
-                                "%d-%b-%Y %H:%M  ", &ts);
+                                "%Y-%m-%d %H:%M  ", &ts);
                     ap_rputs(time_str, r);
                 }
                 else {
-                    /*Length="22-Feb-1998 23:42  " (see 4 lines above) */
+                    /*Length="1975-04-07 01:23  " (see 4 lines above) */
                     ap_rputs("                   ", r);
                 }
             }