New feature: mirror documents (or any files) to preserve them from censorship in the docs/ directory. These files are listed in the main page.
This commit is contained in:
parent
a62c51ca19
commit
189c962e5a
3 changed files with 25 additions and 0 deletions
|
@ -5,6 +5,7 @@ if(!defined('ROOT_DIR'))
|
|||
}
|
||||
define('LOCAL_URI', '');
|
||||
if (!defined('RSS_FILE')) define('RSS_FILE', 'rss.xml');
|
||||
if (!defined('DOC_FOLDER')) define('DOC_FOLDER', 'docs/');
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
setlocale(LC_TIME, 'fr_FR.UTF-8', 'fr_FR', 'fr');
|
||||
|
||||
|
|
4
0.3/docs/docs.txt
Normal file
4
0.3/docs/docs.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
You can manually add files in the /docs/ directory, such as PDF, docs, images, etc.
|
||||
You can also add subfolders in /docs/ for website mirroring. Be sure that your subfolder contains a file named index.html.
|
||||
|
||||
Delete this file to hide the 'Autres documents' block in your autoblogs homepage.
|
|
@ -837,6 +837,26 @@ if( !empty($_POST['opml_file']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY
|
|||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
$directory = "./". DOC_FOLDER;
|
||||
$docs = array();
|
||||
if( is_dir($directory) && !file_exists($directory . '.disabled') ) {
|
||||
$subdirs = glob($directory . "*");
|
||||
foreach($subdirs as $unit)
|
||||
{
|
||||
if(!is_dir($unit) || file_exists( $unit . '/index.html' ) || file_exists( $unit . '/index.htm' ) || file_exists( $unit . '/index.php' ) ) {
|
||||
$docs[] = '<a href="'. $unit . '">'. substr($unit, (strrpos($unit, '/')) + 1 ) .'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty( $docs )) {
|
||||
echo '<div class="pbloc"><h2>Autres documents</h2><ul>';
|
||||
foreach( $docs as $value )
|
||||
echo '<li>'. $value .'</li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="pbloc">
|
||||
<h2>Autoblogs hébergés <a href="?rss" title="RSS des changements"><img src="rss.png" alt="rss"/></a></h2>
|
||||
<p>
|
||||
|
|
Loading…
Reference in a new issue