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

My threads dropdown - need code

Discussion in 'XenForo Questions and Support' started by jauburn, Nov 22, 2011.

  1. jauburn

    jauburn Well-Known Member

    I'm going to create a My Threads tab on the menu bar. Under it will be "threads I started" and "threads I posted in"

    What would be the code behind those two commands? Thanks.
  2. jauburn

    jauburn Well-Known Member

    So will this not work?
  3. Floris

    Floris Guest

  4. jauburn

    jauburn Well-Known Member

    Actually I think I did install your plugin (beautiful!). What I'm asking for, though, is what code I would use to generate

    1. a list of all threads *started* by the user in question
    2. a list of all threads in which the user posted

  5. Floris

    Floris Guest

    Threads started by user: search/member?user_id=6&content=thread
  6. Floris

    Floris Guest

    In the case, if you're using my plugin, find the template, like: xenfans_extra_tabs_dropdown_one

    and before </ul> on a new line, add:

    <xen:if is="{$visitor.user_id}">
    <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=thread'}">{xen:phrase your_threads}</a></li>
    <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=post'}">{xen:phrase your_posts}</a></li>
    <li><a href="{xen:link search/member, '', 'user_id={$visitor.user_id}', 'content=profile_post'}">{xen:phrase your_profile_posts}</a></li>
    Change links and phrases accordingly.

    Did a quick test, seemed to have worked:

    Screen shot 2011-11-23 at 1.18.45 AM.png
    SchmitzIT likes this.
  7. jauburn

    jauburn Well-Known Member

    Super. Thanks!

Share This Page