Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

2.5RC特殊主题无法显示

[复制链接]
漫游¢饿狼 发表于 2012-3-31 19:49:35 | 显示全部楼层 |阅读模式
2.5RC中,特殊主题开发中,在发表之前一切正常,function newthread中include template 都能正常显示。
但是,发表后,function viewthread中include template内容区一片空白。
只有原本的标题tag之类的。但是特殊主题的部分无法显示。
回复

使用道具 举报

吃素的猫 发表于 2012-3-31 19:51:25 | 显示全部楼层
我z喜欢,请大家鼓掌支持,谢谢
回复

使用道具 举报

gao729715404 发表于 2012-3-31 23:49:41 | 显示全部楼层
支持一下啊!http://www.qiqibolg.com
回复

使用道具 举报

 楼主| 漫游¢饿狼 发表于 2012-4-1 10:18:11 | 显示全部楼层
顶上去..
回复

使用道具 举报

m.king 发表于 2012-4-1 10:27:50 | 显示全部楼层
站点地址和测试账号我们看看。
回复

使用道具 举报

 楼主| 漫游¢饿狼 发表于 2012-4-1 10:39:20 | 显示全部楼层
m.king 发表于 2012-4-1 10:27
站点地址和测试账号我们看看。

你好,我是在本地上测试的。观看了数据库,发现发表扩展特殊主题时候pre_forum_post表的message字段,没有identifier了。
我的是Discuz! X2.5 RC Release 20120328版本,没有修改过原本的PHP文件。
我是按照这个流程进行开发扩展特殊主题的。http://dev.discuz.org/wiki/index ... 7%E5%BC%80%E5%8F%91
回复

使用道具 举报

m.king 发表于 2012-4-1 13:33:37 | 显示全部楼层
我们测试没有问题哦。
http://dev.discuz.org/wiki/   你好好看看文档先呗。
有可能是你写的不对。
回复

使用道具 举报

 楼主| 漫游¢饿狼 发表于 2012-4-1 16:51:25 | 显示全部楼层
本帖最后由 漫游¢饿狼 于 2012-4-1 16:54 编辑
m.king 发表于 2012-4-1 13:33
我们测试没有问题哦。
http://dev.discuz.org/wiki/   你好好看看文档先呗。
有可能是你写的不对。

你好,我
class threadplugin_test {
        
        var $name = '测试';
        var $buttontext = '发布';
        var $iconfile = '';
        var $identifier = 'test';
        
        function threadplugin_test() {
        }
        function newthread($fid) {
                    global $_G;
                    include template('test:post');
                    return $return;
        }
        
        function newthread_submit($fid) {
                global $_G;
        }
        
        function newthread_submit_end($fid) {
                global $_G;
                global $tid,$pid,$uid;
               
                $test = $_G['gp_test'];
                DB::query("INSERT INTO ".DB::table('test')." (tid,test) VALUES ('$tid','$test')");
        }
        
        function viewthread($tid,$postappend) {
                global $_G;
                $test = DB::fetch(DB::query("SELECT * FROM ".DB::table( "test" )." WHERE tid = '$tid'"));
                include template('test:viewthread');
                return $return;
        }
        
}

发布后,test表中tid和test字段都有值.
但是viewthread是空白..
viewthread.htm内容如下.
<!--{block return}-->
21312
$test['test']
<!--{/block}-->

以前在2.0时候,在pre_forum_post的message字段中总有一个插件id,但是,现在在2.5中就没有了..
回复

使用道具 举报

 楼主| 漫游¢饿狼 发表于 2012-4-1 18:47:17 | 显示全部楼层
本帖最后由 漫游¢饿狼 于 2012-4-1 18:53 编辑
m.king 发表于 2012-4-1 13:33
我们测试没有问题哦。
http://dev.discuz.org/wiki/   你好好看看文档先呗。
有可能是你写的不对。

希望可以看看,我2.0的时候这样写是可以的。
但是到了2.5RC  20120328,这样写,就无法识别了。
好像是没把identifier传递到message中去。
希望官方看看吧。
回复

使用道具 举报

 楼主| 漫游¢饿狼 发表于 2012-4-4 11:41:41 | 显示全部楼层
m.king 发表于 2012-4-1 13:33
我们测试没有问题哦。
http://dev.discuz.org/wiki/   你好好看看文档先呗。
有可能是你写的不对。

发现post模块的chr(0).chr(0).chr(0).$specialextra老无法执行到。
需要自己在class threadplugin_test的function newthread_submit_end里面自己添加
$message = chr(0).chr(0).chr(0).$this->identifier;
DB::query("UPDATE ".DB::table("forum_post")." SET message = '".$message."' WHERE pid = '$pid'");
才会识别,希望官方可以看看。

我是用WAMPSERVER在本地测试的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-11 07:59 , Processed in 0.110867 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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