This post is adapted from the original post here. Credit: The tool was first introduced to the forum post's writer by ftuma.
Adding a search to your PBase site is a very useful feature. People can search for images within your gallery with ease. One way to do it is to use the Google “site:” operator, for example, executing a search in Google as “nightscape site:www.pbase.com/arjunrc” . The problem with this approach is that Google “site:” does no work well since /arjunrc is a subdirectory and not a sub domain - Google “site:” does not filter directories.
Welcome to a free cool tool from master.com site search.
I have successfully managed to integrate it into my site for a long time and it works like a charm. Please feel free to give it a test run here - look for the search box in the grey rectangle to the left.
While I have used it to index my entire PBase site, Robert has adapted it for indexing only a particular gallery in PBase.
Register with you email address and enter the URL of your PBase gallery. Master.com will email a code to your email which you will need to verify. Once that is done ,you can log in and start managing your site
Once you login to your newly created account, Click on 'Overall Site' in the Configuration tab on the left.
Ensure that you have enabled the checkbox for 'Search your site' - this ensures that master.com only displays an interface for searching within your site - which is what we want.
This part is key. Click on 'Search your site' in the Configuration tab on the left. Make sure that the 'Base Url' text box has your PBase gallery URL. In the Extensions textbox specify '.html.htm' - this tells the search that it should only search your site for content in your HTML pages (which means all your gallery and image pages)
In the 'Exclusions' section, specify
cgi-bin/ /guestbook /root&view=recent /root&view=tree /profile ? /medium /large /small /original add_comment view=tree exif=Y exif=N
The above is critical. The above list makes sure that search does not find duplicate entries. Basically, what we are telling master.com is that if there is any link within your galleries that end with any of the above, it should not be indexed. If you have any galleries which you don't want to expose to search, specify just the names here (like /my_private1 etc.) . Note that if your galleries are marked private in PBase, master.com's search will not index them, so don't worry about protected galleries. Also please make sure that there are no stray spaces after each line - otherwise the exclusions will not work properly.
You are done with the basic setup. You can do more by changing the search appearance and other interesting things. I will not get into it in this tutorial.
Click on 'Sample Forms & HTML' in the configuration tab on the left and master.com will show you the code you need to enter in your PBase gallery. Copy the code in the 'Form' dialog box and paste it in the user description area of your PBase root gallery. (Make sure you have html checkbox enabled in PBase in the user description area). This will create a search box that will only search your PBase galleries.
Note: It may take some time for master.com to completely index your site. Please give it some time - when indexing is complete, you will automatically receive an email.
Note: In the free version, master.com indexes at the most 30 million bytes - so make sure you exclude directories you do not want and tweak the exclusion list effectively.