Improved "Your Posts" link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • makaiguy
    Senior Member
    • May 2004
    • 125
    • 3.8.x

    Improved "Your Posts" link

    I added a "Your Posts" link to my navbar Quick Links some time ago, using
    do=process&searchuser=$bbuserinfo[username]
    as follows:
    PHP Code:
    <if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=process&searchuser=$bbuserinfo[username]">Your Posts</a></td></tr></if> 
    This works well for most users. But I have a few users with short usernames, and it's just been brought to my attention that if their username happens to be a substring of other longer usernames, they get results from those longer usernames as well.

    I've tried changing this to use
    do=finduser&u=$bbuserinfo[userid]:
    PHP Code:
    <if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&u=$bbuserinfo[userid]">Your Posts</a></td></tr></if> 
    This returns results for only the individual logged in user, but returns a list of individual posts, rather than a list of threads, which is preferred.

    Is there any way this can be coded to only bring results for the particular person logged in at the time and still return a list of matching threads?
    Last edited by makaiguy; Sun 13 Aug '06, 12:11pm.
    Doug Wilson
    Administrator, Timeshare Users Group bbs
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    This should work:

    Code:
    do=process&searchuser=$bbuserinfo[username][color=red]&exactname=1[/color]

    Comment

    • makaiguy
      Senior Member
      • May 2004
      • 125
      • 3.8.x

      #3
      Works perfectly. I have one very happy user now. Thanks, Jake.

      FWIW, I've left both in place, a 'Your Threads' option, using
      Code:
      do=process&searchuser=$bbuserinfo[username]&exactname=1
      and a 'Your Posts' option, using
      Code:
      do=finduser&u=$bbuserinfo[userid]
      I seem to have users that prefer one or the other.
      Doug Wilson
      Administrator, Timeshare Users Group bbs

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...