mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
- added full icon support (still needs tweaking)
- very simple but powerful template system working (also needs tweaking, a fair amount of it) - other fixes to both dirlist.lib.php, exechandler.lib.php, config.lib.php and more... git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@9 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
Name: core
|
||||
Priority: 40
|
||||
Author: Jim Myhrberg
|
||||
Include: output.exc.php
|
||||
*/
|
||||
//_SCRIPT;
|
||||
|
||||
@@ -26,7 +27,7 @@ if ( stristr($_SERVER['HTTP_HOST'], ':') !== false ) {
|
||||
$_SERVER['SERVER_PORT'] = $http_host[1];
|
||||
unset($http_host);
|
||||
}
|
||||
preg_match("/(.*)Port [0-9]{2,8}(.*)/", $_SERVER['SERVER_SIGNATURE'], $serverinfo);
|
||||
preg_match("/(.*)Port [0-9]{2,8}(.*)/i", $_SERVER['SERVER_SIGNATURE'], $serverinfo);
|
||||
$_SERVER['SERVER_SIGNATURE'] = $serverinfo[1].'Port '.$_SERVER['SERVER_PORT'].$serverinfo[2];
|
||||
|
||||
|
||||
@@ -73,7 +74,7 @@ if ( $do_readdir ) {
|
||||
|
||||
|
||||
//>Section> echo
|
||||
print_r($dlist->list);
|
||||
//print_r($dlist->list);
|
||||
|
||||
|
||||
//_END;
|
||||
|
||||
@@ -21,11 +21,46 @@ Author: Jim Myhrberg
|
||||
|
||||
|
||||
//>After> core.define_constants
|
||||
define('ICONS_PATH', '/icons/'.$config->iconset.'/');
|
||||
define('ICONS_PATH', 'icons/'.$config->iconset.'/');
|
||||
define('ICONS_URL', DLIST_URL.ICONS_PATH);
|
||||
|
||||
//>Section> load_config:35
|
||||
$config->parse(ICONS_PATH.'config.ini', true, 'icons_');
|
||||
|
||||
//>Section> functions
|
||||
function icons_get_url ($ext, $size, $type) {
|
||||
global $config;
|
||||
if ( $size == 'large' || $size == 'big' ) {
|
||||
$size = $config->icons_large;
|
||||
} else {
|
||||
$size = $config->icons_small;
|
||||
}
|
||||
$icons_path = ICONS_PATH.$size.'/';
|
||||
$icons_url = ICONS_URL.$size.'/';
|
||||
if ( $type == 'file' ) {
|
||||
if ( file_exists($icons_path.$ext.$config->icons_ext) ) {
|
||||
return $icons_url.$ext.$config->icons_ext;
|
||||
} else {
|
||||
return $icons_url.'_file'.$config->icons_ext;
|
||||
}
|
||||
} elseif ( $type == 'dir' || $type == 'folder' ) {
|
||||
if ( file_exists($icons_path.'_folder.'.$ext.$config->icons_ext) ) {
|
||||
return $icons_url.'_folder.'.$ext.$config->icons_ext;
|
||||
} else {
|
||||
return $icons_url.'_folder'.$config->icons_ext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function icons_get_parent ($size) {
|
||||
global $config;
|
||||
if ( $size == 'large' || $size == 'big' ) {
|
||||
$size = $config->icons_large;
|
||||
} else {
|
||||
$size = $config->icons_small;
|
||||
}
|
||||
return ICONS_URL.$size.'/_parent'.$config->icons_ext;
|
||||
}
|
||||
|
||||
//_END;
|
||||
?>
|
||||
33
exec/output.exc.php
Normal file
33
exec/output.exc.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php die();
|
||||
|
||||
//
|
||||
// Exec: output
|
||||
//
|
||||
// Copyright © 2006 Jim Myhrberg. All rights reserved.
|
||||
// zynode@gmail.com
|
||||
//
|
||||
|
||||
//_HEAD;
|
||||
/* --- Configuration ---
|
||||
Name: output
|
||||
Priority: 40
|
||||
Author: Jim Myhrberg
|
||||
*/
|
||||
//_SCRIPT;
|
||||
|
||||
//==========================
|
||||
//>STAGE> init
|
||||
//==========================
|
||||
|
||||
|
||||
//==========================
|
||||
//>STAGE> render
|
||||
//==========================
|
||||
|
||||
//>Section> do_render:5
|
||||
if ( $do_render ) {
|
||||
//>Section> do_render.end:95
|
||||
}
|
||||
|
||||
//_END;
|
||||
?>
|
||||
Reference in New Issue
Block a user