MyBB Community Forums

Full Version: Custom MyCode question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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?
Yes, You could make it with mycode but i cannot guide you since i do not make my own mycode. Someone should be here to help soon Big Grin
I don't think that could be done with the default stuff... sounds like a good idea for a plugin though.
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, 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 Smile

(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 Sad
(2009-03-13, 07:32 PM)Lee Merriman Wrote: [ -> ]
(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 Smile

(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 Sad
I know what you mean. But once you start getting used to it i think it starts getting fun!
Yeah, I just finished this one, and I asploded. Incidently, where are those MyBB forum sig things coming from?
You mean like the one i got on my sig?
..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.
(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.
Pages: 1 2