Agentur MUC-CMS - Zur Startseite
Home > TYPO3 Inside > 

Tutorial MOC Fileshare Manager: Modifications

  German Version

 

After installation the MOC Fileshare Manager should look as depicted below. I've already created some folders and uploaded some files via the front end. Graphical variations are possible due to the basic template of the website.

 

Screenshot by MUC-CMS

 

 

 

With some alterations as described in the following, the MOC Fileshare Manager can look like this:

 

 

Screenshot by MUC-CMS

 

1. Configurations using the Constant Editor

When you open the PLUGIN.FILEMANAGER (13) in the Constant Editor, you'll see that all options are well explained.

 

Notice the line "Allowed extension": By default only the file types txt,xls,doc,pps,gif,jpg,htm,html are allowed for upload. At least I'd add pdf and ppt !

 

Also the possible depth of directories is adjustable (Max depth). Default value is 3.

 

2. Hiding the Target Mountpoint

If you want the Target Mountpoint not to be shown in the front end, you can use a 'quick and dirty' solution. Open pi1/class.tx_mocfilemanager_pi1.phpand comment out the following 5 lines (#):

 

Screenshot by MUC-CMS

 

In general:

pi1/class.tx_mocfilemanager_pi1.php and all other files of the extension can be edited by opening them in the Extension Manager: Choose the module Ext Manager, then the extension MOC Fileshare Manager, then Edit Files...

 

3. Labels 'Upload new file', 'Create new dir' and others

Both Labels - as well as all other texts, button texts, error messages etc. - can be changed quickly and simply in pi1/locallang.php.

 

4. Changing the label of the file size

Search in pi1/class.tx_mocfilemanager_pi1.php for:

$content .= '<td>'.t3lib_div::formatSize($info['size'],"b | Kb| Mb| Gb").'</td>';

 

Instead of b you can write Bytes, instead of Kb for example KB and do on.

 

5. Changing the format of the date

Search in pi1/class.tx_mocfilemanager_pi1.php for:

$content .= '<td>'.date(" d M Y.",filemtime("$dir/$file")).'</td>';

 

This line exists two times!

The first appearance deals with the folders, the second with the files.

 

Examples:

d.m.Y = 11.10.2005

d.m.y = 11.10.05

H:i:s = Time (e.g. 21:37:17 -> hours:minutes:seconds)

Combination: d.m.y (H:i:s) = 11.10.05 (21:37:17) and so on...

 

In this line also the align (e.g. right) can be configured: '<td align="right">' etc.

 

6. Changing the symbols for delete and rename

Apart from the fact that I personally don't like the standard rename-symbol, it's not in line with the delete-symbol (see image on top of this page).

 

The rename.gif is located in the folder ../t3lib/gfx. You can save the original by simply renaming it (e.g. _rename.gif). Then copy your own rename.gif into this folder, empty the cache and reload the page.

 

Screenshot by MUC-CMS

 

The delete.gif is located in typo3conf/ext/moc_filemanager/res. I left it unchanged.

 

7. The Look: Fonts, buttons and spacing

The look is definied in the file ext_typoscript_setup.txt. Decisive are the styles in the class plugin.tx_mocfilemanager_pi1._CSS_DEFAULT_STYLE.

 

It's recommended to make a back-up of the file ext_typoscript_setup.txt before you start changing. And don't forget to clear the cache in order to see your changes.

 

 

The following table lists all relevant styles (abbreviated). I placed line numbers before each class.

 

01

02

03

04

05

06

07

08

09

10

11

12

13

14

15

16 

DIV.tx-mocfilemanager-pi1 TABLE.mounttable TD { padding: 0px;}
DIV.tx-mocfilemanager-pi1 TABLE#contenttable TD { padding: 0px;}
DIV.tx-mocfilemanager-pi1 .filelink { font-family: Verdana; font-size:  ...
DIV.tx-mocfilemanager-pi1 TABLE#contenttable TD.borderbottom { padding: ...
DIV.tx-mocfilemanager-pi1 .filelink:hover {text-decoration: underline;} ...
DIV.tx-mocfilemanager-pi1 .filelinkactive { font-family: Verdana; font- ...
DIV.tx-mocfilemanager-pi1 { font-family: Verdana; font-size: 22px; colo ...
DIV.tx-mocfilemanager-pi1 .filelinkactive { font-family: Verdana; font- ...
DIV.tx-mocfilemanager-pi1 .filelinkactive:hover{ text-decoration: under ...
DIV.tx-mocfilemanager-pi1 .action {font-family: Verdana, Arial, Helveti ...
DIV.tx-mocfilemanager-pi1 .actionButton {font-family: Verdana, Arial, H ...
DIV.tx-mocfilemanager-pi1 .command {font-family: Verdana; font-size: 12 ...
DIV.tx-mocfilemanager-pi1 .info {font-family: Verdana; font-size: 10px; ...
DIV.tx-mocfilemanager-pi1 .dirpath {font-family: Verdana; font-size: 12 ...
DIV.tx-mocfilemanager-pi1 P { font-family: Verdana; font-size: 12px; co ...
DIV.tx-mocfilemanager-pi1 TABLE.MainInfoTable { border: 1px solid #0000 ... 

 

What does what?

 

01

02

03

04

05

06

07

08

09

10

11

12

13

14

15

16 

---

Cellpadding table content
Font folders and filenames
Black line under headline (Share://)
Hover when moving mouse over folders and filenames

---

Font filesize and date. See annotation below!

Identical with line 06! (A mistake of the author?!)

---
Input field under "Upload New File" and "Create new dir"
Button "Upload" and "Create"
Font "Upload New File" and "Create new dir"

In version 0.8.0 obsolete. See annotation below!
Font Path (Share://)

Font Paragraph (P). Does the error messages!
In version 0.8.0 obsolete. See annotation below!

 

 

Annotation to line 07:

This class doesn't seem very meaningful. But if you place the tag TD before it, you can alter the font of the filesize and the date. Both are pure table data and - without the TD - not addressed by the stylesheet.

 

My proposal is to change it to: TD { font-family: Verdana; font-size: 22px; color: #000033;}

 

Note: Doing this change also the font of the Target Mountpoint alters (see also No. 2 "Hiding the Target Mountpoint").

 

 

 

Annotation to line 13 and 16:

In the previous version (0.7.1) the MOC Fileshare Manager had a info-symbol next to the delete-symbol. On mouse-over an info-layer popped up:

 

Screenshot by MUC-CMS

 

 

Because this feature only worked with the Internet Explorer I assume the author abandoned it in the actual version (0.8.0). Instead of it he packed filesize and date directly in two table columns.

TABLE.MainInfoTableformated this info-layer, .infothe date right of the filename.

If you take a look in the actual pi1/class.tx_mocfilemanager_pi1.php, you can see that the info-layer has been commented out.

 

 

 

If you want to test the previous version with the info-layer (0.7.1), you can download the former pi1/class.tx_mocfilemanager_pi1.php here:

 

Open or save target as: moc_pi1_php_version_0_7_1_with_info_layer.txt

 

Just exchange the content of the files! (And don't forget to back-up the actual version of the file).

 

 

 

Author of the tutorial: Agentur MUC-CMS

X / Twitter    Nach oben
Nach obenNach oben