View Full Version : How do I increase the default "Template Editor" size?
bzcomputers
05-01-2013, 11:16 AM
I deal with a lot of custom templates and I'm constantly editing templates and have to resize the template editor a hundred times a day sometimes to make it useable. Nothing like selecting "Save and Reload" only to have to resize again!
Seems there must be a way to edit the code to have it open by default to a larger size.
Save my sanity, please!
nhawk
05-01-2013, 11:26 AM
Simple solution...
Edit the templates in a text editor. When done, copy and paste into the small editor box in vB.
bzcomputers
05-01-2013, 11:51 AM
Yes, that is a solution and I have done that before, but I'm trying to take steps out of the process not add more. Copying over to another editor and back hundreds of times, especially when doing testing, is what I don't want to continue to do. Also opens up for issues and mistakes in copying and pasting, possibly missing some code, etc.
Seems there must be a way to modify the vB code to permanently resize the default Template Editor.
nhawk
05-01-2013, 12:01 PM
Well, then you can change the size in acp->template.php
Look for this..
print_textarea_row($vbphrase['template']
And change the size in the code that follows it. I think the default number of rows is 22. Change it to what you like.
bzcomputers
05-01-2013, 12:56 PM
Thanks. Found what I needed from your reply.
On line #2419 in admincp - template.php
Original:
'template', $templateinfo['template_un'], 20, '5000" style="width:99%', true, true, 'ltr', 'code');
Changed to:
'template', $templateinfo['template_un'], 36, '5000" style="width:1300px', true, true, 'ltr', 'code');
First number in red is the number of code lines visible (height) and the second number is obviously the width of the template editor.
You will also need to edit these same numbers in red above on lines 2853 & 2871. Just search for "print_textarea_row($vbphrase['template']" in template.php and it will take you to each location.
Each person will have their own specific changes depending on their screen resolution. My screen resolution was 1650x1080. Only took a couple seconds to figure out what changes worked best to maximize the use of the screen space.
It's these little things which will keep my sanity a few days longer. Wish I would have found this a long time ago!!!
-------------------------
Edit: Details above updated.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.