byty v Jičíně k prodeji do osobního vlastnictví archeolog.cz: Obří Hrad Keltské oppidum Stradonice Habrůvka, jeskyně Býčí skála pravěk datace, časová osa, pravěké dějiny
   Témata: Home

Výlety

Foto

Technika

Výhledy

Cestování

K zamyšlení


LINUX4ALL archiv

Na webu

Pobavení

Příroda

Report, Dokument

Sport

Tiny MCE and simplebrowser

- STEFi - 2007-06-07 17:51:13
Looking for free file manager for TinyMCE? Several notes about implementation simplebrowser to Joomla TinyMCE....


Objectives
I decided to install new Joomla 1.5 Beta due to code mess in previous version (1.0.x ). I get cleaner code, easy to use adminstration interface, etc. Default Joomla installation includes TinyMCE wysiwyg editor but there is a lack of file manager. File manager plugin is not free. Usually I use JCE editor but it is available only for stable version 1.0.x. Other editors I was unable to install.

Where to start
http://tetlaw.id.au/view/blog/fckeditor-file-browser-plugin-for-tinymce-editor/
On this page you can find package for installation. In Joomla 1.5 Beta is TinyMCE version 2.0 so download propper package simplebrowser.zip. It is older version and there are few bugs which I had to fix. First of all the simplebrowser has slightly different philosophy compared to Joomla fila manager (media manager). Files are divided to Images, Files, Flash and Media. I don't like this and changed it to joomla-like. Second problem was focus on parent window from which is simplemanager started. These two main problems I had to solve.

Installation process

1. donwload plugin
2. unzip to the folder simplebrowser to your Joomla directory "yourJoomla/plugins/editors/tinymce/jscripts/tiny_mce/plugins"
3. edit file "yourJoomla/plugins/editors/tinymce.php"
4. change this (line 290):
plugins : "advlink, advimage, $plugins",
to
plugins : "advlink, advimage,simplebrowser, $plugins",

5. add this (my recommendation after line 290):
file_browser_callback : "TinyMCE_simplebrowser_browse",
plugin_simplebrowser_browselinkurl : '../simplebrowser/browser.html?Connector=connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : '../simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : '../simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php',

6. In simplebrowser drectory edit connectors/php/config.php and change the path to your files (/images/ for me)

7. In simplebrowser drectory edit connectors/php/connector.php
line 83 to: FileUpload( '', $sCurrentFolder ) ;
line 93 to: GetFolders( '', $sCurrentFolder ) ;
line 96 to: GetFoldersAndFiles( '', $sCurrentFolder ) ;

8. In simplebrowser drectory edit connectors/php/io.php
line 26 to: return 'images' . $folderPath ;

9. In simplebrowser drectory edit frmresourceslist.html
In function OpenFile remove focus command, my function:

function OpenFile( fileUrl )
{
window.top.opener.TinyMCE_simplebrowser_browserCallback(escape(fileUrl)) ;
window.top.close() ;
}

Well, that's all.

Přidat komentář k tomuto článku:
Autor:Email:
Titulek:
Komentář:
Kontrola (opište číslo z obrázku): kontrola
Vyplnte prosim tucne oznacene polozky.
Vase komentare k tomuto clanku:
there is a little error napsal: fosion; email: me [at] fosion [dot] de; 2008-06-11 14:50:00 Hello, between simplebrowser and browserCallback , you need to have a '.' not a '_'

function OpenFile( fileUrl )
{
window.top.opener.TinyMCE_simplebrowser.browserCallback(escape(fileUrl)) ;
window.top.close() ;
}

thx for this step by step tutorial, it helped me quite a lot

greetings from Berlin
STEFi (c) 2004 - stefi [at] netdev [dot] cz
Pokud chcete zde publikované materiály použít, prosím, informujte mě. If you wish to use these published materials, please, let me know.
-0.969 sec