Hi,
I am making a website where I am using CKfinder as a standalone file browser as well as in FCKeditor. I used the javascript popup sample as the base and it worked, however I only want images to be shown, and not all of the files. I know that this can be done by typing '?type=Images' at the end of the url. I was wondering if this can be done by simply passing the type of file to show, eg. Images or Flash, to the '_BuildUrl' function. Is this possible to do?
Also, I saw that there is code in the ckfinder.js file to make an iframe. How do you go about putting this into a page? It would be good to have this, as it definitely looks better.
Any help on this would be much appreciated.
Thanks,
Joel
I am making a website where I am using CKfinder as a standalone file browser as well as in FCKeditor. I used the javascript popup sample as the base and it worked, however I only want images to be shown, and not all of the files. I know that this can be done by typing '?type=Images' at the end of the url. I was wondering if this can be done by simply passing the type of file to show, eg. Images or Flash, to the '_BuildUrl' function. Is this possible to do?
Also, I saw that there is code in the ckfinder.js file to make an iframe. How do you go about putting this into a page? It would be good to have this, as it definitely looks better.
Any help on this would be much appreciated.
Thanks,
Joel

Re: CKfinder js Popup
For now, you would have to modify ckfinder.js and adjust it to your needs.
I understand that you want to open CKFinder with the "Browse Server" button in an iframe instead of in a popup.
I have attached a slightly modified popup sample, I hope this is what you wanted to achieve. Unpack and save it as iframe.html in _samples/js directory.
Attachments:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: CKfinder js Popup
If I open this page directly in a browser it works fine.
If I use the open window javascript the page does not work. It simply wants to close the window. If I click on a link to open the window I get the same results. I am using IE7. Seems like the function is not getting called.
Anybody have an answer to this.
Peace.
Re: CKfinder js Popup
If you're still experiencing this problems, try this temporary solution: open files located in the core/js directory (ckfinder_gecko.js, ckfinder_ie.js)
1. Find function bb:
function bb(A){var B=aK.ar+A;B=encodeURI(B).replace('#','%23');switch (ab.dS){case 'fckeditor':case 'js':if (ab.dI) ab.dI(B);break;};if (window.top==window.parent&&window.top.opener){window.top.close();window.top.opener.focus();}};and remove this code:
if (window.top==window.parent&&window.top.opener){window.top.close();window.top.opener.focus();}(this code is responsible for closing CKFinder immediately)
2. Find function gE:
function gE(){var A=ao.es('action');switch (A){case 'js':var B=ao.es('func');if (B&&B.length>0){var C=window.parent.opener||window.parent.parent;ab.dI=C[B];};break;default:var D=window.top.opener;if (D&&D['FCK']&&D['SetUrl']){A='fckeditor';ab.dI=D['SetUrl'];}else A=null;};ab.dS=A;};and change it to:
function gE(){var A=ao.es('action');switch (A){case 'js':var B=ao.es('func');if (B&&B.length>0){var C=window.parent.opener||window.parent.parent;ab.dI=C[B];if(!ab.dI && window.parent.parent) ab.dI=window.parent.parent[B]};break;default:var D=window.top.opener;if (D&&D['FCK']&&D['SetUrl']){A='fckeditor';ab.dI=D['SetUrl'];}else A=null;};ab.dS=A;};(this should point CKFinder to ShowFileInfo function if it doesn't work)
Let me know if that did the trick.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+