MySubscriptions, Donation Bar, MyDownloads, MyAchievements and support for our free and paid plugins. All that for $7!
Advertise Here!
Are you looking to advertise on this forum? Please read this announcement thread.
Are you looking to advertise on this forum? Please read this announcement thread.
|
Help with some edit...
|
|
10-18-2010, 05:34 AM
Post: #1
|
|||
|
|||
|
Help with some edit...
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. |
|||
|
10-18-2010, 06:52 AM
Post: #2
|
|||
|
|||
|
RE: Help with some edit...
$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. |
|||
|
10-18-2010, 06:24 PM
Post: #3
|
|||
|
|||
|
RE: Help with some edit...
Ah... ok. There's a plugin that enables php in templates but I've heard is dangerous, it can be exploited easily...
|
|||
|
10-19-2010, 03:47 AM
Post: #4
|
|||
|
|||
|
RE: Help with some edit...
If you allow other people to edit the templates then yes it's dangerous
|
|||
|
10-25-2010, 01:00 AM
Post: #5
|
|||
|
|||
| RE: Help with some edit... | |||
|
10-25-2010, 05:25 AM
Post: #6
|
|||
|
|||
RE: Help with some edit...
(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 You'd need to use something like: PHP Code: format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']) |
|||
|
10-25-2010, 06:30 AM
Post: #7
|
|||
|
|||
|
RE: Help with some edit...
Thx, it worked
|
|||
|
10-25-2010, 07:10 AM
Post: #8
|
|||
|
|||
|
RE: Help with some edit...
Great to hear that!
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)





![[Image: s.png]](http://mybb-plugins.com/images/s.png)