How to costumize Listing Directory confused smiley

Posted by Elzou 
How to costumize Listing Directory confused smiley
April 22, 2013 07:32PM
Hello

I would like to know how I can change the directory listing:
- Add a background image
- Change the icons
- Change the title

I searched a lot on the net but I did find a
Tutoriel but that does not work with the latest version 0.5.1.



Thank you
Sorry for my poor English.
Re: How to costumize Listing Directory confused smiley
April 22, 2013 07:44PM
did you checked this page: [redmine.lighttpd.net] ?
it covers a few points
Re: How to costumize Listing Directory confused smiley
April 22, 2013 07:50PM
Thank you for your quick response

Yes I looked this page but I do not understand what changed file ? lighttpd.conf ?

I'm a noob. eye rolling smiley

Basically I want to create a html page including directory list ?
Re: How to costumize Listing Directory confused smiley
April 24, 2013 06:42AM
No, creating a html file won't work if you add new files.

You can only create a custom-css file and modify /opt/piratebox/lighttpd/lighttpd.conf

I can't help more, because I haven't done it for myself yet... sorry.
Re: How to costumize Listing Directory confused smiley
April 25, 2013 09:37AM
Hello,
I found a few things I'd like to share that will perhaps help some people.
For me it works.
This allows to little costum page.

Examples :
---------------
The changes are added to this file with :
vi /opt/piratebox/conf/lighttpd/lighttpd.conf

# It adds a CSS file for layout (light-dir.css is an example )

dir-listing.external-css    ="/opt/pirabox/www/light-dir.css"

# Change the message footer (default : "lighttpd/1.4.18" ) 

dir-listing.set-footer      ="My text"


# The four following commands allow for added HTML code above the directory listing for the use you have to create a 
# file header.txt
# that you put in Shared. It is in this text file you add your HTML code.

# Disables the default generated HTML code allows the neat header or footer with HEADER.txt or README.txt

dir-listing.auto-layout     ="disable"

# Displays the header before the directory listing

dir-listing.show-header     ="enable"

# hide HEADER.txt files to "public" from the directory listing

dir-listing.hide-header-file ="enable"

# Displays the header HTML encoded

dir-listing.encode-header ="disable"

# You can also add HTML footer by creating a README.txt

dir-listing.show-readme ="enable"
dir-listing.hide-readme ="enable"
dir-listing.encode-readme-file ="disable"


I hope so this will help some people and I'm sorry for my bad english ...

Elz



Edited 4 time(s). Last edit at 04/28/2013 07:13PM by Elzou.
Thanks a lot Elzou. Finally my piratebox's directory listing got a beautiful icon beside its file's name.
Re: How to costumize Listing Directory confused smiley
April 27, 2013 11:18PM
To hide the README.txt file,

dir-listing.hide-readme ="enable"

should be

dir-listing.hide-readme-file ="enable"                                                                   
Re: How to costumize Listing Directory confused smiley
April 28, 2013 07:01PM
Sorry !

Okay this has been changed !

Thank !
Re: How to costumize Listing Directory confused smiley
May 13, 2013 11:31PM
If above dir-listing.external-css ="/opt/piratebox/www/light-dir.css" did not work for you
try this one ... place a new file "HEADER.txt" into your Shared-directory and create / edit style.css in /opt/pirabox/css/

FILE: HEADER.txt
Language: HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>PirateBox - Shared Files</title> <link rel="stylesheet" type="text/css" href="http://piratebox.lan/css/style.css"> </head> <body> <a href="http://piratebox.lan/"><div class="logobox"></div></a><br><br> <div class="list"> <h1>PirateBox - Shared Files</h1>

FILE: style.css (example)
Language: CSS
.readme { font-family: LatoReg, sans-serif; text-align: left; font-size: 30px; }   .n { font-family: arial; margin-right: 10px; padding-right: 20px; padding-bottom:5px; }     .s { font-family: arial; margin-right: 10px; padding-right: 20px; padding-bottom:5px; }     .m { font-family: arial; margin-right: 10px; padding-right: 20px; padding-bottom:5px; }   .t { font-family: arial; margin-right: 10px;   padding-bottom:5px; }       .list { background: none repeat scroll 0 0 #FFFFFF;   margin-left: auto; margin-right: auto; padding: 15px; width: 650px; z-index: 0; } .list > .list { margin-left: auto; margin-right: auto; width: 650px; box-shadow:none; padding:0px; }



Edited 1 time(s). Last edit at 05/13/2013 11:34PM by dataminer.
Re: How to costumize Listing Directory confused smiley
May 14, 2013 04:48AM
Very nice work-around and idea about the directory listing!!
Re: How to costumize Listing Directory confused smiley
June 16, 2013 01:40PM
Hi,

@Elzou, I think you should re-edit your post to hide the readme file.
(mistake with the last line ?)

dir-listing.hide-readme-file ="enable"

Anyway, I would like to thank you, because it works ! the finger smiley



I'll post an entry on my weblog for french user.


Sylvain
Re: How to costumize Listing Directory confused smiley
June 16, 2013 02:15PM
One thing I would like to ask why 'last modified date' is 1 Jan 1980?
How to update it?
Re: How to costumize Listing Directory confused smiley
June 16, 2013 02:52PM
@johanrusli It's the date issue of the Piratebox, wich by default not save the date on reboot.

Matthias has a script to save the last date, if you fix manualy the date of your PirateBox, but I don't use it.

I just write my post entry, and realisize the inversion of *-file had desable the interpretation of my footer html, so it is fix now, and everything is good (like javascript for the menu for exemple).



Just yum it !
[sylvain.naud.in]
Communauté francophone BiblioBox : [bibliobox.net]
Re: How to costumize Listing Directory confused smiley
July 06, 2013 12:28AM
Free Php Download script that works great

[forum.daviddarts.com]
customization is fine but dir-listing.encoding = "utf-8" directive doesn't work
Re: How to costumize Listing Directory confused smiley
October 17, 2013 09:05PM
error message?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
 **     **  **    **  **    **  **     **  ********  
 **     **  ***   **  ***   **  **     **  **     ** 
 **     **  ****  **  ****  **  **     **  **     ** 
 **     **  ** ** **  ** ** **  *********  ********  
 **     **  **  ****  **  ****  **     **  **        
 **     **  **   ***  **   ***  **     **  **        
  *******   **    **  **    **  **     **  **        
Message: