diff --git a/exec/core.exc.php b/exec/core.exec.php similarity index 100% rename from exec/core.exc.php rename to exec/core.exec.php diff --git a/exec/icons.exc.php b/exec/icons.exec.php similarity index 100% rename from exec/icons.exc.php rename to exec/icons.exec.php diff --git a/exec/language.exc.php b/exec/language.exec.php similarity index 73% rename from exec/language.exc.php rename to exec/language.exec.php index e2b85bd..e9f7cd7 100644 --- a/exec/language.exc.php +++ b/exec/language.exec.php @@ -15,19 +15,6 @@ Author: Jim Myhrberg */ //_SCRIPT; -//========================== -//>STAGE> functions -//========================== - - - function installed_languages () { - $return = glob('languages/*.lang.php'); - foreach( $return as $key => $value ) { - $return[$key] = preg_replace("/languages\/(.*)\.lang\.php/", "$1", $value); - } - return $return; - } - //========================== //>STAGE> init @@ -51,6 +38,18 @@ include('languages/'.$language.'.lang.php'); $lang = new lang(); +//>Section> local_names:10 +$local_names = ( is_readable($config->path_cache.'/local_names.ini') ) ? parse_ini_file($config->path_cache.'/local_names.ini') : array() ; +$language_files = glob('languages/*.lang.php'); +$installed_languages = array(); +foreach( $language_files as $key => $value ) { + $lang_name = preg_replace("/languages\/(.*)\.lang\.php/", "$1", $value); + $installed_languages[$lang_name] = ( !empty($local_names[$lang_name]) ) ? $local_names[$lang_name] : $lang_name ; +} +if ( !isset($local_names[$language]) ) { + execHandler::write2file($config->path_cache.'/local_names.ini', "\n".$language.'='.$lang->_language, 'at'); +} + //>Section> warning:10 if ( $lang->_version < $config->req_lang_ver ) { echo 'WARNING: '.ucfirst($config->language).' language file is out of date and not fully compatible with this version of dList.'; diff --git a/exec/output.exc.php b/exec/output.exec.php similarity index 97% rename from exec/output.exc.php rename to exec/output.exec.php index 878697f..7427375 100644 --- a/exec/output.exc.php +++ b/exec/output.exec.php @@ -114,7 +114,7 @@ if ( !empty($_REQUEST['sort']) && !empty($dlist->sort_order[strtolower($_REQUEST } //>Section> set_fields:10 $fields = explode(',', $config->fields); -//foreach( $fields as $key => $value ) $fields[$key] = trim($value); +foreach( $fields as $key => $value ) $fields[$key] = trim($value); $fields = array_flip(array_filter($fields)); diff --git a/httpd_dlist.conf b/httpd_dlist.conf index da69ed8..195a87b 100644 --- a/httpd_dlist.conf +++ b/httpd_dlist.conf @@ -2,17 +2,19 @@ Options +FollowSymlinks RewriteEngine On -# if dir requested without trailing slash, -# rewrite to dList which redirects to the -# dir with the trailing slash added. -RewriteCond %{REQUEST_FILENAME} -d -RewriteCond %{REQUEST_URI} !/$ -RewriteCond %{REQUEST_URI} ^(.+)$ [OR] -RewriteRule !^(.*)/$ /dlist/view.php?shit +# Uncomment the bollow lines if your server does not redirect +# to directories with a trailing slash in the url. For +# example, if "http://domain.com/dir" is not redirected to +# "http://domain.com/dir/" correctly. Then dList can handle +# it correctly instead of your server. +#RewriteCond %{REQUEST_FILENAME} -d +#RewriteCond %{REQUEST_URI} !/$ +#RewriteCond %{REQUEST_URI} ^(.+)$ [OR] +#RewriteRule !^(.*)/$ /dlist/ [L] # rewrite to dList if no index files found RewriteCond %{REQUEST_FILENAME}/index.html !-f [NC] RewriteCond %{REQUEST_FILENAME}/index.php !-f [NC] RewriteCond %{REQUEST_FILENAME} -d -RewriteRule ^(.*)$ /dlist/view.php +RewriteRule ^(.*)$ /dlist/ \ No newline at end of file diff --git a/icons/osx/config.ini b/icons/osx/config.ini index 262438b..3638de6 100644 --- a/icons/osx/config.ini +++ b/icons/osx/config.ini @@ -1,3 +1,7 @@ +; +; Iconset: OSX v1.0 +; + ; Small icons, generally used in ; detailed views. small = 16x16 diff --git a/view.php b/index.php similarity index 87% rename from view.php rename to index.php index d89af13..71a06fb 100644 --- a/view.php +++ b/index.php @@ -2,7 +2,7 @@ /* - dList v2.1.3 beta + dList v2.1.4 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com @@ -33,7 +33,7 @@ if ( empty($config->dlist_url) ) $config->dlist_url = preg_replace("/(.*)\/(.*?) // initialize execHandler and main scripts $exec = new execHandler(); -$exec->update_frequency = 0; +$exec->update_frequency = 0; //TODO remove this once done developing // configure cache dir for compiled code @@ -45,8 +45,8 @@ if ( $config->debug ) $exec->debug = true; // paths to load $exec->addPath( array( - 'exec/core.exc.php', - 'exec/*', + 'exec/core.exec.php', + 'exec/*.exec.php', 'templates/'.$config->template.'/*.exc.php', ) ); @@ -57,7 +57,7 @@ $exec->cache(); include($exec->include_file); -/* +/*TODO uncomment debug timer once done developing if ($config->debug) { echo "
\npage generated in ".$timer->term(8)." sec.
\n"; } diff --git a/libs/dirlist.lib.php b/libs/dirlist.lib.php index dc8a042..5c98778 100644 --- a/libs/dirlist.lib.php +++ b/libs/dirlist.lib.php @@ -26,9 +26,9 @@ class dirList { // Smart date formatting var $use_smartdate = true; var $smartdate = '{date}, {time}'; - var $smartdate_date = '%B %d, %Y'; + var $smartdate_date = '%B %e, %Y'; var $smartdate_time = '%H:%M'; - var $standard_date_format = '%B %d, %Y, %H:%M'; + var $standard_date_format = '%B %e, %Y, %H:%M'; // Smart date language settings @@ -53,7 +53,7 @@ class dirList { // incase it might do something in the future... function dirlist() { // sorting orders - $this->sort_order = array( + $this->sort_order = array( 'name' => 'name,mtime,size', 'size' => 'size,name,mtime', 'mtime' => 'mtime,name,size', diff --git a/templates/simple/_details.phtml b/templates/simple/_details.phtml index d8edc3f..1678ff4 100644 --- a/templates/simple/_details.phtml +++ b/templates/simple/_details.phtml @@ -1,26 +1,22 @@ - $value): ?> - + $value): ?> - + - + $value): - if ($key == 'name'):?> - - + if ($key == 'name'):?> + - - list as $key => $item): ?> + +list as $key => $item): ?> - + $value): if ($key == 'name'):?> - +
$key?>$key?>
icon ....
- - icon
\ No newline at end of file diff --git a/templates/simple/index.phtml b/templates/simple/index.phtml index 739d5ff..c93c4e6 100644 --- a/templates/simple/index.phtml +++ b/templates/simple/index.phtml @@ -24,7 +24,7 @@
powered_by?>. end()?>.
-
$value): ?>
+
$value): ?> $n) echo ' | '; $n++; endforeach ?>
\ No newline at end of file diff --git a/templates/simple/render.exc.php b/templates/simple/render.exc.php index 919330c..b167de6 100644 --- a/templates/simple/render.exc.php +++ b/templates/simple/render.exc.php @@ -36,10 +36,6 @@ if ( !empty($_COOKIE['dList_simple_viewMode']) && !empty($config->tpl_modes[$_CO } -//>Section> installed_languages -$installed_languages = installed_languages(); - - //>Section> include_phtml include(TPL_PATH.'index.phtml'); diff --git a/templates/simple/settings.php b/templates/simple/settings.php index 684b60a..1b6d935 100644 --- a/templates/simple/settings.php +++ b/templates/simple/settings.php @@ -1,10 +1,9 @@ 'small', # default mode - 'mode' => 'tiles', + 'mode' => 'icons', # available modes 'modes' => array(