Currently, indexu has a category header field that allows you to replace the cat_head.html file with your own custom category header information.
But this is just a field of limited width making it hard to edit if you want to do anything significant.
This hack allows you to either enter the text as before or a file name. If you enter a file name, indexu will call the file which contains all the html code for that category header.
What it does is to look at the length of the data in the field. If the length is small, it assumes the info is a file. The variable max_header_length is set at 25 and is used to determine whether or not the field contains a file name or actual heml code for the category hearder. If the field is less than 25, it assumes the data is a filename and will look for it in the themes filder.
The above code includes the hack to allow the hot, stats, online, etc to be used in the header file. I've included the misc1.txt file ( vBulletin will not allow me to upload the same file more than once ). Rename it to misc.php and upload it to the same folder as the browse.php$ma = 1;
// mod for cat header file in $header
$max_header_length=25;
// mod for misc - online, hot, stats
include("misc.php");
if(empty($header))
// mod for misc - online, hot, stats
// DisplayTemplate($theme_path."cat_header.html","\$p age_title,\$cat,\$meta_keywords,\$meta_description ,\$login_box");
DisplayTemplate($theme_path."cat_header.html","".
"\$page_title,\$cat,\$meta_keywords," .
"\$meta_description,\$hot_links,\$login_box," . // this should be on line above
"\$total_online,\$members_online,\$guess_onlin e," . // online
"\$username_online,\$total_link,\$total_hits," . // online and stats
"\$total_category,\$total_member,\$total_milis "); // stats
// mod for cat header file in $header
elseif (strlen($header) < $max_header_length)
DisplayTemplate($theme_path.$header,"".
"\$page_title,\$cat,\$meta_keywords," .
"\$meta_description,\$hot_links,\$login_box," .
"\$total_online,\$members_online,\$guess_onlin e," .
"\$username_online,\$total_link,\$total_hits," .
"\$total_category,\$total_member,\$total_milis ");
else
print $header;
ShowCategoryPage();
if(empty($footer))
DisplayTemplate($theme_path."footer.html","\$cat,\ $ma");
else
print $footer;
?>
If you don't use that hack, the DisplayTemplate will look like:
You will need to create the category header file and place it in the themes/default folder. Then enter the file name in the header field on the edit category page.// mod for cat header file in $header
elseif (strlen($header) < $max_header_length)
DisplayTemplate($theme_path."$header","\$page_titl e,\$cat,\$meta_keywords,\$meta_description");
I have also set the max_header_length at 25. Change it to whatever you need.



