In your config.inc.php file add this variable:
$config['onload'] = "";
In your ubbt_header.tmpl file change this:
<body>
to this:
<body {$config['onload']}>
LOGIN
======================================================================
Now to place the cursor in the Username box during login you will need to edit your login.tmpl and change this:
<form method="post" action="{$config['phpurl']}/start_page.php">
to this:
<form name="userLogin" method="post" action="{$config['phpurl']}/start_page.php">
Now in your login.php script, just above this:
$html -> send_header($ubbt_lang['LOGIN_PROMPT'],$Cat,0,0,0,0);
add this:
$config['onload'] = "onload="document.userLogin.Loginname.focus()"";
======================================================================
NEW POST
======================================================================
In your newpost.php script just before this:
$html -> send_header("{$ubbt_lang['MAKENEW_HEAD']} ($Title)",$Cat,0,$user,$Board);
add this:
$config['onload'] = "onload="document.replier.Subject.focus()"";
======================================================================
NEW REPLY
======================================================================
In your newreply.php script just before this:
$html -> send_header("{$ubbt_lang['REPLY_HEAD']} ($Title)",$Cat,0,$user,$Extra,$ReadPerm);
add this:
$config['onload'] = "onload="document.replier.Subject.focus()"";
======================================================================
There's more scripts that you can use this with. Just make sure the form has a name and follow the same steps above but adjusted for what ever form/page your changing.
Edit Note: I had an error in the LOGIN code. The form's name should have been "userLogin"