001-forum.php

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.