2009-03-13, 05:09 AM
If I were to make a MyCode for something like [user]1[/user] where 1 = uid, could I somehow return the username of that user, or would it require a plugin?
(2009-03-13, 08:51 AM)MattRogowski Wrote: [ -> ]I don't think that could be done with the default stuff... sounds like a good idea for a plugin though.
(2009-03-13, 09:06 AM)Tomm M Wrote: [ -> ]You could probably do this by altering class_parser.php quite easily... take a look through the file and see how MyBB does this.
I'd do this in the parse_message function, for example, using match / replace php functions. Find the [user] tag, get the number from it, mySQL function to look up the username, replace the number with the username...
(2009-03-13, 07:32 PM)Lee Merriman Wrote: [ -> ]I know what you mean. But once you start getting used to it i think it starts getting fun!(2009-03-13, 08:51 AM)MattRogowski Wrote: [ -> ]I don't think that could be done with the default stuff... sounds like a good idea for a plugin though.
Well, I've always wanted to make a plugin for MyBB
(2009-03-13, 09:06 AM)Tomm M Wrote: [ -> ]You could probably do this by altering class_parser.php quite easily... take a look through the file and see how MyBB does this.
I'd do this in the parse_message function, for example, using match / replace php functions. Find the [user] tag, get the number from it, mySQL function to look up the username, replace the number with the username...
If I did it this way, would I have to add the MyCode first?
Wow, plugins aren't fun at all
(2009-03-13, 09:32 PM)Lee Merriman Wrote: [ -> ]..Yeah, and I just found out it's a paid 'plugin' from MyBB Central .. How stupid is that? If the software is free, so should 'plugins' such as that.These plugins are outside myBB. Labrocca does excellent plugins and deserves to be payed for them. Also part of the money comes back to mybb project.