vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Add URL to profile to Welcome Message in navbar (https://vborg.vbsupport.ru/showthread.php?t=111719)

Deaths 03-29-2006 10:00 PM

Add URL to profile to Welcome Message in navbar
 
Add URL to profile to Welcome Message in navbar

vBHackers.com

Introduction:
One of the few things which annoy me about vB is having to look for a link for my profile (either a post or in the WOL), unlike in IPB. So, I wrote this little template edit to make my life, your life and your members life a bit easier ;).

The edits:

Open up the Navbar template (Admincp -> Styles & Templates -> Style Manager -> Select the "Edit Templates" options in the dropdown next to the skin you wish to edit -> Click "[? ?]" next to "Navigation / Breadcrumb Templates" -> Click [Edit] next to "navbar")

Find:
PHP Code:

<div class="smallfont">
            <
strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
            <
phrase 1="$pmbox[lastvisitdate]2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
            <if 
condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]2="$vbphrase[total_x_nav_compiled]3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
        </
div

Replace it with:
PHP Code:

<div class="smallfont">
<
strong>
<
phrase 1="<a href='member.php?u=$userid'>$bbuserinfo[username]</a>"$vbphrase[welcome_x]</phrase></strong><br />
<
phrase 1="$pmbox[lastvisitdate]2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if 
condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]2="$vbphrase[total_x_nav_compiled]3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
</
div

Press save!

This will change the:

Welcome, Deaths.
You last visited: Today at 10:55 AM
Private Messages: Unread 0, Total 74.

Text into:
Welcome, Deaths.
You last visited: Today at 10:55 AM
Private Messages: Unread 0, Total 74.


PLEASE NOTE:
This may not work on custom styles. If you have a custom style and wish to apply this hack but can't, post the navbar template (and possibly a link to your site) and I'll see if I can help.

Looking for more great vB 3.5 modifications? Some exclusive modifications only available at vBhackers.com:

[high]* Deaths BBCode, /you BBCode, WikiPedia BBCode, Bump System Plugin, Today's Posts on Forumhome (numer), Latest X Threads on Forumhome Advanced (with forumname!) and many, many more![/high]

Snake 03-30-2006 03:09 PM

This is nice. Thanks!

Deaths 03-30-2006 03:45 PM

No problem ;).

Imo vB should add this or something similar to the default version, as it doesn't increase site load or any of that, it simply shows an extra link.

MindTrix 03-30-2006 06:15 PM

If you click the drop down link for Quick Links, it has a My Profile link in there

Deaths 03-30-2006 06:55 PM

Quote:

Originally Posted by MindTrix
If you click the drop down link for Quick Links, it has a My Profile link in there

True. However:
1. Some sites removed the quick links dropdown
2. It's still an extra click :p

Borgs8472 03-30-2006 06:56 PM

I prefer my hack which goes in the usercp :/

MindTrix 03-30-2006 07:25 PM

Quote:

Originally Posted by Deaths
True. However:
1. Some sites removed the quick links dropdown
2. It's still an extra click :p

LOL Nice justification :)

Quote:

Originally Posted by Borgs8472
I prefer my hack which goes in the usercp :/

Thats nice to know ;)

Deaths 03-31-2006 08:32 AM

Quote:

Originally Posted by MindTrix
LOL Nice justification :)

I'm not sure whether or not you're being sarcastic here.

Maybe this'll do as a justification than:
This hack is what I described it. A very small addition which saves you and your users a click or two. Ofcourse you can use quicklinks, ofcourse you can scroll to the homepage and click your profile. Heck, you can even send a PM to yourself to get to your profile. Which is fastest though? I'm pretty sure we both know ;)

Deaths 03-31-2006 08:34 AM

Quote:

Originally Posted by Borgs8472
I prefer my hack which goes in the usercp :/

Your hack is something completely different. My hack adds a link to the navbar, yours adds a link to a user's threads in the UserCP. Please, read the description of the hack before posting useless spqm.

MindTrix 03-31-2006 10:03 AM

Quote:

Originally Posted by Deaths
I'm not sure whether or not you're being sarcastic here.

Maybe this'll do as a justification than:
This hack is what I described it. A very small addition which saves you and your users a click or two. Ofcourse you can use quicklinks, ofcourse you can scroll to the homepage and click your profile. Heck, you can even send a PM to yourself to get to your profile. Which is fastest though? I'm pretty sure we both know ;)

No, no sarcasim intended. I meant it as a honest opinion, i thought it was good reply from you, sorry if you took any offence

Deaths 03-31-2006 01:33 PM

Quote:

Originally Posted by MindTrix
No, no sarcasim intended. I meant it as a honest opinion, i thought it was good reply from you, sorry if you took any offence

My appologies than ;). I was a bit ticked off by the reply by Borgs8472, won't happen again.

SirFlash 02-09-2007 04:46 AM

Thank you very much, this mod makes VB more intuitive, especially for noobs who used to ask where their user profile is at. This worked perfectly on my VB 3.6.4... the code to replace was the same. Cheers.

PoetJA-1975 02-09-2007 07:49 AM

Actually The original code is a bit flawed...
Try replacing your 1st phrase 1....

Code:

<phrase 1="<a href='member.php?u=$userid'>$bbuserinfo[username]</a>"> $vbphrase[welcome_x]</phrase></strong><br />
WITH

Code:

<phrase 1="<a href='member.php?{$session[sessionurl]}u={$bbuserinfo['userid']}'>{$bbuserinfo['musername']}</a>">$vbphrase[welcome_x]</phrase></strong><br />
That way all pages will show the profile link AND with color if you've used the Membergroup markup :)

Jacquii.


All times are GMT. The time now is 04:54 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.01117 seconds
  • Memory Usage 1,766KB
  • 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_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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