To prosty hack w JS. Sam napisalem podobny, chetnie udostepnie. Dla pliku posting_body.tpl
[phpbb]
#------ [ ZNAJDZ ]
//-->
</script>
<!-- BEGIN privmsg_extensions -->
#------ [ DODAJ PRZED ]
function message_rows(span_id, min_rows, max_rows, step)
{
if ( document.post.message.rows <= min_rows )
{
dec = "<span id=\"dec_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: gray;\" onclick=\"message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">•</span>";
inc = "<span id=\"inc_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: black;\" onmouseover=\"this.style.color='red';\" onmouseout=\"this.style.color='black';\" onclick=\"document.post.message.rows = document.post.message.rows + " + step + "; message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">»</span>";
}
else if ( document.post.message.rows > min_rows && document.post.message.rows <= max_rows )
{
dec = "<span id=\"dec_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: black;\" onmouseover=\"this.style.color='red';\" onmouseout=\"this.style.color='black';\" onclick=\"document.post.message.rows = document.post.message.rows - " + step + "; message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">«</span>";
inc = "<span id=\"inc_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: black;\" onmouseover=\"this.style.color='red';\" onmouseout=\"this.style.color='black';\" onclick=\"document.post.message.rows = document.post.message.rows + " + step + "; message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">»</span>";
}
else
{
dec = "<span id=\"dec_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: black;\" onmouseover=\"this.style.color='red';\" onmouseout=\"this.style.color='black';\" onclick=\"document.post.message.rows = document.post.message.rows - " + step + "; message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">«</span>";
inc = "<span id=\"inc_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: gray;\" onclick=\"message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">•</span>";
}
res = "<span id=\"reset_rows\" style=\"cursor: pointer; text-decoration: none; font-weight: bold; color: black;\" onmouseover=\"this.style.color='red';\" onmouseout=\"this.style.color='black';\" onclick=\"document.post.message.rows = " + min_rows + "; message_rows('" + span_id + "', " + min_rows + ", " + max_rows + ", " + step + "); return false;\">∅</span>";
document.getElementById(span_id).innerHTML = dec + ' ' + res + ' ' + inc;
return false;
}
#------ [ ZNAJDZ ]
<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>
#------ [ DODAJ PO ]
<tr>
<td colspan="9" align="right"><span id="message_rows" class="genblmed"> </span> </td>
</tr>
#------ [ ZNAJDZ ]
<td align="right" valign="top"><span class="gensmall">{S_TIMEZONE}</span></td>
</tr>
</table>
</form>
#------ [ DODAJ PO ]
<script type="text/javascript">
<!--
message_rows('message_rows', 15, 60, 5);
//-->
</script>
[/phpbb]
Jakby cos nie dzialalo to pisz.
Daj biedakowi rybę, a zje ją i będzie głodny. Daj biedakowi wędkę, a sam sobie bedzie łowił ryby!