1、config/config_global.php 添加如下代码 打开嵌入插件设计
$_config['plugindeveloper'] = 2;//1 设计模式 2 设计+嵌入插件
2、在插件-模块中设计页面嵌入
3、在前台页面中寻找插入点 插入点分为为全局嵌入点和脚本嵌入点
<?php
/**
***/
defined('IN_DISCUZ') OR exit('Access Denied');
class plugin_qynovel{
function global_header(){ 全局插入点直接调用
return 'this is qynovel';
}
}
//嵌入forum.php中间的插件
class plugin_qynovel_forum extends plugin_qynovel{ 脚本嵌入点需要继承全局嵌入点的类
private $tid;
private $setting;
private $fid;
function __construct(){
global $_G;
$this->tid=$_G['gp_tid'];
$this->setting=$_G['cache']['plugin']['qynovel'];
$this->fid=$this->setting['novelforum'];
}
//小说翻页
function viewthread_useraction(){ 脚本嵌入点 调用函数
return " ";
}
}
?>