MyBB Community Forums

Full Version: Twitter-style [@name]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Plugin Name: Twitter-like [@name]
Plugin Description: [@name] will return link to names profile.
Compatibility: 1.4.x
Version: 1.2
License: You may edit, but do not redistribute without permission

Installation: Upload the PHP file to your ./inc/plugins folder and activate it!

Download: Download!

Demo: Demo


Changelog/News:
  • V1 Released, made in about 15-20 minutes.
  • V1.1 Released, now shows with username styles as suggested by alex clone here.
  • V1.2 Released, now uses build_profile_link to, well, you guessed it, build profile links. Suggested by labrocca here.

To do:

Nothing, how can I improve this? I'm considering adding something to send a PM to a user telling them they've been mentioned. But that might not happen.

To use:


Stick a simple little [@user] in your post and it'll replace it. Partial usernames work too!
Very nice Big Grin, I like it.

I got something you can do to improve it:

Make it show the colour ranks color? Ex. Your name on your forum is red so @Lee would be @Lee $Msg
(2010-03-15, 01:02 AM)alex clone Wrote: [ -> ]Very nice Big Grin, I like it.

I got something you can do to improve it:

Make it show the colour ranks color? Ex. Your name on your forum is red so @Lee would be @Lee $Msg

I think that'll be easy.
Very nice. Good job.
Can you make it so the brackets aren't neccesary? If a regular user sees it they'll assume it's just @username and not [@username]
I could but there are other issues..
So now it uses username styles. Now, I'd love to do it so you could just do @UserName but what if someone says something like .. "!@!@!@!@!@!" or posts an email address.
I am so not feeling the love.
Kudos..I actually like this.

TIP: Use the built in MyBB function build_profile_link(). It's going to be much better.
(2010-03-18, 12:41 AM)labrocca Wrote: [ -> ]Kudos..I actually like this.

TIP: Use the built in MyBB function build_profile_link(). It's going to be much better.

Ah, good god, I've gotta start looking where those functions are used, rather than where they're defined .. My head STILL hurts. Bleh.
Well, that was rather easy.
Lines like this are written poorly.

$query2[$y] = $db->query("SELECT * FROM {$config['database']['table_prefix']}users WHERE username LIKE '%".$uinfo2[1][$y]."%' LIMIT 1");

Do this:

$query2[$y] = $db->simple_select("users", "username", "username LIKE '%".$uinfo2[1][$y]."%',array('limit' => 1));

That should work.

Really you shouldn't use LIKE imho. Basically if username doesn't exist then just display the regular code. A couple more things could be fine tuned on this plugin.
Pages: 1 2 3 4