Menu

how to make a fulltextsearch on specific page

Help
2004-03-14
2012-10-11
  • Stefan Schorn

    Stefan Schorn - 2004-03-14

    how can i make a fulltextsearch on specific pages?
    there is a parameter exclude pages but no include pages.

    any idea?
    regards Stefan

     
    • Stefan Schorn

      Stefan Schorn - 2004-03-14

      I found a solution
      made the following changes to FullTextSearch

              if ($exclude) $exclude = explodePageList($exclude);
              if ($include) $include = explodePageList($include);
              while ($page = $pages->next() and (!$limit or ($count < $limit))) {
                  $name = $page->getName();
                  if ($exclude and in_array($name,$exclude)) continue;
                  if ($include and in_array($name,$include))
                  {
                      $count++;
                      $list->pushContent(HTML::dt(WikiLink($name)));
                      if ($hilight_re)
                          $list->pushContent($this->showhits($page, $hilight_re));
                  }
                  if (!$include)
                  {
                  $count++;
                  $list->pushContent(HTML::dt(WikiLink($name)));
                  if ($hilight_re)
                          $list->pushContent($this->showhits($page, $hilight_re));
                  }
              }

      Regards Stefan

       
      • Reini Urban

        Reini Urban - 2004-04-10

        Do you have a name for this new plugin?
        Or should we just add it to the default?

         
    • Stefan Schorn

      Stefan Schorn - 2004-03-14

      forgot this part of code

          function getDefaultArguments() {
              return array('s'        => false,
                           'noheader' => false,
                           'include'  => false,
                           'exclude'  => false,  //comma-seperated list of glob
                           'limit'    => false,
                           'quiet'    => false); // be less verbose
          }

       
    • Stefan Schorn

      Stefan Schorn - 2004-04-12

      You can put it to the default if its usefull

      Regards Stefan

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.