This is all the code for forum.php, and then try to read it and take notes on your own.
Define (' Apptypeid ', 2); Define (' Curscript ', ' Forum ');
define (); A function that defines a constant, with the result Apptypeid = 2, curscript = ' Forum '.
Why is it so set, yet do not know.
require './source/class/class_core.php '; require './source/function/function_forum.php ';
Import 2 files
Class_core.php-The main class file of the forum, commonly used classes, are defined in this file
Function_forum.php-The functions used by the Forum Forums module are placed in this file.
$modarray=Array(' Ajax ', ' announcement ', ' attachment ', ' forumdisplay ', ' group ', ' image ', ' Index ', ' Medal ', ' Misc ', ' MODCP ', ' notice ', ' Post ', ' redirect ', ' relatekw ', ' relatethread ', ' rss ', ' topicadmin ', ' Trade ', ' viewthread ', ' tags ', ' collection ', ' Guide ');$modcachelist=Array( ' Index ' =Array(' Announcements ', ' onlinelist ', ' forumlinks ', ' heats ', ' historyposts ', ' Onlinerecord ', ' userstats ', ' Diytemplat ' Enameforum '), ' forumdisplay ' =Array(' Smilies ', ' announcements_forum ', ' globalstick ', ' forums ', ' onlinelist ', ' Forumstick ', ' threadtable_info ', ' th Readtableids ', ' stamps ', ' diytemplatenameforum '), ' viewthread ' =Array(' Smilies ', ' smileytypes ', ' forums ', ' usergroups ', ' stamps ', ' bbcodes ', ' smilies ', ' custominfo ', ' Groupicon ' , ' stamps ', ' threadtableids ', ' threadtable_info ', ' posttable_info ', ' diytemplatenameforum '), ' redirect ' = >Array(' Threadtableids ', ' threadtable_info ', ' posttable_info '), ' post ' =Array(' Bbcodes_display ', ' bbcodes ', ' smileycodes ', ' smilies ', ' smileytypes ', ' domainwhitelist ', ' albumcategory '), ' Space ' =Array(' fields_required ', ' fields_optional ', ' custominfo '), ' group ' =Array(' GroupType ', ' Diytemplatenamegroup '),);$mod= !In_array(C::app ()var[' MoD '],$modarray) ? ' Index ': C::app ()var[' MoD '];Define(' Curmodule ',$mod);$cachelist=Array();if(isset($modcachelist[Curmodule])) { $cachelist=$modcachelist[Curmodule]; $cachelist[] = ' plugin '; $cachelist[] = ' Pluginlanguage_system ';}if(C::app ()var[' mod '] = = ' Group ') { $_g[' basescript '] = ' group ';} C:: App ()->cachelist =$cachelist; C:: App (),init (); Loadforum (); Set_rssauth (); Runhooks () ;$navtitle=Str_replace(' {bbname} ',$_g[' Setting '] [' Bbname '],$_g[' Setting '] [' Seotitle '] [' Forum ']);$_g[' Setting '] [' threadhidethreshold '] = 1;requireDiscuz_root. '. /source/module/forum/forum_ '.$mod.‘. PHP ';
001-forum.php