Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Length of Text Displayed on Customer Reviews Page

    If you look at my reviews page here:

    http://www.limelites.co.uk/index.php?main_page=reviews

    you'll see that a lot of the review texts are cut short and truncated. Is there a simple way to increase the length of characters that's allowed on this page, so that the entire text is displayed in each review? There is certainly enough space.

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Length of Text Displayed on Customer Reviews Page

    in includes/templates/yourtemplate/templates/tpl_reviews_default.php fin the line:

    Code:
    <div class="content"><?php echo zen_break_string(nl2br(zen_output_string_protected(stripslashes($reviews->fields['reviews_text']))), 60, '-<br />') . ((strlen($reviews->fields['reviews_text']) >= 100) ? '...' : ''); ?></div>
    About line 43.

    It is the 60 and the 100 that you are interested in. The 60 is the length of the string and the 100 is where it decides to put the ... in.

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Length of Text Displayed on Customer Reviews Page

    But if you want the whole thing try :

    Code:
    <div class="content"><?php echo nl2br(zen_output_string_protected(stripslashes($reviews->fields['reviews_text'])))?></div>

  4. #4
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Length of Text Displayed on Customer Reviews Page

    Quote Originally Posted by niccol View Post
    But if you want the whole thing try :

    Code:
    <div class="content"><?php echo nl2br(zen_output_string_protected(stripslashes($reviews->fields['reviews_text'])))?></div>
    Nope, that does the same thing, just cuts the review text off dead. So where the '...' once was there's just nothing, but it still doesn't show the full text.

  5. #5
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Length of Text Displayed on Customer Reviews Page

    I'd need to add something to the code that allows the review to take up multiple lines... increasing the 100 to 10000 seems to get rid of the '...' but still doesn't allow the full review to display.

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Length of Text Displayed on Customer Reviews Page

    Sorry. It seems to be done in the sql query as well. So, stick to my final version and have a look at:

    includes/modules/pages/reviews/header_php.php

    Have a look at line 17
    Code:
    $reviews_query_raw = "SELECT r.reviews_id, left(rd.reviews_text, 100) AS reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name
    which truncates the reviews_text to 100. Works for me....

  7. #7
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Length of Text Displayed on Customer Reviews Page

    Thanks for the reply.... I changed the 60 to 600 and the 100 to 1000, but now insterad of the .... it just cuts off the review, dead.

 

 

Similar Threads

  1. v138a Customer reviews for main page
    By perfumbg in forum General Questions
    Replies: 0
    Last Post: 14 Sep 2012, 04:55 PM
  2. Customer Reviews - page does nothing? 1.3.8
    By dr_james_leo in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Aug 2010, 07:47 AM
  3. Full Length Reviews
    By scytha in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Dec 2009, 02:20 AM
  4. Length of Street Address Text Box on Create Account Page
    By Picci in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Dec 2007, 09:40 PM
  5. text on the page not displayed
    By mikajlo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Oct 2006, 11:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg