Modules

Modules are external swf files loaded by Flashcommander at runtime.
Modules are stored in bin-release/modules.


Flashcommander comes with 5 modules:

  • TextEditor – edit text based files (txt, html, php, xml, js, etc.)
  • ImageViewer – image editor: resize, crop and rotate images
  • VideoPlayer – plays flv video
  • SwfPlayer – loads swf files
  • Mp3Player – plays mp3 files

You can hire me to create custom modules. A custom module could be:

  • a form for file search
  • a batch rename tool
  • an email sending form on which you can drag files to be sent
  • a form which displays and edits xml data
  • a form which displays and updates SQL data
  • an online tool for converting videos with ffmpeg
  • etc.

Language

Flashcommander loads language from language.xml.

To translate the program to a language you have to edit this file.

Replace only the attribute values with the translated words or phrases.

Don’t modify the xml structure – it would lead to errors.
 

<menu
   account="Account"
   users="Users"
   modules="Modules" />
 
<button
   upload="Upload" download="Download" copy="Copy" move="Move"
   newfolder="New folder" del="Delete" rename="Rename" logout="Logout" />
 
<dialog
   user="User name"
   username="User name" name="Name"
   pass="Password" oldpass="Old password"
   server="Server" />

Attribute names speak for themselves:

  • menu – menu items
  • button – button labels
  • dialog – words and phrases that appear in dialog windows
  • some of these contain patterns like count – these are variables to be filled by the program, leave them unchanged
  • contextmenu items
  • columns – datagrid column header labels
  • error messages – these are returned by the server
  • module – text used in modules

Available languages at the moment are: English, Hungarian.

Login

It is possible to have custom authentication with Flashcommander.

For an example check bin-release/flashcommander.php: – there are 2 things to do:

  1. create the user session: $_SESSION['flashcommander_username'] = "user";
  2. pass the gateway url in flashvars: flashvars="gateway=http://localhost/amfphp/gateway.php"

Flashcommander will skip the login screen and will assume that the “user” is logged in.

Warning: if the session is not created, you will get remote errors in Flashcommander.

Configuration

You can configurate Flashcommander by editing bin/config.xml.

01 <root>
02  
03    <gateway>
04        <item endpoint="../amfphp/gateway.php" />
05    </gateway>
06  
07    <license>
08        <item domain="flashcommander.org"key="c45fc9649e44d9ae95435d3783a31244" />
09    </license>
10  
11    <style>../styles/flashcommander_white.swf</style>
12  
13    <modules>
14        <item name="TextEditor" data="module" url="modules/TextEditor.swf"ext="txt;htm;xml" />
15        <item name="ImageViewer" data="module" url="modules/ImageViewer.swf"ext="jpg" />
16        <item name="SwfPlayer" data="module" url="modules/SwfPlayer.swf"ext="swf" />
17        <item name="VideoPlayer" data="module" url="modules/VideoPlayer.swf"ext="flv" />
18        <item name="Mp3Player" data="module" url="modules/Mp3Player.swf"ext="mp3" />
19    </modules>
20  
21    <browser ext="pdf;mov" />
22  
23    <startview left="" right="thumbnail"/>
24  
25    <navclick>single</navclick>
26  
27 </root>
  • gateway – endpoint is the url to gateway.php, the main file of the amfphp framework;

    items listed here appear in the server combo box at login
  • license – licensed domains are listed here
  • style – path to style swf
  • modules – modules used by the program; this is where you can associate extensions to modules
  • browser – file types to be opened by the browser
  • startview – if ‘thumbnail’ the respective pane (left or right) has a thumbnail view
  • navclick – use ‘single’ or ‘double’ click for navigation

User data

User data is stored in services/flashcommander_2_5/user/user.xml.

Edit this file to manually change user settings or to add users.

However you can do these from the Users menu in flashcommander.

This file cannot be accessed from the web as it is protected by a .htaccess file.

01 <users>
02   <user>
03     <name>user</name>
04     <pass>74be16979710d4c4e7c6647856088456</pass>
05     <email>user@user.com</email>
06     <rootdir>../..</rootdir>
07     <permissions>copy;upload;download</permissions>
08     <uploadfilter name="Images( *.jpeg, *.jpg, *.png)"type="*.jpg;*.jpg;*.png" />
09   </user>
10 </users>
  • name – user name; the default user name is ‘admin’ with password ‘admin’
  • password – passwords are twice md5 encoded strings; if you forget your admin password, you can change your pass here
  • email – an email adress for the user; this is optional
  • rootdir – the root directory of the user; this is the folder that you are in after logging on to flashcommander
    • the default is a relative path to the parent folder of the ‘flashcommander’ folder, but you can set an absolute system path as well:
      ‘/users/myusername’
  • permissions – this is a colon separated list of the permissions; possible values are:
    • copy;delete;rename;mkdir;overwrite;extension;upload;download;users;editimage;edittext
    • the default user can only copy, upload and download files
    • ‘users’ permission means that you have access to the Users menu
  • uploadfilter – specifies what kind of files can be uploaded by this user
    • name – this is a label that apears in the Browse file dialog
    • type – this is a colon separated list of the allowed extensions
    • in the example below the user can only upload jpeg and png files

Use drag&drop; and hotkeys for file operations

User interface
Menu bar:
  • Account: change your password here
  • Users: administrators can manage users here
  • About: information about flashcommander

Toggle view: toggles between File view and Thumbnail view.

User administration
From the 'Users' menu you can open the Users panel.
 
 
  • the second column shows the root folder
  • add or delete users
  • change passwords

The Edit user button opens the user profile dialog - here you can set permissions.
 
 
  • click the Set button to set the currently 
    selected folder as root folder
  • check Users to give user administation right
    - only give this permission to administrators!
  • check Extension to enable user to change 
    file extensions
  • if you check Upload you can specify 
    an upload file filter:
    • 'name' appears in the file browser dialog
    • 'type' specifies the selectable files
    • it is a semicolon separated list 
      of allowed extensions
  • if you disable a feature the related button 
    or menu will appear disabled for the user
Viewing content
If you double click or press Enter or F4 on any recognised file type, the file is open in the opposite pane.
The image below shows the built in video player.
 
  Flashcommander identifies file types based on extensions. For example if you want to handle *.asp files as text, you add this extension to the text filetypes in 'config.xml'.
Editing images
If you double click an image file the image editor window will open.
 
 
  • you can resize, rotate, crop images
  • click the checkbox to fit the preview to the window
  • supported types are jpeg, png and gif.
  • Gd lib should be enabled on the server
  • editing of very large images will fail because of Php resource limits like 'memory_limit' or 'max_execution_time'
  • to perform the operation click 'Save'
  • press Esc to close image editor
Uploading and downloading files
The picture below shows the upload dialog window in flashcommander. 
 
 
  • select multiple files from different folders
  • upload them with one click
  • rename files upon upload
  • conflicting filenames are highlighted in red
  • the progress bar shows state of the whole process
  • very large files won't upload because of Php limit 'upload_max_filesize'

When downloading a file you are prompted to choose a destination folder on your computer.
The download progress is shown in this dialog window:
 
Navigation and file operations
You can navigate with the mouse or with the keyboard. Hot keys are available, most of them are the same as in Total Commander.
You can navigate with the mouse by single or double clicking, depending on the configuration.
Action Key
Change view Tab
Parent folder Backspace
Previous folder Ctrl+<-
Next folder Ctrl+->
Target view = Source view F1
You have several options to start file operations:
Action Key
View F4
Copy F5
Move F6
New folder F7
Rename F8
Delete Del
Copy to clipboard Ctrl+C
Cut to clipboard Ctrl+X
Paste from clipboard Ctrl+V
Save text file Ctrl+S
  • copy - drag with the mouse
  • move - press Ctrl and drag with the mouse
  • keyboard - see the hot keys on the left
  • the buttons on the Button bar
  • right click and use Context Menu

Manage your web site as easily as your desktop

User interface

Menu bar:

  • Account: change your password here
  • Users: administrators can manage users here
  • Modules: here you can load modules like ImageViewer, TextEditor, etc.

Toggle view:toggles between File viewand Thumbnail view.

User interface

User administration

From the ‘Users’ menu you can open the Users
panel.

  • click the Set root
    button to set the currently selected folder as root folder
  • you can also (carefully) hand-edit this value and then click Change root
  • check Users
    to give user administation right
    – only give this permission to administrators!
  • check Extension
    to enable user to change
    file extensions
  • if you check Upload
    you can specify
    an upload file filter:

     

    • ‘name’ appears in the file browser dialog
    • ‘type’ specifies the selectable files; it is a semicolon separated list
      of allowed extensions
  • if you disable a feature the related buttonor menu will appear disabled for the user

When you have made changes to a user (root dir or permissions) click on Save.

Uploading and downloading files

The picture below shows the upload dialog window in Flashcommander.

  • select multiple files from different folders
  • upload them with one click
  • rename files upon upload
  • conflicting filenames are highlighted in red
  • the progress bar shows state of the whole process
  • if large files don’t upload check Php setting ‘upload_max_filesize’ and ‘post_max_size’

When downloading a file you are prompted to choose a destination folder on your computer.
The download progress is shown in this dialog window:

Navigation and file operations

You can navigate with the mouse or with the keyboard. Hot keys
are available, most of them are the same as in Total Commander.
You can navigate with the mouse by single or double clicking, depending on the configuration.
You can navigate back and forward
using the navigation history buttons at the top.
The state of the buttons indicate if it is possible to go to the previous or next folder.

Action Key
Change view Tab
Parent folder Backspace
Previous folder Ctrl + left arrow
Next folder Ctrl + right arrow
Target view = Source view F1

You have several options to start file operations:

Action Key
Copy F5
Move F6
New folder F7
Rename F8
Delete Del
Copy to clipboard Ctrl + C
Cut to clipboard Ctrl + X
Paste from clipboard Ctrl + V
Save text file Ctrl + S
  • copy
    – drag with the mouse
  • move
    – press Ctrl and drag with the mouse
  • keyboard – see the hot keys on the left
  • the buttons on the Button bar
  • right click and use Context Menu

Managing tabs

Loading a module automatically creates a new tab.

You can also create a new tab containing a new filelist.

Create a new tab by pressing Ctrl + T.

Remove a tab by pressing Ctrl + W.

Viewing content

If you double click or press Enter
on any recognised file type, the file is open in the opposite pane.

Flashcommander 2.0 uses modules to display file content.

File extensions are used to determine which module to load.

If you want to handle *.html files as text, you associate this extension with the TextEditor module in ‘config.xml’.

Flashcommander comes with 5 modules:

  • ImageViewer
  • VideoPlayer
  • TextEditor
  • SwfPlayer
  • Mp3Player

The picture below shows the TextEditor module.

2 Comments