Menu ▾ ▴

#93 Add '...' after cutted mail data

closed-fixed
None
5
2014-07-25
2006-10-24
Tim Gerundt
No

I think it is more user-friendly, if you add '...'
after cutted mail data (to, subject). So, the user
sees, that there are more text.

The patch adds the new function
convertMailData2Html($maildata, $cutafter = 0) to the
file "functions.php". The first parameter is the mail
data and the second parameter is the *optional* number,
after the string get cutted.

If you like this way, you can maybe change some more
htmlspecialchars() calls to convertMailData2Html(). My
patch only change the calls in the file
"html/html_inbox.php".

Greetings,
Tim

Discussion

  • Tim Gerundt

    Tim Gerundt - 2006-10-24

    original and altered files

     
  • Tim Gerundt

    Tim Gerundt - 2006-10-24

    patch file

     
  • Anonymous

    Anonymous - 2006-10-25

    Logged In: YES
    user_id=529507

    Fixed in CVS.

    It'll be included in next release.

    But you can download daily snapshots at :
    http://nocc.sourceforge.net/download/

    Thanks for the patch.

     
  • Anonymous

    Anonymous - 2006-10-25
    • assigned_to: nobody --> goddess_skuld
    • status: open --> closed-fixed
     
  • Tim Gerundt

    Tim Gerundt - 2006-10-25

    Logged In: YES
    user_id=652377

    I like your idea of the "…" and hope older browsers
    show the sign too. But your code with the str_replace()
    looks a little bit unprofessional and looks more like a "hack".

    I would suggest this code:
    -------------------------8<-------------------------
    // Convert mail data (from, to, ...) to HTML
    function convertMailData2Html($maildata, $cutafter = 0) {
    if (($cutafter > 0) && (strlen($maildata) > $cutafter)) {
    return htmlspecialchars(substr($maildata, 0, $cutafter))
    . '&hellip;';
    }
    else {
    return htmlspecialchars($maildata);
    }
    }
    ------------------------->8-------------------------

    Greetings,
    Tim

     
  • Tim Gerundt

    Tim Gerundt - 2006-10-25
    • status: closed-fixed --> open-fixed
     
  • Tim Gerundt

    Tim Gerundt - 2006-10-25
    • status: open-fixed --> open
     
  • Tim Gerundt

    Tim Gerundt - 2006-10-25

    original and altered file (Version 2)

     
  • Anonymous

    Anonymous - 2006-10-25

    Logged In: YES
    user_id=529507

    Fixed in CVS.

    It'll be included in next release.

    But you can download daily snapshots at :
    http://nocc.sourceforge.net/download/

    Thanks for the patch.

     
  • Anonymous

    Anonymous - 2006-10-25
    • status: open --> closed-fixed
     

Log in to post a comment.