The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Have you ever wanted to change the size of the textfield when you post a message? Now it is possible....
With this Hack every user can have a custom textfield size. Both width and hight can simply be changed by specifying your favorit values in your Options Menu. For a demo click here Many thanks to Thomas"cptza" woh helped me a lot, to finish this hack ![]() You need to edit 2 files and 3 templates First open admin/functions.php find Code:
if (eregi("MSIE",$HTTP_USER_AGENT)) { // browser is IE
return "70";
Code:
// ###################### Start gettextareawidth #######################
function gettextareawidth () {
global $DB_site,$HTTP_USER_AGENT, $bbuserinfo;
$textareacols=$DB_site->query_first("SELECT textareacols FROM user WHERE userid='$userid'");
$textarearows=$DB_site->query_first("SELECT textarearows FROM user WHERE userid='$userid'");
if ($bbuserinfo[textareacols]!=0) {
return "$bbuserinfo[textareacols]";
}if ($bbuserinfo[textarearows]!=20) {
return "$bbuserinfo[textarearows]";
}elseif (eregi("MSIE",$HTTP_USER_AGENT)) { // browser is IE
return "70";
find Code:
if ($bbuserinfo[showsignatures]) {
$showsignatureschecked="checked";
$showsignaturesnotchecked="";
} else {
$showsignatureschecked="";
$showsignaturesnotchecked="checked";
}
Code:
// textarea Begin
$textareacols=$DB_site->query_first("SELECT textareacols FROM user WHERE userid='$userid'");
$textarearows=$DB_site->query_first("SELECT textarearows FROM user WHERE userid='$userid'");
// Textarea End
Code:
$DB_site->query("UPDATE user
SET ".$updatestyles."adminemail='$adminemail',
showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser',
maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',
startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',
emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
nosessionhash='$nosessionhash'
WHERE userid='$bbuserinfo[userid]'");
Code:
$DB_site->query("UPDATE user
SET ".$updatestyles."adminemail='$adminemail',
showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser',
maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',
startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',
emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
nosessionhash='$nosessionhash',textareacols='$textareacols',textarearows='$textarearows'
WHERE userid='$bbuserinfo[userid]'");
Find Code:
<textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="2">$message</textarea> Code:
<textarea name="message" rows="$bbuserinfo[textarearows]" cols="$textareacols" wrap="virtual" tabindex="2">$message</textarea> insert Code:
<tr><td bgcolor="#1C5780"><normalfont><b>Textarea Size:</b></normalfont><br> <smallfont>Edit the Size of the textarea. $userinfo[textareacols]</smallfont></td> <td bgcolor="#1C5780"><normalfont> <smallfont>width:</smallfont><input type="text" size="3" value="$bbuserinfo[textareacols]" name="textareacols" class="bginput"> <smallfont> hight:</smallfont><input type="text" size="3" value="$bbuserinfo[textarearows]" name="textarearows" class="bginput"> </normalfont></td></tr> Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Nice but i'm not gonna use it for my forums because people will gonna abuse it.
One comment: https://vborg.vbsupport.ru/showthrea...threadid=31969
|
![]() |
|
|