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)
-   -   Welcome Clickable Username! (https://vborg.vbsupport.ru/showthread.php?t=113291)

Borgs8472 04-17-2006 10:00 PM

Welcome Clickable Username!
 
Here's an awesomely powerful hack from me, sure to win over your forum posters hearts and minds.

Actually it's simply to compete with the likes of IPB and phpbb who like to emphasise 'your posts' more by default.

Open up your navbar template (or in some cases header template) and find:
Code:

<phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase>
and replace with:
Code:

<phrase 1="<a style='text-decoration: none' href='member.php?u=$bbuserinfo[userid]'>$bbuserinfo[username]</a>">$vbphrase[welcome_x]</phrase>
In just one edit, (this can be done with an even smaller template edit and and a phrase edit but it's not worth the hassle) your often viewed 'Welcome Username!' message has added functionality, as it can be clicked on as a link to the user's profile.

I decided to remove the default underlining that many people will have this being a link, so the link looks aesthetically similar. The colour may be slightly changed after this.

DJ XtAzY 04-18-2006 01:21 AM

smartest simple mod XD

Tralala 04-18-2006 01:43 AM

Installed! :)

Code Monkey 04-18-2006 01:55 AM

You can also maintain the wonderful, translatable phrasing system by doing it this way.

Code:

<phrase 1="<a style='text-decoration: none' href='member.php?u=$bbuserinfo[userid]'>$bbuserinfo[username]</a>">$vbphrase[welcome_x]</phrase>

Kihon Kata 04-18-2006 02:11 AM

Quote:

Originally Posted by JumpD
You can also not maintain the wonderful, translatable phrasing system by doing it this way.

Code:

<phrase 1="<a style='text-decoration: none' href='member.php?u=$bbuserinfo[userid]'>$bbuserinfo[username]</a>">$vbphrase[welcome_x]</phrase>

what does that mean JUMP?

Code Monkey 04-18-2006 02:15 AM

Quote:

Originally Posted by Kihon Kata
what does that mean JUMP?

Removed the word "not". :D
The one in the release thread hard codes the word "Welcome" so it will be a problem for other language boards specifically muli-lingual board. What I posted will leave the current phrase intact and just add the link to the name so you will not be defeating the system to get what you want.

Borgs8472 04-18-2006 10:23 AM

^ ^
oh, well done. That seems such an odd way of hacking the the phrase system I never considered it. I'll replace with your way in post #1 ;)

Code Monkey 04-18-2006 01:53 PM

Quote:

Originally Posted by Borgs8472
^ ^
oh, well done. That seems such an odd way of hacking the the phrase system I never considered it. I'll replace with your way in post #1 ;)

I just tried it and it worked. *shrugs*

Not really odd if you think about it. It replaces x with whatever is between the quotes. As long as it can get through the parser without kicking up an error.

I don't think that style bit will do anything by the way.

Borgs8472 04-18-2006 01:55 PM

^ ^
It does. Most people have links underlined by default. However welcome username is not underlined normally. Adding that parameter ensures the look stays the same.

Code Monkey 04-18-2006 02:05 PM

You should make it look like the rest of the text. Looks kind of odd as link color.


All times are GMT. The time now is 04:57 AM.

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.01050 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete