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

XF 1.2 How to create an index of threads by authors

Discussion in 'XenForo Questions and Support' started by jauburn, Dec 17, 2013.

  1. jauburn

    jauburn Well-Known Member

    On my forum we have a bunch of writers. They'd love for me to create an index of writers (maybe a xenforo page) or a link under their names in postbit that allows readers, with one click, to pull up a list of the threads that they started that have been moved onto such boards as editors' picks. In other words, I need a search query that pulls threads by author/user and by board(s). How do I create such a query that I can attach to a name or a link?

    I tried just copying the URL that resulted from an advanced search that accomplished what I'm after, but apparently that URL doesn't work for users other than me. So I guess I need some kind of variable. Not sure how to do that.

    Can anyone help?

    Thanks.
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Search is user based and only lasts for a set amount of time, if I remember correctly. As such, if you post a search link, it won't work later.
     
  3. jauburn

    jauburn Well-Known Member

    Well, yes, I discovered that. So I was wondering what the proper search string would be that is reusable.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    DRE likes this.
  5. jauburn

    jauburn Well-Known Member

    Thanks, Brogan.

    How would I create a single string that pulls up posts started by a user in two separate forums?

    Thanks.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Use thread instead of threads.

    Node ids can be comma separated.
     
    DRE and jauburn like this.
  7. jauburn

    jauburn Well-Known Member

    Yeah, I caught that. Thanks. Also, how do I deal with a user name that has spaces in it? I tried using quotation marks, but that didn't work.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Use a - between the words instead of a space.
     
    DRE and jauburn like this.
  9. jauburn

    jauburn Well-Known Member

    Thanks!

    Now, would there be a way somehow to generate such a link under a user's postbit, or somewhere else?
     
  10. jauburn

    jauburn Well-Known Member

    The - between the words didn't work.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    Oh, in that case just use a space or translate it to %20, like so:
    Code:
    http://xenforo.com/community/search/search?users=chris%20deeming&user_content=thread
     
    DRE and jauburn like this.
  12. jauburn

    jauburn Well-Known Member

    Yes, that worked! Thanks. So to get more than one forum, I just separate with a comma, like 2,3?
     
  13. Brogan

    Brogan XenForo Moderator Staff Member

    Oops sorry, nodes should be separated with +, so, e.g. 45+18+15

    Also, regarding this:
    Depending on the template, you can use {$visitor.username}

    You can check whether that is available in the template by adding: {xen:helper dump, $visitor.username} to the template.
     
    DRE likes this.
  14. Brogan

    Brogan XenForo Moderator Staff Member

    DRE likes this.
  15. jauburn

    jauburn Well-Known Member

  16. jauburn

    jauburn Well-Known Member

    That's over my head. But I will attempt to figure it out when my head is clearer.
     
  17. Brogan

    Brogan XenForo Moderator Staff Member

    The 18 and 25 are the two node IDs.
    You need to add each node ID you want to search in.
     
    DRE likes this.
  18. jauburn

    jauburn Well-Known Member

    Okay. The &nodes[]=25 is what confused me. Thanks for your help. Once I have this down, it will be easy to replicate.
     
  19. jauburn

    jauburn Well-Known Member

    Brogan, how would I use this search string to create a custom user field in Users -> Custom User Fields? I see there's a "Value Display HTML" box. Could I create something that would allow each member to display a link under his/her username on posts that would provide one-click access to all of the user's selected works from particular boards? Thanks!
     
  20. DRE

    DRE Well-Known Member

    I have gotten the link from their profile page and put it on their member card. I also used Nobita's started threads addon to make their threads a profile page list
     

Share This Page