Projects » Silverstripe/PHP Projects » Integrating the JRank Search Engine into a Silverstripe Site » Installing and Using the JRank for Silverstripe Integration Code

Bookmark and Share

Installing and Using the JRank for Silverstripe Integration Code

Installing the JRank code into a Silverstripe website is achieved via the following steps:

  • Download the JRank for Silverstripe archive,
  • Copy the contents of "mysite/code" in the archive into the "mysite/code" directory of your website,
  • Create a JRank account,
  • Enter the JRank API key into "mysite/code/SearchResultsPage.php",
  • Create a search results page template based on your website's theme(s), using the provided example template (see "mysite/templates/Layout/SearchResultsPage.ss" in the archive) as a reference,
  • Rebuild the Website's database, i.e., visit http://yoursite/dev/build/?flush=all
  • Create a search results page (at URL: "http://yoursite/search"), and
  • Modify the website templates in order to add the search box wherever it is desired; see "examples/SearchEntryBox.ss" in the archive.

The example template files ("examples/SearchEntryBox.ss", and "mysite/templates/layout/SearchResultsPage.ss") must be customized to your website. In particular, all occurrences of "http://yoursite/" should be replaced with the base URL of the website in which it is being installed. Likewise, it is essential that your JRank API key is inserted into "mysite/code/SearchResultsPage.php", or JRank will not know which site it should return results for, and will return an error.

Once all of the steps above have been completed, the search engine should be integrated into your website. You will probably have to wait a day or so for JRank to perform initial indexing of your website. Just make sure that your "robots.txt" allows JRank's indexing bot to access your website.

Bookmark and Share




Projects » Silverstripe/PHP Projects » Integrating the JRank Search Engine into a Silverstripe Site » Installing and Using the JRank for Silverstripe Integration Code