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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

升级到新版本x2.5后,[order=2] 调用出错

[复制链接]
yacinth 发表于 2012-5-26 13:18:21 | 显示全部楼层 |阅读模式
原本是从x2升级到x2.5的,没有出现这个错误,但最近一次在线升级补丁后,就出现这样的错误了。
模块模板中的代码如下:
  1. <ul>
  2. [loop]
  3. <li><a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" /></a><p><a href="{url}"{target}>{title}</a></p></li>
  4. [/loop]
  5. </ul>
  6. [order=2]
  7. <li class="r"><a href="{url}"{target}><img src="{pic}" width="{picwidth}" height="{picheight}" /></a><p><a href="{url}"{target}>{title}</a></p></li>
  8. [/order]
复制代码
请问[order=2] [/order] 这个调用不可用了吗?新的调用方法是怎么样的?谢谢。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
 楼主| yacinth 发表于 2012-5-27 19:51:47 | 显示全部楼层
没有人知道怎么解决?
回复

使用道具 举报

、Zm_、_√寳 发表于 2012-5-27 20:27:27 | 显示全部楼层
找到以下文件
source\function\function_block.php在这个文件中的function block_template($bid)方法中最后面找到

$template = preg_replace('/\s*\[(order\d+)=\w+\](.*?)\[\/\\1\]\s*/is', '', $template);

$template = preg_replace('/\s*\[(index\d+)=\w+\](.*?)\[\/\\1\]\s*/is', '', $template);


复制代码修改为

$template = preg_replace('/\s*\[(order\d*)=\w+\](.*?)\[\/\\1\]\s*/is', '', $template);

$template = preg_replace('/\s*\[(index\d*)=\w+\](.*?)\[\/\\1\]\s*/is', '', $template);

回复

使用道具 举报

、Zm_、_√寳 发表于 2012-5-27 20:28:23 | 显示全部楼层
我刚解决的,你试试
回复

使用道具 举报

chengshu 发表于 2012-5-28 20:48:48 | 显示全部楼层
不错不错,我也遇到了这问题,谢谢楼主!按你的方案已解决
回复

使用道具 举报

m.king 发表于 2012-5-31 16:47:23 | 显示全部楼层
关于更新后 DIY 模块模板 [order=N]...[/order] 输出错误问题解决方法
https://discuz.dismall.com/thread-2909577-1-1.html
回复

使用道具 举报

 楼主| yacinth 发表于 2012-6-2 09:24:07 | 显示全部楼层
谢谢,已经解决了。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-25 09:57 , Processed in 0.033980 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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