JReviews:Tips & Tricks

From JReviews Documentation
Revision as of 23:00, 28 October 2009 by Jreviews (Talk | contribs)

Jump to: navigation, search

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 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; ?>