Skip to content

UGC

This documentation outlines the key events triggered within the The User-Generated Content (UGC) features and provides guidance on initiating user actions through these events.

Event Definitions

The UGC system triggers specific events in response to user actions. These events, along with their corresponding identifiers, are as follows:

  • UGC_POST: Triggered when a user initiates the process of creating a new post.
  • UGC_REPORT: Triggered when a user clicks report to submit for a post.
  • UGC_QRCODE: Triggered when a user interacts with a QR code to open form.
  • UGC_VOTE: Triggered when a user casts a vote on a post or piece of content.
  • UGC_VOTED: Triggered when a user's vote is successfully registered.

Usage

To initiate user actions within the UGC system, developers can utilize the provided event triggers. Below are examples of how these triggers can be implemented:

javascript
// Open user post form
$cf.events.emit('UGC_POST');

// Open user report form
let broadcast = {"id":"c5245_flickr_53525460530","post_id":"53525460530", ...{} };
$cf.events.emit('UGC_REPORT', broadcast);

URL Integration

  • #newPost: An anchor that directs users to the new post form upon page load.

Example URL:

https://display.contentfry.com/d/[display_id]/#newPost

This URL simplifies the process of opening the new post form, enhancing user experience and facilitating engagement with the UGC feature.

Conclusion

By leveraging the UGC events and URL integration outlined in this documentation, developers seamlessly integrate user-generated content functionality into their applications, movivating active participation and enriching user interaction.