有哪位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 请问这怎办??哭求~~~......... 怎样才能更好的学PHP 找出数据表中内容未知,但是相同的数据,这样的SQL怎么写? 多图上传图片地址存放问题 用PHP写的QQ Client,可以登陆、登出、收发消息、添加好友 新手提问:PHP字符串常量是如何比较大小的? 100分求助PHP连MYSQL的奇怪问题之解答 iframe显示几问 怎么让表单中的某个按钮实现一个php函数定义的动作??? 很棘手的问题,在linux的服务器上用php访问另一台NT服务器上的sql server. php 扩展,php_printer 连接打印机问题 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 请问这怎办??哭求~~~.........