PDA

View Full Version : Show username in Thread Title


TheFrienzNet
07-04-2007, 12:51 AM
I am using the Form Hack and I wanted to do something that shows the username when we submit so it shows up like this:

Username - Moderator Application

But I can't seem to get it right, I always get - Moderator application (without the name)

Here's my code:

////////////////////////////////////////////////////////////////////////////////////////////////////
//TITLE OF THREAD/POST/PM/EMAIL (do not use quotation marks in the title or you will get a parse error)
//You may use variables from the form for this.
////////////////////////////////////////////////////////////////////////////////////////////////////

$posttitle = "$bbuserinfo[username] - Moderator Application";

I also tried $userinfo[username] but no luck. I'd appreciate any help! :)

Guest190829
07-04-2007, 12:53 AM
Try $vbulletin->userinfo['username']

TheFrienzNet
07-04-2007, 12:58 AM
Array['username'] - Moderator Application is what I get.

Guest190829
07-04-2007, 01:15 AM
Sorry about that:


$posttitle = $vbulletin->userinfo['username'] . ' - Moderator Application';

TheFrienzNet
07-04-2007, 01:18 AM
It works! Wow, thank you! Really :)