本帖最后由 jncn48 于 2010-04-11 10:08:54 编辑

解决方案 »

  1.   

    forumdisplay.php 正则判断是否存在abc 存在置标志位 forumdisplay.htm中显示"本帖含有abc词语"
      

  2.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  3.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  4.   

    你是不是在search.php页面中进行搜索的呀?
      

  5.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  6.   


    不是我的目的是想在主题列表forumdisplay里 就可以预看主题內容 包不包含abc而已...
      

  7.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  8.   

    forumdisplay.php?fid=8为何不自己仔细看看代码呢?
      

  9.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  10.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  11.   

    哭求修改的代码....好心人请告之[email protected]谢谢..大家..
      

  12.   


    呵呵,眼睛都哭红了吧?
    建议: 看一下forumdisplay.php这个页面的sql语句, 我对这块代码不熟。自救一下吧,别在这里哭了!
      

  13.   

    找到这一行
    if(strpos($thread['subject'],'abc')!===false)
    {
      strpos($thread['subject']='本贴含有abc'.$thread['subject'];  
    }
    $threadlist[] = $thread;
    在他前面加上
      

  14.   

    找到这一行
    $threadlist[] = $thread;
    在他前面加上
    if(strpos($thread['subject'],'abc')!===false)
    {
      strpos($thread['subject']='本贴含有abc'.$thread['subject'];  
    }吗的垃圾csdn不允许编辑
      

  15.   

    前面多了一个=号不好意思找到这一行
    $threadlist[] = $thread;
    在他前面加上
    if(strpos($thread['subject'],'abc')!==false)
    {
      strpos($thread['subject']='本贴含有abc'.$thread['subject'];  
    }
      

  16.   

    也可以只修改模板
    1 bbs\templates\default\forumdisplay.htm
    找到<a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight]> 在后面加上<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight]><!--{if if(strpos($thread['subject'],'abc')}-->'youabc'.$thread[subject]<!--{/if}--><!--{else}-->
    $thread[subject]
    <!--{/if}-->
      

  17.   

    多了个if  没环境没测试
     if(strpos($thread['subject'],'abc'))>0
      

  18.   

    楼上的你的写法是错误的,strpos最好是用恒等于来判断.还有楼上的楼上,最好不要在模板里改,因为论坛不一定用的是默认模板,这是必须去注意的,有些模板forumdisplay.htm这个文件是有重新写过的.
      

  19.   

    试了 16 ,17 ,18楼的方法 ...开始不行
    然后自己改一改代码这是可以的....但为什么是查询 标题 ? subject
    而不是查询主题內容???? message
      

  20.   

    但是..我是想 查询 主题的內容字段 有没有 abc
    而不是列表标题有没有 abc 请问这怎办??
      

  21.   

    但是..我是想 查询 主题的內容字段 有没有 abc
    而不是列表标题有没有 abc 请问这怎办??
      

  22.   

    但是..我是想 查询 主题的內容字段 有没有 abc
    而不是列表标题有没有 abc 请问这怎办??跪求~~~
      

  23.   

    if(strpos($thread['subject'],'abc')!==false)
    {
      strpos($thread['subject']='本贴含有abc'.$thread['subject'];   
    }
      

  24.   

    但是..我是想 查询 主题的內容字段 有没有 abc
    而不是列表标题有没有 abc 请问这怎办??跪求~~~
      

  25.   

    但是..我是想 查询 主题的內容字段 有没有 abc
    而不是列表标题有没有 abc 请问这怎办??哭求~~~
      

  26.   

    但是..我是想 查询 主题的內容字段 有没有 abc
    而不是列表标题有没有 abc 请问这怎办??哭求~~~.........