GD Star Rating
integration functions
Functions |
|
| wp_gdsr_render_comment_aggregation ($post_id=0, $template_id=0, $show="total", $echo=true) | |
|
This will render aggregated comments rating for the post. |
|
| wp_gdsr_comment_integrate_multi_result ($comment_id, $multi_set_id=0, $template_id=0, $stars_set="oxygen", $stars_size=20, $stars_set_ie6="oxygen_gif", $avg_stars_set="oxygen", $avg_stars_size=20, $avg_stars_set_ie6="oxygen_gif", $echo=true) | |
|
Integrate multi rating result into the comment. |
|
| wp_gdsr_comment_integrate_multi_result_average ($comment_id, $multi_set_id=0, $template_id=0, $avg_stars_set="oxygen", $avg_stars_size=20, $avg_stars_set_ie6="oxygen_gif", $echo=true) | |
|
Integrate average multi rating result into the comment. |
|
| wp_gdsr_comment_integrate_standard_result ($comment_id, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Integrate standard rating result into the comment. |
|
| wp_gdsr_comment_integrate_multi_rating ($multi_set_id=0, $template_id=0, $value=0, $stars_set="oxygen", $stars_size=20, $stars_set_ie6="oxygen_gif", $echo=true) | |
|
Integrate multi set post rating into the comment form. |
|
| wp_gdsr_comment_integrate_standard_rating ($value=0, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Integrate standard post rating into the comment form. |
|
| wp_gdsr_render_article_thumbs ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Renders the rating thumbs for article. |
|
| wp_gdsr_render_article ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Renders the rating stars for article. |
|
| wp_gdsr_render_comment_thumbs ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Manual render of comment thumbs rating. |
|
| wp_gdsr_render_comment ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Manual render of comment rating. |
|
| wp_gdsr_render_multi ($multi_set_id=0, $template_id=0, $read_only=false, $post_id=0, $stars_set="", $stars_size=0, $stars_set_ie6="", $avg_stars_set="oxygen", $avg_stars_size=20, $avg_stars_set_ie6="oxygen_gif", $echo=true) | |
|
Renders multi rating block. |
|
| wp_gdsr_new_comment_review ($value=0, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true) | |
|
Renders stars for comment review used in the comment form for the
comment author to place it's review rating. |
|
| wp_gdsr_multi_review_editor ($multi_set_id=0, $post_id=0, $template_id=0, $echo=true) | |
|
Renders multi rating review editor block. |
|
| wp_gdsr_show_multi_review ($multi_set_id=0, $template_id=0, $post_id=0, $stars_set="oxygen", $stars_size=20, $stars_set_ie6="oxygen_gif", $avg_stars_set="oxygen", $avg_stars_size=20, $avg_stars_set_ie6="oxygen_gif", $echo=true) | |
|
Renders multi rating review for a post. |
|
| wp_gdsr_multi_rating_average ($multi_set_id=0, $post_id=0, $show="total", $echo=true) | |
|
Renders single rating stars image with average rating for the multi
rating review. |
|
| wp_gdsr_multi_review_average ($multi_set_id=0, $post_id=0, $echo=true) | |
|
Renders single rating stars image with average rating for the multi
rating review. |
|
| wp_gdsr_render_review ($post_id=0, $template_id=0, $stars_set="oxygen", $stars_size=20, $stars_set_ie6="oxygen_gif", $echo=true) | |
|
Renders standard review for a post. |
|
| wp_gdsr_render_rating_results ($atts=array(), $echo=true) | |
|
Renders rating results based on $atts settings array similar to the
StarRating shortcode. |
|
| wp_gdsr_render_star_rating_widget ($widget=array(), $echo=true) | |
|
Renders widget-like element based on the $widget settings array.
|
|
| wp_gdsr_render_blog_rating_widget ($widget=array(), $echo=true) | |
|
Renders blog rating widget element based on the $widget settings
array. |
|
| wp_gdsr_render_comments_rating_widget ($widget=array(), $echo=true) | |
|
Renders comments rating widget element based on the $widget
settings array. |
|
| wp_gdsr_show_comment_review ($comment_id=0, $use_default=true, $size=20, $style="oxygen", $echo=true) | |
|
Shows stars with review rating of a comment. |
|
| wp_gdsr_show_article_review ($post_id=0, $use_default=true, $size=20, $style="oxygen", $echo=true) | |
|
Shows review rating for the post with stars. |
|
| wp_gdsr_show_multis_review ($multi_id, $post_id=0, $use_default=true, $size=20, $style="oxygen", $echo=true) | |
|
Shows multis review rating for the post with stars. |
|
| wp_gdsr_show_article_rating ($post_id=0, $use_default=true, $size=20, $style="oxygen", $echo=true) | |
|
Shows rating for the post with stars. |
|
| wp_gdsr_taxonomy_multi_ratings ($taxonomy="category", $term="", $multi_id=0, $size=20, $style="oxygen") | |
|
Returns object with multi ratings data for any taxonomy. |
|
| wp_gdsr_debug_clean | ( | ) |
Truncates log file to zero lenght deleting all data inside.
| wp_gdsr_dump | ( | $ | msg, | |
| $ | obj, | |||
| $ |
block = "none",
|
|||
| $ |
mode = "a+",
|
|||
| $ |
force = false
|
|||
| ) |
Writes a object dump into the log file.
- Parameters:
-
string $msg log entry message mixed $object object to dump string $block adds start or end dump limiters { none | start | end } string $mode file open mode bool $force force writing into debug file even if the debug directive is inactive
| gdsr_get_multi_set | ( | $ |
post_id = 0
|
) |
Get multi set id based on global and categoires rules.
GDStarRating $gdsr main rating class instance object $post post data
- Parameters:
-
int $post_id post to get review for
| gdsr_get_multi_set | ( | $ | user_id, | |
| $ |
limit = 100,
|
|||
| $ |
filter = array()
|
|||
| ) |
Get the array with objects with user votes.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $user_id ID of the user to get data for int $limit number of votes to get array $filter variables to determine data to be retrieved
- Returns:
- array votes objects
| wp_gdsr_integration_readonly | ( | $ |
standard = false,
|
|
| $ |
multis = false
|
|||
| ) |
Makes rating blocks readonly regardless of other settings.
GDStarRating $gdsr main rating class instance
- Parameters:
-
bool $standard standard ratings will be read only bool $multis multi ratings will be read only
| wp_gdsr_multi_review_editor_header | ( | $ |
echo = true
|
) |
Renders multi rating review header elements css and javascript.
GDStarRating $gdsr main rating class instance
- Parameters:
-
bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_powered_by | ( | $ |
echo = true
|
) |
Renders small 80x15 powered by GD Star Rating button.
GDStarRating $gdsr main rating class instance
- Parameters:
-
bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_comment_integrate_multi_rating | ( | $ |
multi_set_id = 0,
|
|
| $ |
template_id = 0,
|
|||
| $ |
value = 0,
|
|||
| $ |
stars_set = "oxygen",
|
|||
| $ |
stars_size = 20,
|
|||
| $ |
stars_set_ie6 = "oxygen_gif",
|
|||
| $ |
echo = true
|
|||
| ) |
Integrate multi set post rating into the comment form.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $multi_set_id id of the multi rating set to use int $template_id id of the template to use int $value inital value for the review string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_comment_integrate_multi_result | ( | $ | comment_id, | |
| $ |
multi_set_id = 0,
|
|||
| $ |
template_id = 0,
|
|||
| $ |
stars_set = "oxygen",
|
|||
| $ |
stars_size = 20,
|
|||
| $ |
stars_set_ie6 = "oxygen_gif",
|
|||
| $ |
avg_stars_set = "oxygen",
|
|||
| $ |
avg_stars_size = 20,
|
|||
| $ |
avg_stars_set_ie6 = "oxygen_gif",
|
|||
| $ |
echo = true
|
|||
| ) |
Integrate multi rating result into the comment.
Must be within valid comments loop.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $comment_id id of the comment int $multi_set_id id of the multi rating set to use int $template_id id of the template to use string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 string $avg_stars_set set to use for rendering of average value int $avg_stars_size set size to use for rendering of average value string $avg_stars_set_ie6 set to use for rendering of average value in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_comment_integrate_multi_result_average | ( | $ | comment_id, | |
| $ |
multi_set_id = 0,
|
|||
| $ |
template_id = 0,
|
|||
| $ |
avg_stars_set = "oxygen",
|
|||
| $ |
avg_stars_size = 20,
|
|||
| $ |
avg_stars_set_ie6 = "oxygen_gif",
|
|||
| $ |
echo = true
|
|||
| ) |
Integrate average multi rating result into the comment.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $comment_id id of the comment int $multi_set_id id of the multi rating set to use int $template_id id of the template to use string $avg_stars_set set to use for rendering of average value int $avg_stars_size set size to use for rendering of average value string $avg_stars_set_ie6 set to use for rendering of average value in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_comment_integrate_standard_rating | ( | $ |
value = 0,
|
|
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Integrate standard post rating into the comment form.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $value inital value for the review string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_comment_integrate_standard_result | ( | $ | comment_id, | |
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Integrate standard rating result into the comment.
Must be within valid comments loop.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $comment_id id of the comment string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_multi_rating_average | ( | $ |
multi_set_id = 0,
|
|
| $ |
post_id = 0,
|
|||
| $ |
show = "total",
|
|||
| $ |
echo = true
|
|||
| ) |
Renders single rating stars image with average rating for the multi rating review.
object $post post data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $set_id id of the multi rating set int $post_id id of the post rating will be attributed to string $show what data to use: total, visitors or users votes only bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_multi_review_average | ( | $ |
multi_set_id = 0,
|
|
| $ |
post_id = 0,
|
|||
| $ |
echo = true
|
|||
| ) |
Renders single rating stars image with average rating for the multi rating review.
object $post post data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $set_id id of the multi rating set int $post_id id of the post rating will be attributed to bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_multi_review_editor | ( | $ |
multi_set_id = 0,
|
|
| $ |
post_id = 0,
|
|||
| $ |
template_id = 0,
|
|||
| $ |
echo = true
|
|||
| ) |
Renders multi rating review editor block.
object $post post data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $post_id id of the post rating will be attributed to bool $echo echo results or return it as a string array $settings override settings for rendering the block
- Returns:
- string html with rendered contents
| wp_gdsr_new_comment_review | ( | $ |
value = 0,
|
|
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Renders stars for comment review used in the comment form for the comment author to place it's review rating.
GDStarRating $gdsr main rating class instance
- Parameters:
-
int $value inital value for the review string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_article | ( | $ |
template_id = 0,
|
|
| $ |
read_only = false,
|
|||
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Renders the rating stars for article.
This function call must be within the post loop.
object $post post data object $userdata user data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $template_id standard rating block template id bool $read_only render block as a read only, voting not allowed string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_article_thumbs | ( | $ |
template_id = 0,
|
|
| $ |
read_only = false,
|
|||
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Renders the rating thumbs for article.
This function call must be within the post loop.
object $post post data object $userdata user data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $template_id standard rating block template id bool $read_only render block as a read only, voting not allowed string $stars_set set to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_blog_rating_widget | ( | $ |
widget = array(),
|
|
| $ |
echo = true
|
|||
| ) |
Renders blog rating widget element based on the $widget settings array.
- Parameters:
-
array $widget settings to use for rendering bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_comment | ( | $ |
template_id = 0,
|
|
| $ |
read_only = false,
|
|||
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Manual render of comment rating.
This function call must be within the comment loop.
object $comment comment data object $post post data object $userdata user data GDStarRating $gdsr main rating class instance
- Parameters:
-
bool $read_only render block as a read only, voting not allowed string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_comment_aggregation | ( | $ |
post_id = 0,
|
|
| $ |
template_id = 0,
|
|||
| $ |
show = "total",
|
|||
| $ |
echo = true
|
|||
| ) |
This will render aggregated comments rating for the post.
- Parameters:
-
int $post_id post to get review for int $template_id id of the template to use string $show votes to show: total, users, visitors bool $echo echo results or return it as a string
| wp_gdsr_render_comment_thumbs | ( | $ |
template_id = 0,
|
|
| $ |
read_only = false,
|
|||
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
echo = true
|
|||
| ) |
Manual render of comment thumbs rating.
This function call must be within the comment loop.
object $post post data object $userdata user data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $template_id standard rating block template id bool $read_only render block as a read only, voting not allowed string $stars_set set to use for rendering string $stars_set_ie6 set to use for rendering in ie6 bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_comments_rating_widget | ( | $ |
widget = array(),
|
|
| $ |
echo = true
|
|||
| ) |
Renders comments rating widget element based on the $widget settings array.
- Parameters:
-
array $widget settings to use for rendering bool $echo echo results or return it as a string
- Returns:
- string html with rendered contents
| wp_gdsr_render_multi | ( | $ |
multi_set_id = 0,
|
|
| $ |
template_id = 0,
|
|||
| $ |
read_only = false,
|
|||
| $ |
post_id = 0,
|
|||
| $ |
stars_set = "",
|
|||
| $ |
stars_size = 0,
|
|||
| $ |
stars_set_ie6 = "",
|
|||
| $ |
avg_stars_set = "oxygen",
|
|||
| $ |
avg_stars_size = 20,
|
|||
| $ |
avg_stars_set_ie6 = "oxygen_gif",
|
|||
| $ |
echo = true
|
|||
| ) |
Renders multi rating block.
This function call must be withing the post loop.
object $post post data object $userdata user data GDStarRating $gdsr main rating class instance
- Parameters:
-
int $multi_set_id id of the multi rating set to use int $post_id id of the post rating will be attributed to int $template_id id of the template to use bool $read_only render block as a read only, voting not allowed string $stars_set set to use for rendering int $stars_size set size to use for rendering string $stars_set_ie6 set to use for rendering in ie6 string $avg_stars_set set to use for rendering of average element int $avg_stars_size set size to use for rendering of average element string $avg_stars_set_ie6 set to use for rendering in ie6 of average element bool $echo echo results or return it as a string