Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Melons - tammikuu 24, 2014, 02:58:23 IP

Otsikko: Adding Custom Title w/ BBC to Private Messages
Kirjoitti: Melons - tammikuu 24, 2014, 02:58:23 IP
I'm using Sorck's BBC in Custom Titles (http://custom.simplemachines.org/mods/index.php?mod=2174) mod which works fine for normal posts but doesn't show custom titles for private messages.

I went ahead and edited PersonalMessage.template.php and added the same code, and now the Custom Titles show up in personal message except they're not parsing the BBC.

// Show the member's custom title, if they have one.
if (!empty($message['member']['title']))
echo '
<li class="title">', parse_bbc($message['member']['title']), '</li>';


Is there something I need to add to PersonalMessage.template.php to initialize parse_bbc()?
Otsikko: Re: Adding Custom Title w/ BBC to Private Messages
Kirjoitti: Sorck - tammikuu 26, 2014, 12:50:14 IP
That change should work. Have you made sure to edit the right PersonalMessage.template.php ? That would probably be the one in ./Themes/Default

Next time you could always post in the mod support thread as it'll give the author (in this case me) an easy way to notice it. :)

However, I will admit that the support for the custom title in PM's has gone missing. I'll repackage it later on.
Otsikko: Re: Adding Custom Title w/ BBC to Private Messages
Kirjoitti: Melons - tammikuu 27, 2014, 10:18:18 AP
EDIT: The original mod has been updated and so the problem has been solved.  Awesome response time Sorck!  ;D

It works, but in a custom title you'll get a custom title displaying without the BBC like this:

[b][color=blue]Contributor[/color][/b]

Instead of this:

Contributor

Thanks Sorck for the awesome 2.X mod and keeping it up to date!  ;D