Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Help with some edit...
#1

Hi,

I'm editing in v1.4 the header_welcomeblock_member for a custom theme and I want to get the user name with style too.

I have for example now: {$mybb->user['username']} and it shows only his name.

But I want to display his group style too... red, blue or whatever his group color and style is.

Please Help. Thx.
#2

$mybb->user['username'] is just the name of the user. You can't style it without running a PHP function.

This does not work like that.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#3

Ah... ok. There's a plugin that enables php in templates but I've heard is dangerous, it can be exploited easily...
#4

If you allow other people to edit the templates then yes it's dangerous
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#5

(10-19-2010, 03:47 AM)Pirata Nervo Wrote: If you allow other people to edit the templates then yes it's dangerous

I'm the only admin so it's ok then.

How could I get the users style using php then ?
#6

(10-25-2010, 01:00 AM)m3krip Wrote:
(10-19-2010, 03:47 AM)Pirata Nervo Wrote: If you allow other people to edit the templates then yes it's dangerous

I'm the only admin so it's ok then.

How could I get the users style using php then ?

You'd need to use something like:
PHP Code:
format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']) 
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#7

Thx, it worked Smile
#8

Great to hear that!
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.




Users browsing this thread: 1 Guest(s)