JReviews:Tips & Tricks
Contents
- 1 General
- 2 Submit Form
- 2.1 How do I fix the wysiwyg editor's background problem?
- 2.2 How do I sort values of custom fields alphabetically when submitting/editing an entry?
- 2.3 How to submit a listing without having to review it at the same time?
- 2.4 How to add a tooltip for a standard form field like Title, Name, E-mail?
- 2.5 How to change the frontend Submission instructions?
- 3 Themes
- 3.1 How can I add tabs to listing detail page?
- 3.2 How do I hide Summary text on listing detail page?
- 3.3 How to make part of theme visible only to administrators?
- 3.4 How to change the rating star images?
- 3.5 How do I change the order of user reviews so that oldest reviews are on top?
- 3.6 How do I modify and add additional submission instructions?
- 4 Modules
- 5 Joomla
General
How do I display the list of users with the most reviews?
To get a Top 10 users page, create a menu item for this link:
http://www.example.com/index.php?option=com_jreviews&url=reviewers
Submit Form
How do I fix the wysiwyg editor's background problem?
Add this to your joomla template's css file:
* TinyMCE specific rules */ body.mceContentBody { background: #FFF !important; background-image: none; }
How do I sort values of custom fields alphabetically when submitting/editing an entry?
Edit the custom field, click on advanced options and change the ordering to A-Z
How to submit a listing without having to review it at the same time?
Go to JReviews Configuration, tab Standard Fields, Listing Form: 'Review form shown to' -> Don't show.
How to add a tooltip for a standard form field like Title, Name, E-mail?
Edit the theme file of the submit form:
- \com_jreviews\jreviews\views\themes\{theme_name}\listings\create_form.thtml
Use this code to include a tooltip:
<span class="jr_infoTip" title="This is the tooltip text"></span>
Add the code inside the <label> tag of any form field
How to change the frontend Submission instructions?
Edit this theme file:
- \com_jreviews\jreviews\views\themes\{theme_name}\listings\create.thtml
Search for "Submission instructions"
Themes
How can I add tabs to listing detail page?
You can use one of the Joomla Tabs content plugins, or you can use built-in jQuery UI tabs (better solution). Adding jQuery UI tabs is explained here:
How do I hide Summary text on listing detail page?
Edit \com_jreviews\jreviews\views\themes\d{theme_name}\listings\detail.thtml and replace
<?php echo nl2br($listing['Listing']['text']);?>
With:
<?php echo nl2br($listing['Listing']['description']);?>
How to make part of theme visible only to administrators?
<?php if($this->Access->isAdmin():?> // Everything here will be available only to admins <?php endif;?>
How to change the rating star images?
Star images are located in \com_jreviews\jreviews\views\themes\{theme_name}\theme_css\images folder. Edit those images or create your own, but make sure new images have the same dimensions, otherwise you'll have to modify css styles also.
How do I change the order of user reviews so that oldest reviews are on top?
Edit \com_jreviews\jreviews\models\reviews.php
default: $order = '`Review.created` DESC'; break;
change to:
default: $order = '`Review.created` ASC'; break;
How do I modify and add additional submission instructions?
Submission instructions are located in \com_jreviews\jreviews\views\themes\default\listings\create.thtml theme file.
Modules
How do I prevent modules from disappearing on the search results page?
There is a setting in JReviews Configuration, tab Search:
"Use current page Itemid for search results".
Set this to yes and the search results page should inherit the modules from previous page.
Joomla
How to remove Joomla edit button from listing detail page?
You need to edit Joomla's com_content template file:
- \components\com_content\views\article\tmpl\default.php
And delete this:
<?php if ($canEdit) : ?> <td align="right" width="100%" class="buttonheading"> <?php echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?> </td> <?php endif; ?>