Results 1 to 11 of 11

Thread: Simple URL for search??

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Posts
    21

    Default Simple URL for search??

    How would I construct a simple URL to search on a keyword in vBa Links?

    I'm looking for a URL that I could build vBB code tags for use in my Forums such as this:

    Code:
    [linksearch=basketball] Search For Basketball Links[/linksearch]
    it would translate into something equivalent to this:

    Code:
    <a href="http://www.mydomain.com/links/whatever.php?word={option}"> Search For Basketball Links</a>
    What should I replace the "whatever.php" part with???

    Thanks!
    Last edited by ataraxia; 10-06-2004 at 11:21 AM.

  2. #2
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Simple URL for search??

    http://yoursite.com/links/search.php?do=searchresults&catid=0&quicksearch=1&string={option}

  3. #3
    Junior Member
    Join Date
    Oct 2004
    Posts
    21

    Default Re: Simple URL for search??

    This works really well! Thanks!

    Is there a parameter to set it so that the results are sorted by title in ascending order?

    What are some other parameters that could be used to sort on other fields and/or in descending order? Looking for some general guidance here. (Something to put in the Docs, eventually!)

  4. #4
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Simple URL for search??

    Add &amp;orderby=name&amp;direction=ASC at the end of the link

    Other sorting options...

    posts => Number of Replies
    views => Number of Views
    dateline => Date Added
    lastpostdateline => Last Posting Date
    username => User Name
    directory => Directory

  5. #5
    Junior Member
    Join Date
    Oct 2004
    Posts
    21

    Default Re: Simple URL for search??

    How about some way to sort by the highest number of occurences of the keyword in each listing? Is that possible?

    Thanks again! (vB Adv Links is a GREAT script!!!!)

  6. #6
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Simple URL for search??

    Currently, no.

  7. #7
    Banned
    Join Date
    Mar 2004
    Posts
    61

    Default Re: Simple URL for search??

    tried this and got:
    vBulletin Message
    Could not find phrase 'llery_error_no_search_fields'.

    advise please!

  8. #8
    Banned
    Join Date
    Mar 2004
    Posts
    61

    Default Re: Simple URL for search??

    http://www.absolutepunk.net/artists/...&string=cartel

    This doesn't work on my page .. can anyone help?

  9. #9
    Junior Member
    Join Date
    Jun 2005
    Posts
    4

    Default Re: Simple URL for search??

    Try...
    Code:
    http://www.vbadvanced.com/links/search.php?do=searchresults&catids=0&quicksearch=1&string=hosting
      vBulletin Message => Could not find phrase 'error_no_search_terms'.
    Look at code...
    Code:
    if ($_REQUEST['do'] == 'searchresults')
    {
    	// blah
    
    	if ($searchid) // from $_REQUEST
    	{
    		// blah
    	}
    	else
    	{
    		globalize($_POST, array('some','var','names')); // from $_POST
    
    		// blah
    
    		if (!$string AND !$username)
    		{
    			eval(print_standard_error('links_error_no_search_terms'));
    		}
    
    		if (empty($fields) AND empty($cfields))
    		{
    			eval(print_standard_error('adv_gallery_error_no_search_fields'));
    		}
    
    		// blah
    
    	}
    }
    So it seems...

    - error_no_search_terms is a typo of a missing phrase
    - links_error_no_search_terms is a missing phrase (add adv_)
    - llery_error_no_search_fields is a typo of a missing phrase
    - adv_gallery_error_no_search_fields is a missing phrase

    And you won't get past what is marked in bold with a GET query.

    EDIT: Phrase fix posted at http://www.vbadvanced.com/forum/showthread.php?t=8989
    Last edited by Rue; 06-27-2005 at 01:09 AM.

  10. #10
    Banned
    Join Date
    Mar 2004
    Posts
    61

    Default Re: Simple URL for search??

    fixed!

  11. #11
    Banned
    Join Date
    Mar 2004
    Posts
    61

    Default Re: Simple URL for search??

    Now, if only I could get it to (when using quick search) to just pull up and the go to the first site found..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Simple problem with including php.
    By chris_ in forum Troubleshooting / "How do I..." Questions
    Replies: 6
    Last Post: 10-07-2004, 09:55 AM
  2. Simple Collapse Bug
    By socals in forum Troubleshooting & Problems
    Replies: 0
    Last Post: 09-06-2004, 05:17 PM
  3. Simple Random Image Script
    By lee wilde in forum Add-On Modules & Modifications
    Replies: 0
    Last Post: 06-21-2004, 12:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •