1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Change phrase "vote" to "review"

Discussion in 'Showcase Support' started by kontrabass, Mar 4, 2015.

  1. kontrabass

    kontrabass Member AMS Premium CAS Premium RMS Premium SC Premium

    Hi Bob,

    I'm probably missing it right in front of my eyes, but I can't seem to find the phrase to change "vote(s)" to "review(s)". I tried "nflj_showcase_votes" but that hasn't seemed to change it here:

    Screenshot at Mar 04 16-39-15.png

    Thanks!!
     
  2. kontrabass

    kontrabass Member AMS Premium CAS Premium RMS Premium SC Premium

    Oh, found the template - I guess it's using the core xenforo phrase? No problem I'll just hard code it.
    Code:
    {xen:phrase 1_vote}, {xen:phrase x_votes_plural,
     
  3. Bob

    Bob Developer Staff Member

    ah, ya.. there are a few places I use core phrases.
     
  4. DiscoRoHan

    DiscoRoHan New Member Showcase

    @kontrabass Can you help me with this? Looking to do the same.

    Thanks!
    Rob.
     
    Goodfella likes this.
  5. DiscoRoHan

    DiscoRoHan New Member Showcase

    Also, how did you remove the 'Reviews:' on the next line down? Is it in Showcase options? Here's mine:

    Screen Shot 2015-03-15 at 10.50.13.png
     
  6. Bob

    Bob Developer Staff Member

    Reviews only displays on the Top Rated and Most Reviews sort order listings. The image he posted has the Most Popular sort order tab activated which displays views. Sorting by Most Liked will display Likes in that position.

    The template involved for List View items is: nflj_showcase_layout_list_view_item

    This is a snippet from that template that controls what is displayed in the "stats" area of the list view item. As you can see, there are several IF statements involved. You'll have to modify them to display what you want depending on the state of the listing (which in this case is mainly sort order).

    HTML:
        <div class="listBlock itemStats">
            <div class="listBlockInner">
                <xen:if is="{$item.rate_review_system} == 1 || {$item.rate_review_system} == 2">
                    <xen:include template="rating">
                        <xen:set var="$rating">{$item.rating}</xen:set>
                        <xen:set var="$hint">{xen:if '{$item.rating_count} == 1', {xen:phrase 1_vote}, {xen:phrase x_votes_plural, 'count={$item.rating_count}'}}</xen:set>
                    </xen:include>                           
                </xen:if>
    
                <div class="pairsJustified ">
                    <xen:if is="{$order} == 'rated' || {$order} == 'reviewed' && {$item.rate_review_system} == 2">
                        <dl class="reviewStats">
                            <dt>{xen:phrase nflj_showcase_reviews}:</dt>
                            <dd>{$item.review_count}</dd>
                        </dl>
                    </xen:if>
                    <xen:if is="{$order} == 'liked'">
                        <dl class="reviewStats">
                            <dt>{xen:phrase nflj_showcase_likes}:</dt>
                            <dd>{$item.likes}</dd>
                        </dl>
                    </xen:if>
    
                    <xen:if is="{$order} == 'recent' || {$order} == 'popular' || {$order} == 'updated' || {$order} == 'atoz'">
                        <dl class="viewStats">
                            <dt>{xen:phrase nflj_showcase_views}:</dt>
                            <dd>{$item.view_count}</dd>
                        </dl>
                    </xen:if>
    
                    <xen:if is="{$item.last_update}">
                        <dl class="updatedStats">
                            <dt>{xen:phrase nflj_showcase_updated}:</dt>
                            <dd><xen:datetime time="$item.last_update" /></dd>
                        </dl>
                    </xen:if>       
                </div>   
            </div>                       
        </div>    
     
    Last edited: Mar 15, 2015
    DiscoRoHan likes this.
  7. kontrabass

    kontrabass Member AMS Premium CAS Premium RMS Premium SC Premium

    Sorry - yes of course. I just added two phrases to our board, and then in your nflj_showcase_layout_list_view_item template, find this and change the phrase names to what you created:

    Code:
    <xen:if is="{$item.rate_review_system} == 1 || {$item.rate_review_system} == 2">
                    <xen:include template="rating">
                        <xen:set var="$rating">{$item.rating}</xen:set>
                        <xen:set var="$hint">{xen:if '{$item.rating_count} == 1', {xen:phrase your_phrase_singular}, {xen:phrase your_phrase_plural, 'count={$item.rating_count}'}}</xen:set>
                    </xen:include>                           
                </xen:if>
    
     
    DiscoRoHan likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.