PDA

View Full Version : the name of the logged in user in my title


PPhysX
01-15-2012, 08:18 PM
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 1326723728 at 1326723728 ---------------

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
<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. :)