1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Suggestion] Direct search URL?

Discussion in 'Closed Suggestions' started by James, Aug 5, 2010.

  1. James

    James Well-Known Member

  2. Ahmed

    Ahmed Well-Known Member

    I think it's useful to have ID search, it can used by other members unless there was something updated.
     
  3. Dismounted

    Dismounted Well-Known Member

    Except the ID expires and you're left with a broken link.
     
  4. Mike

    Mike XenForo Developer Staff Member

    ...except you're not. :)

    At least for query-based searches, if you link someone to a result set, it will automatically re-perform the search for them.
     
  5. James

    James Well-Known Member

    I noticed if you perform a search and change the ID it doesn't work, so as long as the ID is the same the query will continue to re-perform when clicked?

    I sure hope all these search IDs aren't going to clog our database (or can be pruned) ;)
     
  6. Cezz

    Cezz Well-Known Member

    What if it is for you? say you bookmark a query-based search because you check it 15-20 a day... Would it just pull the saved version or would it re-run the search each time? As we would need it to re-run the search each time...
     
  7. Mike

    Mike XenForo Developer Staff Member

    Search IDs are only kept around for 24 hours. But the ID data isn't needed to redo a search. It's all in the URL (that's why it's there).

    If you go back to your own search, it will reuse it while it's valid. (If you go to someone else's, it will never to be used because your permissions may not be the same.)
     
  8. Cezz

    Cezz Well-Known Member

    Is there any way in the current implementation to have a URL bookmarked that automatically redoes the search each time then? Like http://xenforo.com/community/search/?q=query if each time I search http://xenforo.com/community/search/ID/?q=query it brings up the same results it becomes counter productive and would mean I could only check once a day unless I manually do the search each time...
     
  9. Mike

    Mike XenForo Developer Staff Member

    Yes, you can run get requests on searches. Inspect the request/HTML in the search form. You can use all of the options. :)
     
  10. Ahmed

    Ahmed Well-Known Member

  11. Ahmed

    Ahmed Well-Known Member

    That's very good. :)
     
  12. James

    James Well-Known Member

    If the ID isn't needed why can't we just remove it? Like: http://xenforo.com/community/search/?q=query

    I would, like Ceri, like to re-use certain queries and be able to generate our own queries without having to generate an ID. Once you familiarise yourself with the URL functions you generally just write the URL itself... just like I experimented with the user profile URL and found out that I could use this URL to get to my profile:
    http://xenforo.com/community/members/908/
     
  13. Disjunto

    Disjunto Well-Known Member

    Ceri May likes this.
  14. Cezz

    Cezz Well-Known Member

    I am sure I tried that and it didn't work, but now it is :S strange... Oh well this is great...
     
  15. James

    James Well-Known Member

    Ahh, it'd be nice if we could omit the ID but that works :)

    Why not just append the id to the end of the query? Then it can update automatically, like:
    http://xenforo.com/community/search/?q=query&id=xxx
    ID of course auto-appending.
     
  16. James

    James Well-Known Member

    I also tried it and it gave me a nice 404 - hence the reason for this thread :)
     
  17. Ahmed

    Ahmed Well-Known Member

    Did you do it with or without the '$' in front of the word 'query'?
     
  18. James

    James Well-Known Member

    It worked with your URL, I mean when I tried it before making this thread I received an error. I wonder if it was fixed rapidly...
     
  19. Disjunto

    Disjunto Well-Known Member

    haha, I was definitely in php mode when I wrote that ;)
     
    James likes this.

Share This Page