### 插件類主文件
[上一頁](# "上一頁")[下一頁](# "下一頁")
插件類主文件
文件位于插件根目錄
命名格式:插件名+Plugin.class.php
~~~
<?php
//?+----------------------------------------------------------------------
//?|?ThinkCMF?[?WE?CAN?DO?IT?MORE?SIMPLE?]
//?+----------------------------------------------------------------------
//?|?Copyright?(c)?2013-2014?http://www.thinkcmf.com?All?rights?reserved.
//?+----------------------------------------------------------------------
//?|?Author:?Dean?<zxxjjforever@163.com>
//?+----------------------------------------------------------------------
namespace?plugins\Demo;//Demo插件英文名,改成你的插件英文就行了
use?Common\Lib\Plugin;
/**
?*?Demo
?*/
class?DemoPlugin?extends?Plugin{//Demo插件英文名,改成你的插件英文就行了
????????public?$info?=?array(
????????????'name'=>'Demo',//Demo插件英文名,改成你的插件英文就行了
????????????'title'=>'插件演示',
????????????'description'=>'插件演示',
????????????'status'=>1,
????????????'author'=>'ThinkCMF',
????????????'version'=>'1.0'
????????);
????????
????????public?$has_admin=1;//插件是否有后臺管理界面
????????public?function?install(){//安裝方法必須實現
????????????return?true;//安裝成功返回true,失敗false
????????}
????????public?function?uninstall(){//卸載方法必須實現
????????????return?true;//卸載成功返回true,失敗false
????????}
????????
????????//實現的footer鉤子方法
????????public?function?footer($param){
???????? $config=$this->getConfig();
???????? $this->assign($config);
???????? $this->display('widget');
????????}
????}
~~~
[上一頁](# "上一頁")[下一頁](# "下一頁")
- 序言
- 序言
- 關于ThinkCMF
- 關于BootStrap
- 基礎
- ThinkCMF V版本和X版本的區別
- 開發規范
- 調試模式
- 如何獲取
- 環境要求
- 安裝使用
- 備份與恢復
- 函數和類庫
- sp_is_mobile
- Comments
- sp_check_verify_code
- hook
- sp_get_plugin_class
- sp_scan_dir
- sp_get_plugin_config
- sp_plugin_url
- sp_is_sae
- sp_auth_check
- sp_get_current_admin_id
- get_current_admin_id
- get_current_userid
- leuu()
- sp_asset_relative_url
- sp_authcode
- sp_authencode
- sp_check_user_action()
- sp_clear_cache
- sp_content_page()
- sp_file_write
- sp_get_asset_upload_path
- sp_get_cmf_settings
- sp_get_comments
- sp_get_current_user
- sp_get_current_userid()
- sp_get_favorite_key()
- sp_get_host()
- sp_get_menu()
- sp_get_relative_url()
- sp_get_theme_path()
- sp_get_users()
- sp_getad()
- sp_getcontent_imgs()
- sp_getlinks()
- sp_getslide()
- sp_is_user_login()
- sp_param_lable()
- sp_password()
- sp_random_string()
- sp_send_email()
- sp_set_dynamic_config
- sp_update_current_user()
- sp_verifycode_img()
- UU()
- 系統擴展
- ThinkCMF應用開發流程
- 后臺隱藏的后臺菜單管理功能
- 幾個重要基類
- 引入第三方庫
- 門戶應用
- 函數庫
- sp_sql_posts()
- sp_sql_posts_paged_bycatid
- sp_sql_posts_bycatid
- sp_sql_page()
- sp_sql_posts_paged()
- sp_get_child_terms
- sp_get_terms()
- sp_get_term()
- sp_sql_post()
- sp_sql_posts_paged_bykeyword
- 門戶模板制作
- 文章列表頁制作
- 文章內頁制作
- 頁面制作
- 獲取文章的各種方式
- 熱門文章組件制作
- seo優化
- 模板制作
- 模板標簽
- tc_include
- foreach
- 模板結構
- 最新評論組件制作
- 最新加入組件制作
- 本站用戶登錄模板制作
- 本站用戶注冊模板制作
- 忘記密碼模板制作
- 密碼重置
- 評論組件
- 模板資源文件引入
- 手機模板
- 點贊組件
- 如何收藏
- 標簽規則
- 全局變量
- 模板注釋
- 菜單導航制作
- 幻燈片制作
- 廣告位制作
- 友情鏈接制作
- 添加留言控件
- 模板自定義函數庫
- 案例
- 插件開發
- 插件
- 插件鉤子
- 插件配置文件
- 插件類主文件
- 插件開發流程
- 插件控制器
- 插件數據庫模型
- 插件后臺管理控制器
- 后臺管理
- SMTP配置