Ticket #1102 (closed Bug: invalid)

Opened 15 months ago

Last modified 15 months ago

hostname - url of inserted resource

Reported by: Parahat Melayev Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

When I add media or file from file browser, FCKEeditor adds full path but this won't work if you send e-mails created with FCKeditor as client will try to call path from its own host.

So I made some improvements at frmresourceslist.html on oListManager.AddFile as below

oListManager.AddFile = function( fileName, fileUrl, fileSize ) {

// Create the new row. var oRow = this.Table.insertRow(-1) ;

//Burayı ben ekledim (parahat) var sHostname = window.location.hostname; if(window.location.port.length > 0)

sHostname += ":" + window.location.port;

// Build the link to view the folder.

var sLink = '<a href="#" onclick="OpenFile(\'http://' + sHostname + fileUrl + '\');return false;">' ;

// Get the file icon. var sIcon = oIcons.GetIcon( fileName ) ;

// Add the file icon cell. var oCell = oRow.insertCell(-1) ; oCell.width = 16 ; oCell.innerHTML = sLink + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' ;

// Add the file name cell. oCell = oRow.insertCell(-1) ; oCell.innerHTML = '&nbsp;' + sLink + fileName + '</a>' ;

// Add the file size cell. oCell = oRow.insertCell(-1) ; oCell.noWrap = true ; oCell.align = 'right' ; oCell.innerHTML = '&nbsp;' + fileSize + ' KB' ;

}

Attachments

frmresourceslist.html (4.7 KB) - added by Parahat Melayev 15 months ago.
Improved frmresuorceslist.html

Change History

Changed 15 months ago by Parahat Melayev

Improved frmresuorceslist.html

Changed 15 months ago by Parahat Melayev

Please see attaced file. Code in my first post is broken by Trac.

Changed 15 months ago by fredck

  • status changed from new to closed
  • resolution set to invalid

It is enough to set the full URL in the "UserFilesPath" setting of the file browser connector. In this way you can precisely control whether you want it or not to have the full URL.

Changed 15 months ago by fredck

  • keywords file browser url path image e-mail removed
Note: See TracTickets for help on using tickets.