Difference between revisions of "JReviews:Tips & Tricks"

From JReviews Documentation
Jump to: navigation, search
(Other theme tricks)
 
(72 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== General ==
+
== Custom Fields ==
=== How do I display the list of users with the most reviews? ===
+
*[[How to use custom fields as virtual categories]]
To get a Top 10 users page, create a menu item for this link:
+
*[[How to display field values in columns]]
 +
*[[How to remove bullets between field values]]
 +
*[[Using a custom field for Amazon affiliate links]]
 +
*[[Changing output format of Website url field]]
 +
*[[How to set default website custom field value to http://]]
 +
*[[Using banner field type for custom field output]]
 +
*[[How to add custom fields into JReviews RSS Feeds]]
  
<pre>http://www.example.com/index.php?option=com_jreviews&url=reviewers</pre>
+
== Site Performance ==
 +
*[[Optimizing the performance of your JReviews site]]
  
 +
== SEO ==
 +
*[[How to add Structured data for rich snippets]]
  
== Submit Form ==
+
== Configuration Overrides ==
=== How do I fix the wysiwyg editor's background problem? ===
+
*[[How to change the default ordering to a custom field]]
Add this to your joomla template's css file:
+
<source lang="css">
+
* TinyMCE specific rules */
+
body.mceContentBody {
+
  background: #FFF !important;
+
  background-image: none;
+
}
+
</source>
+
 
+
 
+
=== 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:
+
<source lang="php">
+
<span class="jr_infoTip" title="This is the tooltip text"></span>
+
</source>
+
 
+
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"
+
 
+
  
 +
== Media files & Thumbnails ==
 +
*[[How to output thumbnail url]]
 +
*[[How to transfer files to or from Amazon S3]]
  
 
== Themes ==
 
== 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
 
<source lang="php">
 
<?php echo nl2br($listing['Listing']['text']);?>
 
</source>
 
  
With:
+
=== Theme files ===
<source lang="php">
+
*[[How to get original JReviews files]]
<?php echo nl2br($listing['Listing']['description']);?>
+
</source>
+
  
 +
=== Listing Detail Page ===
 +
*[[How do I hide Summary text on listing detail page]]
 +
*[[How do I change the order of user reviews so that oldest reviews are on top]]
 +
*[[How can I embed YouTube videos on JReviews listings]]
  
=== How to make part of theme visible only to administrators? ===
+
=== List Pages ===
<source lang="php">
+
*[[How to display listing description on list pages]]
<?php if($this->Access->isAdmin():?>
+
*[[How to display detailed ratings on list pages]]
  // Everything here will be available only to admins
+
*[[Using Custom Params, Custom Where and Custom Order settings]]
<?php endif;?>
+
</source>
+
  
 +
=== Directory Pages ===
 +
*[[How to update Alphaindex bar with characters from other languages]]
  
=== How to change the rating star images? ===
+
=== Submit Forms ===
Star images are located in \com_jreviews\jreviews\views\themes\{theme_name}\theme_css\images folder.
+
*[[How to add a TOS checkbox to submit forms]]
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 fix the wysiwyg editor's background problem]]
 
+
*[[How do I modify and add additional submission instructions]]
 
+
*[[How do I sort values of custom fields alphabetically when submitting/editing an entry]]
=== How do I change the order of user reviews so that oldest reviews are on top? ===
+
*[[How to submit a listing without having to review it at the same time]]
Edit \com_jreviews\jreviews\models\reviews.php
+
*[[Adding jQuery UI tabs to listing submit page]]
<source lang="php">
+
*[[How to add a tooltip for a standard form field like Title, Name, E-mail]]
default:
+
*[[How do I make part of the submit form available to author and above user levels]]
$order = '`Review.created` DESC';
+
*[[Customizing the layout of custom fields on listing submit page]]
break;
+
</source>
+
 
+
change to:
+
 
+
<source lang="php">
+
default:
+
$order = '`Review.created` ASC';
+
break;
+
</source>
+
 
+
 
+
=== 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.
+
  
 +
=== Other theme tricks ===
 +
*[[How to make part of theme visible only to administrators]]
 +
*[[How to make part of theme visible only to registered users]]
 +
*[[How to make part of theme visible only to listing owners]]
 +
*[[How to change the rating star images]]
 +
*[[Custom_module_positions_in_JReviews_theme_files | How to load specific module positions within the JReviews theme files]]
 +
*[[How to add a suffix for click2search results page]]
 +
*[[How do I truncate the length of the listing titles]]
 +
*[[How to output listing url in the theme files]]
  
 +
== Modules & Menus ==
 +
*[[How to display only listings without reviews in the Listings Module]]
 +
*[[How do I prevent modules from disappearing on the search results page]]
 +
*[[How to display Summary text in the Listings Module]]
 +
*[[How to display Description text in the Listings Module]]
 +
*[[How to hide navigation dots and arrows in Modules and Plugins]]
 +
*[[Making JReviews Menus active when viewing listing detail pages]]
 +
*[[How to change ordering after featured listings]]
 +
*[[How to toggle custom fields based on the category selection in the Advanced Search Module]]
  
 
== Joomla ==
 
== Joomla ==
=== How to remove Joomla edit button from listing detail page? ===
+
*[[How to remove Joomla edit button from listing detail page]]
You need to edit Joomla's com_content template file:
+
*[[Making the core rating system work on JReviews pages]]
*\components\com_content\views\article\tmpl\default.php
+
 
+
And delete this:
+
<source lang="php">
+
<?php if ($canEdit) : ?>
+
<td align="right" width="100%" class="buttonheading">
+
<?php echo JHTML::_('icon.edit', $this->article, $this->params, $this->access); ?>
+
</td>
+
<?php endif; ?>
+
  
  
</source>
+
__NOTOC__

Latest revision as of 15:59, 11 January 2020

Custom Fields

Site Performance

SEO

Configuration Overrides

Media files & Thumbnails

Themes

Theme files

Listing Detail Page

List Pages

Directory Pages

Submit Forms

Other theme tricks

Modules & Menus

Joomla