View previous topic :: View next topic |
Author |
Message |
RadikalQ3 Apprentice
Joined: 26 Oct 2003 Posts: 172 Location: Planeta Tierra
|
Posted: Tue Feb 01, 2005 1:05 pm Post subject: New post areatext too small -> (and solution of) |
|
|
I'm a Gentoo user, and I like their forums at forums.gentoo.org
Recently, I have written a howto (in spanish, sorry) for Update a Gentoo box creating binary packages but without installing them.
The howto includes a bash script for automatize the process.
The guide is in the post: Howto update&compile making binary packages for later install
The howto is a large post, and, when I make a new version of the howto, edit the post is a very uncomfortable work by two reasons:
- The TextArea for write the message is ridiculously small. I use a 1280x1024 resolution, but... the TextArea is always 450 pixels width
- The bbcode online editor does not work correctly, in particular, in a long text, when pressing one of the bbcode insertion buttons (for example, letter in bold), the TextArea loses the scroll position, placing the text caret in the starting point of the text.
I know that this is a standard problem of the phpBB style forums... but these two things can be corrected.
I was installed an standard copy of phpbb in one of my servers to play with it, make changes, etc.
If someone want test it the url is: http://foros.pasote.com Edited: Sorry is offline now...
In those forums I have corrected the two mentioned things, and now, is possible edit a large post without loose the scroll position and use a TextArea with an adaptive to the screen witdh (you can test it changing the size os the browser's window).
If the webmaster of forums.gentoo.org wants make these modifications, just must change the file posting_body.tpl, site in the /templates directory of the phpbb installation.
Change 1, make the TextArea wide adptative:
In the /templates/posting_body.tpl file, the next lines:
Code: | <tr>
<td colspan="9"><span class="gen">
<textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
</span></td>
</tr>
</table>
|
must be changed by:
Code: | </table>
<textarea name="message" wrap="virtual" style="width:99%; height:450px;" tabindex="3" class="post" >{MESSAGE}</textarea> |
resulting, something like this:
Code: | <tr>
<td colspan="9"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
</table>
<textarea name="message" wrap="virtual" style="width:99%; height:450px;" tabindex="3" class="post" >{MESSAGE}</textarea>
</span></td>
|
I'ts to say: eliminate the table row of the textarea, and putting the textarea out of the table.
Too changing the textarea style...
Change 2, re-write the java-script of the bbcode tags insertion
In the same file: /templates/posting_body.tpl at top of the file the javascript, begginning with:
Code: | <script language="JavaScript" type="text/javascript">
<!-- |
and ended with:
ok?, so... simply change the javascript code by this other:
Code: |
<script language="JavaScript" type="text/javascript">
<!--
// bbCode control by
// subBlue design
// www.subBlue.com
// JavaScript enhanced version of bbcode insertion tags
// Better insertion tags in the textarea field
// Tested on:
// - Internet Explorer 6.0
// - Mozilla 1.7 (Windows version)
// - Mozilla 1.7 (Linux-Gentoo version)
// Enhancements:
// Don't loose the text scroll position when insert a code
//* Javascript substitution for correct working on explorer & mozilla browsers
//* by RadikalQ3 (radikal AT q3 dot nu), helping to Gentoo comunity.
//**************************************************************************************
// Helpline messages
b_help = "{L_BBCODE_B_HELP}";
i_help = "{L_BBCODE_I_HELP}";
u_help = "{L_BBCODE_U_HELP}";
q_help = "{L_BBCODE_Q_HELP}";
c_help = "{L_BBCODE_C_HELP}";
l_help = "{L_BBCODE_L_HELP}";
o_help = "{L_BBCODE_O_HELP}";
p_help = "{L_BBCODE_P_HELP}";
w_help = "{L_BBCODE_W_HELP}";
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";
// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
var bbtagsAbiertos = new Array();
function tmAnadeTag(eltag) {
if (bbtags[eltag+1] != '') {
bbtagsAbiertos[bbtagsAbiertos.length] = eltag;
//Add '*' in the button's text:
eval('document.post.addbbcode'+eltag+'.value += "*"');
}
}
function tmQuitaTag(eltag) {
for (i = 0; i < bbtagsAbiertos.length; i++) {
if (bbtagsAbiertos[i] == eltag) {
bbtagsAbiertos.splice(i, 1);
//Remove '*' from the button's text:
buttext = eval('document.post.addbbcode' + eltag + '.value');
eval('document.post.addbbcode' + eltag + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
}
}
function tmHayTagABierto(eltag) {
var tag = 0;
for (i = 0; i < bbtagsAbiertos.length; i++) {
if (bbtagsAbiertos[i] == eltag) { tag++; }
}
if (tag > 0) { return true; } else { return false; }
}
function tmCierraTags() {
var count = bbtagsAbiertos.length;
for (n = 0; n < count; n++) { bbstyle(bbtagsAbiertos[bbtagsAbiertos.length - 1]); }
}
function bbstyle(eltag) {
var txtarea = document.post.message;
if (eltag == -1) { tmCierraTags(); return; }
//Para Internet Exploiter:
if (document.selection) {
txtarea.focus();
sel = document.selection.createRange();
if (sel.text.length > 0) { sel.text = bbtags[eltag] + sel.text + bbtags[eltag+1]; }
else {
if (!tmHayTagABierto(eltag) || bbtags[eltag+1] == '') {
sel.text = bbtags[eltag];
tmAnadeTag(eltag);
}
else {
sel.text = bbtags[eltag+1];
tmQuitaTag(eltag);
}
}
txtarea.focus();
}
//Para Mozilla-Netscape:
else if (txtarea.selectionStart || txtarea.selectionStart == '0') {
var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;
var cursorPos = endPos;
var scrollTop = txtarea.scrollTop;
if (startPos != endPos) {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbtags[eltag]
+ txtarea.value.substring(startPos, endPos)
+ bbtags[eltag+1]
+ txtarea.value.substring(endPos, txtarea.value.length);
cursorPos += bbtags[eltag].length + bbtags[eltag+1].length;
}
else {
if (!tmHayTagABierto(eltag) || bbtags[eltag+1] == '') {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbtags[eltag]
+ txtarea.value.substring(endPos, txtarea.value.length);
tmAnadeTag(eltag);
cursorPos = startPos + bbtags[eltag].length;
}
else {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbtags[eltag+1]
+ txtarea.value.substring(endPos, txtarea.value.length);
tmQuitaTag(eltag);
cursorPos = startPos + bbtags[eltag+1].length;
}
}
txtarea.focus();
txtarea.selectionStart = cursorPos;
txtarea.selectionEnd = cursorPos;
txtarea.scrollTop = scrollTop;
}
else {
if (!tmHayTagABierto(eltag) || bbtags[eltag+1] == '') {
txtarea.value += bbtags[eltag];
tmAnadeTag(eltag);
}
else {
txtarea.value += bbtags[eltag+1];
tmQuitaTag(eltag);
}
txtarea.focus();
}
}
function bbfontstyle(bbopen,bbclose) {
var txtarea = document.post.message;
//Para Internet Exploiter:
if (document.selection)
{ txtarea.focus();
sel = document.selection.createRange();
sel.text = bbopen+sel.text+bbclose;
}
//Para Mozilla-Netscape:
else if (txtarea.selectionStart || txtarea.selectionStart == '0') {
var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;
var cursorPos = endPos;
var scrollTop = txtarea.scrollTop;
if (startPos != endPos) {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbopen
+ txtarea.value.substring(startPos, endPos)
+ bbclose
+ txtarea.value.substring(endPos, txtarea.value.length);
cursorPos += bbopen.length + bbclose.length;
}
else {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbopen+' '+bbclose
+ txtarea.value.substring(endPos, txtarea.value.length);
cursorPos = startPos + bbopen.length+bbclose.lenth+1;
}
txtarea.focus();
txtarea.selectionStart = cursorPos;
txtarea.selectionEnd = cursorPos;
txtarea.scrollTop = scrollTop;
}
else { txtarea.value += bbopen+' '+bbclose;
txtarea.focus();
}
}
// Shows the help messages in the helpline window
function helpline(help) {
document.post.helpbox.value = eval(help + "_help");
}
function checkForm() {
formErrors = false;
if (document.post.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE}";
}
if (formErrors) {
alert(formErrors);
return false;
} else {
bbstyle(-1);
//formObj.preview.disabled = true;
//formObj.submit.disabled = true;
return true;
}
}
function emoticon(text) {
bbfontstyle(text,'');
return;
}
//-->
</script>
|
This is the complete template file, including the enhancements:
(is the templates/posting_body.tpl of the subSilver standard mod style of a standard phpBB forum)
Code: |
<script language="JavaScript" type="text/javascript">
<!--
// bbCode control by
// subBlue design
// www.subBlue.com
// JavaScript enhanced version of bbcode insertion tags
// Better insertion tags in the textarea field
// Tested on:
// - Internet Explorer 6.0
// - Mozilla 1.7 (Windows version)
// - Mozilla 1.7 (Linux-Gentoo version)
// Enhancements:
// Don't loose the text scroll position when insert a code
//* Javascript substitution for correct working on explorer & mozilla browsers
//* by RadikalQ3 (radikal AT q3 dot nu), helping to Gentoo comunity.
//**************************************************************************************
// Helpline messages
b_help = "{L_BBCODE_B_HELP}";
i_help = "{L_BBCODE_I_HELP}";
u_help = "{L_BBCODE_U_HELP}";
q_help = "{L_BBCODE_Q_HELP}";
c_help = "{L_BBCODE_C_HELP}";
l_help = "{L_BBCODE_L_HELP}";
o_help = "{L_BBCODE_O_HELP}";
p_help = "{L_BBCODE_P_HELP}";
w_help = "{L_BBCODE_W_HELP}";
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";
// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
var bbtagsAbiertos = new Array();
function tmAnadeTag(eltag) {
if (bbtags[eltag+1] != '') {
bbtagsAbiertos[bbtagsAbiertos.length] = eltag;
//Add '*' in the button's text:
eval('document.post.addbbcode'+eltag+'.value += "*"');
}
}
function tmQuitaTag(eltag) {
for (i = 0; i < bbtagsAbiertos.length; i++) {
if (bbtagsAbiertos[i] == eltag) {
bbtagsAbiertos.splice(i, 1);
//Remove '*' from the button's text:
buttext = eval('document.post.addbbcode' + eltag + '.value');
eval('document.post.addbbcode' + eltag + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
}
}
function tmHayTagABierto(eltag) {
var tag = 0;
for (i = 0; i < bbtagsAbiertos.length; i++) {
if (bbtagsAbiertos[i] == eltag) { tag++; }
}
if (tag > 0) { return true; } else { return false; }
}
function tmCierraTags() {
var count = bbtagsAbiertos.length;
for (n = 0; n < count; n++) { bbstyle(bbtagsAbiertos[bbtagsAbiertos.length - 1]); }
}
function bbstyle(eltag) {
var txtarea = document.post.message;
if (eltag == -1) { tmCierraTags(); return; }
//Para Internet Exploiter:
if (document.selection) {
txtarea.focus();
sel = document.selection.createRange();
if (sel.text.length > 0) { sel.text = bbtags[eltag] + sel.text + bbtags[eltag+1]; }
else {
if (!tmHayTagABierto(eltag) || bbtags[eltag+1] == '') {
sel.text = bbtags[eltag];
tmAnadeTag(eltag);
}
else {
sel.text = bbtags[eltag+1];
tmQuitaTag(eltag);
}
}
txtarea.focus();
}
//Para Mozilla-Netscape:
else if (txtarea.selectionStart || txtarea.selectionStart == '0') {
var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;
var cursorPos = endPos;
var scrollTop = txtarea.scrollTop;
if (startPos != endPos) {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbtags[eltag]
+ txtarea.value.substring(startPos, endPos)
+ bbtags[eltag+1]
+ txtarea.value.substring(endPos, txtarea.value.length);
cursorPos += bbtags[eltag].length + bbtags[eltag+1].length;
}
else {
if (!tmHayTagABierto(eltag) || bbtags[eltag+1] == '') {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbtags[eltag]
+ txtarea.value.substring(endPos, txtarea.value.length);
tmAnadeTag(eltag);
cursorPos = startPos + bbtags[eltag].length;
}
else {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbtags[eltag+1]
+ txtarea.value.substring(endPos, txtarea.value.length);
tmQuitaTag(eltag);
cursorPos = startPos + bbtags[eltag+1].length;
}
}
txtarea.focus();
txtarea.selectionStart = cursorPos;
txtarea.selectionEnd = cursorPos;
txtarea.scrollTop = scrollTop;
}
else {
if (!tmHayTagABierto(eltag) || bbtags[eltag+1] == '') {
txtarea.value += bbtags[eltag];
tmAnadeTag(eltag);
}
else {
txtarea.value += bbtags[eltag+1];
tmQuitaTag(eltag);
}
txtarea.focus();
}
}
function bbfontstyle(bbopen,bbclose) {
var txtarea = document.post.message;
//Para Internet Exploiter:
if (document.selection)
{ txtarea.focus();
sel = document.selection.createRange();
sel.text = bbopen+sel.text+bbclose;
}
//Para Mozilla-Netscape:
else if (txtarea.selectionStart || txtarea.selectionStart == '0') {
var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;
var cursorPos = endPos;
var scrollTop = txtarea.scrollTop;
if (startPos != endPos) {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbopen
+ txtarea.value.substring(startPos, endPos)
+ bbclose
+ txtarea.value.substring(endPos, txtarea.value.length);
cursorPos += bbopen.length + bbclose.length;
}
else {
txtarea.value = txtarea.value.substring(0, startPos)
+ bbopen+' '+bbclose
+ txtarea.value.substring(endPos, txtarea.value.length);
cursorPos = startPos + bbopen.length+bbclose.lenth+1;
}
txtarea.focus();
txtarea.selectionStart = cursorPos;
txtarea.selectionEnd = cursorPos;
txtarea.scrollTop = scrollTop;
}
else { txtarea.value += bbopen+' '+bbclose;
txtarea.focus();
}
}
// Shows the help messages in the helpline window
function helpline(help) {
document.post.helpbox.value = eval(help + "_help");
}
function checkForm() {
formErrors = false;
if (document.post.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE}";
}
if (formErrors) {
alert(formErrors);
return false;
} else {
bbstyle(-1);
//formObj.preview.disabled = true;
//formObj.submit.disabled = true;
return true;
}
}
function emoticon(text) {
bbfontstyle(text,'');
return;
}
//-->
</script>
<!-- BEGIN privmsg_extensions -->
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
<tr>
<td valign="top" align="center" width="100%">
<table height="40" cellspacing="2" cellpadding="2" border="0">
<tr valign="middle">
<td>{INBOX_IMG}</td>
<td><span class="cattitle">{INBOX_LINK} </span></td>
<td>{SENTBOX_IMG}</td>
<td><span class="cattitle">{SENTBOX_LINK} </span></td>
<td>{OUTBOX_IMG}</td>
<td><span class="cattitle">{OUTBOX_LINK} </span></td>
<td>{SAVEBOX_IMG}</td>
<td><span class="cattitle">{SAVEBOX_LINK} </span></td>
</tr>
</table>
</td>
</tr>
</table>
<br clear="all" />
<!-- END privmsg_extensions -->
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
{POST_PREVIEW_BOX}
{ERROR_BOX}
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
<!-- BEGIN switch_not_privmsg -->
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
<!-- END switch_not_privmsg -->
</tr>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="2" height="25"><b>{L_POST_A}</b></th>
</tr>
<!-- BEGIN switch_username_select -->
<tr>
<td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" class="post" tabindex="1" name="username" size="25" maxlength="25" value="{USERNAME}" /></span></td>
</tr>
<!-- END switch_username_select -->
<!-- BEGIN switch_privmsg -->
<tr>
<td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td>
<td class="row2"><span class="genmed"><input type="text" class="post" name="username" maxlength="25" size="25" tabindex="1" value="{USERNAME}" /> <input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></span></td>
</tr>
<!-- END switch_privmsg -->
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
<td class="row2" width="78%"> <span class="gen">
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
</span> </td>
</tr>
<tr>
<td class="row1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td><span class="gen"><b>{L_MESSAGE_BODY}</b></span> </td>
</tr>
<tr>
<td valign="middle" align="center"> <br />
<table width="100" border="0" cellspacing="0" cellpadding="5">
<tr align="center">
<td colspan="{S_SMILIES_COLSPAN}" class="gensmall"><b>{L_EMOTICONS}</b></td>
</tr>
<!-- BEGIN smilies_row -->
<tr align="center" valign="middle">
<!-- BEGIN smilies_col -->
<td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td>
<!-- END smilies_col -->
</tr>
<!-- END smilies_row -->
<!-- BEGIN switch_smilies_extra -->
<tr align="center">
<td colspan="{S_SMILIES_COLSPAN}"><span class="nav"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">{L_MORE_SMILIES}</a></span></td>
</tr>
<!-- END switch_smilies_extra -->
</table>
</td>
</tr>
</table>
</td>
<td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span>
<table width="450" border="0" cellspacing="0" cellpadding="2">
<tr align="center" valign="middle">
<td><span class="genmed">
<input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="bbstyle(8)" onMouseOver="helpline('c')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onClick="bbstyle(12)" onMouseOver="helpline('o')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onClick="bbstyle(14)" onMouseOver="helpline('p')" />
</span></td>
<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>
</tr>
<tr>
<td colspan="9">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="genmed"> {L_FONT_COLOR}:
<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
<option style="color:black; background-color: {T_TD_COLOR1}" value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option>
<option style="color:darkred; background-color: {T_TD_COLOR1}" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
<option style="color:red; background-color: {T_TD_COLOR1}" value="red" class="genmed">{L_COLOR_RED}</option>
<option style="color:orange; background-color: {T_TD_COLOR1}" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
<option style="color:brown; background-color: {T_TD_COLOR1}" value="brown" class="genmed">{L_COLOR_BROWN}</option>
<option style="color:yellow; background-color: {T_TD_COLOR1}" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
<option style="color:green; background-color: {T_TD_COLOR1}" value="green" class="genmed">{L_COLOR_GREEN}</option>
<option style="color:olive; background-color: {T_TD_COLOR1}" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
<option style="color:cyan; background-color: {T_TD_COLOR1}" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
<option style="color:blue; background-color: {T_TD_COLOR1}" value="blue" class="genmed">{L_COLOR_BLUE}</option>
<option style="color:darkblue; background-color: {T_TD_COLOR1}" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
<option style="color:indigo; background-color: {T_TD_COLOR1}" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
<option style="color:violet; background-color: {T_TD_COLOR1}" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
<option style="color:white; background-color: {T_TD_COLOR1}" value="white" class="genmed">{L_COLOR_WHITE}</option>
<option style="color:black; background-color: {T_TD_COLOR1}" value="black" class="genmed">{L_COLOR_BLACK}</option>
</select> {L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
<option value="7" class="genmed">{L_FONT_TINY}</option>
<option value="9" class="genmed">{L_FONT_SMALL}</option>
<option value="12" selected class="genmed">{L_FONT_NORMAL}</option>
<option value="18" class="genmed">{L_FONT_LARGE}</option>
<option value="24" class="genmed">{L_FONT_HUGE}</option>
</select>
</span></td>
<td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="9"> <span class="gensmall">
<input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" />
</span></td>
</tr>
</table>
<textarea name="message" wrap="virtual" style="width:99%; height:450px;" tabindex="3" class="post" >{MESSAGE}</textarea>
</span></td>
</tr>
<tr>
<td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
<td class="row2"><span class="gen"> </span>
<table cellspacing="0" cellpadding="1" border="0">
<!-- BEGIN switch_html_checkbox -->
<tr>
<td>
<input type="checkbox" name="disable_html" {S_HTML_CHECKED} />
</td>
<td><span class="gen">{L_DISABLE_HTML}</span></td>
</tr>
<!-- END switch_html_checkbox -->
<!-- BEGIN switch_bbcode_checkbox -->
<tr>
<td>
<input type="checkbox" name="disable_bbcode" {S_BBCODE_CHECKED} />
</td>
<td><span class="gen">{L_DISABLE_BBCODE}</span></td>
</tr>
<!-- END switch_bbcode_checkbox -->
<!-- BEGIN switch_smilies_checkbox -->
<tr>
<td>
<input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} />
</td>
<td><span class="gen">{L_DISABLE_SMILIES}</span></td>
</tr>
<!-- END switch_smilies_checkbox -->
<!-- BEGIN switch_signature_checkbox -->
<tr>
<td>
<input type="checkbox" name="attach_sig" {S_SIGNATURE_CHECKED} />
</td>
<td><span class="gen">{L_ATTACH_SIGNATURE}</span></td>
</tr>
<!-- END switch_signature_checkbox -->
<!-- BEGIN switch_notify_checkbox -->
<tr>
<td>
<input type="checkbox" name="notify" {S_NOTIFY_CHECKED} />
</td>
<td><span class="gen">{L_NOTIFY_ON_REPLY}</span></td>
</tr>
<!-- END switch_notify_checkbox -->
<!-- BEGIN switch_delete_checkbox -->
<tr>
<td>
<input type="checkbox" name="delete" />
</td>
<td><span class="gen">{L_DELETE_POST}</span></td>
</tr>
<!-- END switch_delete_checkbox -->
<!-- BEGIN switch_type_toggle -->
<tr>
<td></td>
<td><span class="gen">{S_TYPE_TOGGLE}</span></td>
</tr>
<!-- END switch_type_toggle -->
</table>
</td>
</tr>
{POLLBOX}
<tr>
<td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
</tr>
</table>
<table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
<tr>
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
</form>
<table width="100%" cellspacing="2" border="0" align="center">
<tr>
<td valign="top" align="right">{JUMPBOX}</td>
</tr>
</table>
{TOPIC_REVIEW_BOX}
|
PD: Sorry for my english, I'm a spanish speaker... _________________ Radikal Trucomania
Last edited by RadikalQ3 on Fri Jun 17, 2005 9:02 am; edited 1 time in total |
|
Back to top |
|
|
ian! Bodhisattva
Joined: 25 Feb 2003 Posts: 3829 Location: Essen, Germany
|
Posted: Tue Feb 01, 2005 3:53 pm Post subject: |
|
|
Great work! I've applied your changes to our CVS-version.
Expect it be part of the next forums update.
Thanks alot! _________________ "To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins |
|
Back to top |
|
|
RadikalQ3 Apprentice
Joined: 26 Oct 2003 Posts: 172 Location: Planeta Tierra
|
Posted: Tue Feb 01, 2005 3:59 pm Post subject: |
|
|
Believe me... I hate the actual textarea size... was a pleasure change this! _________________ Radikal Trucomania |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Tue Feb 01, 2005 10:29 pm Post subject: |
|
|
This is solid stuff folks. Very nice. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
SerfurJ l33t
Joined: 10 Apr 2004 Posts: 824 Location: Texas
|
Posted: Tue Feb 22, 2005 4:25 am Post subject: |
|
|
i think that change made it much harder for me to browse the forums with my text browser (elinks).
on unmodified phpbb, i see:
Code: | Post a new topic
______________________________________________
[ [ [
B i u [ Quote ] [ Code ] [ List ] [ List= ] [ Img ] [ URL ]
] ] ]
Font colour: [Default__] Font size: [Normal] Close Tags
yles can be applied quickly to selected text._
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
____________________________________
[ ] Disable BBCode in this post
[ ] Disable Smilies in this post
[X] Notify me when a reply is posted |
on gentoo forums i see:
Code: | Post a new topic
______________________________________________
[ B [ i [ u [ Quote ] [ Code ] [ List ] [ List= ] [ URL ]
] ] ]
Font colour: [Default__] Font size: [Normal] Close Tags
yles can be applied quickly to selected text._
_______________________________________________________________________
[ ] Disable BBCode in this post
[ ] Disable Smilies in this post
[ ] Notify me when a reply is posted
|
|
|
Back to top |
|
|
RadikalQ3 Apprentice
Joined: 26 Oct 2003 Posts: 172 Location: Planeta Tierra
|
Posted: Tue Feb 22, 2005 2:00 pm Post subject: |
|
|
SerfurJ wrote: | i think that change made it much harder for me to browse the forums with my text browser (elinks) |
Yes... sorry, I never was use a just text browser.
The text browsers that I have tested (elinks and links2) show this problem because they just use the areatext tags 'cols' and 'rows' for a correct rendering of the text field.
I have made a new version of the modification for correct this.
You can test it in a fresh installation of a phpbb forum (with this correction applyed) in one of my server, at: http://foros.pasote.com
The modification for this is very simple: include the col and row fields in the textarea field...
Now, the file templates/subSilver/posting_body.tpl is :
Code: | <textarea name="message" wrap="virtual" style="width:99%; height:450px;" tabindex="3" class="post" >{MESSAGE}</textarea> |
simply, we must add the cols and rows parameters:
Code: | <textarea name="message" wrap="virtual" cols="35" rows="15" style="width:99%; height:450px;" tabindex="3" class="post" >{MESSAGE}</textarea> |
I have tested this new modification with Internet Explorer, Mozilla, Konqueror and a Just text browser: links2 and works perfectly.
(Sorry but... navigation in elinks is horrible... links2 is more... comfortable?)
The graphic browsers display the textarea full width and the just text browsers show an 35x15 chars textarea... without conflicts _________________ Radikal Trucomania |
|
Back to top |
|
|
SerfurJ l33t
Joined: 10 Apr 2004 Posts: 824 Location: Texas
|
Posted: Tue Feb 22, 2005 2:41 pm Post subject: |
|
|
thanks.. someone please apply that fix. |
|
Back to top |
|
|
c07 Veteran
Joined: 25 Oct 2002 Posts: 1091
|
Posted: Tue Feb 22, 2005 3:46 pm Post subject: |
|
|
RadikalQ3 wrote: | The modification for this is very simple: include the col and row fields in the textarea field... |
Yes, that's correct. |cols| and |rows| are required attributes in HTML 4.01, but can be overridden by style in stylable user agents.
BTW, there were comments about the textarea being too large now. One was requesting more clickable space at the right, so maybe |width| should be reduced to 97% or 98%. And a height of 300px or 400px may be more optimal for users without large screens (I'd prefer 350px to be able to see the "topic review" while typing). |
|
Back to top |
|
|
RadikalQ3 Apprentice
Joined: 26 Oct 2003 Posts: 172 Location: Planeta Tierra
|
Posted: Tue Feb 22, 2005 5:53 pm Post subject: |
|
|
c07 wrote: | Yes, that's correct. |cols| and |rows| are required attributes in HTML 4.01, but can be overridden by style in stylable user agents. |
Yes, but... doesn't works in text browsers... but including both the problem is solved...
So... maybe is a problem of the text browsers... _________________ Radikal Trucomania |
|
Back to top |
|
|
ian! Bodhisattva
Joined: 25 Feb 2003 Posts: 3829 Location: Essen, Germany
|
Posted: Tue Feb 22, 2005 7:12 pm Post subject: |
|
|
Fixed. Thanks a lot folks! _________________ "To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins |
|
Back to top |
|
|
SerfurJ l33t
Joined: 10 Apr 2004 Posts: 824 Location: Texas
|
Posted: Tue Feb 22, 2005 7:40 pm Post subject: |
|
|
thanks. much better! |
|
Back to top |
|
|
mycroes Tux's lil' helper
Joined: 26 May 2003 Posts: 110 Location: Netherlands
|
Posted: Mon Mar 07, 2005 6:21 am Post subject: Well done |
|
|
Well this really is a great update! It's the first time I see the tags thingie working correctly in Firefox again, and I'm really gonna need it on some of my own sites too I think... Yet another pro to the Gentoo forum...
Greetings,
Michael _________________ In a world without walls or fences we don't need windows or gates |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|