need4speed Posted June 19, 2010 Share Posted June 19, 2010 Is there a skilled PHP developer who can integrate this file manager into Prestahop so it works with Tinymc ?KCfinder web file manager Link to comment Share on other sites More sharing options...
rocky Posted June 20, 2010 Share Posted June 20, 2010 From reading the instructions, it doesn't look very difficult. You could extract all the files into a kcfinder directory in the root of PrestaShop. You would then need to modify kcfinder/config.php and change line 64 from: //'_tinyMCEPath' => "/tiny_mce", to: '_tinyMCEPath' => "/js/tinymce/jscripts/tiny_mce", You would then need to add a parameter everywhere TinyMCE is called to link to the kcfinder directory. For example, to add the kcfinder to the "Home text editor v1.6" module, edit modules/editorial/editorial.php and add the following after line 133: file_browser_callback: 'openKCFinder', then add the following code before the closing script tag on line 163: function openKCFinder(field_name, url, type, win) { tinyMCE.activeEditor.windowManager.open({ file: '/kcfinder/browse.php?opener=tinymce&type;=' + type, title: 'KCFinder', width: 700, height: 500, resizable: "yes", inline: true, close_previous: "no", popup_css: false }, { window: win, input: field_name }); return false; } I don't have time to actually test this though. Link to comment Share on other sites More sharing options...
need4speed Posted June 20, 2010 Author Share Posted June 20, 2010 Thanks for the tip but I think im doing something wrong since my home editorial page disappersI have modified the editorial.php code tol: function tinyMCEInit(element) { $().ready(function() { $(element).tinymce({ file_browser_callback: 'openKCFinder', // Location of TinyMCE script script_url : \''.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js\', // General options theme : "advanced", plugins : "safari,pagebreak,style,layer,table,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,directionality,fullscreen", // Theme options theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,pagebreak", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, content_css : "'.__PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/global.css", width: "582", height: "auto", font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", elements : "nourlconvert", convert_urls : false, language : "'.(file_exists(_PS_ROOT_DIR_.'/js/tinymce/jscripts/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en').'" }); }); } function openKCFinder(field_name, url, type, win) { tinyMCE.activeEditor.windowManager.open({ file: '/kcfinder/browse.php?opener=tinymce&type;=' + type, title: 'KCFinder', width: 700, height: 500, resizable: "yes", inline: true, close_previous: "no", popup_css: false }, { window: win, input: field_name }); return false; } tinyMCEInit(\'textarea.rte\'); Can you maybe take a quick look to see what is wrong? Link to comment Share on other sites More sharing options...
need4speed Posted June 20, 2010 Author Share Posted June 20, 2010 I got it to work I just needed to modify some of the ' to " But I have one problem left. When I have uploaded a pictured and double click on it, it doesnt get inserted into the tinymc window Link to comment Share on other sites More sharing options...
need4speed Posted June 20, 2010 Author Share Posted June 20, 2010 I got the whole thing to work Just remember to us javascript newbie guys that you have to remove the uncomment thing on the line: _tinyMCEPath//'_tinyMCEPath' => to '_tinyMCEPath' => Link to comment Share on other sites More sharing options...
Ardian Yuli Setyanto Posted June 21, 2010 Share Posted June 21, 2010 so your problem is solved ? Link to comment Share on other sites More sharing options...
need4speed Posted June 21, 2010 Author Share Posted June 21, 2010 It sure is Link to comment Share on other sites More sharing options...
rocky Posted June 21, 2010 Share Posted June 21, 2010 Then please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
ussef Posted December 29, 2010 Share Posted December 29, 2010 bonjour,j'ai la meme problème aussi. toute est bien en place juste lorsque je click sur l'image " double-click" URL de l'image ne se charge pasmon dossier editeur.htmldossier tinymcedossier kcfinderconfig.php // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION CONFIGURATION '_check4htaccess' => true, '_tinyMCEPath' => "tinymce/jscripts/tiny_mce", editeur.html <html > <head> <title>Full featured example</title> <!-- TinyMCE --> [removed][removed] <!-- /TinyMCE --> [removed] tinyMCE.init({ mode: "exact", elements: "elm1", theme: "advanced", plugins: "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave", theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft", theme_advanced_toolbar_location: "top", theme_advanced_toolbar_align: "left", theme_advanced_statusbar_location: "bottom", theme_advanced_resizing: true, style_formats: [ {title: 'Bold text', inline: 'b'}, {title: 'Red text', inline: 'span', styles: {color: '#ff0000'[spam-filter], {title: 'Red header', block: 'h1', styles: {color: '#ff0000'[spam-filter], {title: 'Example 1', inline: 'span', classes: 'example1'}, {title: 'Example 2', inline: 'span', classes: 'example2'}, {title: 'Table styles'}, {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ], file_browser_callback: 'openKCFinder' }); function openKCFinder(field_name, url, type, win) { tinyMCE.activeEditor.windowManager.open({ file: 'kcfinder/browse.php?opener=tinymce&type;=' + type, title: 'KCFinder', width: 700, height: 500, resizable: "yes", inline: true, close_previous: "no", popup_css: false }, { window: win, input: field_name }); return false; } [removed] </head> <body> <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%"> </textarea> </body> </html> merci de m'aider a résoudre cette problème Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now