Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Truncate comment
  • Posted: 26.02.2006, 20:26
     
    rank:
    Freshman Freshman
    registered:
     October 2002
    Status:
    offline
    last visit:
    17.02.08
    Posts:
    19
    I noticed to see words clumsy cutted in the comments.
    So, I figured out a way, to make it more decent.

    File: \Comments\index.php
    Change row 648

    Code

    elseif(strlen($comment) > $commentlimit) echo substr("".pnVarPrepHTMLDisplay($comment)."", 0, $commentlimit)."<br />\n<strong><a href=\"index.php?name=Comments&amp;sid=$sid&tid=$tid&mode=$mode&order=$order&thold=$thold\">"._READREST."</a></strong>\n";

    to:

    Code

    elseif(strlen($comment) > $commentlimit) echo substr(substr(trim($comment),0,$commentlimit),0,strlen(substr(trim($comment),0,$commentlimit))-strpos(strrev(substr(trim($comment),0,$commentlimit))," "))."... <br />\n<strong><a href=\"index.php?name=Comments&amp;sid=$sid&tid=$tid&mode=$mode&order=$order&thold=$thold\">"._READREST."</a></strong>\n";


    Gr.
    mrpq

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula