PDA

View Full Version : "/me action" port for vB3.5.x


Hellcat
12-12-2005, 10:00 PM
Update v1.20
"/me does whatever...." now gets propperly parsed to "* Username does whatever...." as well in the Archive and subscription notification e-mails! :)

Update v1.10
Quick-Reply didn't work, the raw "/me" was quoted.
Now works fine as well when quoting in Quick-Reply :)

----------
To update simply uninstall the older product and re-import the updated product XML.

==========

Hi everyone!

Here I present you my vBulletin 3.5.x port of the famous "/me" action :up:

This plugin is based on the original /me action done back in vB2 times :)
The code is mainly based on the contens of this thread:
https://vborg.vbsupport.ru/showthread.php?t=59698
so at least 50% percent of the credits have to go there.

However I've completely rewritten it to fit into vB3.5.x's plugin system and the hooks.


Features of this plugin:
Adds the ability to use the "/me" action in posts and PMs.
Just type "/me waves" to get something like "* Hellcat waves"
The formatting of the /me text can easiely be customized by editing the BB tag it uses for formatting purpose
The color of the /me text can be customized seperately for every style you have installed, so you always have a color fitting into the currently used style! :)
This version is actually QUOTE SAFE!
If you quote someone who used the /me you get "* User waves" instead of the raw "/me waves" in your quoted text!
So there will be no messing up when quoting /me's :D

While editing posts however, you still have the original entered "/me" (except for PMs)


Installation

Painless and easy, no files need to be edited, no files need to be uploaded!

1)
Simply download the product XML from this post, go to your AdminCP -> Product Manager -> Upload/Import Product -> Point it to the XML and hit "GO" :)

2)
Add the following BB tag via the BB-Code-Manager:

BB tag name: me

BB tag replacement: <div style="color: {mecolor};"><strong><em>{param}</em></strong></div>

This BB tag is actually used for the /me output, so edit the replacement of this tag to fit your need of the formatting of the /me text.

3)
Optional:
For every style you have installed go to Style Manager -> Add Replacement Variable

Variable name: mecolor

Variable value: enter any HTML color you like and that fits to the color theme of the style, "#AA0000" for example for a med red.

Using this you can set a different color for the /me for every style.


If you don't want or need to do step 3 you might also want to remove the DIV tag from the HTML makeup (if you don't you have an unparsed {mecolor} in there).


What else?
1) Click "INSTALL" if you use it :p
2) This can easiely be edited/copied to implement even more actions
3) Post comments and problems here and we try to solve them :)
4) This has been develloped and tested on vBulletin 3.5.2 but should work under 3.5.0 and 3.5.1 as well.

Have fun!

SuperFly
12-13-2005, 12:35 AM
Very nice

/me clicks install

nexialys
12-13-2005, 12:35 AM
sorry to break your fun: (compared to these ???)
https://vborg.vbsupport.ru/showthread.php?t=93171
https://vborg.vbsupport.ru/showthread.php?t=98549

Hellcat
12-13-2005, 12:39 AM
Whooops....

* Hellcat shuts up

I searched a day for "/me" but didn't find those :(
And the thread about the 3.0.x /me didn't have a refference as well :(

Nah.... so there's one more. :)

theArchitect
12-13-2005, 02:44 AM
Well, the major benefit this hack has is that it is coded for 3.5.2 and is quote safe.

P.S. Just want to get a pet hate off my chest (seeing one of the other hacks still in beta). I realise that hack authors generally release their work for free (so I should shut the hell up), but it can be slightly annoying when a very cool hack gets released with bugs in it and then never gets updated so it never gets used. Such a waste of a great idea and good code.

Colosus
12-13-2005, 04:56 AM
One question... Does this allow /me to be used within a sentence without messing it up? For instance a link...

http://www.test.com/memo/

Hellcat
12-13-2005, 05:13 AM
One question... Does this allow /me to be used within a sentence without messing it up? For instance a link...

http://www.test.com/memo/
Yes, should be no problem.
I already posted a few posts with that where the "/me" accours somwhere in the text.
It's supposed to only parse the "/me" if it's at the very beginning of a line.

nexialys
12-13-2005, 11:14 AM
It's supposed to only parse the "/me" if it's at the very beginning of a line.
good.. :)

btw, i was posting the links to "compare" like said...

and this is good to not shuffle the /me everywhere... BUT,,, would be COOOOOLER if it can parse a sentence, like :
this is good. /me click install. and i'll be happy!

...i know it's a bit more complicated, use 2 regex more... but anyway, this is a idea for a addon.. lol

shovel
12-13-2005, 11:27 AM
Well, the major benefit this hack has is that it is coded for 3.5.2 and is quote safe.

P.S. Just want to get a pet hate off my chest (seeing one of the other hacks still in beta). I realise that hack authors generally release their work for free (so I should shut the hell up), but it can be slightly annoying when a very cool hack gets released with bugs in it and then never gets updated so it never gets used. Such a waste of a great idea and good code.
Couldn't agree with you more.

Snake
12-13-2005, 01:57 PM
Lovely!

bold
12-13-2005, 03:39 PM
for some reason the color stays the default post color. any ideas how to make it work?

Hellcat
12-13-2005, 03:57 PM
for some reason the color stays the default post color. any ideas how to make it work?
Did you set the replacement variables in the style manager for all styles?
And is the name the same as given in the BB code?

bold
12-13-2005, 05:48 PM
oops had it '{mecolor}' for the bbcode. but just 'mecolor' as replacement variable.

FleaBag
12-14-2005, 05:17 PM
Smurfin' awesome. Thanks for sharing! :)

thisgeek
12-20-2005, 03:45 AM
oops had it '{mecolor}' for the bbcode. but just 'mecolor' as replacement variable.

I did the same thing - d'oh! Figured it out when I checked the output source.

GrendelKhan{TSU
12-20-2005, 10:00 PM
Yes, should be no problem.
I already posted a few posts with that where the "/me" accours somwhere in the text.
It's supposed to only parse the "/me" if it's at the very beginning of a line.

that's what I wanted to know! so many problems before with this hack case I have a lot of likes from urls with

www.SITE.com/media/file

the /me in media would fook up the url with the id busting in. :/ lol
great stuff!!


ps. important side question....do you know how a search engine spider would read it? as "/me" or as "GrendelKhan{TSU"??

Hellcat
12-21-2005, 01:19 AM
The search engine would also see the "* User does something" instead of the "/me does something"

In the Searchengine friendly Archive it'll be the "/me" I'd guess....

DaveAK
12-23-2005, 01:58 AM
My first install! Thanks for making it easy. :)

Wolf42
12-23-2005, 09:09 AM
* Wolf42 clicks install.
After some troubles with the raplacement variables I got it to work.
Thx for sharing. ;)

bitbender
01-02-2006, 01:43 PM
Thx!! This fixed up the code and quote block problems we were having with the ABD version!!

HYN!

S@NL - BlackBik
01-03-2006, 07:49 PM
Very nice

* SuperFly clicks install

Me too :)

But it doen't work well when quoting in quick reply...

Hellcat
01-04-2006, 11:38 PM
Me too :)

But it doen't work well when quoting in quick reply...
Hmm.... TBH never tried that so far....
I'll check that out and see if QR can be tweaked :)

sidekick
01-05-2006, 01:37 AM
this one is better than what i had before, earlier the /me wud mess up my url's
deactivated the old one and installed this.. i dont see the same problem

thanks :)

Hellcat
01-12-2006, 12:09 AM
But it doen't work well when quoting in quick reply...
I added support for Quick-Reply :)
See initial post, I already uploaded the new product XML.

Post here if there are still problems, but in my tests quick-reply quoting worked now :)

S@NL - BlackBik
01-12-2006, 05:17 PM
Yep, it works great now :)
Thanks for your support.

Dreiko
01-12-2006, 09:12 PM
Installed and works great :)

The only thing is that, my forum uses the "Backlink for quotes" hack, and, when I quote a "/me", I get

*Username;postnumber and message*

curry684
03-06-2006, 11:10 PM
Wonderful, now running on my forum (http://forum.xboxic.com) :)

* curry684 rejoices!

senkin
03-07-2006, 04:13 AM
Niceness. I am so using this :)

Hellcat
05-16-2006, 10:21 PM
Yesyes, even the old and tiny things get an update from time to time :)

Now, this /me also works
- In the Archive
- In subscription notification emails

Have fun :)

Ghostsuit
05-16-2006, 10:53 PM
hmm strange when I use this I get * username action

Any idea what might be up?

Hellcat
05-16-2006, 11:48 PM
the [me] is the BBcode used for the formatting of the action code.
It should only be exposed in PMs since in quotes it's not used and when editing the raw "/me" shows up :)

Boofo
05-17-2006, 02:35 AM
hmm strange when I use this I get * username action

Any idea what might be up?

You need to make the repacement color variable for the me tags. ;)

And excellent update, Hellcat, sir. ;)

* Boofo runs off to see where else he can break this

L-Mane
05-26-2006, 12:27 AM
Database error in vBulletin 3.5.4:

Invalid SQL:
SELECT COUNT(*) AS `num` FROM post WHERE `userid` = 1 AND `threadid` =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Error Number : 1064

I got this after doing the BB code.

Boofo
05-26-2006, 12:32 AM
I got this after doing the BB code.

That shouldn't have anything to do with this hack. Did you try doing another bbcode to see if it was doing the same thing? It looks like there is another hack messing with something somewhere.

L-Mane
05-26-2006, 12:34 AM
It only does it when I do Manage Products

I installed "moderator_stats_1_3" plugin before.

Boofo
05-26-2006, 01:09 AM
Have you tried disabling that product and then doing the bbcode?

L-Mane
05-26-2006, 01:25 AM
Ok, it's fine now when I disabled that....weird.

Boofo
05-26-2006, 01:55 AM
Ok, it's fine now when I disabled that....weird.

You might want to post what happened in the thread for that hack. Or maybe someone has had the same problem and there might be a fix for it there. ;)

SagesseForum
05-26-2006, 06:59 AM
/me installs

Smiry Kin's
06-01-2006, 09:53 PM
/me installs

Boofo
06-01-2006, 10:35 PM
* Boofo KNOWS you will be very pleased with this! ;)

Hellcat
06-08-2006, 08:21 AM
Howdy :)

Concerning vBulletin 3.6 (beta 1):
This seems to be working fine under vB3.6b1.

At least I didn't encounter any problems while testing ;)

Freesteyelz
06-09-2006, 09:05 PM
* Freesteyelz likes the fun mod; clicks "Install". :)

Boofo
06-09-2006, 09:17 PM
You'll love it! Hellcat did an excellent job on it. ;)

peterska2
06-12-2006, 08:48 PM
doesn't work on 3.6 here

Hellcat
06-12-2006, 10:30 PM
doesn't work on 3.6 here
Why and where does it not work?
Working fine on my 3.6 so far....

peterska2
06-12-2006, 10:52 PM
When I tried it via QR the output I recieved was /me tests the me hack

Hellcat
06-12-2006, 10:58 PM
Ahhhh!
Let me quote a part of the installation instructions ;)
2)
Add the following BB tag via the BB-Code-Manager:

BB tag name: me

BB tag replacement: <div style="color: {mecolor};"><strong><em>{param}</em></strong></div>

This BB tag is actually used for the /me output, so edit the replacement of this tag to fit your need of the formatting of the /me text.

peterska2
06-12-2006, 11:08 PM
* peterska2 looks away in despair

You mean there are instrcutions? :o

* peterska2 goes back to try it again


[edit]

Fancy that, it works now.

Can you put the file in a zip and include a text file with the BB code instructions please :)

Hellcat
06-12-2006, 11:19 PM
OK, I made it a ZIPPO with an included install.txt :)

da420
06-13-2006, 05:36 AM
When I tried it via QR the output I recieved was /me tests the me hack

I had to uninstall, because I couldnt figure out how to make it work. I got the same thing, and I read this thread and I still don't know how to do it right. :^/

Hellcat
06-13-2006, 07:58 AM
Simply add a new BBCode in your AdminCP like described in the first post, and now the INSTALL.TXT as well :)

davidw
06-13-2006, 02:25 PM
Actually, replacement variable in instructions should say:

3)
Optional:
For every style you have installed go to Style Manager -> Add Replacement Variable

Variable name:
{mecolor}

instead of

Variable name:
mecolor

or at least how that's the only way I could get it to work (by adding the {}s)

da420
06-19-2006, 05:32 AM
I can't quite get it to show up in red. I tried a bunch of things but not getting it right.

Ziki
06-22-2006, 10:27 AM
Anyway this already is in 3.5.4 :)

Boofo
06-22-2006, 10:37 AM
Anyway this already is in 3.5.4 :)

Only if you added it it is.

da420
06-28-2006, 05:06 AM
I can't get it to show up in red. I tried a bunch of things but not getting it right.

Oh well, uninstalled.

Hellcat
06-28-2006, 09:44 AM
I can't quite get it to show up in red. I tried a bunch of things but not getting it right.
Edit the replacement of the [me] BBCode to whatever suits you.
Something like style="color: #FF0000" in the <div ...> tag makes it red :)

Or simply use the replacement variable like stated in the readme and the release post.

rgbivens
06-30-2006, 04:22 AM
If you are using the Advanced BBCode system and a user is in two groups, both groups must have permission to use the code before it will work.

Example:

User X is in Admin and Registered members groups.

Admin is set to use /me bbcode Registered members are not.

