.
// forum custom thread type
include_once DISCUZ_ROOT.'./forumdata/cache/cache_threadtypes.php';
$threadtypes = $forum['threadtypes'] ? unserialize($forum['threadtypes']):array();
$threadtypesoptions ='';
if ($_DCACHE['threadtypes']){
foreach( $_DCACHE['threadtypes'] as $key=>$val ){
$checked = (is_array($threadtypes) && $threadtypes['types'][$key]) ? 'checked':'';
$threadtypesoptions .="<input type=\"checkbox\" name=\"threadtypesnew[types][$key]\" value=\"$val\" $checked> $val<br>\n";
}
}else{
$threadtypesoptions = $lang['forums_edit_threadtypes_options_null'];
}
$threadtypesstatuscheck = array( intval($threadtypes['status'])=>'checked');
$threadtypesstatusstyle = empty($threadtypes['status']) ? 'none':'';
showtype('forums_edit_threadtypes');
showsetting('forums_edit_threadtypes_status', '', '', "<input type=\"radio\" name=\"threadtypesnew[status]\" value=\"1\" $threadtypesstatuscheck[1] onclick=\"findobj('threadtypeson').style.display=''\">$lang[yes] <input type=\"radio\" name=\"threadtypesnew[status]\" value=\"0\" $threadtypesstatuscheck[0] onclick=\"findobj('threadtypeson').style.display='none'\">$lang[no]");
echo "<tbody id=\"threadtypeson\" style=\"display:$threadtypesstatusstyle\">";
showsetting('forums_edit_threadtypes_required','threadtypesnew[required]',$threadtypes['required'],'radio');
showsetting('forums_edit_threadtypes_listable','threadtypesnew[listable]',$threadtypes['listable'],'radio');
showsetting('forums_edit_threadtypes_prefix','threadtypesnew[prefix]',$threadtypes['prefix'],'radio');
showsetting('forums_edit_threadtypes_replaceicon','threadtypesnew[replaceicon]',$threadtypes['replaceicon'],'radio');
showsetting('forums_edit_threadtypes_options','','',$threadtypesoptions);
echo "</tbody>";
//--------------------------------------------------------------
// forum custom thread type
include_once DISCUZ_ROOT.'./forumdata/cache/cache_threadtypes.php';
$threadtypes = $forum['threadtypes'] ? unserialize($forum['threadtypes']):'';
$threadtypesoptions ='';
if ($_DCACHE['threadtypes']){
$num=0;
$threadtypesoptions .="<table cellspacing=\"4\" cellpadding=\"0\" width=\"100%\" align=\"center\"><tr>";
foreach( $_DCACHE['threadtypes'] as $key=>$val ){
$checked = $threadtypes['types'][$key] ? 'checked':'';
$threadtypesoptions .="<td><input type=\"checkbox\" name=\"threadtypesnew[types][$key]\" value=\"$val\" $checked> $val\n";
$num ++;
if($num%6==0) $threadtypesoptions.="<tr>";
}
$threadtypesoptions .="</td></tr></table>";
}else{
$threadtypesoptions = $lang['forums_edit_threadtypes_options_null'];
}
$threadtypesstatuscheck = array( intval($threadtypes['status'])=>'checked');
$threadtypesstatusstyle = empty($threadtypes['status']) ? 'none':'';
showtype('forums_edit_threadtypes');
showsetting('forums_edit_threadtypes_status', '', '', "<input type=\"radio\" name=\"threadtypesnew[status]\" value=\"1\" $threadtypesstatuscheck[1] onclick=\"findobj('threadtypeson').style.display=''\">$lang[yes] <input type=\"radio\" name=\"threadtypesnew[status]\" value=\"0\" $threadtypesstatuscheck[0] onclick=\"findobj('threadtypeson').style.display='none'\">$lang[no]");
echo "<tbody id=\"threadtypeson\" style=\"display:$threadtypesstatusstyle\">";
showsetting('forums_edit_threadtypes_required','threadtypesnew[required]',$threadtypes['required'],'radio');
showsetting('forums_edit_threadtypes_listable','threadtypesnew[listable]',$threadtypes['listable'],'radio');
showsetting('forums_edit_threadtypes_prefix','threadtypesnew[prefix]',$threadtypes['prefix'],'radio');
showsetting('forums_edit_threadtypes_replaceicon','threadtypesnew[replaceicon]',$threadtypes['replaceicon'],'radio');
echo "<tr><td colspan=\"2\" class=\"altbg2\">$lang[forums_edit_threadtypes_options]<br>$lang[forums_edit_threadtypes_options_comment]</td></tr>\n";
echo "<tr><td colspan=\"2\" class=\"altbg2\">$threadtypesoptions</td></tr>\n";
echo "</tbody>";
//--------------------------------------------------------------