Hey. So I'm using
http://mods.mybb.com/view/all-id-mycode plugin but I want to edit it so it would fetch user's username style. So for example if my username style was blue and I did [uid=1] it would be a blue text. How can I make this happen?
(2014-07-20, 03:53 AM)Claraviolet Wrote: [ -> ]http://mods.mybb.com/view/username-style
Check that out.Instead of user ID,it works with group ID and you can change the style by going to admin CP(like adding glow or glitter)
What would the group ID help? I want [uid=1] to be the username, link to userprofile and userstyle.
Try changing:
$query = $db->simple_select("users", "username", "uid={$matches[1]}");
to
$query = $db->simple_select("users", "username, usergroup, displaygroup", "uid={$matches[1]}");
and putting this code
$row['username'] = format_name(htmlspecialchars_uni($row['username']), $row['usergroup'], $row['displaygroup']);
directly above this line:
$message = str_replace($matches[0], '<a href="'.$mybb->settings['bburl']."/member.php?action=profile&uid={$matches[1]}".'" target="_blank">'.$row['username'].'</a>', $message);
That should do it.
(2014-07-20, 10:22 PM)Snake_ Wrote: [ -> ]I recommend: http://mods.mybb.com/view/dvz-mentions
Wow, this is what I was looking for. Thanks!
Though, it gaves me an error when I've uploaded it to plugin directory:
Parse error: syntax error, unexpected T_FUNCTION in /home/xxxxx/public_html/inc/plugins/dvz_mentions.php on line 65