Discuz教程网

[插件制作] Discuz删帖时嵌入自定义操作 Discuz二次开发deletethread()示例

[复制链接]
authicon dly 发表于 2012-3-15 17:08:47 | 显示全部楼层 |阅读模式
deletethread()deletethread() 函数执行时调用
用于在主题删除前后嵌入自己的功能,此函数将在 deletethread() 中被调用 2 次,函数中 $_G['deletethreadtids'] 变量为待处理的 TID 数组
全局嵌入点类array('param' => deletethread() 函数的参数数组,'step' => 删除的步骤'check' 检测步骤'delete' 删除步骤
)

  1. class plugin_it577_foot {
  2.         /**
  3.          * delete feet when the thread is deleted
  4.          */
  5.         function deletethread(){
  6.                 global $_G;
  7.                 $tids=$_G['deletethreadtids'];
  8.                 foreach ($tids as $tid){
  9.                         DB::delete('it577_foot',"tid=$tid");
  10.                 }
  11.         }
  12. }
复制代码

对应的插件地址:https://www.discuz.1314study.com/thread-74145-1-1.html



上一篇:火爆你的论坛,discuz踩帖插件“大脚印”发布,免费+开源
下一篇:根据精华限制用户 免费版
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-6-17 21:31

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表