We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21341
    • 26 Posts
    Hello,

    i installed the tagcloud snippet which shows a weighted wordlist.

    The snippet creates a tagcloud and every word is a link. The script creates HTML href`s but the FSF-call doesnt work and i couldnt find the information on how to let ajaxSearch work by sending an url.

    Thanks
      • 5811
      • 1,717 Posts
      Newton, I am not sure to understand your request embarrassed Could you explain what you are awaiting from AjaxSearch. Thanks
        • 25483
        • 741 Posts
        ronaldlokers Reply #3, 18 years ago
        Quote from: coroico at Sep 24, 2008, 07:25 AM

        Newton, I am not sure to understand your request embarrassed Could you explain what you are awaiting from AjaxSearch. Thanks

        I think he wants to activate AjaxSearch with a parameter in the url like this:

        http://www.domain.ext/AjaxSearch.html?q=searchforthisword
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media

          • 5811
          • 1,717 Posts
          To activate AS with a parameter in the url try:

          your_url?index=xx&AS_search=searchthatword&advsearch=advsearchOption

          See lines code between 292 and 305 function validSearchString in file classes/ajaxSearch.inc.php:
              if ( isset($_POST['search']) || isset($_GET['AS_search']) || isset($_GET['FSF_search'])) {
                // Prefer post to get
                if (isset($_POST['search'])) {
                  $this->searchString = $_POST['search'];
                  if (is_array($this->searchString)) $this->searchString = implode(' ',array_values($this->searchString));   // use of searchWordList 
                } elseif (isset($_GET['AS_search'])) {
                  $this->searchString = urldecode($_GET['AS_search']);
                } else {
                  // Code to make tag cloud snippet work with this search
                  $this->searchString = $_GET['FSF_search'];
                }
                if (isset($_POST['advSearch'])) $this->advSearch = $_POST['advSearch'];
                else if (isset($_GET['advsearch'])) $this->advSearch = $_GET['advsearch'];
              }

            • 21341
            • 26 Posts
            Thanks for your help.

            My problem: i want a ajaxsearch but without typing the searchstring or hitting enter. The background is that the tagcloud snippet creates a cloud of words appearing in different documents. Then it displays the cloud, each word as a link. By clicking a link it will search the formaly documents for that word und displays a normal search result page.
            Therefore i wanted to call ajaxsearch by an url, so i can manipulate the tagcloud snippet to work with AS instead of non-working FSF code.

            I will try your suggestion and report it here later.