<?php /* Xiuno BBS 3.0 插件实例 广告插件卸载程序 */ define('DEBUG', 1); // 发布的时候改为 0 define('APP_NAME', 'bbs'); // 应用的名称 define('APP_PATH', '../../'); // 应用的路径 chdir(APP_PATH); $conf = (include './conf/conf.php'); include './xiunophp/xiunophp.php'; include './model.inc.php'; $pconf = xn_json_decode(file_get_contents('./plugin/xn_ad/conf.json')); $pconf['installed'] == 0 and message(-1, '插件已经卸载。'); $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, jump('需要管理员权限才能完成卸载。', 'user-login.htm')); // 第一处卸载 plugin_unstall_before('./pc/view/thread.htm', '<?php echo $first[\'message\']; ?>', file_get_contents('./plugin/xn_ad/ad_1.htm')); // 第二处卸载 plugin_install_remove('./pc/view/footer_debug.inc.htm', file_get_contents('./plugin/xn_ad/ad_2.htm')); json_conf_set('installed', 0, './plugin/xn_ad/conf.json'); message(0, '卸载完成!');
<?php /* Xiuno BBS 3.0 插件实例 代码高亮插件安装程序 */ define('DEBUG', 0); // 发布的时候改为 0 define('APP_NAME', 'bbs'); // 应用的名称 define('APP_PATH', '../../'); // 应用的名称 chdir(APP_PATH); $conf = (include './conf/conf.php'); include './xiunophp/xiunophp.php'; include './model.inc.php'; $pconf = xn_json_decode(file_get_contents('./plugin/xn_syntax_highlighter/conf.json')); $pconf['installed'] == 1 and message(-1, '插件已经安装,请不要重复安装。'); $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, jump('需要管理员权限才能完成安装。', 'user-login.htm')); //---------------> 第一处插入,末尾追加 plugin_install_append('./pc/view/thread.htm', file_get_contents('./plugin/xn_syntax_highlighter/thread_end.htm')); json_conf_set('installed', 1, './plugin/xn_syntax_highlighter/conf.json'); message(0, '安装完成!');
<?php /* 广告插件卸载程序 */ define('DEBUG', 1); // 发布的时候改为 0 define('APP_NAME', 'bbs'); // 应用的名称 define('APP_PATH', '../../'); // 应用的路径 chdir(APP_PATH); $conf = (include './conf/conf.php'); include './xiunophp/xiunophp.php'; include './model.inc.php'; $pconf = xn_json_decode(file_get_contents('./plugin/xn_sphinx/conf.json')); $pconf['installed'] == 0 and message(-1, '插件已经卸载。'); $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, '需要管理员权限才能完成卸载。'); // 第一处卸载 plugin_unstall_replace('./pc/route/search.php', '$threadlist = thread_find_by_keyword($keyword);', file_get_contents('./plugin/xn_sphinx/pc_route_search_1.txt')); json_conf_set('installed', 0, './plugin/xn_sphinx/conf.json'); message(0, '卸载完成!');
<?php /* QQ 登陆插件 */ define('DEBUG', 1); // 发布的时候改为 0 define('APP_NAME', 'bbs'); // 应用的名称 define('APP_PATH', '../../'); // 应用的路径 chdir(APP_PATH); $conf = (include './conf/conf.php'); include './xiunophp/xiunophp.php'; include './model.inc.php'; $pconf = xn_json_decode(file_get_contents('./plugin/xn_qq_login/conf.json')); $pconf['installed'] == 1 and message(-1, '插件已经安装,请不要重复安装。'); $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, '需要管理员权限才能完成安装。'); //---------------> 第一处插入 plugin_install_after('./pc/view/user_login.htm', '</dl>', file_get_contents('./plugin/xn_qq_login/user_login.htm.1.inc.htm')); $runtime = runtime_init(); runtime_set('qq_login_enable', 1, TRUE); // 执行 sql db_exec("CREATE TABLE IF NOT EXISTS bbs_user_open_plat (\n\t uid int(11) unsigned NOT NULL DEFAULT '0',\n\t platid tinyint(1) NOT NULL DEFAULT '0' COMMENT '平台编号', # 0:本站 1:QQ 登录 2:微信登陆 3:支付宝登录 \n\t openid char(32) NOT NULL DEFAULT '',\n\t PRIMARY KEY(uid),\n\t UNIQUE KEY(openid)\n);"); json_conf_set('installed', 1, './plugin/xn_qq_login/conf.json'); message(0, '安装完成!');
<?php /* Xiuno BBS 3.0 插件实例 贴图库插件安装程序 */ define('DEBUG', 0); // 发布的时候改为 0 define('APP_NAME', 'bbs'); // 应用的名称 define('APP_PATH', '../../'); // 应用的名称 chdir(APP_PATH); $conf = (include './conf/conf.php'); include './xiunophp/xiunophp.php'; include './model.inc.php'; $pconf = xn_json_decode(file_get_contents('./plugin/xn_tietuku/conf.json')); $pconf['installed'] == 1 and message(-1, '插件已经安装,请不要重复安装。'); $user = user_token_get('', 'bbs'); $user['gid'] != 1 and message(-1, jump('需要管理员权限才能完成安装。', 'user-login.htm')); //---------------> 第一处插入 $flag = '$day = date(\'Ymd\', $time);'; plugin_install_before('./route/post.php', $flag, file_get_contents('./plugin/xn_tietuku/route_post_insert.inc.txt')); json_conf_set('installed', 1, './plugin/xn_tietuku/conf.json'); message(0, '安装完成!');