Admin cannot use /me script

Admin and Registered members are allowed to use /me script, Admin can now use it.

I hope that made sense. I think some people that were having problems in previos posts might be having this problem because when a user who doesn't have permission to use a bbcode uses one, it comes out unparsed like [ me]text[ /me]

-Grant

rogersnm
06-30-2006, 06:17 PM
Is there any way to remove the bottom line space?

Polo
07-06-2006, 12:50 PM
I always liked this little hack :) thank you ;)

DaveAK
08-20-2006, 06:16 PM
Any chance of a 3.6.0 update? I just upgraded to Gold, reverted all my templates, and I'm getting a problem when you quote somebody that had used /me. What I get is the username followed by the post number, in the quoted text.

i.e. * DaveAK;1234567 has issues with this hack

DaveAK
08-26-2006, 02:06 AM
Any chance of a 3.6.0 update? I just upgraded to Gold, reverted all my templates, and I'm getting a problem when you quote somebody that had used /me. What I get is the username followed by the post number, in the quoted text.

i.e. * DaveAK;1234567 has issues with this hack
Anyone else having this problem in 3.6.0? Anyone come up with a fix?

DaveAK
08-26-2006, 02:44 AM
OK, I've fixed it, but I'm not sure it's the best way of doing it.

I added a $originalposternopostid variable into newreply.php and functions_newposts.php

In the plugin manager I changed the preg_replace Quick_Reply instance and the QUOTE instance to use $originalposternopostid instead of $originalposter. I left the isset($originalposter) unchanged.

Comments on this? It works, but have I done it right?

Diva
10-20-2006, 07:19 PM
Any chance of a 3.6.0 update? I just upgraded to Gold, reverted all my templates, and I'm getting a problem when you quote somebody that had used /me. What I get is the username followed by the post number, in the quoted text.

i.e. * DaveAK;1234567 has issues with this hack

I would love to use this hack if you can update it for 3.6.2. I used it on my test site and have the same problem as DaveAK. Is there an easier way around it or do we have to hack PHP? DaveAK, can you tell me how to do that?

Also, is there a way to have the hack keep the same color/boldness in the quotes? At least stay bold would be nice. I'm so glad you updated it!!!

DaveAK
11-11-2006, 08:06 PM
Got it working for 3.6.x Had to change the PHP code for the QUOTE and Quick_Reply instances to the following :

if (isset($originalposter))
{
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* ' . rtrim(rtrim($originalposter,"0..9"),";") . ' $3', $pagetext);
}
The nested rtrim first removes the post ID, then the semi-colon, so that it will work with usernames that end in numbers. No file edits are needed as in my previous attempt posted above.

Diva
11-12-2006, 03:37 PM
Thank you so much, DaveAK. You are so kind!

Elenna
07-02-2007, 05:25 PM
Awesome, thanks for the fix for quotes.

Confirmed working (with the above fix) on 3.6.5

Note for those that don't know where to apply the above fix:

Go into AdminCP> Plugins & Products> Plugin Manager
Scroll to Product: /me (should be at the top).
Click Edit next to the /me Action (QUOTE instance) and /me action (Quick-Reply instance) lines and REPLACE the Plugin PHP code with the code from above.

paramorefans
07-25-2007, 06:39 AM
is there anyway to add this to the quickreply?

DieselMinded
09-20-2007, 09:58 PM
/me installs on 3.6.8 works great thanks
and the members rejoice

Dave Hawley
09-21-2007, 03:21 AM
Could someone explain to me what this does? From reading it appears to simply be a custom BB code?

Smiry Kin's
09-21-2007, 03:49 AM
does this

/me

you can custom it by added words after it.. doing something such as

/me wonders if Dave knows what im on about.

Dave Hawley
09-21-2007, 04:03 AM
Ok, thanks, but couldn't I do the same with a Custom BB code? E.g

*

Smiry Kin's
09-21-2007, 02:08 PM
Ok, thanks, but couldn't I do the same with a Custom BB code? E.g

*
why go to the effort people would have to type *

/me

is alot faster, and user-friendly... lol

Dave Hawley
09-21-2007, 11:35 PM
Not sure "effort" is an apt word for your comparison :)

Thanks for the answers none-the-less!

Smiry Kin's
09-22-2007, 12:20 AM
its effort-less / me action..

those who no irc know what the / me is.. :P

Dave Hawley
09-22-2007, 01:33 AM
LOL! More effort is going into trying to convince me than you save with / me :)

tazB.ca
09-22-2007, 04:38 PM
/me loves it

