phpBB3整合

导入含有论坛帖子的数据库, 能在YaCy主页显示论坛内容. 此向导能帮助你在你的phpBB3论坛页面中添加搜索框.

phpBB3论坛页面需使用数据库导出

论坛帖子中含有话题、时间、主题和作者等丰富信息. 此类信息往往由论坛散播,并且对于搜索引擎来说,它们的标注很费解. 直接从数据库检索论坛帖子要好得多。这将导致 YaCy 能够在搜索后提供良好的导航功能。 YaCy has a phpBB3 extraction feature, please go to the phpBB3 content integration servlet for direct database imports.

接受phpBB3论坛页面的网页爬取

下栏是使用某一值的phpBB3论坛爬取起始点. 将论坛首页填入表格. 开始爬取后, 你可能需要返回此页面阅读以下提示.

phpBB3论坛主页的URL
这是一个抓取起点
 

在phpBB3中添加搜索框

在论坛模板中添加以下代码以将搜索框集成到phpBB3中. phpBB3中有多种模板, 您正在使用默认模板“prosilver”:

  • 打开 styles/prosilver/template/overall_header.html
  • find the line where the default search window is displayed, that's right behind the
    <div id="search-box">
    statement
  • 在 div 标签后面插入以下代码:
    <script src="http://110.185.202.223:50201/js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script>
       $(document).ready(function() {
          yconf = {
             url : 'http://110.185.202.223:50201/',
             title : 'YaCy Forum Search',
             width : 500,
             height : 600,
             position : ['top',30]
          };
          $.getScript(yconf.url+'/js/yacyui-portalsearch.js', function(){return false;});
       });
    </script>
    <div id="yacylivesearch">
       <form id="ysearch" method="get" accept-charset="UTF-8" action="http://110.185.202.223:50201/yacysearch.html">
          <input name="search" id="yquery" type="text" size="16" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value=""/>
          <input type="hidden" name="verify" value="cacheonly" />
          <input type="hidden" name="maximumRecords" value="10" />
          <input type="hidden" name="resource" value="local" />
          <input type="hidden" name="urlmaskfilter" value=".*" />
          <input type="hidden" name="prefermaskfilter" value="" />
          <input type="hidden" name="display" value="2" />
          <input type="hidden" name="nav" value="all" />
          <input type="submit" name="Enter" value="Search" />
      </form>YaCy Search
    </div>
            
  • 用你自己的IP或者服务器名替代代码中给出的IP地址
  • 你可以更改代码中的文本元素
  • 搜索框详细设置, 请参见 the configuration for live search.