Realmac Software

Welcome to the RapidWeaver Community Forums, where you can chat with RapidWeaver users from around the world!

Rapidsearch Pro question from a coding ignorant

Jose ArroyoJose Arroyo Pasadena, CAPosts: 62Members
Getting rapid search pro set up has been a nightmare. Thanks to the help from Ed and Jonathan at Nimblehost, I was able to set it up correctly. The only part remaining is setting the correct path on each page. That's where I get stuck. I'm totally ignorant about coding (though trying to learn slowly) and I'm sure its a pretty simple task once I figure out exactly how to modify the default code which is: <form action="/path/to/rapidsearch/pro/" method="get"> <fieldset> <input type="text" name="query" value=""/> <input type="submit" value="Search"/> </fieldset> </form>

The last piece of advice I received from Ed was : In the form that you’re using you have to provide a ‘path’, a ‘url’, to the location. Right now you’ve left the ‘default’ code in place which doesn’t reflect your setup.

You can try using an ‘Absolute’ – Full URL – and point it to the RSPro page.

If that doesn’t work, then you’ll need to use a ‘Relative’ path. Having investigated things, it looks like each ‘instance’ will need to be customized for each page of your site.

All I'm asking is for someone to show me what would the correct path setup be using one of my pages. So if one of my pages is: http://www.mysite.com/page1
how do I write the correct path using both an "absolute"-full url pointed to the rspro page and a "relative" path for the page as per the last information given by Ed.
Thanks in advance for any assistance .

Comments

  • tsilvatsilva Posts: 276Members
    edited June 2012
    1) For the RapidSearch Pro page, go to Page Info>General and name the folder: "search" (omit quotes) and name the filename: "index.php" (omit quotes).

    2) Insert the code you cited above to any other page. It will create a small search box. Change the "form action" part as follows:

    form action="http://www.mysite.com/search"

    Keep the quotes shown in the code. You don't need to bother with the relative path (you can learn about this another time). The full URL shown above will work fine.

    3) If you are typing this into a Styled Text page, select the entire code and go to Format>Ignore Formatting.
    Best regards,
    tsilva
  • Jose ArroyoJose Arroyo Pasadena, CAPosts: 62Members
    tsilva,
    Thanks so much for your help. What you explained and in the way you did was exactly how I needed to be able to understand.
    I have two pages that are actually subpages of the same root page. For those pages, it doesn't work because I'm assuming I need to create a relative path for them. If its not much to ask, could you give me an example for a relative path where the root page is:
    http://www.mysite.com/page1 and the subpage needing the relative path is: http://www.mysite.com/page1/subpage

    Again, thanks so much
  • tsilvatsilva Posts: 276Members
    edited June 2012
    Is the RapidSearch Pro plugin placed in one of the two subpages?
    I am asking because if not, the code above should still work, since all you are doing is telling the internet to find the RapidSearch Pro page via the html address provided. The file path above is not pointing to the page where the small searchbox is located, just to the RapidSearch Pro page.

    IF the RapidSearch Pro page (folder name: "search") IS one of the two subpages, then, the "form action" path would look like this:

    form action="http://www.mysite.com/page1/search"

    I wouldn't recommend you use relative paths. The path above is called a "full URL" path. Absolute paths are another method: it would look like this:

    form action="/page1/search"

    As you can see, it is the same, but without the "http://mysite.com" in front of it. When it starts with the "/" it is an absolute path. Relative paths dont start with a "/" and are "relative" to the root, meaning, they change depending on where the page is. They are finiky and not worth the trouble, IMHO. Note that with 'absolute' paths, you cannot preview files that are uploaded in "preview" mode, UNLESS they are also copied to the root of your Mac. For this reason, I prefer to use the "full URL" type of file path.

    Best regards,
    tsilva
Sign In or Register to comment.