Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 6 Years, 8 Months, 2 Weeks ago [How To?] Echo back the user name
#1
Solved: 6 Years, 8 Months, 2 Weeks ago
Hello $player,

See what I did there?
I want to echo back the user who is currently reading the thread.

Thank you for your time.

Regards,

Senethic
#2
Solved: 6 Years, 8 Months, 2 Weeks ago
You can use {$mybb->user['username']} in templates. Smile
No longer involved in the MyBB project.
#3
Solved: 6 Years, 8 Months, 2 Weeks ago
(11-28-2012, 09:39 PM)Nathan Malcolm Wrote: You can use {$mybb->user['username']} in templates. Smile

Hey Nathan,

Thanks for the quick reply, Will i be able to use this in a postbit ?
#4
Solved: 6 Years, 8 Months, 2 Weeks ago
You can use it in any template, it's a global variable. Smile
No longer involved in the MyBB project.
#5
Solved: 6 Years, 8 Months, 2 Weeks ago
(11-28-2012, 09:43 PM)Nathan Malcolm Wrote: You can use it in any template, it's a global variable. Smile

Let me correct myself, would I be able to use it in a post* ?
I know that you can use variables in the back-end but I wonder how I could call up that variable on the frontend in a post Big Grin.
#6
Solved: 6 Years, 8 Months, 2 Weeks ago
You'd have to create a custom plugin which uses the parser to create dynamic MyCodes. Being able to echo arbitrary variables in posts would be a cause for concern.
No longer involved in the MyBB project.
#7
Solved: 6 Years, 8 Months, 2 Weeks ago
(11-28-2012, 09:49 PM)Nathan Malcolm Wrote: You'd have to create a custom plugin which uses the parser to create dynamic MyCodes. Being able to echo arbitrary variables in posts would be a cause for concern.

Alright, my friend is a PHP Dev, I'll get this sorted.
Thank you for your awesome support Nathan.
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)