有哪位discuz高手可以告诉偶这修改方法...? 本帖最后由 jncn48 于 2010-04-11 10:08:54 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 forumdisplay.php 正则判断是否存在abc 存在置标志位 forumdisplay.htm中显示"本帖含有abc词语" 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. 你是不是在search.php页面中进行搜索的呀? 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. 不是我的目的是想在主题列表forumdisplay里 就可以预看主题內容 包不包含abc而已... 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. forumdisplay.php?fid=8为何不自己仔细看看代码呢? 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. 哭求修改的代码....好心人请告之[email protected]谢谢..大家.. 呵呵,眼睛都哭红了吧?建议: 看一下forumdisplay.php这个页面的sql语句, 我对这块代码不熟。自救一下吧,别在这里哭了! 找到这一行if(strpos($thread['subject'],'abc')!===false){ strpos($thread['subject']='本贴含有abc'.$thread['subject']; }$threadlist[] = $thread;在他前面加上 找到这一行$threadlist[] = $thread;在他前面加上if(strpos($thread['subject'],'abc')!===false){ strpos($thread['subject']='本贴含有abc'.$thread['subject']; }吗的垃圾csdn不允许编辑 前面多了一个=号不好意思找到这一行$threadlist[] = $thread;在他前面加上if(strpos($thread['subject'],'abc')!==false){ strpos($thread['subject']='本贴含有abc'.$thread['subject']; } 也可以只修改模板1 bbs\templates\default\forumdisplay.htm找到<a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]> 在后面加上<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]><!--{if if(strpos($thread['subject'],'abc')}-->'youabc'.$thread[subject]<!--{/if}--><!--{else}-->$thread[subject]<!--{/if}--> 多了个if 没环境没测试 if(strpos($thread['subject'],'abc'))>0 楼上的你的写法是错误的,strpos最好是用恒等于来判断.还有楼上的楼上,最好不要在模板里改,因为论坛不一定用的是默认模板,这是必须去注意的,有些模板forumdisplay.htm这个文件是有重新写过的. 试了 16 ,17 ,18楼的方法 ...开始不行然后自己改一改代码这是可以的....但为什么是查询 标题 ? subject而不是查询主题內容???? message 但是..我是想 查询 主题的內容字段 有没有 abc而不是列表标题有没有 abc 请问这怎办?? 但是..我是想 查询 主题的內容字段 有没有 abc而不是列表标题有没有 abc 请问这怎办?? 但是..我是想 查询 主题的內容字段 有没有 abc而不是列表标题有没有 abc 请问这怎办??跪求~~~ if(strpos($thread['subject'],'abc')!==false){ strpos($thread['subject']='本贴含有abc'.$thread['subject']; } 但是..我是想 查询 主题的內容字段 有没有 abc而不是列表标题有没有 abc 请问这怎办??跪求~~~ 但是..我是想 查询 主题的內容字段 有没有 abc而不是列表标题有没有 abc 请问这怎办??哭求~~~ 但是..我是想 查询 主题的內容字段 有没有 abc而不是列表标题有没有 abc 请问这怎办??哭求~~~......... 又遇到难题了,各位帮帮忙啊,谢谢大家了! PHPMYADMIN的配置问题 40分马上结贴!PHP里调用shell的双引号问题 请高手帮我看一下啊 瞎说count函数对非数组变量的处理 [求助]使用php读取文件/引入其他页面内容的问题 一个正则匹配问题,麻烦解答 急!!!求php+mysql:用户信息注册完整源码!!!! 高高分求教!!能不能把写好的,sql语句导入php中呢? 今天十点跟资本家吵一架,现在无业中。 php+sql server2000连不上 简单php幼稚问题
不是我的目的是想在主题列表forumdisplay里 就可以预看主题內容 包不包含abc而已...
呵呵,眼睛都哭红了吧?
建议: 看一下forumdisplay.php这个页面的sql语句, 我对这块代码不熟。自救一下吧,别在这里哭了!
if(strpos($thread['subject'],'abc')!===false)
{
strpos($thread['subject']='本贴含有abc'.$thread['subject'];
}
$threadlist[] = $thread;
在他前面加上
$threadlist[] = $thread;
在他前面加上
if(strpos($thread['subject'],'abc')!===false)
{
strpos($thread['subject']='本贴含有abc'.$thread['subject'];
}吗的垃圾csdn不允许编辑
$threadlist[] = $thread;
在他前面加上
if(strpos($thread['subject'],'abc')!==false)
{
strpos($thread['subject']='本贴含有abc'.$thread['subject'];
}
1 bbs\templates\default\forumdisplay.htm
找到<a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]> 在后面加上<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]><!--{if if(strpos($thread['subject'],'abc')}-->'youabc'.$thread[subject]<!--{/if}--><!--{else}-->
$thread[subject]
<!--{/if}-->
if(strpos($thread['subject'],'abc'))>0
然后自己改一改代码这是可以的....但为什么是查询 标题 ? subject
而不是查询主题內容???? message
而不是列表标题有没有 abc 请问这怎办??
而不是列表标题有没有 abc 请问这怎办??
而不是列表标题有没有 abc 请问这怎办??跪求~~~
{
strpos($thread['subject']='本贴含有abc'.$thread['subject'];
}
而不是列表标题有没有 abc 请问这怎办??跪求~~~
而不是列表标题有没有 abc 请问这怎办??哭求~~~
而不是列表标题有没有 abc 请问这怎办??哭求~~~.........