15.08.2013 Views

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Step 2 - Extract the Content<br />

Content Upload<br />

The information about the uploaded content is contained within the "content_title",<br />

"content_size", "content_type", and "content_description" fields. The actual<br />

content is contained in the "content_text" field.<br />

The content received can be in HTML, XML, or RTF format. The format received<br />

is determined by the client side scripting and configuration.<br />

Below is an ASP line that extracts the content.<br />

strContent = objUpload.EkFormFieldValue(binaryFormData,"content_text", ErrorCode)<br />

Step 3 - Save the Content<br />

Step 4 - Return a Response<br />

The Receiving Page<br />

The receiving script saves the content in the mechanism that it requires. Below is<br />

ASP code that saves the content to the database.<br />

AddNewContentToDatabase SQLFilter(strTitle), SQLFilter(strContent)<br />

Because <strong>eWebEditPro</strong> displays the response in the editor, the client should<br />

generate a response that the user understands.<br />

Below is an ASP example showing how to generate a response that confirms the<br />

content upload.<br />

strResp = ""<br />

If "New" = strDesc Then<br />

strResp = strResp & "New Content Received"<br />

AddNewContentToDatabase strTitle, strHtml<br />

Else<br />

strResp = strResp & "Updated Content Received"<br />

UpdateContentInDatabase strTitle, strHtml, strID<br />

End If<br />

strResp = strResp & "Content Title:&nbsp;&nbsp;" & strTitle & ""<br />

strResp = strResp & "body>"<br />

Response.Write(strResp)<br />

Like Automatic Upload, Content Upload uses a receiving page on the server. The<br />

form with the data is posted to the receiving page.<br />

The receiving script determines how and where content should be saved. The<br />

content is usually stored as a string in a database.<br />

If you use the receiving page specified for Automatic Upload, the content upload<br />

can occur on the client side with just the command. The server side administrator<br />

or CMS builder must create the receiving page.<br />

That page is specified in the configuration data or in the Automatic Upload Object<br />

Interface. The code below illustrates where the Automatic Upload page is<br />

specified in the configuration data.<br />

<br />

<br />

<strong>Ektron®</strong> <strong>eWebEditPro</strong> Developer’s <strong>Reference</strong> <strong>Guide</strong>, Release 5.1, Revision 1 505

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!