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
original and altered files
patch file
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.
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))
. '…';
}
else {
return htmlspecialchars($maildata);
}
}
------------------------->8-------------------------
Greetings,
Tim
original and altered file (Version 2)
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.