Допомога Open Journal Systems

Contexts

Each set of Reading Items is made up of individual tools (e.g., Related Studies, Online Forums, etc.) with each tool consisting of a number of relevant databases grouped into a context. These databases, and the contexts they are organized into, can be created, edited or deleted.

Metadata for items in a context. The Journal Manager can alter the title of the tool. It also provides an option to determine whether the author's keywords (the default), the author's name (e.g., for use with Author's Other Works), or geographical indexing terms will be used for the searching of the database. Another option, used with Define Terms, allows the reader to select the search term by double clicking on any word in the text of the item being read in the journal. Journal Managers can use these options in building their own reading tools.

Edit searches for each tool. Using Searches, the Journal Manager can edit or delete the search URL for each database in a tool, as well as reorder the databases that appear in the tool. For each database, a URL is provided that will enable the reader to learn more about the database, and a URL for that enables the search to be conducted. There are two types of searches that can be set up, a GET search, and if that will not work with the database, a POST search is also supported.

GET Searches

For GET searches, run a search and look at the resulting URL. E.g., on Google, a search for "FOOBAR" gives the URL

http://www.google.ca/search?hl=en&q=FOOBAR&meta=

Replace the search term, FOOBAR, with the variable {$formKeywords}. When OJS encounters this variable, it will be replaced with the appropriate value from the item's metadata. This gives us a search URL of

http://www.google.ca/search?hl=en&q={$formKeywords}&meta=

for the RT. However, since the other parameters are unnecessary in this case, we can use a simplified URL of

http://www.google.ca/search?q={$formKeywords}

for the RT.

POST Searches

For POST forms, it is more complicated. Again, looking at Google, you can view the page's source, and notice<form action="/search" ...>, giving us a starting base URL ofhttp://www.google.com/search. You can then look at each of the<input ...> and<select ... > elements in the form, and add them asname=value pairs separated by& to the end of the URL. The element that specifies the textbox that accepts user-entered text (in Google's case, namedq), should once again have a value of {$formKeywords}, which will be replaced with the appropriate value.

A somewhat easier way for POST forms is to copy the HTML source to a file, changemethod=post tomethod=get in the appropriate form field, and change the form'saction= value such that it is a complete URL, e.g.,http://www.google.com/search rather than just/search. You can then view the modified HTML file in your browser and use the GET method above to construct the URL.

As some search engines do not support GET queries, if you find that the above method does not work, you can enter POST form data in the "Search post data" field. If the example given above required that the data be posted, you would enterhttp://www.google.com/search for the search URL andq={$formKeywords} for the post data.

Make sure you test the URLs make sure they work correctly, by replacing {$formKeywords} with a term in the URL and testing it to see if it shows the expected search results. Note that with POST forms this might not always be possible, depending on the site. For URLs that don't have proper search engines another possibility is to use Google and restrict by site. You can use a query likesite:mysite.com FOOBAR in Google to search for the term "FOOBAR" only within mysite.com. This is used in the current RTs for several sites.