原来的卡通图文不能显示0-9 ,我小改了一下,现在可以显示了.
使用条件:安装过卡通图文的朋友!
原始版是:
viewthread.php
查找到
$post['signature'] = $post['usesig'] && $post['signature'] ? postify($post['signature'], 0, 0, 0, 0, $groupinfo['allowsigbbcode'], $groupinfo['allowsigimgcode']) : NULL;
下面添加
//UseCarton by DyNE
if($post['usecarton'] && $forum['allowsmilies']) {
$post['message'] = addspacing($post['message'],'`');
//处理英文大写字母
$post['message'] = preg_replace("/([A-Z])/s", "<img src=\"images/Carton_Char/\\1.gif\" align=\"absmiddle\" border=\"0\">",$post['message']);
//处理特定的汉字
require_once './include/carton.php';
foreach($carton as $char) {
$post['message'] = str_replace($char['code'], "<img src=\"images/Carton_Char/$char[url]\" align=\"absmiddle\" border=\"0\">",$post['message']);
}
$post['message'] = str_replace('`', '', $post['message']);
}
//UseCarton End
将这个新增加的替换为:
//UseCarton by yzgolden
if($post['usecarton'] && $forum['allowsmilies']) {
$post['message'] = addspacing($post['message'],'`');
//处理英文大写字母
$post['message'] = preg_replace("/([A-Z;0-9])/s", "<img src=\"images/Carton_Char/\\1.gif\" align=\"absmiddle\" border=\"0\">",$post['message']);
//处理特定的汉字
require_once './include/carton.php';
foreach($carton as $char) {
$post['message'] = str_replace($char['code'], "<img src=\"images/Carton_Char/$char[url]\" align=\"absmiddle\" border=\"0\">",$post['message']);
}
$post['message'] = str_replace('`', '', $post['message']);
}
//UseCarton End
完毕! |