MyBB Community Forums

Full Version: HTML user info call help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello there, basically, I am switching from phpbb, and I had created a banner with user info. You can check that out here:

Image: http://i188.photobucket.com/albums/z265/...btheme.jpg

phpbb forum link: http://pixelsmashers.com/forum/

Mybb forum link: http://pixelsmashers.com/mybbforum/

So, I am trying to replicate the top part when the user is logged in that I made in phpbb, but I need the html function calls for a few things. Can you guys help me out?

Things I need:

-User Avatar (I think it's $mybb->user['avatar'] ?) <- I also need to resize this to 80px by 80x (without cutting it off).
-Unread private message count only
-User rank

Any help is appreciated thank you.
$mybb->user['unreadpms']
$mybb->user['usertitle']
(2012-04-30, 03:07 PM)Paul H. Wrote: [ -> ]$mybb->user['unreadpms']
$mybb->user['usertitle']

Thanks Big Grin! The unread pm worked great! However, I should have been more specific about the title. I wanted the group image to display there. What is the code for image of the rank or stars I believe it's called?

Also, how does one resize the avatar after a specific call? In order for the avatars to fit in the top I need to resize them in that portion of the forum only (in the banner). Thanks again for the help it is highly appreciated.

edit:

I tried userstars, but it didn't seem to work:

Quote:{$mybb->user['userstars']}
You can wrap avatar variable in span tag (with some class) and in global.css add width / height property.

.someclass img {
height:50px;
width:50px;
}
(2012-04-30, 11:01 PM)Johnny S Wrote: [ -> ]You can wrap avatar variable in span tag (with some class) and in global.css add width / height property.

.someclass img {
height:50px;
width:50px;
}

Awesome! That worked perfectly Big Grin! Thanks John. However, I am still stuck on calling the image for the user stars (rank).

Here's the code I am currently trying to use (the only thing different from the avatar call is the userstar function).

Quote:<a href="{$mybb->settings['bburl']}/member.php?action=profile"><span class = "startop1"><img src="{$mybb->user['userstars']}" /></span></a>

The class (startop1) just has the width I set. So, is "{$mybb->user['userstars']}" the correct function?

Quote:{$mybb->user['userstars']}

Unfortunately, nothing displays after that userstar call in the header. Any help is appreciated thank you.
It would be 'groupimage' but it may not work outside of the postbit.
After dumping mybb variables under [user] variable there isn't any reference to user starimages.since they are group based and not user based like user titles you should look at functions_post.php and (around line 260) modify it to output starimages globaly.

Variable {$mybb->usergrup['starimage']} will output only one star (path) ,star number per group is defined in line 274-277.
Thanks for the response guys. That variable almost worked perfectly. It shows my admin rank fine:

http://pixelsmashers.com/cssforum/images...level1.png

But, when I log in as a regular user and not an admin, instead of showing my custom images for each post count it as follows:

http://pixelsmashers.com/cssforum/images...level6.png

or

http://pixelsmashers.com/cssforum/images...level8.png

It shows just a regular star:

http://pixelsmashers.com/mybbforum/images/star.gif

I'm not really the best with php so I am a bit confused on what code edits I should do in order to rectify this issue. Also, here is an example thread and you can see each custom star image below the title.

http://pixelsmashers.com/mybbforum/showt...78&page=32


edit:

Also, here is an image to clarify the problem I have after using:

Quote:{$mybb->usergroup['starimage']}

http://i188.photobucket.com/albums/z265/...andbad.jpg
Why didn't you say so earlier.That is usergroup rank image and not star.

Try with this

<a href="{$mybb->settings['bburl']}/member.php?action=profile"><span class = "startop1"><img src="{$theme['imgdir']}/{$mybb->usergroup['image']}" /></span></a>
Thanks for the reply John. Sorry about that, I am new to mybb and the functions Big Grin. However, I tried the code above and no image was displayed Sad.

edit:

Here is where I have it configured for other users (non admins and mods):

http://i188.photobucket.com/albums/z265/...nklist.jpg

The other images are in groups for admins and mods. I also see the star image in the regular registered group as well. So, I think I am trying to call two different things. The admin and mod is in the group section and the user title stuff is in the title section.
Pages: 1 2 3