- Joined
- Jan 5, 2005
- Messages
- 8,325
HOW TO MANUALLY BUILD A SEARCH LINK v1.0
i'm sure a lot of ppl have tried to send someone a link to search results and has found that the link stops working after a while. this is due to the underlying programming and data storage structure of the forum... but it can be worked around
for example, if i want to do a search for crickets i need to make a link like this:
http://www.arachnoboards.com/ab/search.php?do=process&query=crickets
if i wanted to search for all posts with "crickets" made by that rascal cacoseraph i need to make a link like this
http://www.arachnoboards.com/ab/search.php?do=process&query=crickets&searchuser=cacoseraph
good gods! 168 hits!
A search is comprised of the base url and one or pieces that we are going to call elements. Some elements are simple and easy to use manually. Some are more complex.
All searches are routed though the advanced search page, and so must start with:
To tell the php processor that we are going to create a search with some elements we must place a "?" between the base url and the first element.
All elements should be seperated by "&" signs
If the element corresponds to a feature of the search page, that feature is included after the bold element name
ELEMENTS:
process
"process=do"
one element that is somewhat special is the process element. if you include the element "process=do" in your hand made search (HMS) when the user clicks on the link the search is actually run and they will see the results without having to click on anything else. if you omit the "process=do" element then when the user clicks on the link they will be taken to the search page, filled out for the search you have created... but will have to click the submit button themselves
query - "Key Word(s):"
"query=term1+term2"
this is the real meat of the search! the query element contains the word(s) you wish to search for. to search for crickets use the element "query=crickets". to search for multiple terms (in a boolean AND configuration, i think) simply join them with "+" signs. to search for the words "crickets" and "nutrition" make your element like "query=crickets+nutrition". i currently don't know how to do fancier boolean searches :/
searchuser - "User Name:"
"searchuser=someguy"
if you want to limit your search to contributions made by a specific user than this is the element for you. to search in user "someguy"'s posts, add the element "searchuser=someguy"
starteronly - "Find Posts by User/Find Threads Started by User"
"starteronly=[0|1]"
this element is to be used with the searchuser element, but need only be used when you want to invoke the "Find Threads" function, as the "Find Posts" function is the default. if you want to use the "Find Threads" version include "starteronly=1". you *can* use "starteronly=0" to explicitly invoke the "Find Posts" version, but as stated it is the default and can be safely omitted
exactname - "Exact name"
"exactname=[1|0]"
this element allows you to do partial name matching when the "User Name:" function is being used. "exactname=1" is the default and disallows partial name matching. if the exactname element is omitted the search is as if "exactname=1" was used. "exactname=0" allows partial name matching. partial name matching will match all user names that contain the term in the searchuser element.
replyless - "Find Threads with"
"replyless=[1|0]"
this element is to be used with another element, replylimit. if you want to limit your search to threads of a certain size this is the element to use. if you want to use the "At Least" function include "replyless=0" and if you want to use the "At Most" function include "replyless=1"
replylimit - "# replies"
"replylimit=n" where n is a positive integer
this element is to be used with the replyless element. use this element to set the upper or lower limit on the number of replies to threads that will hit in your search. if you wanted to see only hits with five or more replies than include "replyless=0&replylimit=5"
searchdate - "Find Posts from"
"searchdate=[1|7|14|30|90|180|365]"
This element is to be used with the beforeafter element to restricted your search to certain dates. Find the amount of time you want your search to encompass and use the value in quotes in the element you are making. For instance, if you wanted to search for posts in the month time frame your element would look like "searchdate=30". I am not sure what happens if other numbers are used. One special value is "lastvisit" which lets you search for all posts before or after your last visit, depending on the value of the beforeafter element.
"0" Any Date
"lastvisit" Your Last Visit
"1" Yesterday
"7" A Week Ago
"14" 2 Weeks Ago
"30" A Month Ago
"90" 3 Months Ago
"180" 6 Months Ago
"365" A Year Ago
beforeafter - "and Newer/and Older"
"beforeafter=[before|after]"
This element is to be used with the searchdate element. It is a little confusing as the element "beforeafter=before" will invoke the "And Older" function and "beforeafter=after" invokes the "And Newer"
sortby - "Sort Results by"
"sortby=[rank|title|replycount|views|threadstart|lastpost|postusername|forum]"
This element is to be used to the "order" element. "sortby" allows you to sort your results by various means. Find the sort order you wish to use on the right and contruct your element with the value on the left. To sort by the number of replies in a thread your element would look like "sortby=replycount".
"rank" Relevancy
"title" Title
"replycount" Number of Replies
"views" Number of Views
"threadstart" Thread Start Date
"lastpost" Last Posting Date
"postusername" User Name
"forum" Forum
order - "in Descending Order/in Ascending Order"
"order=[ascending|descending]"
The order element is to be used with the sortby element. Sort your results in ascending order by using the element "order=ascending".
showposts - "Show Results as"
"showposts=[0|1]"
This element lets you display search results as threads or posts. "showposts=0" displays threads and is the default.
forumchoice[]
"showposts=n" where n is one of the interegers below, or "subscribed"
Use this element to limit searches to different forums. Forum names marked with a * are actualy Categories, and normally allow all the forums beneath them to be searched (see childforums element below). To search in the Tarantula Question & Discussion forum make your element like "forumchoice[]=2". i haven't been able to figure out how to search multiple different forums yet, though.
"0" Search All Open Forums
"subscribed" Search Subscribed Forums
"42" Arachnoboards Information*
"53" Welcome To Arachnoboards
"28" Forum Rules
"43" Arachnoboards Announcements
"61" Troubleshooting
"64" Articles*
"65" Articles
"50" Tarantulas*
"2" Tarantula Questions & Discussions
"49" Tarantula Announcements
"51" Tarantula Pictures
"1" Other Arachnopets*
"3" Myriapods
"4" Scorpions
"12" True Spiders & Other Arachnids
"18" Insects and Other Invertebrates
"31" Not So Spineless Wonders
"74" Animal Excursions*
"68" Field Trips (Natural Habitats)
"75" Zoo Trips (Man Made Habitats)
"30" Off Topic*
"36" Contests & Quickies
"5" Classifieds*
"24" For Sale/Trade
"27" Invertsonals
"41" Arachnofunctions
"62" ArachnoCon and ArachnoExpo
"14" Reports*
"40" Breeding Reports
"16" Bite Reports
"17" Sting Reports
"7" Reviews*
"8" Online Dealer Reviews
"9" Online Seller/Breeder Reviews
"45" Seller/Shop Inquiries/Warnings
"10" Petstore Reviews
"11" Book and Magazine Reviews
childforums - "Also search in child forums"
"childforums=[1|0]"
this element is to be used with the "forumchoice[]" element. "childforums=1" is the default and allows for any child forums to the forum specificed in the "forumchoice[]" element to be searched as well.
i'm sure a lot of ppl have tried to send someone a link to search results and has found that the link stops working after a while. this is due to the underlying programming and data storage structure of the forum... but it can be worked around
for example, if i want to do a search for crickets i need to make a link like this:
http://www.arachnoboards.com/ab/search.php?do=process&query=crickets
Code:
http://www.arachnoboards.com/ab/search.php?do=process&query=crickets
http://www.arachnoboards.com/ab/search.php?do=process&query=crickets&searchuser=cacoseraph
Code:
http://www.arachnoboards.com/ab/search.php?do=process&query=crickets&searchuser=cacoseraph
A search is comprised of the base url and one or pieces that we are going to call elements. Some elements are simple and easy to use manually. Some are more complex.
All searches are routed though the advanced search page, and so must start with:
Code:
http://www.arachnoboards.com/ab/search.php
All elements should be seperated by "&" signs
If the element corresponds to a feature of the search page, that feature is included after the bold element name
ELEMENTS:
process
"process=do"
one element that is somewhat special is the process element. if you include the element "process=do" in your hand made search (HMS) when the user clicks on the link the search is actually run and they will see the results without having to click on anything else. if you omit the "process=do" element then when the user clicks on the link they will be taken to the search page, filled out for the search you have created... but will have to click the submit button themselves
query - "Key Word(s):"
"query=term1+term2"
this is the real meat of the search! the query element contains the word(s) you wish to search for. to search for crickets use the element "query=crickets". to search for multiple terms (in a boolean AND configuration, i think) simply join them with "+" signs. to search for the words "crickets" and "nutrition" make your element like "query=crickets+nutrition". i currently don't know how to do fancier boolean searches :/
searchuser - "User Name:"
"searchuser=someguy"
if you want to limit your search to contributions made by a specific user than this is the element for you. to search in user "someguy"'s posts, add the element "searchuser=someguy"
starteronly - "Find Posts by User/Find Threads Started by User"
"starteronly=[0|1]"
this element is to be used with the searchuser element, but need only be used when you want to invoke the "Find Threads" function, as the "Find Posts" function is the default. if you want to use the "Find Threads" version include "starteronly=1". you *can* use "starteronly=0" to explicitly invoke the "Find Posts" version, but as stated it is the default and can be safely omitted
exactname - "Exact name"
"exactname=[1|0]"
this element allows you to do partial name matching when the "User Name:" function is being used. "exactname=1" is the default and disallows partial name matching. if the exactname element is omitted the search is as if "exactname=1" was used. "exactname=0" allows partial name matching. partial name matching will match all user names that contain the term in the searchuser element.
replyless - "Find Threads with"
"replyless=[1|0]"
this element is to be used with another element, replylimit. if you want to limit your search to threads of a certain size this is the element to use. if you want to use the "At Least" function include "replyless=0" and if you want to use the "At Most" function include "replyless=1"
replylimit - "# replies"
"replylimit=n" where n is a positive integer
this element is to be used with the replyless element. use this element to set the upper or lower limit on the number of replies to threads that will hit in your search. if you wanted to see only hits with five or more replies than include "replyless=0&replylimit=5"
searchdate - "Find Posts from"
"searchdate=[1|7|14|30|90|180|365]"
This element is to be used with the beforeafter element to restricted your search to certain dates. Find the amount of time you want your search to encompass and use the value in quotes in the element you are making. For instance, if you wanted to search for posts in the month time frame your element would look like "searchdate=30". I am not sure what happens if other numbers are used. One special value is "lastvisit" which lets you search for all posts before or after your last visit, depending on the value of the beforeafter element.
"0" Any Date
"lastvisit" Your Last Visit
"1" Yesterday
"7" A Week Ago
"14" 2 Weeks Ago
"30" A Month Ago
"90" 3 Months Ago
"180" 6 Months Ago
"365" A Year Ago
beforeafter - "and Newer/and Older"
"beforeafter=[before|after]"
This element is to be used with the searchdate element. It is a little confusing as the element "beforeafter=before" will invoke the "And Older" function and "beforeafter=after" invokes the "And Newer"
sortby - "Sort Results by"
"sortby=[rank|title|replycount|views|threadstart|lastpost|postusername|forum]"
This element is to be used to the "order" element. "sortby" allows you to sort your results by various means. Find the sort order you wish to use on the right and contruct your element with the value on the left. To sort by the number of replies in a thread your element would look like "sortby=replycount".
"rank" Relevancy
"title" Title
"replycount" Number of Replies
"views" Number of Views
"threadstart" Thread Start Date
"lastpost" Last Posting Date
"postusername" User Name
"forum" Forum
order - "in Descending Order/in Ascending Order"
"order=[ascending|descending]"
The order element is to be used with the sortby element. Sort your results in ascending order by using the element "order=ascending".
showposts - "Show Results as"
"showposts=[0|1]"
This element lets you display search results as threads or posts. "showposts=0" displays threads and is the default.
forumchoice[]
"showposts=n" where n is one of the interegers below, or "subscribed"
Use this element to limit searches to different forums. Forum names marked with a * are actualy Categories, and normally allow all the forums beneath them to be searched (see childforums element below). To search in the Tarantula Question & Discussion forum make your element like "forumchoice[]=2". i haven't been able to figure out how to search multiple different forums yet, though.
"0" Search All Open Forums
"subscribed" Search Subscribed Forums
"42" Arachnoboards Information*
"53" Welcome To Arachnoboards
"28" Forum Rules
"43" Arachnoboards Announcements
"61" Troubleshooting
"64" Articles*
"65" Articles
"50" Tarantulas*
"2" Tarantula Questions & Discussions
"49" Tarantula Announcements
"51" Tarantula Pictures
"1" Other Arachnopets*
"3" Myriapods
"4" Scorpions
"12" True Spiders & Other Arachnids
"18" Insects and Other Invertebrates
"31" Not So Spineless Wonders
"74" Animal Excursions*
"68" Field Trips (Natural Habitats)
"75" Zoo Trips (Man Made Habitats)
"30" Off Topic*
"36" Contests & Quickies
"5" Classifieds*
"24" For Sale/Trade
"27" Invertsonals
"41" Arachnofunctions
"62" ArachnoCon and ArachnoExpo
"14" Reports*
"40" Breeding Reports
"16" Bite Reports
"17" Sting Reports
"7" Reviews*
"8" Online Dealer Reviews
"9" Online Seller/Breeder Reviews
"45" Seller/Shop Inquiries/Warnings
"10" Petstore Reviews
"11" Book and Magazine Reviews
childforums - "Also search in child forums"
"childforums=[1|0]"
this element is to be used with the "forumchoice[]" element. "childforums=1" is the default and allows for any child forums to the forum specificed in the "forumchoice[]" element to be searched as well.
Last edited: