-
☆ A M B ☆
- 24,524 Posts
Ladies, Gentlemen, and Otherwise!
It is finished, it works, and I would much appreciate any bug reports if anybody does use this thing.
Full (I hope) installation instructions in the Installation folder.
Demo at
http://www.sottwell.com
Log in as "filemanager", password filemanager;
I didn’t mean to rush you, thought maybe I was doing something wrong as I am a newbie. As usual, the toughest thing for a newbie is get started and I’m still struggling. Seems the software comes first and if your lucky they tell you what it’s for and how to use it later. There’s a lot of info in the forums but it’s tuff to pick out the pieces and make something useful out of it so examples are what I rely on. Thanks for the assistance.
-
☆ A M B ☆
- 24,524 Posts
Nested categories. It works fine, exept IE is (of course) a problem with the layout. You’ll have to fiddle with the CSS; you may even want to redo the top menu in a table. It’s not too difficult, I broke it out into its own include file, docman/includes/menu.php. I finally gave up and used the IE conditional to put some corrective CSS in my template’s head:
<!--[if IE]>
<style type="text/css">
#dmAdminmenu {
margin-left:0px;
}
#dmCatmenu li#dmTop ul {
display:block;
}
#dmCatmenu {
position:absolute;
left:-140px;
}
</style>
<![endif]-->
a function to show the document sice in bites, kb mb....
function size_readable($size, $unit = null, $retstring = null, $si = true)
{
// Units
if ($si === true) {
$sizes = array(’B’, ’kB’, ’MB’, ’GB’, ’TB’, ’PB’);
$mod = 1000;
} else {
$sizes = array(’B’, ’KiB’, ’MiB’, ’GiB’, ’TiB’, ’PiB’);
$mod = 1024;
}
$ii = count($sizes) - 1;
// Max unit
$unit = array_search((string) $unit, $sizes);
if ($unit === null || $unit === false) {
$unit = $ii;
}
// Return string
if ($retstring === null) {
$retstring = ’%01.2f %s’;
}
// Loop
$i = 0;
while ($unit != $i && $size >= 1024 && $i < $ii) {
$size /= $mod;
$i++;
}
return sprintf($retstring, $size, $sizes[$i]);
}
Sorry for this possibly stupid question, but your sql creates an ’id’ field in ’file_categories’ and you insert a (’catid’,’catname’) just after, causing MySQL to issue an error.
Is there something I forget ?
Thanks,
Pascal
-
☆ A M B ☆
- 24,524 Posts
Cool, it seems the snippet is back on live
-
☆ A M B ☆
- 24,524 Posts
New menu.php file, cleans up the menu and adds the number of files in a category next to the category name in the drop-down menu.
Just remove the .txt extension and replace assets/snippets/docmant/includes/menu.php
Will need some changes to the docman.css file. Here is how I did it:
/* menu markup */
#dmMenuBar ul#dmMenu{position:relative;}
#dmMenuBar li{background:none;}
#dmMenuBar li.dmMenuitem{float:left;}
#dmMenuBar li ul{display:none;background:#fff;margin:0;}
#dmMenuBar li.dmMenuitem ul{position:absolute;}
#dmMenuBar li.dmMenuitem ul li ul{position:relative;}
#dmMenuBar li:hover ul{display:block;}