WordPress 2.0 Plugin: Filemanager Tinymce Editor
The build-in filemanager in WordPress 2.0 didn´t suit my needs, so i took a TinyMCE Plugin "filemanager", i´m also using in mambo. Thanks to enrico this is already working in my WYSIWYG for WP 1.5
I´m still having problems to implement it as a real WP 2.0 Plugin, because the new wysiwyg-hooks aren´t very good documented yet. While trying i also took the buttonsnap class by Owen Winkler, which is inevitable to accomplish this.
After 3 hours i said to myself: "Damn i should know jScript better" (help enrico)
Ok what i did was plug it hard into the WordPress Tiny-Core. Further down are the instructions to do this. I hope this will be usefull to somebody .. please let me know!
Screenshot of Filemanager Popup Window
Features:
– Files upload, delete, rename, move (also multiple file actions but upload)
– Directory create, delete
– insert Download Link into Post with Filetype Image and/or Filesize and/or Date
– can acces htacces protected folders .. at least with my server-config
– sort FileList by Name / Size / Date
– pretty neat to use
ToDo´s:
– make a real plugin
– take all config options into Backoffice
– use user rights for different File Options
Install Instructions:
Knowledge of coding needed: medium
1. Look into the Zip
1a. Backup Backup Backup
2. Copy Zip folder content to TinyMCE-folder to /wp-includes/js/tinymce/
watch out your original tiny_mce_gzip.php will be overwritten better make a backup. I´ll describe the changes made in step 6.
3. Edit your URL Settings in
/tinymce/plugins/filemanager/insertfile/config.inc.php
You´ll see thoose 3 places directly at the beginning of the file.
4. Edit your URL + Language Settings in
/tinymce/plugins/filemanager/insertfile/insert_file.php
You´ll find the available languages in filemanager/langs
5. Edit your URL + Language Settings in/tinymce/plugins/filemanager/insertfile/move.php
6. Edit /tinymce/tiny_mce_gzip.php
This file is also included in the package, you can make the changes by hand or better diff bevore overwriting the original…. if you´ve not already done it
Line 84 register the Plugin
find the plugin array and change to this appending the ‚filemanager‘
$plugins = apply_filters(‚mce_plugins‘, array(‚wordpress‘, ‚autosave‘, ‚wphelp‘,’filemanager‘));
Line 110 register the Plugin Button
at the end of this big ol´long Button array attach " ,’filemanager‘ " You can also put the button in some other place inside the array.
This should be it … works for me
Download
Version 0.2:
WordPress 2.0 Plugin: Filemanager Tinymce Editor
You can follow all the replies to this entry through the comments feed.
- By on 11.09.2007 at 0:13
- By on 22.03.2007 at 21:41
- By on 04.10.2006 at 2:57
Hi, your plugin is the greatest file manager for Tiny MCE, I have seen. KFC manager, Xinha manager, not even Ajax file manager can get close enough to your creation in means od integration with TinyMCE editor. But there is still one big problem and that is the integration with newest TinyMCE. It works, yes, but it also made some other default plugins stop working and Internet Explorer began to souht somehing about error on page. I believe it is the question of moding the editor_plugin.js to, so that it would be compatible with the newest TinyMCE. But since I am no coder, I will have to as you for this
… are tehre any chances of you doing it for us?
Any chance on a update?
The hack is „broken“ in WP 2.1 and up
Problem of Icon fixed in firefox!
I selected preferences, then i cleaned up all the items (passwords, cache…)
Also went to javascript configuration, and enabled all the options.
It works now!
That’s true, the icon just won’t appear in firefox.
I’ve got it working fine in IE but the icon doesnt appear in Firefox. Is this a know issue or am I missing something.
Would love to have it work in Firefox.
wow klasse ding!
hab ich schon länger gesucht sowas!
Habe alles nochmal nachgeschaut. Auch nochmal erneut installiert. Aber alles ohne erfolg!
Ich kann einfach keine Dateien oder Ordner markieren/select’en‘ um dann eine gewünschte Aktion durchzuführen.
nein, ich habe aus aus nem joomla herausgefiltert.
Du solltest mal in der config schauen, dort sind noch enige variablen. dann solletst du deine ordnerberechtigungen checken. Das kann je nach servereinstellung variieren.
Hallo!!! Das Plugin sieht bisher sehr vielversprechend aus. Genau das was ich suche! Habe aber ein Problem!
Ich kann Dateien hochladen und Ordner erstellen. Aber alle anderen Funktionen wie löschen, umbennen, nach TinyMCE den Link übergeben etc funktionieren nicht.
Ich kann die Dateien wohl nicht richtig markieren um mir ihnen eine oben genannte Aktion durchzuführen.
Liegt das Problem eventuell daran das ich das Plugin einzig und allein mit TinyMCE und nicht noch im zusammenhang mit WP nutze?
I would really appreciate your help because i have probs finding my way through buttonsnap. i looked at you implementation butt could not really figure it out!
If you need help creating a plugin from this, I can help.
I’ve used Role Manager and the buttonsnap class in my ImageManager plugin.
oh yeah i´ve already looked at this tiny plugin. it even has tags for an editable region.
I´ll definitly implement this, but till now none of my customers has asked for it.
Thanx for this nice nice plugin.. wonder if you should be able to accomplish something that no one have been doing yet. building a template function like fckeditor has see this exemple
http://tinymce.moxiecode.com/punbb/viewtopic.php?id=1849
and here you can try it out very nice template function
http://www.fckeditor.net/demo/default.html
By the way this rock! thx:D
Strange .. muss wohl beim editieren des Artikels gekillt worden sein. sollte es jetzt wieder tuen.. sorry
Trotz suche im Quellcode dieser Seite kann ich den Download-Link leider nicht ausmachen. Bin ich einfach nur blind oder fehlt er wirklich?
Schön das es läuft. Vielen dank für dein feedback, werde mal über ein Download nachdenken.
hi!
Danke!
Ich habs gefixed. Es war alles korrekt installiert, auch alles richtig eingefügt.
Nur habe ich mal aus Spaß die Zeilen mal geändert, bzw. das ‚filemanager‘ einfach mal weiter vor gesetzt.
Es geht um das hier:
Line 84 register the Plugin
find the plugin array and change to this appending the ‘filemanager’
$plugins = apply_filters(’mce_plugins’, array(’wordpress’, ‘autosave’, ‘wphelp’,’filemanager’));
Line 110 register the Plugin Button
at the end of this big ol´long Button array attach “ ,’filemanager’ “ You can also put the button in some other place inside the array.
Und nach dem vorsetzen und ner neuen LINEBREAK wurde es dann auch endlich angezeigt..
komisch, kann mir nicht erklären warum.
Aber geiles Teil!
Cool wäre es, wenns so eine Art Plugin mit integriertem Downloadbereich werden würde, also auch mti Kategorien und so 😉
du solltest ein diskettensymbol im editor sehen. Ich habe im artikel noch ein bild davon eingefügt. Wenn das nicht zu sehen ist findet der tinyMCE nicht den filemanager, der im pluginordner liegen sollte -> ../wp-includes/js/tinymce/plugins/filemanager
Sobald der filemanager dort liegt wird das symbol angezeigt. Danach kannst du die pfade im filemanager anpasssen.
hi!
Echt geiles Ding, nur .. es geht irgendwie nicht.
Habe alles nach Anleitung gemacht, ich sehe nur nirgends etwas, mit dem ich das Popup öffnen könnte…
Wäre cool, wenn du mir den Vorgang mal kurz beschreibst.
Vor lauter Code check ich da gar nich mehr recht durch.. LOL
Achja, habe die tiny…gzip aus der ZIP genommen und hochgeladen.
ciao
Jan
Hey this file manager is awesome, you should really try to write this as a plugin!