you really need to just inform smarty of the variable..
look towards the bottom and find
$smarty_data = array(
"catrow" => array(0=>array('CatId'=>$Board)),
..
add a row that pass your $hidelocked from the .inc.php to the tpl.
like so (add this line):
"hidelocked" => $hidelocked,
now smarty (the .tpl) knows about the value of $hidelocked from the script..
good luck,
SD
oh, and there's also a file in your /scripts directory called sample.inc.php that is commented and will explain a lot of what isn't documented anywhere. well worth a read
