• Hi,

    Sorry to bother but im a newbie in wordpress.

    I’m using fileaway with woffice theme and i have trouble to activate the manager mode so i can delete and edit file in the frontend like on the link picture :

    https://ps.w.org/file-away/assets/screenshot-06.jpg?rev=999654

    Woffice theme support taught me to add this code to my theme child functions.php file :

    function woffice_projects_fileway_manager($post_slug) {

    $sub_name = “projects_” . $post_slug;

    /* We output the directory */
    echo do_shortcode(‘[fileaway base=”1″ makedir=”true” sub=”‘ . $sub_name . ‘” type=”table” directories=”true” paginate=”false” makedir=”true” flightbox=”images” bulkdownload=”on”]’);

    /* We output the file uploader */
    echo do_shortcode(‘[fileup base=”1″ makedir=”true” sub=”‘ . $sub_name . ‘”]’);

    }

    after checking fileway documentations i finally came out with taht code added to my functions.php file :

    function woffice_projects_fileway_manager($post_slug) {

    $sub_name = “projects_” . $post_slug;

    /* We output the directory */
    echo do_shortcode(‘[fileaway base=”1″ manager=”on” makedir=”true” sub=”‘ . $sub_name . ‘” type=”table” directories=”true” paginate=”false” makedir=”true” flightbox=”images” bulkdownload=”on”]’);

    /* We output the file uploader */
    echo do_shortcode(‘[fileup base=”1″ makedir=”true” sub=”‘ . $sub_name . ‘”]’);

    }

    But nothing happened… so my question so what did I miss ?

    Can you explain me precisely the steps to follow to activate manager mode or director tree mode so i can manage my file and sub directories from the frontend ?

    thx

    https://www.ads-software.com/plugins/file-away/

Viewing 1 replies (of 1 total)
  • hi,
    i included a working [PHP] code below, which is working on my site.
    You can copy and paste to a new PAGE and check if this is working for you.
    If the code is working, you can start updating it for your need.
    btw, you do need to log in first, in order to see the content.
    i currently only use 2 levels of user roles, admin and subscriber.
    please create users as ‘subscriber’ to test this code.
    also, the ‘admin’ role is also supported.
    good luck.
    ———-start code————————————————-
    [php]
    global $current_user;
    get_currentuserinfo();
    if ( is_user_logged_in() )
    {
    if ($current_user->user_login == admin) {
    echo do_shortcode(‘[fileaway manager=”on” directories=”on” base=2 name=”‘ . $current_user->user_login . ‘” showto=”administrator”]’);
    }
    else {
    echo do_shortcode(‘[fileaway manager=”on” directories=”on” base=2 sub=”‘ . $current_user->user_login . ‘” name=”‘ . $current_user->user_login . ‘” showto=”subscriber”]’);
    }
    }
    else {
    echo (‘Only registered user can view the content’);
    }
    [/PHP]

Viewing 1 replies (of 1 total)
  • The topic ‘activate director tree and manager mode’ is closed to new replies.