View Full Version : Bigger edit boxes by default in Admin CP scripts?
styleforum
04-11-2008, 01:17 AM
I find it annoying that all the edit boxes start out tiny when I go to edit things in the Admin CP. I can increase the size (with the 'Increase Size' Javascript link), but the next time I use the same thing, they are small again.
Is there any way to change all those places that the "increase size" appears so that the box stretches to fit the frame by default? Looking at code in a 50 char wide by 12 row box is ridiculous.
Thanks.
Lynne
04-11-2008, 02:14 AM
Sure you can, but you have to actually edit the file. For instance, in the faq page, you will find this code for the textarea:
print_textarea_row($vbphrase['text'], 'deftext', $faqphrase["$defaultlang"]['text'], 10, '70" style="width:100%');
If you look at the function print_textarea_row (in adminfunctions.php), you will see that the 10 is the number of rows and the 70 is the number of columns. So, you can change the 70 to something larger, like 150 or so.
MikQuattro
05-07-2008, 03:11 PM
Is there a solution for v3.7? I've tried changing the values in the adminfunction.php file with no effect. I just want to make the textarea larger by default when I'm editing templates. :)
Lynne
05-07-2008, 03:20 PM
I only gave one example from the adminfunction.php file. There are several places you would need to change that line depending on whilh textarea you want to make larger. Every textarea is called from a separate line.
MikQuattro
05-07-2008, 04:17 PM
Thanks for the speedy reply...:)
That bit of code you posted isn't even in the adminfunctions.php file, the only thing close is this:
function print_textarea_row($title, $name, $value = '', $rows = 4, $cols = 40, $htmlise = true, $doeditbutton = true, $direction = '', $textareaclass = false)
That's why I assumed that the code had changed for v3.7. I tried editing that, with no effect. I also looked for similar code in adminfunctions_template.php file as well as others, but I'm having a hard time tracking down the values I need.
All I'm trying to do is make the default size of the textarea in the template editor larger. I'm assuming that is going to be one piece of code because whenever you open a template to edit, it's always the same, regardless of the template.
When you do a View Source of the page, you get this for the textarea:
<div id="ctrl_template"><textarea name="template" id="ta_template_2" class="code" rows="22" cols="75" style="width:100%" wrap="virtual" dir="ltr" tabindex="1">
The problem is, I've search in loads of files for "ctrl_template", "template", "ta_template_2", etc, and I haven't come up with anything.
Anyway, sorry for the confusion, I hope that explains it a bit better.......TBH, I think I confused myself even more.....LOL
Lynne
05-07-2008, 06:00 PM
I just reread what I originally wrote. When I wrote about the adminfuction.php file, I was telling the user to take a look at the *function* in that file to see the parameters. The line I quoted is found in whatever page is calling the textarea which you will have to determine by whichever textarea you are trying to change the size of.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.