brvheart
11-01-2007, 02:16 AM
ok, I must have fell off the truck and hit my head....this is what I get (I know I goofed somewhere...)

I type it and get something like this:

[me]*username bla bla bla [/ me] - got this part worked out, but can not get the replacement variable to work...

can someone help me please? I am not good with BB Code and replacement variables....

Bro_Joey_Gowdy
01-07-2008, 08:36 AM
Any updated version for 3.7.0 ??

tehQspm
02-12-2008, 06:36 PM
works fine on 3.7.0 Beta 4. Would be cool to get it to parse for Visitor/Picture comments though.

Boofo
02-12-2008, 06:38 PM
That would be easy to do.

tehQspm
02-12-2008, 11:59 PM
can you help point me in the right direction? I think I can get the right hook it's just knowing which variables to use and how. That's the problem.

Boofo
02-13-2008, 04:57 AM
I haven't looked at it yet. I will get on it in the AM and see what I can do for you.

Boofo
02-15-2008, 11:06 PM
Ok. I have updated this for the 3.7.0 Vistor Messages/Previews. I will do the picture comments now.

EDIT: I have been told I'm not allowed to release an update to this as it is a copyright violation. Sorry.

xxshatteredsoul
03-10-2008, 10:15 PM
Got it working for 3.6.x Had to change the PHP code for the QUOTE and Quick_Reply instances to the following :

if (isset($originalposter))
{
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* ' . rtrim(rtrim($originalposter,"0..9"),";") . ' $3', $pagetext);
}
The nested rtrim first removes the post ID, then the semi-colon, so that it will work with usernames that end in numbers. No file edits are needed as in my previous attempt posted above.
Can someone add this hack to the 3.6 mods. This is the only change above that needs to get added to work on 3.6.8. Thank you.

GoTTi
04-08-2008, 06:24 AM
Ok. I have updated this for the 3.7.0 Vistor Messages/Previews. I will do the picture comments now.

EDIT: I have been told I'm not allowed to release an update to this as it is a copyright violation. Sorry.


what do you mean its a COPYRIGHT violation??? whats the violation? what is it you have you want to release? you can release fixes on here. there is no copyright....i dont understand.

PoetJA-1975
07-07-2008, 11:12 AM
LOL - Temperamental Coders perhaps aka BS
* PoetJA-1975 has installed on 3.7.2 and seems to work just fine actually - as is...

Jacquii.

PGAmerica
07-10-2008, 05:33 PM
I have not tried this yet. Can this be modified to allow for a /you command as well.

eg. /you would be replaced by the name of the user that is being replied too.

PGAmerica
07-10-2008, 06:44 PM
[me]*username bla bla bla [/ me] - got this part worked out, but can not get the replacement variable to work...

How did you get past this? I installed this according to the instructions and when I use it, I get the following:

* PGAmerica Hello to you

What's with that? I typed /me and it shows the and text and then replace the /me with my username. How do I get rid of the and ? I have the "mecolor" variable in place, so it is not that.

ideas?

scville
12-04-2008, 06:22 PM
/me installed!

8thos
05-14-2011, 06:06 PM
/me curious

8thos
06-18-2011, 03:18 AM
Is there a modification like this for vb4?

BirdOPrey5
06-19-2011, 12:17 AM
Is there a modification like this for vb4?

This is working fine for me on 4.0.8... will probably work on all 4.x as is.

8thos
06-19-2011, 12:51 AM
/me test

8thos
06-19-2011, 12:56 AM
It works in vb4.1.4 but it is black and bold instead of red and normal on vb3.

BirdOPrey5
06-19-2011, 09:10 AM
It works in vb4.1.4 but it is black and bold instead of red and normal on vb3.

The mod instructions tell you how to setup a replacement variable so you can set a color per style.

Otherwise if you just want the same color across all styles just set the color in the ME BBCode replacement text. <div style="color:red;">{param}</div> instead of what is there. Actually I'd think <span> is probably a better choice than <div> anyway.

<span style="color:red;">{param}</span>

8thos
06-19-2011, 02:37 PM
The mod instructions tell you how to setup a replacement variable so you can set a color per style.

Otherwise if you just want the same color across all styles just set the color in the ME BBCode replacement text. <div style="color:red;">{param}</div> instead of what is there. Actually I'd think <span> is probably a better choice than <div> anyway.

<span style="color:red;">{param}</span>
Replacement text didn't work. Thanks anyway. Changing it to span.

8thos
09-02-2011, 04:29 PM
/me wonders if this still works on vbulletin.org

S@NL - BlackBik
12-07-2011, 01:37 PM
Works as a charm on 4.1.8 :)