vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   the name of the logged in user in my title (https://vborg.vbsupport.ru/showthread.php?t=277028)

PPhysX 01-15-2012 08:18 PM

the name of the logged in user in my title
 
I want to use the title:

"I love xxxx"

Where xxxx will present the name of the logged in user

How can I do this?

--------------- Added [DATE]1326723728[/DATE] at [TIME]1326723728[/TIME] ---------------

bumpidy bump

Lynne 01-16-2012 09:56 PM

I love {vb:raw bbuserinfo.username}

LifesGreatestGift 01-17-2012 12:49 AM

I think he want's to use a custom user title only for his profile/posts.

You will need a conditional in your postbit(_legacy) template to replace the default user title code.
If you do not use the conditional in the below way, then everyone's user title will say I love {user browsing}!

Something like
Code:

<vb:if condition="$post[userid] == 1 AND $show['member']">
    <span class="rank">I love {vb:raw bbuserinfo.username}!</span>
<vb:else />
    <vb:if condition="$post['rank'] != ''">
        <span class="rank">{vb:raw post.rank}</span>
    </vb:if>
</vb:if>

Then just change the 1 to your userid

-------------------------------------
So this conditional 'says'
If this post belongs to [you] and the user browsing is NOT a guest
then show 'I love [username of user browsing]!'
else if this post isnt [you] and user title isn't NULL
display poster's user title
-------------------------------------

Not sure if this code is 100% correct, but you get the idea.

PPhysX 01-17-2012 03:36 PM

Thank you, LifesGreatestGift.

That's exactly what I was looking for. :)


All times are GMT. The time now is 10:34 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.00942 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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