Hooks
Hooks allow you to modify and extend the functionality of JReviews without having to modify existing code.
Below you can find a growing list of existing action and filter hooks. Before you get started with hooks, make sure to read the developers documentation, and specifically the section on using hooks.
claims
4
images
3
listings
4
mapspro
1
media
2
meta-tags
11
mylists
9
other
1
privacy
1
reports
3
reviews
6
search
1
system
10
users
2
asset-manager
claims
-
claim_save_preFilter the claim form data before saving it to the database.
-
claim_submit_validationFilter the array of validation messages.
-
claim_form_bottomAllows injecting HTML code at the bottom of the form and above the buttons.
-
claim_form_topAllows injecting HTML code above the message field.
custom-fields
engageusers
eventscalendar
field-permissions
-
can_view_field_in_comparison_pageFilter user permission to see the output of a custom field in the listing comparison page.
-
can_write_fieldFilter user permission to see a custom field in submit forms.code examples
-
can_view_field_in_detail_pageFilter user permission to see the output of a custom field in detail pages.
-
can_read_fieldFilter user permission to see the output of a custom field.code examples
-
can_view_field_in_list_pageFilter user permission to see the output of a custom field in lists.
images
inquiries
-
inquiry_form_topAllows injecting HTML code above the message field.
-
inquiry_email_extra_fieldsAllows processing extra fields added to the inquiry form to include them in the email.
-
inquiry_submit_validationFilter the array of validation messages.
-
inquiry_form_bottomAllows injecting HTML code at the bottom of the form and above the buttons.
-
inquiry_save_preFilter the inquiry form data before saving it to the database.
-
listing_inquiry_email_payloadFilter inquiry email payload before email is sent.code examples
listing-detail
-
listing_detail_info_iconsAllows adding and removing information icons.
-
listing_detail_logo_optionsAllows changing thumbnail generation options for the listing logo.code examples
-
post_get_listing_detailpage_queryFilter the listing data before sending it to the templates.code examples
-
listing_detail_cover_optionsAllows changing thumbnail generation options for the listing covercode examples
listing-permissions
-
can_create_listingFilter user permission to create a new listing.code examples
-
can_delete_listingFilter user permission to delete a listing.
-
can_create_editor_review_for_listingFilter user permission to submit an editor review.
-
listing_allows_claimsFilter the enabled setting for listing claims.code examples
-
can_upload_listing_photoFilter user permission to upload photos to listings.
-
listing_allows_editor_reviewsFilter the enabled setting for editor reviews.
-
can_update_listing_mediaFilter user permission to access the media edit page.code examples
-
can_claim_listingFilter user permission to claim a listing.code examples
-
can_update_listingFilter user permission to update a listing.
-
can_add_listing_metadataFilter user permission to access meta description and keywords fields while creating or updating a listing.
-
can_upload_listing_videoFilter user permission to upload videos for listings.
-
listing_allows_inquiriesFilter the enabled setting for listing inquiries.code examples
-
listing_user_reviews_openAllows closing user review submissions.code examples
-
can_favorite_listingFilter user permission to use favorites feature.
-
can_upload_listing_audioFilter user permission to upload audio to listings.
-
can_use_editor_in_listingFilter user permission to use the WYSIWYG editor in summary and description fields.
-
listing_allows_favoritesFilter the enabled setting for listing favorites.code examples
-
can_create_user_review_for_listingFilter user permission to submit a user review.
-
listing_editor_reviews_openAllows closing editor review submissions.
-
can_send_listing_inquiryFilter user permission to send an inquiry.code examples
-
listing_allows_user_reviewsFilter the enabled setting for user reviews.
-
trusted_on_create_listingFilter the moderation setting for new listing submissions.code examples
-
can_upload_listing_attachmentFilter user permission to upload attachments to listings.
-
can_upload_listing_mediaFilter user permission to upload media to listings by specifying the allowed media types.
-
can_add_review_on_listing_createFilter user permission to leave a review while creating a listing.
-
can_feature_listingFilter user permission to change the listing featured status.
-
can_publish_listingFilter user permission to change the listing publish status.
-
can_upload_media_from_url_in_listingFilter user permission to upload media to listings with the upload from URL feature.
listingresources
-
trusted_on_listing_resource_createFilter the moderation setting for new lsting resources.
-
resources_form_bottomAllows injecting HTML code at the bottom of the form and above the buttons.
-
listing_allows_resourcesFilter the enabled setting for listing resources.
-
can_create_listing_resourceFilter user permission to create a listing resource.
-
can_delete_listing_resourceFilter user permission to delete a listing resource.
-
resources_submit_validationFilter the array of validation messages.
-
resources_save_preFilter the listing resource form data before saving it to the database.
-
can_update_listing_resourceFilter user permission to update a listing resource.
listings
-
listing_submit_validationFilter the array of validation messages.code examples
-
listing_status_labelsAllows adding and removing labels (e.g. featured, new, popular)code examples
-
listing_save_preFilter the listing form data before saving it to the database.code examples
-
listing_form_bottomAllows injecting HTML code at the bottom of the form and above the buttons.
listings-list
-
list_page_ld_json_structured_dataFilter Schema.org structured data markup added to list pages when all listings share the same listing type.
-
post_get_listings_listings_module_queryFilter the listings module data before sending it to the templates.
-
pre_get_listings_listpage_query_countFilter the listings count query.
-
post_get_listings_listpage_queryFilter the listings list page data before sending it to the templates.code examples
-
listing_list_info_iconsAllows adding and removing information icons.
-
pre_get_listings_listpage_queryFilter the listings query.code examples
-
listing_list_ordering_selectFilter the ordering select list in listing list pages.
-
pre_get_listings_listings_module_queryFilter the listings query.code examples
media
media-permissions
-
can_vote_on_mediaFilter user permission to like and dislike media.
-
can_download_attachmentFilter user permission to download attachments.
-
can_delete_media_in_listingFilter user permission to delete media.
-
media_allows_votingFilter the enabled setting for media voting.code examples
-
can_publish_media_in_listingFilter user permission to change the listing media publish status.
-
trusted_on_create_attachmentFilter the moderation setting for attachment uploads.code examples
-
can_update_media_in_listingFilter user permission to update uploaded media details, such as caption and description.
-
can_set_main_mediaFilter user permission to toggle the listing main media.
-
media_allows_reportFilter the enabled setting for media reporting.code examples
-
trusted_on_create_audioFilter the moderation setting for audio uploads.code examples
-
can_report_mediaFilter user permission to report media.
-
trusted_on_create_videoFilter the moderation setting for video uploads.code examples
-
trusted_on_create_photoFilter the moderation setting for photo uploads.code examples
meta-tags
-
page_canonical_metatagFilter the canonical meta tag.code examples
-
page_keywords_metatagFilter the keywords meta tag.
-
page_prev_metatagFilter the prev page meta tag.
-
page_robots_metatagFilter the robots tag.
-
page_description_metatagFilter the description meta tag.code examples
-
page_next_metatagFilter the next page meta tag.
-
twitter_cards_after_parseFilter Twitter card tags HTML before it's added to the head of the page.
-
twitter_cards_before_parseFilter Twitter card tags array before it's converted to HTML.code examples
-
page_title_metatagFilter the page title tag.code examples
mylists
-
mylists_submit_validationFilter the array of validation messages.
-
mylists_form_bottomAllows injecting HTML code at the bottom of the form and above the buttons.
-
trusted_on_user_list_createFilter the moderation setting for new user lists.
-
listing_allows_user_listsFilter the enabled setting for user lists for listings.
-
can_delete_user_listFilter user permission to delete a user list.
-
can_publish_user_listFilter user permission to publish a user list.
-
can_update_user_listFilter user permission to update a user list.
-
can_create_user_listFilter user permission to create a user list.
-
can_make_user_list_privateFilter user permission to publish to make a user list private.
owner-replies
privacy
reports
review-discussion-permissions
-
can_report_review_discussionFilter user permission to report review discussions.
-
can_delete_review_discussionFilter user permission to delete a review discussion comment.
-
review_discussion_allows_reportFilter the enabled setting for review discussions reporting.code examples
-
trusted_on_create_review_discussionFilter the moderation setting for new review discussions.code examples
-
trusted_on_update_review_discussionFilter the moderation setting for new updated discussions. The default behavior is to autopublish them.
-
can_update_review_discussionFilter user permission to update a review discussion.
review-discussions
review-permissions
-
trusted_on_update_user_reviewFilter the moderation setting for updated user reviews.
-
review_allows_repliesFilter the enabled setting for listing owner reply to reviews.code examples
-
review_allows_votingFilter the enabled setting for review helpfulness voting.code examples
-
can_upload_review_mediaFilter user permission to upload media to reviews.
-
review_allows_reportFilter the enabled setting for reviews reporting.code examples
-
trusted_on_create_review_owner_replyFilter the moderation setting for new listing owner replies to reviews.
-
can_delete_review_replyFilter user permission to delete the listing owner reply to a review.
-
review_allows_discussionsFilter the enabled setting for review discussions.code examples
-
can_update_reviewFilter user permission to update a review.
-
trusted_on_create_editor_reviewFilter the moderation setting for new editor reviews.code examples
-
can_vote_on_reviewFilter user permission to vote on review helpfulness.
-
can_report_reviewFilter user permission to report reviews.
-
can_upload_review_photoFilter user permission to upload photos to reviews.
-
can_upload_review_audioFilter user permission to upload audio to reviews.
-
can_upload_review_attachmentFilter user permission to upload attachments to reviews.
-
can_reply_to_reviewFilter user permission to submit a listing owner reply for a review.
-
trusted_on_update_editor_reviewFilter the moderation setting for updated editor reviews.
-
trusted_on_create_user_reviewFilter the moderation setting for new user reviews.code examples
-
can_upload_media_from_url_in_reviewFilter user permission to upload media to reviews with the upload from URL feature.
-
can_create_review_postFilter user permission to create a new review discussion post.
-
can_delete_reviewFilter user permission to delete a review.
-
can_upload_review_videoFilter user permission to upload videos to reviews.
reviews
-
review_form_rating_optionsAllows changing the text of rating criteria options used in the review form.code examples
-
review_submit_validationFilter the array of validation messages.code examples
-
review_vote_save_preFilter the review vote form data before saving it to the database.
-
review_save_preFilter the review form data before saving it to the database.
-
{review_type}_reviews_default_orderFilter the default user and editor reviews order within a listing.code examples
-
review_form_bottomAllows injecting HTML code at the bottom of the form and above the buttons.
system
-
admin_initRuns after the JReviews admin is initialized and before a controller action is run.
-
before_theme_render_viewvarsFilter view variables before these are sent to the template.code examples
-
cron_tasksHook into the JReviews cron to and to run tasks periodically.
-
after_filter_outputFilter the controller output after it's been rendered.
-
renderGenerate a different output for controller actions using the `render` method.code examples
-
enable_captchaFilter the captcha setting so it can be controlled programatically.code examples
-
before_theme_render_requestFilter the request data before the view is rendered.
-
site_initRuns after the JReviews front-end is initialized and before a controller action is run.
-
configure:community.register_urlAllows modifiying the registration URL used in JReviews sign-up screens and login forms.code examples
-
before_filter_requestFilter the request data before the controller action is run.
templates
-
template_directory:after-directory{-name}Action executed after each directory in a directory page.code examples
-
template_listings.detail:{position}-descriptionAllows displaying any output above or below the listing description.
-
template_listings.detail_tabs:split-field-groupsAllows displaying field groups as different tabs when using the `_tabs` version of the listing detail template.code examples
-
template_listings.{page}:after-titleAllows displaying any output after the listing title