I have integrated [url=http://wacker-welt.de/webadmin/]webadmin.php[/url] into the back-end as a file manager. I am not sure how useful this is since Phoenix already has a file manager, but I am so sick of people "persuading" me to switch to WordPress that I have decided to contribute whatever I have to the community. Hopefully someone will find it useful.
This hack was developed on v0.9.0.11.
1. Download [url=http://wacker-welt.de/webadmin/]webadmin.php[/url].
2. Add the lines enclosed between "B2EVO HACK" to webadmin.php (for login control and headers):
/* Filenames related to the apache web server:
*/
$htaccess = '.htaccess';
$htpasswd = '.htpasswd';
/*-----------------B2EVO HACK---------------------*/
require_once( dirname(__FILE__). '/_header.php' );
require_once( dirname(__FILE__) . '/../conf/_admin.php' );
$admin_tab = 'uploads';
$admin_pagetitle = T_('File management');
require( dirname(__FILE__).'/_menutop.php' );
require( dirname(__FILE__).'/_menutop_end.php' );
$homedir = 'e:\your\b2evo\media\path';
/* ----------------END B2EVO HACK---------------- */
if (get_magic_quotes_gpc()) {
3. Add the lines enclosed between "B2EVO HACK" to webadmin.php, somewhere above "switch ($action)" (for preventing user from wandering outside the media folder):
/*-----------------B2EVO HACK---------------------*/
if ( ( strpos($directory, $homedir) === FALSE
|| strpos($directory, $homedir) != 0 )
|| ( !empty($_REQUEST['destination']) && $action != 'rename'
&& ( strpos(addslash($_REQUEST['destination']), $homedir) === FALSE
|| strpos(addslash($_REQUEST['destination']), $homedir) != 0) ) )
{
$directory = $homedir;
listing_page('<tr id="error"><td>Permission denied</td></tr>');
}
/* ----------------END B2EVO HACK---------------- */
switch ($action) {
case 'view':
3. Upload the edited webadmin.php to your b2evo/admin folder.
4. Modify _menutop.php to show the file manager tab. Add the lines enclosed between "WEBADMIN HACK":
if( $admin_tab == 'tools' )
echo '<li class="current">';
else
echo '<li>';
echo '<a href="tools.php" >', T_('Tools'), '</a></li>';
/*-----------------WEBADMIN HACK---------------------*/
if( $admin_tab == 'uploads' )
echo '<li class="current">';
else
echo '<li>';
echo '<a href="webadmin.php" >', T_('File Management'), '</a></li>';
/*-----------------END WEBADMIN HACK---------------------*/
That's all. You should be able to access the "File Management" tab after you login.
Hi, I want to use this hack in 0.91, but i´ve got en error with :
permission denied
where must i give the ftp--Login and passwords into??
without password my server will never give any informations to fileManager....