Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 07, 2009, 03:28:30 PM
22773 Posts in 5216 Topics by 2974 Members
Latest Member: Vijitha
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  jReviews 1.x  |  Tips & tricks  |  Displaying both editor rating box and user rating box in the authorreviewheader « previous next »
Pages: [1]
Author Topic: Displaying both editor rating box and user rating box in the authorreviewheader  (Read 1992 times)
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8996


« on: May 18, 2007, 08:49:34 AM »

Copy the below text from userreviewheader.html:

Code:
<div id="userbox_outer">
<div id="userbox">
<patTemplate:tmpl name="uh1" type="simplecondition" requiredvars="avg_user_rating" varscope="user_reviews_header">
<div id="userbox_h1"><patTemplate:translate>_JR_USER_RATING</patTemplate:translate></div>
<div id="userbox_h2">{AVG_USER_RATING}</div>
<div id="userbox_h3"><patTemplate:translate>_JR_OUT_OF_SCALE</patTemplate:translate>&nbsp;{RATING_SCALE}</div>
</patTemplate:tmpl>
<patTemplate:tmpl name="not_rated" visibility="hidden">
<div id="userbox_h4"><patTemplate:translate>_JR_NOT_RATED</patTemplate:translate></div>
</patTemplate:tmpl>
</div>
</div>

We edit it to replace the average rating tag with the correct one and add some patTemplate logic to check the review count and show the "not rated" text if there are no user reviews.

Code:
<div id="userbox_outer">
<div id="userbox">
<patTemplate:tmpl name="user_rating_box" type="condition" conditionvar="author_reviews_count" varscope="author_review_header">
<patTemplate:sub condition="0">
<div id="userbox_h4"><patTemplate:translate>_JR_NOT_RATED</patTemplate:translate></div>
</patTemplate:sub>
<patTemplate:sub condition="__default">
<div id="userbox_h1"><patTemplate:translate>_JR_USER_RATING</patTemplate:translate></div>
<div id="userbox_h2">{AUTHOR_USER_RATING}</div>
<div id="userbox_h3"><patTemplate:translate>_JR_OUT_OF_SCALE</patTemplate:translate>&nbsp;{RATING_SCALE}</div>
</patTemplate:sub>
</patTemplate:tmpl>
</div>
</div>

Paste the code in authorreviewheader.html
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
marcogap1328
Newbie
*
Offline Offline

Posts: 5


« Reply #1 on: April 22, 2008, 04:02:13 AM »

Hello,

in my case, this only works when there is a editor rating. if there is no editor rating, the user rating is not showing.

i need this solution the other way around. Displaying editor box in user rating box.

Is this posible?

Thanks and Greetings from Germany
Marco
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8996


« Reply #2 on: April 22, 2008, 08:03:36 AM »

It's not possible because the user review header is not used at all when the editor reviews are enabled. I know this isn't too practical, I learn from experience Wink so in the next version you'll be able to access all variables at all times and can pretty much do what you want with the layout with few limitations. Unfortunately for the current version it's too difficult to change.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
note2you
Jr. Member
**
Offline Offline

Posts: 26


« Reply #3 on: April 23, 2008, 12:07:07 AM »

Quote
so in the next version you'll be able to access all variables at all times and can pretty much do what you want with the layout with few limitations

amazing..... thanks in advance Alejandro
Logged
Pages: [1]
« previous next »
    Jump to: