Solved: 14 Years, 4 Months ago $post['USERNAME']
#1
Solved: 14 Years, 4 Months ago
Is there such a thing as $post['USERNAME']? Where can I find the variable that tells me the name of the post owner?
#2
Solved: 14 Years, 4 Months ago
The variable for the user that is logged in and loading a page is {$mybb->user['username']}
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#3
Solved: 14 Years, 4 Months ago
Where can I find the list of $mybb global variables?
#4
Solved: 14 Years, 4 Months ago
This is a list of ones for users and usergroups: http://www.learnmybb.com/forums/thread-144.html

It's basically {$mybb->user['X']} or {$mybb->usergroup['X']} where X is the column name from the users/usergroups table.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#5
Solved: 14 Years, 4 Months ago
Hmm, how come I can't use $mybb->user['username'] in Plugins??
#6
Solved: 14 Years, 4 Months ago
You can, you have to define $mybb first.

global $mybb;

Put that in your function and it'll work.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#7
Solved: 14 Years, 4 Months ago
REP ++++++!!!!!
Question: How do I get the poster's name? For instance, I'm trying to edit the post bit so that it displays the FID4 of the topic poster... How do I do it
#8
Solved: 14 Years, 4 Months ago
(2009-07-29, 09:21 PM)Prudens Wrote: REP ++++++!!!!!
Question: How do I get the poster's name? For instance, I'm trying to edit the post bit so that it displays the FID4 of the topic poster... How do I do it
I think that is in the $post array.
#9
Solved: 14 Years, 4 Months ago
But whenever I say
global $post,$mybb;

echo $post['fid4'];


It only returns my FID4, not the FID4 of the poster.

NVM WORKS PERFECTLY! THNAK YOu!
#10
Solved: 14 Years, 4 Months ago
If it's $post['X'] then it's information about that specific post, and about the author of that specific post.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.


Forum Jump:


Users browsing this thread: 2 Guest(s)