miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Adding link to UserInfo page in header menu

 
Author Anonymous
Guest
#1 | Posted: 10 Oct 2007 16:17 
How can I add the link:

http://forum.myforum.com/index.php?action=userinfo&user=1

as MyStats in the header menu. I know how to add the html code in the template/main_header but how do I get the user=1 to change with whatever the users id is signed in? So if user 78 signs in the link <a href="http://forum.myforum.com/index.php?action=userinfo&user=78">MyStats</a> will appear in the header menu. I hope I was clear enough.

Author lime
Partaker
#2 | Posted: 11 Oct 2007 00:13 
Try using {$user_id} in your template, for example:

<a href="http://forum.myforum.com/index.php?action=userinfo&user={$user_id}">MyStats</a>

Author Anonymous
Guest
#3 | Posted: 11 Oct 2007 09:32 
Works great, thanks man, I didn't know the variable $user_id was declared yet. If your not logged in and click it, it says User does not exist!!! because the user_id == 0 which is find.

Author Paul
Lead Developer 
#4 | Posted: 11 Oct 2007 09:54 
Paste this in bb_plugins.php:

/* Link to UserInfo page */

if($user_id>0) $myStatsLnk="<a href=\"https://www.minibb.com/forums/{$indexphp}action=userinfo&amp;user={$user_id}\">MyStats</a> {$l_sepr} ";

/* --Link to UserInfo page */
Then paste in templates/main_header.html:

{$myStatsLnk}

;-)

Author Anonymous
Guest
#5 | Posted: 11 Oct 2007 10:16 
That works better :)

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Adding link to UserInfo page in header menu
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