Snif
A few days ago hcgtv wrote about snif. I immediately started playing with it and I really like it :). I'm using it now for both my testcases directory as my (new) releases directory, in which i will keep development versions of plugins and other stuff.
Snif can display subfolders, but it uses a parameter in the url to link to them, so if you want to add sniff to a subfolder too, you have to copy a simple index.php file in every subdirectory. Because i don't like having to add a file in every subdirectory i started playing with a RewriteRule
in the .htaccess
-file. I added the following:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (.*) /releases/index.php?path=$1 [QSA,L]
Also i set up snif to link directly to subdirs:
<?php
$directDirectoryLinks = true;
It almost works, but links to file now contain the subfoldername twice... The code in the index.php-files for the subfolders will cetainly help to solve this issue :)
UPDATE: The solution :)
Around line 350 (somewhere in the config-section) add:
<?php
/**
* Set the base url, used in the <base> tag. This should only be changed when
* you want to use RewriteRules or similar tricks.
*/
$baseURL = 'http://'.$snifServer.'/releases/';
(ofcourse you should change the value of $baseURL according to the url on your server)
Then add around line 1949 (somewhere in the <head> of the generated html):
<base href="<?php echo $baseURL; ?>" />
Comments
hcgtv on 2005-03-25 00:58
Cool, glad you're having fun
Cool, glad you're having fun with this app. There is another file called toc.php that serves as a table of contents for the whole directory tree.
Like this: http://nupusi.com/files/toc...
TeRanEX on 2005-03-25 01:02
Yes i read about it but i
Yes i read about it but i prefer 'the normal' snif :)
Miguel on 2005-06-16 16:08
Instead of using '
Instead of using '<base href=' you could use $baseURL in some places to correct the relative url to a absolute path.
This is a trickier but cleaner method.
Comment Atom Feed