Version: 3.00, by Erwin
Developer Last Online: May 2013
Version: 3.0.7
Rating:
Released: 01-04-2004
Last Update: Never
Installs: 200
No support by the author.
Updated version 2.00 thanks to buro9!
Updated version 3.00 thanks to Edgewize!
New in version 3.00:
Correct parsing in quotes, private messages etc.
Okay, this is the famous /me code first created by Chen. All credits go to him. I'm just putting up instructions on how to do this in vB3. It's very easy.
Is there a way to have it parse the whole line in the hightlight color when there is the /me code in it no matter where the /me code is in the line? Does that make any sense?
change:
'#^/me(.*)$#im'
to:
'#^(.*)/me(.*)$#im'
change:
$post[username] \\1
to:
\\1 $post[username] \\2
change:
$originalposter \\1
to:
\\1 $originalposter \\2
in all the preg_replace() calls and it should do what you want.
this text that /me typed
would come out as:
* this text that masahiko typed
make sense? of course, i haven't used the hack_me.php version so all my example chages are based of the original/my own.
Ok, we had a major issue now with the file-version of this hack (where the file is included). Some threads where no longer readable, especially some with an URL in it. We took the hack out and everything went fine again.
My guess is that some of the preg_replace's are not defined clear enough.
Ok, we had a major issue now with the file-version of this hack (where the file is included). Some threads where no longer readable, especially some with an URL in it. We took the hack out and everything went fine again.
My guess is that some of the preg_replace's are not defined clear enough.
Thanks for this great little hack. Below is what I used to get it working on 3.0 Gold (replaces the original post). This code works with PMs as well, and uses the same formatting as the "highlight" tag so it can be used on a per-style basis.
The major difference is the editing of private.php in two spots. I know using $post in private.php probably isn't the best way to go about it, but it is quick and only takes two lines.
code is updated, bug in WYSIWYG mode when editing posts is fixed.
This doesn't seem to working when previewing a PM and doesn't work in the show_pm. It works great in the quote pm, though. Also, if I use other fonts for this, it doesn't seem to work. The link below will show you the testing thread for this.
sure you guyz didn't messed up some code somewhere?
Unlikely, I am pretty experienced at this and have been installing hacks since UBB v1 (so about 4 years experience and countless hacks installed during those years), also this hack is one of the simpler hacks, 1 line pasted into 3 files and one php page created by copying and pasting, not much to mess up and very easy to check.
As far as I can tell the problem is related to url's with /me in them (could just be coincidence though, also all the problem posts on my site had urls using vB code rather than just being parsed ie HERE as opposed to http://www.redfoxdk.com/falcon/falcon_downloads/Rattys_missileFix%20_BMSdatav1.61.zip), although I suspect it could also be caused by a conflict between 2 hacks. Chances are Bernd Glasstett and myself both have the conflicting hack.
Mind you it is also possible that the problem is just hard to notice because it only affects a small number of posts. I have 1500 posts per day on my forum and only found 4 recent posts that wouldn't open. I notice that both Bernd and myself have very busy forums whilst those who have stated they are not experiencing the problem have fairly quiet forums.
This could simply be a timebomb waiting to happen on your forum.