1 (edited by Lucas Malor 2007-09-27 12:41)

Topic: A little improve to legibility

I've tested some little modifies in punBB css in order to improve the legibility also for low screen resolution.

I simply: 1) added an horizontal scroll at the end of a quote or a message, if the contents is a long string without spaces (as an url), 2) extended the beginning line of a signature to 100% , 3) put the number of lines in the signature editing <textarea > to the max numbers of lines allowed.


In include/parser.php:

replace:

        $text = str_replace('[quote]', '</p><blockquote><div class="incqbox"><p>', $text);
        $text = preg_replace('#\[quote=("|"|\'|)(.*)\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(array(\'[\', \'\\"\'), array(\'[\', \'"\'), \'$2\')." ".$lang_common[\'wrote\'].":</h4><p>"', $text);
        $text = preg_replace('#\[\/quote\]\s*#', '</p></div></blockquote><p>', $text);

with:

        $text = str_replace('[quote]', '</p><blockquote><div class="incqbox"><p><div class="quotecontents">', $text);
        $text = preg_replace('#\[quote=("|"|\'|)(.*)\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(array(\'[\', \'\\"\'), array(\'[\', \'"\'), \'$2\')." ".$lang_common[\'wrote\'].":</h4><p><div class=\"quotecontents\">"', $text);
        $text = preg_replace('#\[\/quote\]\s*#', '</div></p></div></blockquote><p>', $text);

In profile.php :

replace:

<textarea name="signature" rows="4" cols="65"><?php echo pun_htmlspecialchars($user['signature']) ?></textarea><br /></label>

with:

<textarea name="signature" rows="<?php if ($pun_config['p_sig_lines'] !== '0') {echo $pun_config['p_sig_lines'];} else {echo '4';} ?>" cols="65"><?php echo pun_htmlspecialchars($user['signature']) ?></textarea><br /></label>

In style/imports/base.css :

replace:

DIV.blockpost DIV.box, DIV.postleft, DIV.postsignature, DIV.postmsg {OVERFLOW: hidden}

with:

DIV.blockpost DIV.box, DIV.postleft {OVERFLOW: hidden}
div.postsignature, div.postmsg { overflow: auto; }
div.postsignature { padding-bottom: 4px; }

replace:

DIV.postmsg {WIDTH:100%}

with:

div.postmsg { width:100%; padding-bottom: 4px; }

after:

DIV.incqbox {WIDTH: 100%; OVERFLOW: hidden}

add:

div.quotecontents { overflow: auto; padding-bottom: 4px; }

replace:

DIV.postsignature HR {
    MARGIN-LEFT: 0px;
    WIDTH: 200px;

with:

DIV.postsignature HR {
    MARGIN-LEFT: 0px;
    width: 100%;