Donate Share

PHP File Manager

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

View function fix

You are viewing a single message from this topic. View all messages.

  1. 2009-04-17 05:09:32 UTC
    I just downloaded the newest version of PHPFM, and I tried to click "view", but what seemed to happen was, instead of taking me to where the file was located, it jumbled the filename and the host together. So I made a quick fix until an official fix has been put into place.


    Create a new PHP function:
    function dircorrect($vardir) {
    $vardir = str_replace('/var/www', '', $vardir);
    return $vardir;

    and then change the actual view function for javascript to:

    function view(arg){
    var w = 800;
    var h = 600;
    window.open('".dircorrect($dir_atual)."'+escape(arg) , '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=yes,toolbar=no,menubar=no,location=yes');
    }

    I hope this was helpful to somebody.
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.