MyBB Community Forums

Full Version: Welcome Panel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
My code assigns the user's title to $title, not $mybbuser['usertitle'] and it should work.
Well it doesn't sorry. Im calling $title
die(print_r($usertitle));


Does that print anything?
Array ( [utid] => 1 [posts] => 0 [title] => Newbie [stars] => 1 [starimage] => ) 1

Im not a newbie, im an admin :/
Its not going to work for Administrators. The code I posted above fetches all usertitles based on the post count, not dependant on status.

You have to do something like:
if($mybbuser['usertitle'])
{
$title = $mybbuser['usertitle'];
}
else
{
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usertitles WHERE posts<='".$mybbuser['postnum']."' ORDER BY posts DESC");
$usertitle = $db->fetch_array($query);
$title = $usertitle['title'];
}

Use $title when you're displaying the title of the user.
Thanks Chris.

Attachments removed, an updated version can be found later in this thread.
New version of the Welcome Panel

This version includes the following:
* It now uses mybb stats, rather than my own query into the users table, so it should be even more quicker (I think).

* A bug where users who didn't have avatars were shown a red X has now been fixed.

* A bit more un-needed code has been taken off.

Suggestions:
This is where you can ask to have things added to the welcome panel, and Ill try my best to add them. Anything within reason of coarse.

Bugs:
Please either report them to me via PM, or on this thread. Do not use the email link in my profile please.

Reminder:
If you are going to use this hack, you must use both files attached. Download only one will not do any good.

Upgrading:
If you have install the prevous mod, do the following to upgrade:
1) Delete index_welcomepanel from Admin CP > Templates > Modify / Delete > Global Templates > Expand
2) In welcomepanel.txt, follow steps 1 and 4, making sure you replace the code for step 1.

So, here is v0.2
http://www.mybbmods.com/view.php?did=39.
Hey, is there still a demo somewhere? All the Links seem broken.
no demo at the moment, but if you want to download the latest file, go to: http://www.mybbmods.com/view.php?did=39. It has a screenshot in it.

Notice: If you need to get support or have a suggestion for this mod, the official thread can now be found at http://www.mybbmods.com/forum/showthread.php?tid=179

(a mod please close this thread when you read it)
Pages: 1 2 3 4 5