Title: manager mode question
Last modified: August 22, 2016

---

# manager mode question

 *  Resolved [waxymilanders](https://wordpress.org/support/users/waxymilanders/)
 * (@waxymilanders)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/)
 * I noticed that when I enable manager mode I no longer have the option to have
   audio files play. Is there a way to change this with the settings? I have a site
   where I need to have members be able to rename and delete files but also to be
   able to listen to them without downloading.
 * [https://wordpress.org/plugins/file-away/](https://wordpress.org/plugins/file-away/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5847941)
 * Sorry. The mechanisms of each mode get in the way of each other. You could create
   a custom little function that would allow them to enable and disable manager 
   mode. Give me a couple minutes and I’ll give you an example.
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5847977)
 * Here, add this to your theme’s functions.php file.
 *     ```
       class my_custom_fileaway_class
       {
       	public function __construct()
       	{
       		add_shortcode('fa_manager_toggle', array($this, 'toggle'));
       	}
       	public function toggle()
       	{
       		if(!class_exists('fileaway')) return false;
       		if(isset($_REQUEST['fa_manager']))
       		{
       			$link = fileaway_utility::querystring(get_permalink(), $_SERVER["QUERY_STRING"], array('fa_manager'), true);
       			$output = '<a class="your-css-class" href="'.$link.'" target="_self">Disable Manager Mode</a><br>';
       			$output .= do_shortcode('[fileaway directories=true manager=true]');
       		}
       		else
       		{
       			$link = fileaway_utility::querystring(get_permalink(), $_SERVER["QUERY_STRING"], array('fa_manager' => '1'));
       			$output = '<a class="your-css-class" href="'.$link.'" target="_self">Enable Manager Mode</a><br>';
       			$output .= do_shortcode('[fileaway directories=true playback=extended]');
       		}
       		return $output;
       	}
       }
       new my_custom_fileaway_class;
       ```
   
 * You’ll want to modify the shortcodes, and you can specify the css class for the
   link.
 * Then on your page, just use this shortcode:
 * `[fa_manager_toggle]`
 *  Thread Starter [waxymilanders](https://wordpress.org/support/users/waxymilanders/)
 * (@waxymilanders)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848003)
 * I added the code to the functions.php file but it gave me an error that the }
   in line 6 was “unexpected” and wouldn’t allow my site to load.
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848005)
 * It works fine in my functions.php.
 * Can you show me the lines before and after the code I provided, including line
   6?
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848007)
 * Or you could email me your functions.php file to [fileaway.plugin@gmail.com](https://wordpress.org/support/topic/manager-mode-question/fileaway.plugin@gmail.com?output_format=md)
   and I’ll find your syntax error and send it back to you.
 *  Thread Starter [waxymilanders](https://wordpress.org/support/users/waxymilanders/)
 * (@waxymilanders)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848008)
 * I copied and pasted exactly what you had here:
 * class my_custom_fileaway_class
    { public function __construct() { add_shortcode(‘
   fa_manager_toggle’, array($this, ‘toggle’)); } public function toggle() { if(!
   class_exists(‘fileaway’)) return false; if(isset($_REQUEST[‘fa_manager’])) { 
   $link = fileaway_utility::querystring(get_permalink(), $_SERVER[“QUERY_STRING”],
   array(‘fa_manager’), true); $output = ‘[Disable Manager Mode](https://wordpress.org/support/topic/manager-mode-question/&apos;.$link.&apos;?output_format=md)‘;
   $output .= do_shortcode(‘[fileaway directories=true manager=true]’); } else {
   $link = fileaway_utility::querystring(get_permalink(), $_SERVER[“QUERY_STRING”],
   array(‘fa_manager’ => ‘1’)); $output = ‘[Enable Manager Mode](https://wordpress.org/support/topic/manager-mode-question/&apos;.$link.&apos;?output_format=md)‘;
   $output .= do_shortcode(‘[fileaway directories=true playback=extended]’); } return
   $output; } } new my_custom_fileaway_class;
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848011)
 * Yes, I need to see what’s in your file before and after what you copied and pasted.
   The syntax error is not in my code.
 *  Thread Starter [waxymilanders](https://wordpress.org/support/users/waxymilanders/)
 * (@waxymilanders)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848017)
 * ok I must have done something wrong the first time, the error went away. But 
   now it is showing all my files instead of the directory that I specified.
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848021)
 * As I said, you’ll need to modify the shortcodes in the custom code provided. 
   Or, give me the shortcodes that you had originally, and I will modify it for 
   you and post it here.
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848023)
 * These two lines are the lines that you need to modify:
 * `$output .= do_shortcode('[fileaway directories=true manager=true]');`
 * and
 * `$output .= do_shortcode('[fileaway directories=true playback=extended]');`
 * Just modify the shortcode part. One should have manager mode enabled. The other
   should have playback enabled, as exampled.
 *  Thread Starter [waxymilanders](https://wordpress.org/support/users/waxymilanders/)
 * (@waxymilanders)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848025)
 * ok thanks!
 *  Plugin Author [thomstark](https://wordpress.org/support/users/thomstark/)
 * (@thomstark)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848026)
 * No problem.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘manager mode question’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/file-away_e3e2e1.svg)
 * [File Away](https://wordpress.org/plugins/file-away/)
 * [Support Threads](https://wordpress.org/support/plugin/file-away/)
 * [Active Topics](https://wordpress.org/support/plugin/file-away/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-away/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-away/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [thomstark](https://wordpress.org/support/users/thomstark/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/manager-mode-question/#post-5848026)
 * Status: resolved