View Full Version : User Title Help!
thebucky84
06-29-2011, 03:57 AM
So I'm having an issue here. I want to add a second user title. The problem is it only wants to be set up based on post count. Well on my site we have ROTM (Ride Of The Month), I want the title ROTM Winner for their second title. Since user titles are post counted based how do I get around that? I only want the winners to have that title, obviously.
Thanks!
Lynne
06-29-2011, 02:36 PM
I think you would need to write plugin to add a title only for those users.
postbit_display_complete
if ($post[userid] == 'x') $template_hook['postbit_userinfo_left'] = '<span class="winner">Winner of XXXXX</span>';
thebucky84
06-29-2011, 03:31 PM
ah ok, I'll see what happens... thanks!
thebucky84
07-30-2011, 03:45 AM
so where would i plug this in at? .. im trying to find "postbit_display_complete" no luck so far
edit: got it made.. now how do i assign to members?
Lynne
07-31-2011, 05:09 PM
What do you mean "how do i assign to members"? You would write the condition for their userid like I had above.
thebucky84
08-02-2011, 01:20 AM
i got ya, plugin their username under the "x" field and the month in "XXXXX" field.. is that correct?
Lynne
08-02-2011, 02:03 AM
Yeah, I believe so. Try it on your test site and see if it does what you want.
thebucky84
08-02-2011, 10:57 PM
so im in plugin & products>plugin manager.. i have my fields set as: Product: VBulletin; Hook Location: postbit_display_complete; Title: ROTM; Execution order: 1; and the php code: if ($post[userid] == 'noodleNiNja') $template_hook['postbit_userinfo_left'] = '<span class="winner">Winner of February</span>';
with all that, still nothing under the default user title of the member(s)
Lynne
08-02-2011, 11:09 PM
$post[userid] should be a number - the userid - not a name.
thebucky84
08-02-2011, 11:47 PM
any specific number?
If you go to the user's profile, you can see their userid in the url, like "member.php?35-SomeUser" (35 would be the number you want). You can also search for a user in the adminCP Users -> Search for Users and it will show the number like "User: SomeUser (id: 35)"
thebucky84
08-03-2011, 08:46 PM
got it, thanks! It shows up fine, but its next to (on the right) of the avatar. How do i make it above it and below the user title? And also if make a image do i just paste the path where it says "Winner of February"?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.