JReviews:ShortCodes

From JReviews Documentation
Revision as of 13:33, 14 September 2016 by Jreviews (Talk | contribs)

Jump to: navigation, search

JReviews Shortcodes allow you to embed listings or reviews inside an article text.

For example, this shortcode would display a listing with an alias "westville-east":

[jreviews type="listings" listing_alias="westville-east" summary="1"]

Inside an article that shortcode displays this:

Shortcodes-example.png

This shortcode would display reviews of a listing with an alias "westville-east":

 [jreviews type="reviews" listing_alias="westville-east" link_title="{review_title}" show_comments="1"]

Inside an article that shortcode displays this:

Shortcodes-example2.png

There are two types of shortcodes:

Listings shortcode

There are many parameters that you can use:

Parameter Example Description
listing_alias listing_alias="westville-east" Alias of a specific listing
listing_order listing_order="latest" Available options: latest, rdate, rating, rrating, topratededitor, raviews, random, featuredrandom, rhits, proximity
summary summary="0" 0 - disabled, 1 - enabled
summary_words summary_words="10" Number of words
show_category show_category="0" 0 - disabled, 1 - enabled
fields fields="jr_state,jr_city" Comma separated list of custom fields to show
editor_rating editor_rating="0" 0 - disabled, 1 - enabled
user_rating user_rating="1" 0 - disabled, 1 - enabled
tmpl_suffix tmpl_suffix="_vertical" Theme file suffix. The default theme used is /modules/listings.thtml
tn_show tn_show="1" 0 - disabled, 1 - enabled
tn_position tn_position="left" Available options: left, right, top, bottom
tn_mode tn_mode="scale" Available options: crop, scale
tn_size tn_size="100x100" Thumbnail size in WIDTHxHEIGHT format
cat_auto cat_auto="0" 0 - disabled, 1 - enabled
dir dir="1" Directory IDs
category category="22" Category IDs
listing listing="51" Listing IDs
nav_position nav_position="bottom" Available options: bottom, side
total total="10" Max. number of results
limit limit="5" Results per page
columns columns="2" Number of columns
show_numbers show_numbers="0" 0 - disabled, 1 - enabled
compare compare="0" 0 - disabled, 1 - enabled


Examples

10 top rated listings:

[jreviews type="listings" listing_order="rating" columns="2" total="10" limit="10" show_numbers="1"]

Latest listings from the category that has ID 23:

[jreviews type="listings" listing_order="latest" category="23" total="6" limit="6"]

Reviews shortcode

Available parameters:

Parameter Example Description
listing_alias listing_alias="westville-east" Alias of a specific listing
reviews_order reviews_order="latest" Available options: latest, helpful, random
link_title link_title ="{review_title}" You can use the {listing_title} and {review_title} tags to build your link title output. You can also specify the total number of characters to show (including the ... at the end), by adding the number inside the tag like this {listing_title 10} - {review_title 15}.
reviews_type reviews_type="all" Available options: all, user, editor
show_comments show_comments="0" 0 - disabled, 1 - enabled
comments_words comments_words="10" Number of words
fields fields="jr_pros,jr_cons" Comma separated list of review custom fields to show
tmpl_suffix tmpl_suffix="_vertical" Theme file suffix. The default theme used is /modules/listings.thtml
tn_show tn_show="1" 0 - disabled, 1 - enabled
tn_position tn_position="left" Available options: left, right, top, bottom
tn_mode tn_mode="scale" Available options: crop, scale
tn_size tn_size="100x100" Thumbnail size in WIDTHxHEIGHT format
extension extension="com_jreviews" Name of the extension from which reviews will be displayed. Required when using filters below.
cat_auto cat_auto="0" 0 - disabled, 1 - enabled
dir dir="1" Directory IDs
category category="22" Category IDs
listing listing="51" Listing IDs
nav_position nav_position="bottom" Available options: bottom, side
total total="10" Max. number of results
limit limit="5" Results per page
columns columns="2" Number of columns
show_numbers show_numbers="0" 0 - disabled, 1 - enabled


Examples

10 most helpful user reviews:

[jreviews type="reviews" reviews_order="helpful" reviews_type="user" columns="2" total="10" limit="10" show_numbers="1"]

Latest reviews:

[jreviews type="reviews" review_order="latest" total="6" limit="6"]