neoRate
Star rater.
Based on:
https://github.com/auxiliary/rater
V:1.0
Description
The neoRate plugin for VisualNEO Web provides a star rating system, allowing users to rate content or products within an application. This plugin is highly customizable, supporting various rating symbols, adjustable maximum values, and interaction control options, making it ideal for feedback collection, product reviews, and other interactive user rating applications. Here’s an overview of its key features and usage:
Initializing a Rating Component
The neoRateInitialize command sets up a rating component within a specified container, allowing developers to define rating symbols, maximum values, and other interactive options.
- Command: neoRateInitialize
- Syntax: neoRateInitialize "objId" symbol maxValue initialValue readOnly changeOnce resultVar callbackSub
- objId: ID of the container where the rating component will display.
- symbol: Choice of rating symbol (e.g., stars or hearts).
- maxValue: Maximum possible rating (e.g., 5).
- initialValue: Starting value for the rating.
- readOnly: Set to true if the rating should be uneditable by users.
- changeOnce: Allows rating to be changed only once if set to true.
- resultVar: Variable to store the rating value.
- callbackSub: Optional subroutine triggered after a rating change.
Example:
neoRateInitialize "ratingContainer" "star" 5 0 false true "userRating" "onRatingChange"
This setup displays a 5-star rating component in ratingContainer, allowing the user to rate only once, with the result stored in userRating and triggering the onRatingChange subroutine upon rating changeieving and Setting Ratings The plugin provides commands for retrieving and updating the current rating value:
- neoRateGetValue: Retrieves the current rating and stores it in a specified variable.
- Syntax: neoRateGetValue "objId" [resultVar]
- neoRateSetValue: Sets a new rating value programmatically.
- Syntax: neoRateSetValue "objId" theValue
Example for Get and Set:
neoRateGetValue "ratingContainer" "[currentRating]"
neoRateSetValue "ratingContainer" 4
These commands retrieve the user’s rating from ratingContainer and set a new rating of 4 if required.
Practical Applications
The neoRate plugin is ideal for:
- Product Reviews: Allowing users to rate items in e-commerce apps.
- Content Feedback: Collecting feedback on articles, videos, or other content.
- Interactive Surveys: Capturing user preferences in survey-style apps.
With options for symbols, customization of maximum values, and control over user interaction, neoRate is a versatile tool for enhancing engagement and collecting feedback within VisualNEO Web applications .
|
Purpose: |
Initialize neoRate |
|
Category: |
neoRate |
|
Syntax: |
neoRateInitialize "objId" symbol maxValue initialValue readOnly changeOnce resultVar callbackSub
objId Select a Container object symbol Choose one of the predefined symbols maxValue Max value initialValue Initial value readOnly Read only changeOnce Change once resultVar Variable to store rating callbackSub Callback subroutine (optional) |
neoRateGetValue
|
Purpose: |
Get the current neoRate value |
|
Category: |
neoRate |
|
Syntax: |
neoRateGetValue "objId" [resultVar]
objId Container object resultVar Variable to store result |
neoRateSetValue
|
Purpose: |
Set the current neoRate value |
|
Category: |
neoRate |
|
Syntax: |
neoRateSetValue "objId" theValue
objId Container object theValue Value |
Created with the Personal Edition of HelpNDoc: Easily create Help documents