vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   User CP dropdown...is this correct? (https://vborg.vbsupport.ru/showthread.php?t=230664)

multiplex 12-21-2009 12:53 AM

User CP dropdown...is this correct?
 
hello i installed this mod https://vborg.vbsupport.ru/showthread.php?t=194834 but looks like the support has dropped so i'm hoping to get help through this avenue

my question is actually more of a general question anyways related to the navbar

i am trying to add 2 new options in the User CP drop down menu

My Posts
My Threads

here is what i added in the navbar_usercp_menu template

Code:

<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]" >My Posts</a></td></tr>

Code:

<tr><td class="vbmenu_option" align="left"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1">My Threads</a></td></tr>

both show up and work BUT only when you are currently on your profile page. if you try to execute the new options while say on the home page, it wont work. this error shows up:

Invalid User specified. If you followed a valid link, please notify the administrator


can anyone kindly provide any guidance on how to get this to work regardless of what page you are trying to access these options from

thanks in advanced

kh99 12-21-2009 01:32 AM

Try using $vbulletin->userinfo[userid] in place of $userinfo[userid]

multiplex 12-21-2009 01:48 AM

Quote:

Originally Posted by kh99 (Post 1934343)
Try using $vbulletin->userinfo[userid] in place of $userinfo[userid]

thanks for the suggestion but it didnt work. anyone else?

Lynne 12-21-2009 03:38 AM

$userinfo[userid] is the person who's profile you are on which is why it would work if you were on your *own* profile. If you want it in the navbar for *you*, then you should use $bbuserinfo[userid]

multiplex 12-21-2009 04:56 AM

Quote:

Originally Posted by Lynne (Post 1934390)
$userinfo[userid] is the person who's profile you are on which is why it would work if you were on your *own* profile. If you want it in the navbar for *you*, then you should use $bbuserinfo[userid]

perfect! worked like a charm. many thanks!


All times are GMT. The time now is 08:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00983 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete