Step 3: Add User-Generated ContentThis is a featured page


Data Access API CallCellService.getCellContentReturns only the content of a cell.
Data Access API CallCellService.getCellReturns a cell's content, metadata, current revision information, and tags.

The user-generated content areas on your page can be retrieved as embedded HTML via a server-side include (SSI). The call to add user-generated content is made anonymously; i.e.you will not send us the ticket you received, described in step 1 of this guide. However, in order for your users to make edits to the content, you will need to have retrieved the ticket and provided it to the javascript client application outlined in step 2.

When you have identified where on your page you want to include user-generated content, you simply add the SSI in that location. The HTML response is contained in a <DIV> element and every ID and class used by the HTML and CSS is prefixed with "WPC" to avoid conflicts with your namespace.

Note that how you construct requests will vary depending on your platform and what frameworks you use. We have included some sample applications with code snippets to help get you started.

Two Different APIs

The two APIs (getCellContent, getCell) offer an increasing amount of data. At first, you should use getCell to retrieve as much data as possible -- this provides a "byline" for the content that includes information about the last author, a list of tags, and simple navigation to subpages. As you implement more API calls later, you can trim this request down.

Below is an example of the kind of information that can be returned with these calls.
getCellWithChildren attributes


Getting Cells Is Anonymous

These calls do not require a ticket because the call is made anonymously and no special permissions are required to view content. This allows for caching the content requests (described later in this guide).

Cells and Cell Identifiers

Every section of user-generated content, or cell, is referenced by a unique identifier. This identifier is something you make up that is meaningful to your system. When you request a cell, you must send along this unique identifier.

WYSIWYG Editing and Saving Content

Once the content is retrieved by your server and sent to the client, the client application enables WYSIWYG editing and saving of that content. To enable that functionality, refer to the next step of the Integration Guide.

Next Step 4: Customize Interface Style


boe_wetpaint
boe_wetpaint
Latest page update: made by boe_wetpaint , Mar 6 2009, 5:38 PM EST (about this update About This Update boe_wetpaint Edited by boe_wetpaint

3 words added
23 words deleted

view changes

- complete history)
More Info: links to this page
Started By Thread Subject Replies Last Post
bejawada Cannot get a user generated content cell displayed on my web applictn 8 Sep 15 2008, 5:16 PM EDT by boe_wetpaint
Thread started: Jun 2 2008, 6:08 PM EDT  Watch
I am getting an error message when I send in a get request for this CellService.getCellWithChildren() with a cell.CellId=TestCalendarPage.

I am setting the proper values for ticket, namespace, devkey in the servlet when making a get request. Please do let me know what I am missing here?
1  out of 1 found this valuable. Do you?    
Show Last Reply
cpatni Styling WPC-editableContent and WPC-areaContainer 4 May 8 2008, 11:33 AM EDT by ryan_wetpaint
Thread started: May 7 2008, 6:48 PM EDT  Watch
Is styling content is supported? I wanted to have a border around WPC-editableContent but it doesn't seem possible. Also, the id for WPC-areaContainer could not be used because the id is not a valid value.
WPC-areaContainer?cellId=game-827005
At least, I can't have following CSS
#WPC-areaContainer?cellId=game-827005 {
}

Any help?
Do you find this valuable?    
Show Last Reply
cpatni Can't see the user generated content after editing 1 Apr 30 2008, 7:43 PM EDT by cpatni
Thread started: Apr 30 2008, 7:42 PM EDT  Watch
http://scripts.snowball.com/cp/ugc.html
I can't see the content when I refresh the page. I can see it when I try to edit it. Is it expected behavior. The page is statically generated using a java program for testing.
Do you find this valuable?    
Keyword tags: None
Show Last Reply
Showing 3 of 3 threads for this page

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)