15、常用于扩展新的设置项目。项目的脚本文件以.inc.php结尾(如test.inc.php),模版为固定文件名,位于插件目录的template/子目录中,文件名与脚本名同名(如test.htm),扩展名为.htm。添加相应的扩展项目模块时,需注明程序模块、菜单名称。例如我们添加个人面板项目,程序模块为test,菜单名称是“测试”,当插件启用后,个人面板即家园的设置中会出现“测试”拓展项目。在新插件内核中,通过plugin.php方式访问的插件可直接通过plugin.phpid=xxx:yyy方式调用而无需再在后台定义为普通脚本模块,只要source/plugin/xx
16、x/yyy.inc.php文件存在即可。如果xxx和yyy同名,可直接通过plugin.phpid=xxx方式访问。插件变量配置插件接口中提供了一个通用的插件配置管理程序,在大多数情况下可实现插件的参数配置,省却了插件开发者自行编写后台管理模块(即上面提到的“扩展项目管理中心”模块)的麻烦。通常情况下,应优先使用通用插件配置管理程序来实现插件的参数配置,只有在通用程序确实无法实现时,才自行编写后台管理模块。输入配置名称和配置变量名、选择合适的配置类型后,即可为此插件增加一个配置变量,点“详情”可以编辑此配置变量的更多信息。为了方便插件程序调用使用者配置好的参数,配置变量同样被
27、如果是array且是空值的,必须输出一个空数组,如:returnarray();函数名并不限于以上列表,您可以自定义,只要符合以下规则,函数就会在适当的地方被调用。functionCURMODULE_USERDEFINE_output()CURMODULE指明了此函数在哪个模块执行,可通过常量CURMODULE得到当前页面的CURMODULE值。USERDEFINE可自定义,如果函数名以“_output”结尾则会在模板输出前调用,否则会在模块执行前调用。如:attachment_test()函数会在论坛的下载附件的时候执行。“_output”结尾的函数的第一个参数为
30、obal_cpnav_extra2stringglobal_qmenu_top(X3)stringglobal_qmenu_bottom(X3)stringglobal_nav_extra(X2.5)stringglobal_headeruserabout.htmarrayglobal_userabout_topstringuserapp_menu_topstringuserapp_menu_middlearrayglobal_userabout_bottomuserstatus.htmstringglobal_usernav_extra1str
32、x_topstringcollection_index_bottomcollection_mycollection.htm(X2.5)stringcollection_index_topstringcollection_index_bottomcollection_nav.htm(X2.5)stringcollection_nav_extracollection_view.htm(X2.5)stringcollection_viewoptionsstringcollection_view_topstringcollection_threadlistbot
33、tomstringcollection_relatedopstringcollection_view_bottomstringcollection_side_bottomdiscuz.htmstringindex_status_extrastringindex_nav_extra(X2.5)stringindex_topstringindex_catlist_top(X2.5)arrayindex_followcollection_extra(X3)arrayindex_favforum_extra(X2.5)arrayindex_favfor
34、um_extra(X3)arrayindex_catlist(X2.5)arrayindex_forum_extra(X2.5)arrayindex_forum_extra(X2.5)arrayindex_datacollection_extra(X3)stringindex_middlestringindex_bottomstringindex_side_topstringindex_side_bottomdiscuzcode.htmarrayviewthread_attach_extra(X2.5)editor_menu_forum.ht
35、mstringpost_image_btn_extrastringpost_image_tab_extrastringpost_attach_btn_extrastringpost_attach_tab_extraforumdisplay.htmstringforumdisplay_leftside_topstringforumdisplay_leftside_bottomstringforumdisplay_forumactionstringforumdisplay_modlinkstringforumdisplay_topstringforumdi
36、splay_middlestringforumdisplay_postbutton_topstringforumdisplay_threadtype_inner(X2.5)stringforumdisplay_filter_extra(X2.5)stringforumdisplay_threadtype_extra(X2.5)stringforumdisplay_bottomstringforumdisplay_side_topstringforumdisplay_side_bottomforumdisplay_fastpost.htmstringfor
37、umdisplay_fastpost_contentstringforumdisplay_fastpost_func_extrastringforumdisplay_fastpost_ctrl_extrastringglobal_login_textstringforumdisplay_fastpost_upload_extend(X3)stringforumdisplay_fastpost_btn_extrastringforumdisplay_fastpost_sync_methodforumdisplay_list.htmstringforumdispla
38、y_filter_extraarrayforumdisplay_threadarrayforumdisplay_thread_subject(X2.5)arrayforumdisplay_authorarrayforumdisplay_thread(X2.5)arrayforumdisplay_author(X2.5)stringforumdisplay_threadlist_bottom(X2.5)stringforumdisplay_postbutton_bottomforumdisplay_sort.htm(X2.5)stringforumdi
39、splay_postbutton_bottomforumdisplay_subforum.htm(X2.5)arrayforumdisplay_subforum_extraarrayforumdisplay_subforum_extraguide.htmstringguide_nav_extrastringguide_topstringguide_bottomindex_navbar.htmstringindex_navbarpost.htmstringpost_topstringpost_middlestringpost_btn_extrast
40、ringpost_sync_methodstringpost_bottomstringpost_upload_extend(X3)post_activity.htmstringpost_activity_extrapost_debate.htmstringpost_debate_extrapost_editor_attribute.htm(X3)stringpost_attribute_extrastringpost_attribute_extra_bodypost_editor_body.htmstringpost_editorctrl_right
41、stringpost_editorctrl_leftstringpost_editorctrl_topstringpost_editorctrl_bottompost_infloat.htmstringpost_infloat_topstringpost_infloat_middlestringpost_infloat_btn_extrapost_poll.htmstringpost_poll_extrastringpost_poll_upload_extend(X3)post_reward.htmstringpost_reward_extrapos
42、t_trade.htmstringpost_trade_extratopicadmin_modlayer.htmstringforumdisplay_modlayerstringmodcp_modlayertrade_info.htmstringviewthread_tradeinfo_extraviewthread.htmstringviewthread_topstringviewthread_postbutton_topstringviewthread_modoptionstringviewthread_beginline(X2.5)string
43、viewthread_title_extrastringviewthread_title_rowstringviewthread_middlestringviewthread_bottomviewthread_activity.htmstringviewthread_activity_extra1stringviewthread_activity_extra2viewthread_album.htm(X3)stringviewthread_beginlinestringviewthread_useraction_prefixstringviewthread
44、_useractionstringviewthread_bottomviewthread_fastpost.htmstringviewthread_fastpost_sidestringviewthread_fastpost_contentstringviewthread_fastpost_func_extrastringviewthread_fastpost_ctrl_extrastringglobal_login_textstringviewthread_fastpost_upload_extend(X3)stringviewthread_fastpos
45、t_btn_extra(X2.5)viewthread_from_node.htmarrayviewthread_postheaderarrayviewthread_postheaderarrayviewthread_postheaderarrayviewthread_endlineviewthread_node.htmarrayviewthread_profilesidearrayviewthread_imiconsarrayviewthread_magic_userarrayviewthread_avatararrayviewthread_side
46、toparrayviewthread_sidebottomarrayviewthread_postheaderstringviewthread_modaction(X2.5)stringviewthread_share_methodstringviewthread_useractionarrayviewthread_postsightmlafter(X2.5)arrayviewthread_postfooterarrayviewthread_postaction(X2.5)stringviewthread_magic_threadarrayview
47、thread_magic_postarrayviewthread_endlineviewthread_node_body.htmarrayviewthread_posttopstringglobal_login_textarrayviewthread_postbottomviewthread_poll.htmstringviewthread_poll_topstringviewthread_poll_bottomviewthread_portal.htmstringviewthread_useraction_prefixstringviewthread_u
49、stringgroup_topstringforumdisplay_topstringgroup_nav_extrastringforumdisplay_nav_extrastringgroup_bottomstringforumdisplay_bottomstringgroup_side_bottomstringforumdisplay_side_bottomgroup_list.htmstringforumdisplay_postbutton_topstringforumdisplay_filter_extraarrayforumdisplay_
50、threadstringforumdisplay_postbutton_bottomgroup_my.htmstringmy_headerstringmy_bottomstringmy_side_topstringmy_side_bottomgroup_right.htmstringgroup_index_sidestringgroup_side_topstringforumdisplay_side_topindex.htmstringindex_headerstringindex_topstringindex_bottomstringin
52、rastringfollow_topstringfollow_upload_extend(X3)stringfollow_nav_extra(X3)spacecp_avatar.htmstringspacecp_avatar_topstringspacecp_avatar_bottomspacecp_blog.htmstringspacecp_blog_topstringspacecp_blog_middlestringspacecp_blog_bottomspacecp_credit_base.htmstringspacecp_credit_topstringspacecp_credit_extrastringspacecp_credit_bottomspacecp_credit_log.htmstringspacecp_credit_topstringspacecp_credit_bottomspacecp_privacy.htmstringspacecp_privac