Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 09:49:54 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
149631
Posts in
21098
Topics by
7537
Members
Latest Member:
lotte2
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
DirList Module
Pages: [
1
]
2
3
Go Down
Author
Topic: DirList Module (Read 19977 times)
Ralf (Berlin)
Offline
Posts: 1314
DirList Module
«
on:
October 07, 2007, 05:16:37 PM »
I have wrote a small module. Purpose of
DirList
is to show automatic all files in the assigned MEDIA folder as downloadable links and additional information about filesize and time last modified.
For Download v0.13 please look at
this Post
Thank You!
Ralf
«
Last Edit: October 14, 2007, 11:50:24 AM by Ralf (Berlin)
»
Logged
mhaefliger
Offline
Posts: 1
Re: DirList Module
«
Reply #1 on:
October 09, 2007, 09:21:02 PM »
Hi Ralf
I tried it out. Great work. Works nice. One suggest / extension:
on website fronted, click on row headers (Filename, Modified), so it would change the sort (sortierung). For example "Modified" --> Date, "Filename" --> alphabetical.
best regards
martin
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #2 on:
October 10, 2007, 04:20:30 AM »
Hi Martin,
thank you for the feedback.
Quote
on website fronted, click on row headers (Filename, Modified), so it would change the sort (sortierung). For example "Modified" --> Date, "Filename" --> alphabetical.
that's a very good idea, I will implement it as soon as possible.
best regards
Ralf
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #3 on:
October 13, 2007, 06:33:03 AM »
Hello,
I have added some additional functions to
DirList v0.11
:
in backend you may preselect the sorting of DirList by filename, filesize or date ascending or descending
first click on table header in frontend will sort the selected row ascending, next click will sort descending
DirList uses mimetypes and display a icon for each file
Automated upgrade from v0.10 to v0.11 should work proper, so it is not neccessary to uninstall v0.10.
For Download v0.13 please look at
this post
Please try it out and report any problems and suggestions to me, thank you!
Ralf
«
Last Edit: October 14, 2007, 11:51:52 AM by Ralf (Berlin)
»
Logged
doc
Guest
Re: DirList Module
«
Reply #4 on:
October 13, 2007, 07:58:22 AM »
Hello Ralf,
just tested the new version. Works fine if the module is not invoked two times from one single page (sections). I had the same problem with my Zitate module
.
Currently the following error message appears if I add two versions of dirlist to one page via sections:
Code:
Fatal error: Cannot redeclare cmp() (previously declared in E:\09-Webserver\xampp\htdocs\webserver\wb267_blank\modules\dirlist\class.dirlist.php:476) in E:\09-Webserver\xampp\htdocs\webserver\wb267_blank\modules\dirlist\class.dirlist.php on line 476
Personally I do not like the buttons to switch the sort list in the frontend. I would prefer the column name as link maybe with a up/down icon to indicate that users can click on the column entry.
Very nice that you check the page language setting to display the date/time in a different way e.g. for German / English.
Think if this error is fixed, we could add the module to the Add-ons page.
Again thanks for your contribution.
Regards Christian
«
Last Edit: October 13, 2007, 08:02:08 AM by doc
»
Logged
mlohnen
Offline
Posts: 31
Re: DirList Module
«
Reply #5 on:
October 13, 2007, 08:40:36 AM »
Hi, very nice module.. thank you!
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #6 on:
October 13, 2007, 08:58:16 AM »
Hello Christian,
Oooops, this was a minor problem
I've fixed the problem and added a tag to prevent multiple DirList within a single page to sort synchronous when clicking at the column header - looks nice but isn't useful
For Download v0.13 please look at
this post
Quote
Personally I do not like the buttons to switch the sort list in the frontend. I would prefer the column name as link maybe with a up/down icon to indicate that users can click on the column entry.
Perhaps it should be an option for a coming version to choose between buttons or links in the table header. Up/Down buttons seems to be a good idea...
Regards
Ralf
«
Last Edit: October 14, 2007, 11:53:02 AM by Ralf (Berlin)
»
Logged
mlohnen
Offline
Posts: 31
Re: DirList Module
«
Reply #7 on:
October 13, 2007, 09:05:31 AM »
And here is a Dutch language file for DirList v0.11 (should also work for v0.12)
Rename txt to php and put in DirList language subdirectory.
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #8 on:
October 13, 2007, 09:17:37 AM »
Hello Marco,
Quote
And here is a Dutch language file for DirList v0.11 (should also work for v0.12)
Great! Thank you!
Best regards
Ralf
«
Last Edit: October 13, 2007, 09:19:29 AM by Ralf (Berlin)
»
Logged
doc
Guest
Re: DirList Module
«
Reply #9 on:
October 13, 2007, 05:46:34 PM »
Hi Ralf,
adding two dir list modules on one page via section works fine now with
v0.12
. However, if I click on the file size button of one of the lists, the other module output is sorted as well
Another thing. You are using the $module_directory variable defined in info.php. On some server configuration, those modules will not work. It is recommended to use the hardcoded string of the module directory instead of $module_directory (not nice but this way the module will run independend on the server configuration). See hello world module for details.
Regards Christian
«
Last Edit: October 13, 2007, 05:52:50 PM by doc
»
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #10 on:
October 13, 2007, 10:15:12 PM »
Hello Christian,
Quote
adding two dir list modules on one page via section works fine now with v0.12. However, if I click on the file size button of one of the lists, the other module output is sorted as well
Hmmm, I can't reproduce this error, tried installations at different servers. I had added the tag
{section}
to v0.12 to prevent DirList exactly from this behaviour. Have you upgraded from v0.11 to v0.12? Please check template file
frontend.htt
in /dirlist/htt :
Code:
<th class="th_file">
<form name="btn_file_{section}" action="{form_action}" method="post">
<input type="hidden" name="sort{section}" value="{file_sort}">
<input type="submit" value="{file_btn_text}">
</form>
</th>
are there also the
{section}
placeholders in your file?
Quote
It is recommended to use the hardcoded string of the module directory instead of $module_directory (not nice but this way the module will run independend on the server configuration). See hello world module for details.
... not nice, but okay, I will change it.
Regards
Ralf
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #11 on:
October 13, 2007, 10:41:22 PM »
Hello Christian,
I think I have detected the problem. Sometimes it's the first click at row header which will start a sorting of all DirLists at the page.
Have to sleep about it, at the moment there is no solution...
Regards
Ralf
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #12 on:
October 14, 2007, 05:43:58 AM »
Hello Christian,
there is no error rsp. bug in DirList, while sorting the lists in frontend.
Please check the following example to understand the behaviour of DirList:
Load a page with two or more DirLists inside (
please flush browser cache before
)
In the
Second DirList
try to change sorting in any way you want. You will see that the
First DirList
will not change sorting in any way.
At last change the sorting of the
Second DirList
in a manner which is
not the default sorting
for this DirList.
I you now click at any Column Header of the
First DirList
the
Second DirList
will change too.
any further change in the
First DirList
will not cause any change in the
Second DirList
What happens? At the moment you change the focus from the
Second DirList
to the
First DirList
the
Second DirList
will fall back to the
default sorting
order. This behaviour is absolutly correct because all changes in the frontend are temporary and not saved in any way.
Regards
Ralf
Logged
doc
Guest
Re: DirList Module
«
Reply #13 on:
October 14, 2007, 07:53:50 AM »
Hello Ralf,
thanks for the information. Just looks funny if you change the sort order (date/time) of the first list and afterwards for the second list (date/time) the first list will change too
Best regards
Christian
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #14 on:
October 14, 2007, 08:10:49 AM »
Hello Christian,
yes, it looks funny
Changing this behaviour will be very elaborate and therefore I think at the time it's ok for this small modul.
I have attached
dirlist_0.13.zip
with changed $module_directory to hardcoded module path and NL.php inside for Add-on page.
Regards
Ralf
Please download the latest version from the
Addons Repository
«
Last Edit: October 20, 2007, 03:59:03 PM by Ralf (Berlin)
»
Logged
doc
Guest
Re: DirList Module
«
Reply #15 on:
October 14, 2007, 08:16:53 AM »
Hi Ralf,
just tested it, works as expected. Think we should wait for another few days so forum members can provide some feedback before publishing it on the Add-ons repository. Can you please remove the old Zipfiles in this thread to prevent a mix-up of different versions?
Thanks for this nice module.
Regards Christian
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #16 on:
October 18, 2007, 05:47:53 PM »
DirList v0.14 - 18.10.2007
fixed:
HTML/XML - some markup language errors prevented DirList from passing W3C Markup Language Validation
note
: Bug in WB 2.6.7 impede modules from passing W3C Validation, please check
Ticket #521
for further informations and fix-up
Please download the latest version from the
Addons Repository
Thank you!
Ralf
«
Last Edit: October 20, 2007, 03:59:55 PM by Ralf (Berlin)
»
Logged
doc
Guest
Re: DirList Module
«
Reply #17 on:
October 20, 2007, 03:15:33 PM »
Hello Ralf,
added your latest DirList version to the section Page Type modules on the
Add-ons repository
. Please delete the version attached here in the forum to avoid a mixup of files.
Thanks for the nice contribution.
Regards Christian
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #18 on:
October 20, 2007, 04:01:56 PM »
Hello Christian,
thank you for your service.
Regards
Ralf
Logged
pkoskela
Offline
Posts: 6
Re: DirList Module
«
Reply #19 on:
October 21, 2007, 09:51:01 AM »
Dirlist shows .htaccess file in list. How can I hide it?
Danke schön, Module für WebsiteBaker CMS ist gut!
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #20 on:
October 21, 2007, 10:18:17 AM »
Hello,
thank you for this hint - I haven't considered .htaccess files. I will fix this problem with the next release of DirList.
For a fixup please open the file
class.dirlist.php
and jump to line 389:
Code:
function getMediaFiles($path) {
$result = array();
$fl = $this->searchdir($path, 0, "FILES");
for ($i = 0; $i < count($fl); $i++) {
$fname = basename($fl[$i]);
if ($fname != 'index.php') $result[] = $fname;
}
return $result;
}
and replace the line:
Code:
if ($fname != 'index.php') $result[] = $fname;
with the line:
Code:
if (($fname != 'index.php') && ($fname != '.htaccess')) $result[] = $fname;
and
.htaccess
will no longer appear in DirList.
Thank you for your help!
Regards
Ralf
Logged
BerndJM
Offline
Posts: 1764
Re: DirList Module
«
Reply #21 on:
October 21, 2007, 01:23:08 PM »
Hi Ralf,
may be I'm wrong, but wouldn't it be better to hide
all
hidden files (files starting with a dot)?
Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #22 on:
October 21, 2007, 02:00:35 PM »
Hello Bernd,
you're right, it's better to hide
all
the hidden files, so the replacement should be:
Code:
if (($fname != 'index.php') && ($fname[0] != '.')) $result[] = $fname;
Thank you!
Regards
Ralf
Logged
Ralf (Berlin)
Offline
Posts: 1314
Re: DirList Module
«
Reply #23 on:
November 01, 2007, 12:24:01 PM »
Hello,
I've released DirList v0.15, the main differents to v0.14 are:
DirList no longer shows hidden files
Filter to include or exclude files by extension
You may download DirList v0.15 from the
Addons Repository
Thank you!
Regards
Ralf
Logged
doc
Guest
Re: DirList Module
«
Reply #24 on:
November 01, 2007, 03:13:30 PM »
Hello Ralf,
thanks for the improved version.
Regards Christian
Logged
Pages: [
1
]
2
3
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...