雨哲插件

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
雨哲插件 资料库 超强嵌入点扩展组件 发贴时屏蔽快速跳转代码的实现
  • 全部资料
  • 查看资料

发贴时屏蔽快速跳转代码的实现

2018-4-23 16:13|分类: 超强嵌入点扩展组件 |发布用户: 雨哲

201804/24/182035prrtcwnnycyzc4x2.jpg

discuz!有一个功能,就是可以在后台设置哪些提示信息可以跳过,比如发贴成功时会提示一个发表成功的信息页面,这个页面在后台就可以设置跳过。

但有时候我们某些插件功能又不能让它自动跳过,因为在跳过后就无法处理页面执行完输入前的相关操作了,比如一客服需要的发贴后自动置顶指定时间。

组件名称:发贴成功后屏蔽自动跳转

组件变量:post_newsticktopic

手机嵌入:否

组件类型:string

模板内容:

{hookinput:newsticktopicgroups,<strong>发表新贴成功后屏蔽快速跳转</strong>,,hidden}{/hookinput}
{hookinput:newsticktopicforums,启用版块,设置需要启用自动置顶的版块,forums}38{/hookinput}
{hookinput:newsticktopicgroups,会员组一,设置需要启用自动置顶的会员组,groups}1,2,3{/hookinput}
[yuzhehook:code_getresult_login_after]
if ($_GET['action']=='newthread' && $_GET['topicsubmit']=='yes' && in_array($_G['fid'], explode(',', '{hookvalue:newsticktopicforums}'))){
    if (in_array($_G['groupid'], explode(',', '{hookvalue:newsticktopicgroups}'))){
        $midstrarr = $midstrloop = array();
        $midstrarr = @dunserialize($_G['setting']['msgforward']);
        if ($midstrarr['quick']){
            foreach($midstrarr['messages'] as $msgmessages) {
                if ($msgmessages != 'post_newthread_succeed'){
                    $midstrloop[] = $msgmessages;
                }
            }
            $midstrarr['messages'] = $midstrloop;
            $_G['setting']['msgforward'] = serialize($midstrarr);
        }
    }
}
[/yuzhehook:code_getresult_login_after]

插件介绍:雨哲超强嵌入点 插件是一款平台插件,通过后台添加在前台显示(基于模板的hook位置)指定内容的功能。

下载地址:http://addon.discuz.com/?@yuzhe_hook.plugin

分享到: 手机访问 分享给QQ好友 分享到QQ 分享到QQ空间 QQ空间 分享到新浪微博 新浪微博 分享到人人 人人网
企业微信 : 雨哲手机扫描添加到联系人手机扫描直接访问

QQ|关于我们|Archiver|手机版|小黑屋|雨哲插件

GMT+8, 2024-5-20 17:59 , Processed in 0.060529 second(s), 9 queries , Xcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

返回顶部