Cutefields with CKfinder

Post your suggestions for the script here.

Cutefields with CKfinder

Postby marcusmagalhaes » Tue Aug 02, 2016 3:48 pm

basically, I choose the url of the image, using the CKfinder.
Attachments
3.png
select and voila!
(83.83 KiB) Not downloaded yet
2.png
opens the popup which contains the files.
(191.41 KiB) Not downloaded yet
4.png
I click the button.
(61.31 KiB) Not downloaded yet
I love cnr!
User avatar
marcusmagalhaes
 
Posts: 217
Joined: Tue Apr 24, 2007 1:17 pm

Re: Cutefields with CKfinder

Postby Hawk » Wed Aug 03, 2016 1:30 pm

Nice. But what if you had multiple cutefields, I guess ckfinder would be applied to all of them right?
User avatar
Hawk
 
Posts: 434
Joined: Tue Aug 29, 2006 9:00 pm

Re: Cutefields with CKfinder

Postby marcusmagalhaes » Wed Aug 03, 2016 6:07 pm

cutefields2.1.php
if($thisType == "String"){
$buffer .= '<legend>'.$thisDesc.'</legend><input type="text" name="'.$thisField.'" id="'.$thisField.'" value="'.$thisValue.'"/><input type="button" value="Localizar no Servidor" onclick="BrowseServer();" /><br /><br />';


cute.js
//CKFinder - Popup
function BrowseServer()
{
// You can use the "CKFinder" class to render CKFinder in a page:
var finder = new CKFinder();
finder.basePath = '../'; // The path for the installation of CKFinder (default = "/ckfinder/").
finder.selectActionFunction = SetFileField;
finder.popup( { width : 850, height : 600, popupTitle : 'CKFinder Popup', popupFeatures : 'menubar=yes,modal=yes' } );

// It can also be done in a single line, calling the "static"
// popup( basePath, width, height, selectFunction ) function:
// CKFinder.popup( '../', null, null, SetFileField ) ;
//
// The "popup" function can also accept an object as the only argument.
// CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ;
}

// This is a sample function which is called when a file is selected in CKFinder.
function SetFileField( fileUrl )
{
document.getElementById( 'url' ).value = fileUrl; -------> url = cutefields field name ...
}
I love cnr!
User avatar
marcusmagalhaes
 
Posts: 217
Joined: Tue Apr 24, 2007 1:17 pm

Re: Cutefields with CKfinder

Postby Hawk » Fri Aug 12, 2016 8:58 am

Cool, so any field which is type "String" will get the button for url.
User avatar
Hawk
 
Posts: 434
Joined: Tue Aug 29, 2006 9:00 pm


Return to Suggestions



Who is online

Users browsing this forum: No registered users and 1 guest

cron

x