Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Integrate to File Manager

 
extensions guideimplement uiintegrate to plesk uiplesk features available for extensionsextensions

Plesk File Manager is a part of user interface that allows
administrator, reseller, or customer to manage domain’s files and
directories and provides a set of useful features, for example, a visual
HTML editor and a file permissions manager. Starting from Plesk 11.5,
you can create extensions that add functionality to Plesk File Manager.

To add an item to the context menu of the File Manager:

  1. Create the file /plib/library/FileManager/Action.php in your
    extension directory.

  2. Create the class Modules_MyModule_FileManager_Action that extends
    the
    pm_FileManager_Action
    class in this file. MyModule here is your extension’s ID.

    The following methods are used:

  • lmsg()

  • getTitle()

  • getName()

  • getHref()

  • isActive()

  • isDefault()

    An example of such class in provided below:

class Modules_CodeEditor_FileManager_Action extends pm_FileManager_Action
{
    /**
    * Retrieve title for action
    */
    public function getTitle()
    {
        pm_Context::init('code-editor');
        return $this->lmsg('actionTitle');
    }
    /**
    * Retrieve name for action
    * by default name is camelCase module ID
    */
    public function getName()
    {
        return parent::getName();
    }
        /**
    * Retrieve URL for action
    */
    public function getHref()
    {
        pm_Context::init('code-editor');
        $params = array(
        'currentDir=' . urlencode($this->_item['currentDir']),
        'file=' . urlencode($this->_item['name']),
        );
        return pm_Context::getBaseUrl() . '?' . implode('&', $params);
    }
    /**
    * Checks if action is available for a file
    */
    public function isActive()
    {
        if ($this->_item['isDirectory']) {
            return false;
        }
        return true;
    }
    /**
    * Checks if action is default for a file
    */
    public function isDefault()
    {
        return false;
    }
}

The variable $this->_item contains an array with the information
about the file or a directory on which the menu is shown:

array (
    'name' => 'hello.txt',
    'modificationTimestamp' => '1380276799',
    'modificationDate' => 'Sep 27, 2013 05:13 PM',
    'size' => '8192',
    'formatedSize' => '8.0 KB',
    'user' => 'user_ifvbjsgcdk',
    'group' => 'psacln',
    'filePerms' => 'rw- r-- r-- ',
    'isDirectory' => false,
    'icon' => '/theme/icons/16/plesk/file-txt.png',
    'isReadonly' => false,
    'currentDir' => '/httpdocs',
)

As a result of adding such an extension, a new item will be available in
the File Manager context menu:

image 76051

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Getting Started With Plesk Extensions & Tools

Read More »

The Plesk WP Toolkit 5.6 Release – What’s New

Read More »

Podcast | Using the Right eCommerce Tools with Joerg Strotmann

Read More »
Knowledge Base

Plesk Features Available for Extensions

Read More »

Plesk Updates – Updating Plesk Manually via the User Interface

Read More »

Available Licensing Models – Freemium Extensions

Read More »

Extensions Reference

Read More »

Hosting Wiki

  • DBMS Interface
  • SSI
  • PhpMyAdmin
  • phpPgAdmin
  • PHP
  • HTML
  • Plesk
  • URL
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family