PDA

View Full Version : /me code Version 3


Pages : [1] 2

Erwin
01-04-2004, 10:00 PM
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.

Typing "/me is great!" gives you this:

* Erwin is great!


You make changes to THREE php files only.

1. Copy this piece of code:

Change "red" to whatever color you want.


// /me hack
if (THIS_SCRIPT == 'newreply' && !isset($bbcode) && isset($pagetext))
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$postinfo['username'].' $3', $pagetext);
elseif (THIS_SCRIPT == 'private' && !isset($bbcode) && isset($pagetext))
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$pm['fromusername'].' $3', $pagetext);
elseif (isset($bbcode) && $dobbcode && is_array($GLOBALS['post']))
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$GLOBALS['post']['username'].' $3', $bbcode);
elseif (isset($bbcode) && $dobbcode && $GLOBALS['previewpost'])
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$GLOBALS['bbuserinfo']['username'].' $3', $bbcode);
elseif (isset($bbcode) && $dobbcode && isset($GLOBALS['fromuserinfo']))
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$GLOBALS['fromuserinfo']['username'].' $3', $bbcode);
// /me hack


2. Open functions_bbcodeparse.php:

Find:


} // end smilies


PASTE code copied BELOW.

3. Open newreply.php

Find:

In 3.0.6 or less:

$pagetext = trim(strip_quotes($pagetext));


In 3.0.7:

$pagetext = trim(htmlspecialchars_uni($pagetext));


PASTE code copied BELOW.

4. Lastly, open private.php

Find:


$pagetext = trim($pagetext);


PASTE code copied BELOW.

Done! ;)

DestinyIslands
01-05-2004, 01:31 AM
/me will click install as soon as he installs it! Should be tonight or tommorw!

/you ... what does this do?

MGM
01-05-2004, 01:41 AM
absolutely nothing :p

sweet! thanks for porting it over Erwin!

* MGM clicks install

MGM out

SnowBot
01-05-2004, 02:21 AM
nice little mod, thanks fella :)

Koutaru
01-05-2004, 02:35 AM
* Koutaru clicks install.

I'll definately be using this one :) thanks for releasing

Boofo
01-05-2004, 03:14 AM
Been waiting for this one, my friend. ;) Good job!

Exero
01-05-2004, 06:13 AM
* Exero clicks install
www.exero.net/forum/ installed, thanks alot man its wiked..

Hoffi
01-05-2004, 09:08 AM
/me clicks install too....

neocorteqz
01-05-2004, 09:09 AM
Simple, easy. Just the way i like it. Thanks.

xxskullxx
01-05-2004, 01:46 PM
Nice and easy. Thanks, Erwin.

Boofo
01-05-2004, 01:50 PM
I've heard of Erwin being nice but I know for sure he ain't easy! ;)

neocorteqz
01-05-2004, 07:04 PM
I've heard of Erwin being nice but I know for sure he ain't easy! ;)
LMAO.
One question, is this supposed to work with quoted post?


http://www.neocorteqz.com/images/metest.png

Erwin
01-05-2004, 07:09 PM
Yes it should. Did you do step 2? This hack only has problems when you try to edit a post with /me in it - then it stuffs up.

TheAnt
01-05-2004, 07:16 PM
/me bows to Erwin in reverence

*install

neocorteqz
01-05-2004, 07:17 PM
Yes it should. Did you do step 2? This hack only has problems when you try to edit a post with /me in it - then it stuffs up.


Yep, unless there is more than one spot that code is in..


$pagetext = trim(strip_quotes($pagetext));
// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// /me Hack
eval('$newpost[\'message\'] = "' . fetch_template('newpost_quote', 1, 0) . '";');

// fetch the quoted post title




edit: It works when the "/me" code is placed before the quote tags.

And to clarify, this is the only hack i am using. :)

FleaBag
01-05-2004, 07:47 PM
A classic in my opinion - even though I seem to be the only person using it on my site. Thanks for the effort Erwin.

xxskullxx
01-05-2004, 07:56 PM
I've heard of Erwin being nice but I know for sure he ain't easy! ;)
LOL

* xxskullxx thinks Boofo read too much into that comment

BillaBongUSA
01-05-2004, 08:50 PM
Yep, unless there is more than one spot that code is in..


$pagetext = trim(strip_quotes($pagetext));
// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// /me Hack
eval('$newpost[\'message\'] = "' . fetch_template('newpost_quote', 1, 0) . '";');

// fetch the quoted post title




edit: It works when the "/me" code is placed before the quote tags.

And to clarify, this is the only hack i am using. :)


Yeah, it only seems to work for me when /me is on the first line of my post.

Cassidy
01-05-2004, 10:10 PM
/me clicked install to!

Great hack XD my members are all IRC addicts so they'll love this!

Xanthine
01-06-2004, 07:46 PM
Yep works fine, just isnt quotable

Koutaru
01-06-2004, 07:49 PM
* Koutaru testing before quote

* Koutaru testing if hack works in quotes
Just testing ;) ... :p I guess not!

* Koutaru testing after quote

never mind then! Actually, if you put /me in quotes when it hasn't already been said (already been converted in the original post) then it doesn't work. Then again.. I guess it's not supposed to anyway :p

Erwin
01-06-2004, 07:52 PM
* TheAnt bows to Erwin in reverence

*install
Testing...

shorty
01-06-2004, 09:44 PM
Did you fix it Erwin :D

Boofo
01-06-2004, 09:58 PM
Erwin, will this work in pms now, too, sir?

Link14716
01-06-2004, 10:30 PM
It works anywhere BBCode is used by the looks of it.

Boofo
01-06-2004, 10:34 PM
It works anywhere BBCode is used by the looks of it.
The vB2 version didn't unless you put it in the private.php file, too. ;)

Erwin
01-06-2004, 10:37 PM
Erwin, will this work in pms now, too, sir?
Yes, but when you reply with a quote, it does not work properly. :) This has been an issue since vB2.

Repec
01-07-2004, 11:26 AM
* Repec clicks install

I just love this irc addition :D

Boofo
01-07-2004, 11:31 AM
Yes, but when you reply with a quote, it does not work properly. :) This has been an issue since vB2.
They did come out with a fix for that in vB2. I have it here if it would help at all. And they also had to do some code in the private.php to get it to work in pms. ;)

Convergys
01-07-2004, 03:57 PM
Yeah, it only seems to work for me when /me is on the first line of my post.
I am having the same problem....

BBQ
01-07-2004, 05:13 PM
* BBQ clicks install :D
i don't care if it works in quotes, peepz quote too much anyway, mostly useless

and it's supposed to be used when you start a new line! it's the goold old IRC action command simulated in vbb.

Erwin
01-07-2004, 11:00 PM
The /me has to be at the start of a separate line. Is this what you mean?

/me tests...

gmarik
01-08-2004, 06:04 PM
simple, yet good.
any changes from vb2?

eXtremeTim
01-09-2004, 01:07 AM
simple, yet good.
any changes from vb2?
This hack does not work when you edit a post you lose the username when using the wysiwyg message editor. You end up with * your text here.

BillaBongUSA
01-09-2004, 05:39 AM
Let's see...

/me enjoys Pinnacle, whatever the hell that is

BillaBongUSA
01-09-2004, 05:41 AM
Ah, I think it only doesn't work when using the WYSIWYG editor unless it's on the very first line of your post. It works fine when used on the standard editors, though.

Erwin
01-09-2004, 06:27 AM
Let me try...

/me testing...

Erwin
01-09-2004, 06:27 AM
Weird...

eXtremeTim
01-09-2004, 02:25 PM
No edit a post with the wysiwyg message mode and it will lose the username

watch.

Hmm it works here. :-/

But on my site is i edit a post thats using /me text here you end up with * text here on the edit page not * eXtremeTim text here or * Username text here

* eXtremeTim is testing the editing on vb.org of /me

Convergys
01-09-2004, 04:00 PM
Lets see if this does the same thing here as test forum...

/me is cool

Gio Takahashi
01-09-2004, 07:01 PM
I installed this. works like a charm. goodjob.

Chris M
01-09-2004, 11:46 PM
Hmmm it seems kinda buggy...

The vB2 version did work when quoted after a while - Someone fixed it, but I can't remember who...

Satan

Erwin
01-10-2004, 03:37 AM
Hmmm it seems kinda buggy...

The vB2 version did work when quoted after a while - Someone fixed it, but I can't remember who...

Satan
I promise to fix it when I find time. It's never been a problem for my forums, LOL!

PranK
01-10-2004, 04:13 AM
/me thinks this is kinda cool.
/me clicks install

Christian

neocorteqz
01-10-2004, 05:41 AM
I promise to fix it when I find time. It's never been a problem for my forums, LOL!
No big deal for me. I'm prolly the only one who'll think this is a cool thing. :D

edit: Also seeing that there is an admin above me. Is it possible to get my name changed here? I'd like to use my Name that i use over at vB.com. the name i neocorteqz

:)

* User_001 thanks in whomever advance

Erwin
01-10-2004, 06:03 AM
No big deal for me. I'm prolly the only one who'll think this is a cool thing. :D

edit: Also seeing that there is an admin above me. Is it possible to get my name changed here? I'd like to use my Name that i use over at vB.com. the name i neocorteqz

:)

* User_001 thanks in whomever advance
You are now neocorteqz. ;)

neocorteqz
01-10-2004, 06:34 AM
You are now neocorteqz. ;)
Thank you sir.

Btw. How do i go about customizing the color of this for each sty;e? it doesn't look too good in one of my styles.

SnowBot
01-10-2004, 08:08 AM
Thank you sir.

Btw. How do i go about customizing the color of this for each sty;e? it doesn't look too good in one of my styles.ok to change the colors do

1. Open includes/functions_bbcodeparse.php:
FIND
$bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"red\">* $post[username] \\1</font (file:///1</font)>", $bbcode);

Part Where You Change The colour
"<font color=\"color_YOU_WANT\">*

EXAMPLE change to yellow
$bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"yellow\">* $post[username] \\1</font (file:///1</font)>", $bbcode);

2. Open newreply.php:
FIND
// CF Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// CF Hack

Part Where You Change The colour
"*

EXAMPLE change to yellow
// CF Hack
$pagetext = preg_replace('#^/me(.*)$#im', "[color=\"yellow\"]* $originalposter\\1", $pagetext);
// CF Hack

Hope this helps

djnoz
01-10-2004, 08:50 PM
Excellent hack, I've clicked install. Thanks!

Darkwolf
01-10-2004, 09:13 PM
/me click install

Mike Gaidin
01-11-2004, 12:58 AM
/me clicks install.

Logikos
01-16-2004, 11:21 PM
/me clicks install

Dan
01-16-2004, 11:41 PM
thanks Erwin

/me clicks install

FlyingDutchman
01-20-2004, 05:33 AM
if you want custom color for each style you could do this:

these are alternate instructions, use these INSTEAD of erwin's, NOT BOTH :)


1. Open includes/functions_bbcodeparse.php:

Find:
$bbcode = str_replace(array('&gt;|||)', '&lt;|||)', '&quot;|||)'), array('&gt;)', '&lt;)','&quot;)'), $bbcode);
} // end smilies

UNDERNEATH, ADD:

// /me Hack
global $post;
$bbcode = preg_replace('#^/me (.*)$#im', "* $post[username] \\1", $bbcode);
// /me Hack



2. Open newreply.php:

Find:

$pagetext = trim(strip_quotes($pagetext));


UNDERNEATH, ADD:

// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// /me Hack

3. Go to your admin CP and add 2 new replacement variables use [ instead of ( and ] instead of ):

Search for Text: (high)
Replace with Text: <font color="red">
(change the 'red' to some other color if it doesn't fit with your style)

Search for Text: (/high)
Replace with Text: </font>

You'll have to do step 3 for every style you have...

FlyingDutchman
01-20-2004, 05:34 AM
oh, and

* FlyingDutchman clicks install :)

nice hack, too bad quoting and editing doesn't work properly :|

Natch
01-21-2004, 09:33 PM
Thanks for this - I was just wondering if there's any reason why it doesn't translate properly across to the shoutbox from vBIndex RC3build7 ... I know that isn't your hack, but I thought it used the same functions ...

regardless ...

/me clicks install gratefully

fly
01-23-2004, 05:00 PM
Hmmmm....

Either I'm an idiot or this doesn't work w/ RC3. I can't even find the respective lines in functions_bbcodeparse.php to edit.

xxskullxx
01-23-2004, 06:29 PM
It works fine with RC3, the code you hunt for has changed a little. Instead of looking for $bbcode = str_replace(array('&gt;|||)', '&lt;|||)', '"|||)'), array('&gt;)', '&lt;)','")'), $bbcode);
} // end smilies in functions_bbcodeparse.php, look for $bbcode = str_replace(array('&gt;|||)', '&lt;|||)', '&quot;|||)'), array('&gt;)', '&lt;)','&quot;)'), $bbcode);
} // end smilies instead. The php code function on here chops it up a bit.

Erwin
02-01-2004, 08:50 AM
I haven't had time to upgrade to RC3 yet. :) When I do so, I will update this hack. Thanks for the heads up!

Cloudrunner
02-01-2004, 04:03 PM
I haven't had time to upgrade to RC3 yet. :) When I do so, I will update this hack. Thanks for the heads up!
hmm...it ported to VB3 perfectly fine for me.

fly
02-02-2004, 01:02 PM
FYI...

If you go to preview a reply, it doesn't add the username. It just shows '* likes'.

Omega Prime
02-04-2004, 12:37 PM
* Omega Prime clicks install

Interesting feature..thanks :)

shadesvn
02-10-2004, 10:18 AM
There were many codes changed in this topic ! I'm using RC4 at the moment so if anyone has tested it on RC4 pls post me a new instruction !

/me
Thanks !

Charlie Argueta
02-13-2004, 07:44 AM
/me subscribes to this thread until he upgrade to Gold

Zachery
02-13-2004, 01:53 PM
* Charlie Argueta subscribes to this thread until he upgrade to Gold
testing
* Faranth tests

Zachery
02-13-2004, 01:53 PM
So it works here, did stefan do somthing to make it work in with edits?

Link14716
02-13-2004, 02:33 PM
It works perfectly for me on RC3.

Zachery
02-13-2004, 02:34 PM
IT does display the first time, try edting it, your name will disappear.


im using RC4 btw...

Reeve of shinra
02-15-2004, 03:48 PM
Installed it

S@NL - Pascal
02-15-2004, 10:23 PM
Hi,

The /me solution shown in this thread doesn't work that good.
For vB3.0.0 RC4 make the following modifications:

In your AdminCP add the following Custom BB code:
Title : Me
Tag : me
Replacement : <font color="red">* {option} {param}</font>
Example : write this
Description : --What you like--
Use {option} : Yes
Button image : -- Leave blank --


In editpost find:

$postusername = $bbuserinfo['username'];


After it add:

// Hack : /me like in IRC channels
$edit['message'] = preg_replace('#^/me (.*)$#im', " . "]\\1", $edit['message']);
// End Hack


In newreply.php find:

$newpost['openclose'] = $_POST['openclose'];


After it add:

// Hack : /me like in IRC channels
$newpost['message'] = preg_replace('#^/me (.*)$#im', " . "]\\1", $newpost['message']);
// End Hack


Have fun with it.

Boofo
02-16-2004, 02:29 AM
How about private messages?

FleaBag
02-23-2004, 06:26 AM
/me installs!

deathemperor
02-23-2004, 07:57 AM
/me test if it is so wonderful this way
^ ^

Chris M
02-23-2004, 04:39 PM
How about private messages?Working fine on RC4 here...

Except for PMs...

* says mooinstead of
*hellsatan says moo;)

It works in edits here as well :)

* Chris M wants it to work in quotes and in private messages:ermm:

Satan

SmasherMaster
02-26-2004, 11:44 AM
SWEET, this hack is awesome

/me clicks install

ShutDown23
02-29-2004, 05:19 AM
/me will install tomarrow. Thank you!

ChuanSE
02-29-2004, 06:11 AM
/me likes it (install)

draculanowaday
02-29-2004, 02:26 PM
/me clicks install

MSX
03-09-2004, 12:59 AM
/me throws old iPod at install button

Boofo
03-09-2004, 01:25 AM
I found an interesting tidbit with this hack. If you use other than the default font in your message, the /me code doesn't work. Try it with the Comic Sans font and you will see what I mean. I did it in the test forum on here and the /me code wouldn't parse.

Edgewize
03-11-2004, 10:06 AM
Great hack; I customized it pretty heavily to add support for private messages, message preview, and to respect bbcode-disabled flags. I also think that this will work no matter what font is currently in use, and it will never generate non-XHTML-compliant output (even when tags are badly overlapped).

* Edgewize clicks install because without Erwin, I'd never have started!


I put the following a file called hack_me.php:

(NOTE: had to mangle the color tags to get it to post right. replace Xcolor with color in six places!)

<?php
if (THIS_SCRIPT == 'newreply' && !isset($bbcode) && isset($pagetext))
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$postinfo['username'].' $3', $pagetext);
elseif (THIS_SCRIPT == 'private' && !isset($bbcode) && isset($pagetext))
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$pm['fromusername'].' $3', $pagetext);
elseif (isset($bbcode) && $dobbcode && is_array($GLOBALS['post']))
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$GLOBALS['post']['username'].' $3', $bbcode);
elseif (isset($bbcode) && $dobbcode && $GLOBALS['previewpost'])
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$GLOBALS['bbuserinfo']['username'].' $3', $bbcode);
elseif (isset($bbcode) && $dobbcode && isset($GLOBALS['fromuserinfo']))
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$GLOBALS['fromuserinfo']['username'].' $3', $bbcode);
?>

Then added the line

@include('hack_me.php');


in the following places:


includes/functions_bbcodeparse.php around line 323, immediately after:
global $DB_site, $vboptions, $bbuserinfo, $templatecache, $smiliecache;
global $html_allowed;

newreply.php around line 96, immediately after
$pagetext = trim(strip_quotes($pagetext));

private.php around line 1156, immediately after
$pagetext = trim($pagetext);



(Note: to change the color, change the three color tags in hack_me.php)

First post, baby! And hello Erwin, I totally forgot that you post here as well as at EV1servers :)

Boofo
03-11-2004, 11:01 AM
I'm still have problems with the different fonts (as you can see in the thread link below). Any idaes how to fix this?

http://www.bearfacts2.com/forums/showthread.php?t=437

SaN-DeeP
03-11-2004, 07:39 PM
* DestinyIslands will click install as soon as he installs it! Should be tonight or tommorw!

/you ... what does this do?
the you tag sounds more interesting though..

think of users using.
Example i post a message like:

[you] is a nice member

When rest of members of board read that message it. it appears to them as
[Member Reasing the post name] is a nice member

;)
what do u think ??

Boofo
03-11-2004, 09:31 PM
the you tag sounds more interesting though..

think of users using.
Example i post a message like:

[you] is a nice member

When rest of members of board read that message it. it appears to them as
[Member Reasing the post name] is a nice member

;)
what do u think ??

I'm putting the install file together for it now. I did this a while back for my site for vB3 but I needed to get the archive code set right so the [you] code wouldn't show up there. I have it up and working now at my site if you would like to check it out. ;) I need someone to make sure I got all the places it can show up at (in case I missed any).

ChuanSE
03-12-2004, 05:44 AM
i didn't manage to get a answer for you boofo :/
I guess it doesn't work in my private forum...

But hey, you made some real cool mods on your board :D

Boofo
03-12-2004, 06:47 AM
i didn't manage to get a answer for you boofo :/
I guess it doesn't work in my private forum...

But hey, you made some real cool mods on your board :D

That's because on my site I don't use [you]. I use a different word so I don't get it overused and abused on the board too soon. ;)

Thank you for the kind words. Glad to have you aboard. ;)

BBQ
03-12-2004, 01:14 PM
Installed on RC4, works like a charm

Well that is, it works fine in a new thread and new reply.
Works fine in quoting a post with a /me in it.

Doesn't work when you edit the orig /me post, you loose the username then. But you can always add /me befor eit again. Plus editting is not done often.

* BBQ is happy but he already installed this on beta 7 and pressed install a few pages in this thread back :p

SaN-DeeP
03-12-2004, 06:41 PM
I'm putting the install file together for it now. I did this a while back for my site for vB3 but I needed to get the archive code set right so the [you] code wouldn't show up there. I have it up and working now at my site if you would like to check it out. ;) I need someone to make sure I got all the places it can show up at (in case I missed any).
can u please pm me the links to ur board ??
i had installed the YOU tag on ipb :)

i administrate my forums, and i know what are default places where that thing should be visible ;)

Sandy...

Boofo
03-12-2004, 06:46 PM
It's in my profile, but here it is again. ;)

http://www.bearfacts2.com

ChuanSE
03-14-2004, 06:33 AM
That's because on my site I don't use [you]. I use a different word so I don't get it overused and abused on the board too soon. ;)

Thank you for the kind words. Glad to have you aboard. ;)

aha, what would be the secret word then? :p j/k

But hey, i'm glad to have guyz like you aboard :D
Keep up the good work ;)

Edgewize
03-15-2004, 10:58 AM
FYI, PMs and editing work properly in my reorganized version (https://vborg.vbsupport.ru/showthread.php?p=484334#post484334) of Erwin's most excellent hack.

Boofo
03-15-2004, 03:57 PM
Same here. Thank you very much, sir. ;)

I still can't get the different fonts to work right though with or without your code. :(

Edgewize
03-15-2004, 05:08 PM
Oh... for a while, I wasn't able to reproduce your problem Boofo, but now I think I got it!

I re-edited my post (https://vborg.vbsupport.ru/showthread.php?p=484334#post484334) and changed some of the lines in hack_me.php, give that a shot...

Boofo
03-15-2004, 05:55 PM
Thank you, sir, that made a big difference. ;)

There is still one small problem. The link below is how it looks now. The first post still has a problem if there is a line of text before it for some reason. Otherwise, it works great!

http://www.bearfacts2.com/forums/showthread.php?p=1296#post1296

Also, you need to add color to the second line in the hack_php.file for quoting the pms. If there is no color in there, the quoted pms don't show color (as you are replying to the message). ;)

Edgewize
03-15-2004, 06:37 PM
I think that in your second line, the font is changing between the / and the "me". Not sure if I can really support that. Just don't do it! *grin*

As for the color, I actually like it better when the quoted lines don't have color, because in my postbit it looks confusing (at a glance, its hard to tell if the /me belongs to the quoted post or the reply). You can always change the preg_replace line to put the [color] back in, as you've done :D

Boofo
03-15-2004, 06:42 PM
Is there a way to parse the line if it has the /me code in it anywhere? They had that for vb2 and it was great. ;)

Boofo
03-15-2004, 06:45 PM
I think that in your second line, the font is changing between the / and the "me". Not sure if I can really support that. Just don't do it! *grin*



You were right. That's what it was doing. I fixed it and all is well now. Thank you again, sir. This is by far the greatest addition to this hack there ever has been. Excellent job! ;)

EDIT I did notice that when you go to edit the post, it parses the default font line but not the rest. Like this:

Let's see if this works

/ me is testing with the Comic Sans Font

/ me is testing with the Centurt Gothic Font

* Boofo is testing the default font

/ me is testing with the Garamond Font (size 3)

Shouldn't it work the same way for all of them? (I had to add a space between the / and the me here to show you what it looks like in edit mode on my site or it would parse it here. It looks just like that but without the spaces I added here.)

Edgewize
03-16-2004, 11:18 PM
Shouldn't it work the same way for all of them? (I had to add a space between the / and the me here to show you what it looks like in edit mode on my site or it would parse it here. It looks just like that but without the spaces I added here.)

Yeah. This is a weird one, I can't reproduce it; working fine on my board. Maybe you left in one of the lines from the original hack by Erwin? As you said, there's no reason that it should detect it properly for display but not on the quote page. It's the same preg_match expression :/

Zachery
03-16-2004, 11:54 PM
Any one figure out my problem?

Edgewize
03-17-2004, 10:38 AM
Any one figure out my problem?

You could have made it easier and linked to your last post, it was a bit tough to find :/ If the problem is still that the /me is lost on editing, try switching to my modified version of this hack instead:

https://vborg.vbsupport.ru/showthread.php?p=484334#post484334

msimplay
03-21-2004, 05:34 PM
You could have made it easier and linked to your last post, it was a bit tough to find :/ If the problem is still that the /me is lost on editing, try switching to my modified version of this hack instead:

https://vborg.vbsupport.ru/showthread.php?p=484334#post484334 that works floorlessly

BarBeQue
03-23-2004, 09:39 PM
Tested and works fine on vbb3 gold!

Small change though... in includes/functions_bbcodeparse.php instead of looking for this
$bbcode = str_replace(array('&gt;|||)', '&lt;|||)', '"|||)'), array('&gt;)', '&lt;)','")'), $bbcode);
} // end smilies

You need to look for this slightly different line:
$bbcode = str_replace(array("&gt;\xE4)", "&lt;\xE4)", "&quot;\xE4)"), array('&gt;)', '&lt;)','&quot;)'), $bbcode);
} // end smilies

8472
03-25-2004, 10:15 AM
/me wonders if someone would be so kind to release this as a .htl file

Frugal
03-25-2004, 10:50 AM
Great hack; I customized it pretty heavily to add support for private messages, message preview, and to respect bbcode-disabled flags. I also think that this will work no matter what font is currently in use, and it will never generate non-XHTML-compliant output (even when tags are badly overlapped).

* Edgewize clicks install because without Erwin, I'd never have started!



I put the following a file called hack_me.php:

:)Ok let me get this straight, is this on top of erwins hack or instead of it?

Frugal

Boofo
03-25-2004, 10:59 AM
Instead of. ;)

Frugal
03-25-2004, 11:08 AM
Instead of. ;)
Hmm, then I can't understand why it isn't working. Uploaded hack_me.php to root vbb folder, when that failed moved it to includes, when that failed checked the other files to make sure the @include('hack_me.php'); was in the right place.

* Frugal is now stumped.

Frugal

Boofo
03-25-2004, 11:13 AM
It works great for me, I'm not sure what could be happening on your site. Wish I could give you some sort of an answer. :(

Frugal
03-25-2004, 11:16 AM
Where does the hack_me.php go? Is it the forum root, or the includes dir? I'm guessing the problem is in this file somewhere as the other 3 files each only need one minor edit which I have checked to be correct.

Frugal

Frugal
03-25-2004, 11:39 AM
Hmm Erwins version works but I can't get the one by Edgwize to work for love nor money :(

Frugal

Boofo
03-25-2004, 11:42 AM
The hack_me.php file does in the forum root. ;)

It's wierd that it doesn't work for you. I couldn't get Erwin's version to work right but the hack_me version fixed everything. ;)

Frugal
03-26-2004, 11:01 AM
Problem solved and surprisingly simple. Changed first line of hack_me.php from

<?

to

<?php

Frugal

Boofo
03-26-2004, 11:58 AM
Problem solved and surprisingly simple. Changed first line of hack_me.php from

<?

to

<?php

Frugal

Congratulations! I'm glad you got it working for you! ;)

Stray
03-26-2004, 11:08 PM
nevermind, seems to work in quick replies now...

lasto
03-26-2004, 11:20 PM
/me clicks install

easiest hack ive ever doen and works fine as well

nice one erwin

GamerJunk.net
03-27-2004, 03:22 AM
/me installs

Frugal
03-27-2004, 09:23 AM
Congratulations! I'm glad you got it working for you! ;)
Well good and bad, discovered a nasty bug with that version of the hack, several threads became unviewable, obviously something in them that the hack was trying to parse. I've had to remove this hack and go back to Erwins version.

Frugal

Boofo
03-27-2004, 09:54 AM
Sounds to me like you have something else going on somewhere interfering with this hack then. I have never run into that anywhere on my forum. All threads view fine. There's really no way that it can cause any threads not to view. All he is parsing in the hack is the /me code. :surprised:

Frugal
03-27-2004, 11:39 AM
Dunno, it's probably clashing with another hack, but either way it causes problems for me. With Erwins version all threads open fine, with Edgewizes about 4 threads showed as blank pages.

Frugal

Boofo
03-27-2004, 12:00 PM
Is that what you were testing on my site? You said it didn't work. What did you try to do?

Frugal
03-27-2004, 12:34 PM
Is that what you were testing on my site? You said it didn't work. What did you try to do?I tried to paste in one of the problem posts from my board but unfortunately it was too long for your forum.

This is one of the posts it didn't like

http://forums.frugalsworld.com/vB/showthread.php?t=25598 (http://forums.frugalsworld.com/vB/showthread.php?t=25598)

*you need to copy and paste the url into a browser and change vB to v b b (without the spaces)

Funny enough I think all of the problem posts had a url with /me in it somewhere in the post, coincidence?

Frugal

Boofo
03-27-2004, 12:37 PM
I have it set for 20,000 characters. How long was the post?

Frugal
03-27-2004, 12:39 PM
I have it set for 20,000 characters. How long was the post?About 27000 characters.

Frugal

Boofo
03-27-2004, 12:41 PM
I'll up it to 50 k and then you can try it again. Give me 5 minutes. ;)

masahiko
03-27-2004, 07:38 PM
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.
code is updated, bug in pm previews is fixed see the funcitons_newpost changes.

includes/functions_newpost.php

Find:


$previewmessage = parse_bbcode($newpost['message'], $foruminfo['forumid'], iif($newpost['disablesmilies'], 0, 1));


ABOVE, ADD:


// /me hack
global $post;
$post[username] = $bbuserinfo[username];
// /me hack



includes/functions_bbcodeparse.php

Find:


// ********************* PARSE BBCODE TAGS ***************************


ABOVE, ADD:


// /me Hack
global $post;
$bbcode = preg_replace('#^/me (.*)$#im', "<div><span class=\"highlight\">* $post[username] \\1</span></div>", $bbcode);
// /me Hack



newreply.php

Find:


$pagetext = trim(strip_quotes($pagetext));


UNDERNEATH, ADD:


// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// /me Hack




private.php

Find:


// quote reply
$originalposter = fetch_quote_username($pm['fromusername']);


UNDERNEATH, ADD:


// /me Hack
$pm['message'] = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pm['message']);
// /me Hack


Find:


$pm['message'] = parse_pm_bbcode($pm['message'], $pm['allowsmilie']);


ABOVE IT, ADD:


// /me Hack
global $post;
$post[username] = $pm[fromusername];
// /me Hack

Boofo
03-27-2004, 07:40 PM
What about the editpost.php? ;)

masahiko
03-27-2004, 07:43 PM
What about the editpost.php? ;)

i haven't had any issues with editing posts. were there problems with it?

Boofo
03-27-2004, 07:49 PM
I don't know. I use the hack_me.php file, but I thought when editing posts there might be a problem so I just thought I would mention it. ;)

Is there a way to make the whole line parse if there is bbcode BEFORE the /me code? They had that with an addon for the vB2 /me code.

msimplay
03-27-2004, 08:08 PM
i prefer hack_me.php works perfectly in vb3 gold

masahiko
03-27-2004, 08:13 PM
I don't know. I use the hack_me.php file, but I thought when editing posts there might be a problem so I just thought I would mention it. ;)

i figured out where people where having the problem. the code i posted is updated to fix it.

Is there a way to make the whole line parse if there is bbcode BEFORE the /me code? They had that with an addon for the vB2 /me code.

changing '#^/me(.*)$#im' to '#/me(.*)$#im' in all the preg_replace() calls should let it start anywhere inside the line and end at the end of the line.

Boofo
03-27-2004, 08:48 PM
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?

draculanowaday
03-28-2004, 06:55 AM
thanks, work well with Vb 3.0 Gold :)

Aleksey
03-28-2004, 03:21 PM
Ok, just to clearfy, if I put "/me" it will say username of a person who is looking at my post?

Boofo
03-28-2004, 03:23 PM
No it will say:

/me like this hack

masahiko
03-28-2004, 09:37 PM
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.

Bernd Glasstett
03-29-2004, 07:29 AM
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.

ChuanSE
03-29-2004, 08:39 AM
strange, i just got 5 identical mails of the latest post in this thread?
Am i the only one?

Frugal
03-29-2004, 08:50 AM
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.Yup this is exactly what happened on my site.

Frugal

ChuanSE
03-29-2004, 09:17 AM
I can't say i have these probs at my board tho

the hack works fine, the url's are fine

sure you guyz didn't messed up some code somewhere?

Boofo
03-29-2004, 09:19 AM
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.

includes/functions_bbcodeparse.php

Find:


// ********************* PARSE BBCODE TAGS ***************************


ABOVE, ADD:


// /me Hack
global $post;
$bbcode = preg_replace('#^/me (.*)$#im', "<div><span class=\"highlight\">* $post[username] \\1</span></div>", $bbcode);
// /me Hack



newreply.php

Find:


$pagetext = trim(strip_quotes($pagetext));


UNDERNEATH, ADD:


// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// /me Hack




private.php

Find:


// quote reply
$originalposter = fetch_quote_username($pm['fromusername']);


UNDERNEATH, ADD:


// /me Hack
$pm['message'] = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pm['message']);
// /me Hack


Find:


$pm['message'] = parse_pm_bbcode($pm['message'], $pm['allowsmilie']);


ABOVE IT, ADD:


// /me Hack
global $post;
$post[username] = $pm[fromusername];
// /me Hack


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.

http://www.bearfacts2.com/forums/showthread.php?t=437

Any idea how to fix the pm stuff and the different font stuff?

Frugal
03-29-2004, 10:05 AM
I can't say i have these probs at my board tho

the hack works fine, the url's are fine

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 (http://www.redfoxdk.com/falcon/falcon_downloads/Rattys_missileFix%20_BMSdatav1.61.zip) as opposed to http://www.redfoxdk.com/falcon/falcon_downloads/Rattys_missileFix%20_BMSdatav1.61.zip (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.

Frugal

masahiko
03-29-2004, 07:48 PM
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.

http://www.bearfacts2.com/forums/showthread.php?t=437

Any idea how to fix the pm stuff and the different font stuff?

i updated my post with a fix for the pm previews.

i'm assuming that you're using font tags around the /me text. if you're using my code then it'll never work because the /me part isn't the first thing on the line. you'll have to use one of the preg changes i gave you erlier. i'm using my own hack verbatum so i'm not going to test that. if you do change it you'll have to watch for conflicts in the code thats being replaced. if you have one tag that changes the font inside another font tag, the inside one will take over.

Boofo
03-31-2004, 08:04 AM
Using that preg_replace you posted didn't fix it. It still doesn't work with other fonts for me. And it STILL doesn't work in the show_pm. When viewing a pm with the /me code, you see the /me code. It works great in preview mode and quoting a private message, but not viewing a private message from someone who has the /me code in it. Does that make any sense?

kanezfan
04-06-2004, 04:21 AM
maybe i'm an idiot, but i'm trying to install this on vb3 gold and I when i use find on either dreamweaver or wordpad, i can't find $pagetext = trim(strip_quotes($pagetext)); in newreply.php. Am i retarded or can you tell me what line it's on? i think it's me though, because when i scroll down the file in Dreamweaver, if i search for just pagetext, it doesn't find it, but i can see the word pagetext right there in the file. it's pissing me off, but that's what you get for trying to install a hack at 1:30 in the morning.

RixiuS
04-09-2004, 02:36 AM
what about newthread?

Boofo
04-09-2004, 05:22 AM
maybe i'm an idiot, but i'm trying to install this on vb3 gold and I when i use find on either dreamweaver or wordpad, i can't find $pagetext = trim(strip_quotes($pagetext)); in newreply.php. Am i retarded or can you tell me what line it's on? i think it's me though, because when i scroll down the file in Dreamweaver, if i search for just pagetext, it doesn't find it, but i can see the word pagetext right there in the file. it's pissing me off, but that's what you get for trying to install a hack at 1:30 in the morning.

You need to get a better editor. Try EditPlus 2. ;)

ChuanSE
04-10-2004, 05:12 AM
Hehehe Boofo, he should find it with notepad :D

But hey, the line has to be pasted without spaces at the end, etc...
Otherwise he says "can't find" indeed.

Stray
04-11-2004, 02:07 PM
I'm using the hack_me.php version and I was wondering how I'd go about making the text bold and putting another asterisk at the end of the phrase.

BarHopper
04-12-2004, 11:59 AM
<a href="http://www.game-realms.net/vb/showthread.php?p=11874#post11874" target="_blank">http://www.game-realms.net/vb/showth...1874#post11874</a>

how can i change the colour? The red doesnt really suit it at all.

Synicide
04-13-2004, 05:16 AM
http://www.game-realms.net/vb/showthread.php?p=11874#post11874

how can i change the colour? The red doesnt really suit it at all.
Works perfectly. I love you all. :D

* Synicide throws kisses to everybody.

Edgewize
04-14-2004, 01:26 AM
If anyone is having trouble with my original hack_me.php version posted a few pages back, then I'm at a loss. It must be a conflict with another poorly written hack because all that my code does is insert code tags before and after the /me line, as if they were typed by the user himself. There is no way that vB tags can cause a post or a thread to just 'disappear' unless some custom change has been made to the bbcode parser.

For the record, the original hack_me version that I posted in this thread works fine for my vB 3.0 Gold sites.

Boofo
04-14-2004, 02:45 AM
If anyone is having trouble with my original hack_me.php version posted a few pages back, then I'm at a loss. It must be a conflict with another poorly written hack because all that my code does is insert code tags before and after the /me line, as if they were typed by the user himself. There is no way that vB tags can cause a post or a thread to just 'disappear' unless some custom change has been made to the bbcode parser.

For the record, the original hack_me version that I posted in this thread works fine for my vB 3.0 Gold sites.

I went back to using your code. I couldn't get any of the others to work everywhere. ;)

Edgewize
04-14-2004, 03:08 PM
Oops, right after I say that, I discover a problem :) New version fixes a very obscure bug with one-line quotes. Just a minor display bug, could accidentally change the color of text that came right before a /me. Check the original post:

https://vborg.vbsupport.ru/showthread.php?p=484334#post484334

Boofo
04-14-2004, 04:26 PM
Oops, right after I say that, I discover a problem :) New version fixes a very obscure bug with one-line quotes. Just a minor display bug, could accidentally change the color of text that came right before a /me. Check the original post:

https://vborg.vbsupport.ru/showthread.php?p=484334#post484334

What did you change in it? I see the s is gone and a t is added. Anything else? ;)

And I wanted to ask. How come if I use highlight instead of color=, all the /me lines are in bold?

Edgewize
04-16-2004, 06:12 AM
All the occurrances of \s were replaced with [ \t] (that's [(space)\t]). \s also matches newlines, so that could get into trouble and match too much in very particular situations. Also, the parenthesis groups were shifted around a bit, but I can't remember why ;)

I have no idea why highlight would do that. As you can see, it just inserts a tag before any bbcode processing is done ... does your highlight normally make things bold?

Wolf42
04-16-2004, 01:39 PM
* Wolf42 clicks install

Its still a nice hack. Thank you very much. :D

Boofo
04-16-2004, 03:06 PM
All the occurrances of \s were replaced with [ \t] (that's [(space)\t]). \s also matches newlines, so that could get into trouble and match too much in very particular situations. Also, the parenthesis groups were shifted around a bit, but I can't remember why ;)

I have no idea why highlight would do that. As you can see, it just inserts a tag before any bbcode processing is done ... does your highlight normally make things bold?

To tell you the truth, I'm not sure if the highlight tags does that also, or not. I never paid much attention to it until now. Where would that code be on vB3, do you know?

TouchingVirus
04-17-2004, 09:32 PM
The highlight code appears in functions_bbcode.php at line 203..i think this is what you were looking for..


// [HIGHLIGHT]
$bbcodes['custom']['find']['[highlight]'] = '#\[highlight\](.*)\[/highlight\]#esiU';
$bbcodes['custom']['replace']['[highlight]'] = "handle_bbcode_parameter('\\1', '" . str_replace("'", "\'", '<span class="highlight">\1</span>') . "')";
$bbcodes['custom']['recurse']['highlight'][0] = array('replace_html' => "<span class=\"highlight\">\\7</span>");

Boofo
04-17-2004, 09:48 PM
Why would it be in bold when I use it with this hack? Any idea? ;)

sabret00the
04-18-2004, 09:20 AM
ok i've enhanced this code for the benefit of sites with multiple stylesets (conflicting colours)

1. Open includes/functions_bbcodeparse.php:

Find:


$bbcode = str_replace(array('&gt;|||)', '&lt;|||)', '&quot;|||)'), array('&gt;)', '&lt;)','&quot;)'), $bbcode);
} // end smilies


UNDERNEATH, ADD:


// /me Hack
global $post;
$bbcode = preg_replace('#^/me (.*)$#im', "<span class=\"highlight\">* $post[username] \\1</span>", $bbcode);
// /me Hack



2. Open newreply.php:

Find:


$pagetext = trim(strip_quotes($pagetext));


UNDERNEATH, ADD:


// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "* $originalposter\\1", $pagetext);
// /me Hack


Done and you also maintain XHTML compliancy :D

SySt3M
04-19-2004, 12:53 PM
thanks very much, nifty little addition this one

/me clicks install

JaNa
04-23-2004, 04:34 AM
/me Clicks Install!

Lurk
04-23-2004, 09:40 PM
/me test

MrNase
04-26-2004, 12:11 PM
* MrNase had the same idea 2 minutes ago :D

Bro_Joey_Gowdy
04-26-2004, 12:54 PM
I kept getting errors in vb3gold so I finally had to intergrate it with Boofo's YOU hack and now its working perfectly except I have to use [me] just like [you]. But hey, its all good.

:devious:

Sooner95
04-26-2004, 11:49 PM
/me thinks this was pretty cool

thanks bud!

pixelpunk
05-04-2004, 08:33 PM
In 3.0.1 I opened /includes/functions_bbcodeparse.php and searched for:

$bbcode = str_replace(array("&gt;\xE4)", "&lt;\xE4)", "&quot;\xE4)"), array('&gt;)', '&lt;)','&quot;)'), $bbcode);
} // end smilies

and put your code beneath it

// /me Hack
global $post;
$bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"red\">* $post[username] \\1</font>", $bbcode);
// /me Hack



newreply.php is still the same.

I believe this part of my vBulletin has yet to be hacked so that code should apply to everyone running 3.0.1.

Smike
05-06-2004, 01:58 PM
/me click install !

sympatic hack !

Synicide
05-07-2004, 11:08 AM
* Smike click install !

sympatic hack !
Is there any way that you can remove the extra line break you get when you post with this?

pixelpunk
05-10-2004, 07:23 PM
The personal user text hack broke this. Or vice versa.
https://vborg.vbsupport.ru/showthread.php?t=60065

Anyone know of a fix?

Maikeru
05-13-2004, 11:58 PM
Can you choose the color of the text?

/me hopes you answer this question

Like change that red to another color?

allforu
05-18-2004, 02:51 PM
How about signature? teach me....

Thanks

Detomah
05-24-2004, 11:05 AM
* Detomah installs perfectly without a hitch. :)

Zacharicus
06-08-2004, 04:42 AM
Hey,
Problems with 3.0.1? I did the hack, and a user got this error continously when trying to post from the quick reply.

Fatal error: Call to undefined function: parse_bbcode() in /home/virtual/site122/fst/var/www/html/forums/includes/functions_showthread.php on line 635


Cheers,
Zacharicus
Admin

www.intelligencenetwork.net

ChuanSE
06-08-2004, 11:57 PM
Yep installed it again :)

kall
06-12-2004, 11:03 AM
Can you choose the color of the text?

* Maikeru hopes you answer this question


Like change that red to another color?
* kall would assume so, as the colour here is yellow...

*sighs*

In newreply.php: find

red


change to:

your colour


HEY! It doesn't work when using quickreply. :(

Arsenic33
06-13-2004, 06:02 PM
/me is happy with what h sees

thanks

Zacharicus
06-14-2004, 03:18 PM
This is supposed to work with 3.0.1?

HakkieDEV
06-16-2004, 06:24 PM
/me clicks install

Awesome hack!

Martin64
06-18-2004, 01:05 AM
* Martin64 licks install

Great job. :)

Berethorn
07-11-2004, 03:58 AM
/me has installed, and it's working!

I wish it had the capability of ending the tag with another /me or something

turbidblue
07-11-2004, 09:26 PM
nice, installed very easy! works like a charm!

thanks!

* turbidblue clicks install ;)

Mtmm
07-14-2004, 12:27 AM
/me installs

weitalia
07-15-2004, 03:40 PM
* weitalia say hi
I use masahiko last mod,but don't works with edit in NO WAY,leave the * and no more the name...why???
Other question: why /me should be in FIRST place of the post?I can't understand why.. :(

;)

Erwin
07-15-2004, 08:31 PM
It has to be the first word in a sentence, not first in a post.

/me tests.

It can be at the end.

/me tests again.

weitalia
07-26-2004, 12:14 PM
Thanx so much Erwin,I got it sorry :D
But the other problem rest unsolved for me:
Why when i edit the post i get the solitary * instead of /me ? Is not possible to make it come back again? I think this is very important [cauz i should edit my posts so much!]...

;)

Datenpapst
07-26-2004, 01:06 PM
* TheAnt bows to Erwin in reverence

*install
Intressting Hack, will be added in august. :)

Blam Forumz
07-27-2004, 08:39 PM
* Blam Forumz clicks install

thanks ;)

SandsUSA
08-02-2004, 10:31 PM
/me happily clicks install!

oldfan
08-03-2004, 03:13 AM
works great, thanks

qxh
08-12-2004, 11:06 PM
/me has installed

thanks

roundhost
08-15-2004, 09:25 PM
/me thinks this mod looks cool and worthy of being downloaded

liquids
08-16-2004, 02:33 AM
/me testing

Blam Forumz
08-18-2004, 05:29 AM
On vBIndex it shows up as:

* slaps someone

and not

/me slaps someone

(Ignore the colour, I chose to have it that way)

Bison
08-28-2004, 02:38 PM
/me clicks install

Zelda-King
08-28-2004, 02:46 PM
* Zelda-King is testing the quick reply thing seeing as it was complained about here in spite of it working fine on his board.

Edit:
Installed, but uninstalled. I couldn't get it to work with previews? Or quick reply?It does work with Quick Reply.

Zelda-King
08-28-2004, 02:48 PM
Just tested preview too. It works with that.

lazserus
09-02-2004, 10:42 PM
This worked until I upgraded to 3.0.3. Anyone else had problems? I reinstalled the hack, but instead of getting the member name the asteriks just shows up with no name.

edit: nevermind, it just doesn't show up in the preview in vB 3.0.3, but does in the post.

bAkAyAr0
09-04-2004, 08:24 PM
/me clicks install

AnhTuanCool
09-06-2004, 05:12 PM
Great!

/me click install right away

SmackdownOnline
09-07-2004, 12:16 AM
/me clicks install

emtee
09-29-2004, 09:51 PM
testing /me . In my board the red color doesn't stop after the username. What's wrong?

HaloImpulse
10-11-2004, 11:25 PM
for me, the user name doesnt show up.

http://www.haloimpulse.com/forums/showthread.php?p=1276#post1276

HaloImpulse
10-11-2004, 11:26 PM
This worked until I upgraded to 3.0.3. Anyone else had problems? I reinstalled the hack, but instead of getting the member name the asteriks just shows up with no name.

edit: nevermind, it just doesn't show up in the preview in vB 3.0.3, but does in the post.


it doesnt work in either for me

Lostnode
11-27-2004, 06:11 AM
* Lostnode Loves the idea...

This and the /you will be added once I get home :)

nautiqeman
11-29-2004, 07:14 PM
/me installs and nods to creator

bendigo-tech
11-29-2004, 11:35 PM
* bendigo-tech installs! :D

mholtum
11-30-2004, 12:03 AM
hmm doesnt work for me ..

TwinsForMe
11-30-2004, 05:24 AM
* TwinForMe clicks install. :)

tazha
11-30-2004, 09:28 AM
for me, the user name doesnt show up.

http://www.haloimpulse.com/forums/showthread.php?p=1276#post1276


Same for me...

VB3.0.3

Too bad..

mholtum
11-30-2004, 02:31 PM
Same for me...

VB3.0.3

Too bad..
I have the same issue

folkish
12-02-2004, 07:26 PM
/me installed this hack. Thanks!

blackpheonix
12-04-2004, 03:41 PM
/me installs. great hack thanks

Tipi
12-04-2004, 11:47 PM
Love it! :D

Is it possible to get the /me-text to look like the rest of the text? I don't want my members to figure this out just yet, and if they see the green text with the little star in front they will understand everything right away. ;) Also wondering if it's possible to use / me in threadtitle. :cool:

Dark Zero
12-09-2004, 02:26 AM
I have the same issue its simple

look this part of the code
lace('#^/me(.*)
remove the ^ character and all work

Victor

Boofo
12-09-2004, 03:43 AM
its simple

look this part of the code
lace('#^/me(.*)
remove the ^ character and all work

Victor
What does removing the ^ character do?

Dark Zero
12-09-2004, 04:47 AM
in the regular expresions the ^ character is the start of a string

for some reason the original code fail in the vb 3.0.3

Jacko
12-10-2004, 03:59 PM
As above i removed the ^ character and voila.

works a treat:

http://www.carstyledirect.com/forum/

Gnappy
12-22-2004, 05:47 PM
/me clicked install

a question: Erwin in first post make "my nick"+"is great", how he made this? "/me" code is the opposite one....
am i drunk or...?

thx for replies ^^

Roxie
12-22-2004, 06:49 PM
works perfectly with 3.0.3
/me clicks install

Robink
12-30-2004, 05:13 AM
I couldnt find the text string to be searched in my vb3.0.3 ..

Is it cause my file is modified, or is that line not there in 3.0.3?
And does it work in 3.0.3?

The-Aeon
12-30-2004, 06:23 PM
a question: Erwin in first post make "my nick"+"is great", how he made this? "/me" code is the opposite one....
I'm wondering about that, too.

I made a screenshot as example, see it in the attachment.



sorry for my english, its long ago when I learnt it in school.

Eagle Creek
01-03-2005, 04:50 PM
Am I great? How did you know :D?

THX! I was looking for this!

bubbadog
01-09-2005, 11:39 PM
Typing "/me is great!" gives you this:

* bubbadog is great!
Excellent example if I do say so myself, Erwin! :D

(Sorry, I couldn't resist!)

Hellspire
01-11-2005, 04:33 AM
Can someone, perhaps the creator of this, upgrade it to 3.0.5 standards????

Furthermore, make it so that you can change the color that is outputted based on the skin they are using at the present moment.

Thanks in advance.

MissKalunji
01-13-2005, 05:30 AM
Can someone, perhaps the creator of this, upgrade it to 3.0.5 standards????

Furthermore, make it so that you can change the color that is outputted based on the skin they are using at the present moment.

Thanks in advance.


it works on 3.0.5 i installed it

next question does anybody know how to make it for
/ you (to show up the username of the person who replied right b4 me??

example /me waves at / you <-- would be hellspire??

Gnappy
01-13-2005, 06:16 PM
yeah, it is the same thing i was asking in my last reply here ^^

MissKalunji
01-13-2005, 09:29 PM
yeah, it is the same thing i was asking in my last reply here ^^


i guess no one came up with it yet :surprised:

Toky0
01-13-2005, 11:12 PM
Ms Kalunji how did you install this? When I searched for the code strips. I found nothing.

MissKalunji
01-13-2005, 11:27 PM
Ms Kalunji how did you install this? When I searched for the code strips. I found nothing.


me too at first i had that problem....dont search for the whole code...copy half ofthe code and you'll find it....why it couldnt find it it was caz at the end there was a space and by copying it didnt takeit (stupid isnt it :ermm: )

lemme know if it worked...

Toky0
01-13-2005, 11:48 PM
/me clicks install!

Thanks for the help Ms Kalunji. :classic:

MissKalunji
01-13-2005, 11:50 PM
* Toky0 clicks install!


Thanks for the help Ms Kalunji. :classic:


np did it work??

Toky0
01-13-2005, 11:52 PM
Yes it did perfectly.

boo.3
01-17-2005, 08:10 PM
/me clicks install

TrentTech
01-26-2005, 10:33 AM
/me considers installing it

peterska2
01-26-2005, 04:19 PM
I can't get it working on 3.0.6

Any help?

Morgalis
01-27-2005, 03:41 PM
The code in includes/functions_bbcodeparse.php has changed in 3.06 and breaks it

using /me tests this hack comes out as

* tests this hack

any help Erwin?

Thanks in advance

Morgalis
01-27-2005, 03:53 PM
The code in includes/functions_bbcodeparse.php has changed in 3.06 and breaks it

using /me tests this hack comes out as

* tests this hack

any help Erwin?

Thanks in advance


Actually this was in preview... for whatever reason it does not work in preview but it works in a new post

thanks

Erwin
01-30-2005, 03:39 AM
I've edited the first post so that you can find the code to change in vB 3.0.6.

MissKalunji
01-30-2005, 04:15 AM
I've edited the first post so that you can find the code to change in vB 3.0.6.


still no answer bout /you??

Erwin
01-30-2005, 06:33 PM
still no answer bout /you??
Because that's a different hack - post that in the mod request forum. This is a support thread for this hack - and I haven't even ticked the support checkbox so this hack is not formally supported.

buro9
02-02-2005, 03:34 PM
It was doing weird things when a user edits a post... so I've created this work around for the bit of text that goes into functions_bbcode.php

// HACK : START : ME
global $post;
if ('' == $post[username]) {
$meUsername = $bbuserinfo[username];
} else {
$meUsername = $post[username];
}
$bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"red\">* $meUsername \\1</font>", $bbcode);
// HACK : END : ME


Essentially if you are editing a post the $post array does not exist, as another context is used instead. So you lose the username.

I've added a switch that tests for this, and if $post doesn't exist, it uses the name of the current poster... fine for my forum as I only allow post owners to edit their messages... but this is a crude hack and it will break when an admin or mod edits their post... so not good.

Does anyone know a better context that I can use? How to find out the equivalent of an $editpost array or the post id so that I can get the proper name.

Cheers

David K

Erwin
02-02-2005, 10:52 PM
It was doing weird things when a user edits a post... so I've created this work around for the bit of text that goes into functions_bbcode.php

// HACK : START : ME
global $post;
if ('' == $post[username]) {
$meUsername = $bbuserinfo[username];
} else {
$meUsername = $post[username];
}
$bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"red\">* $meUsername \\1</font>", $bbcode);
// HACK : END : ME


Essentially if you are editing a post the $post array does not exist, as another context is used instead. So you lose the username.

I've added a switch that tests for this, and if $post doesn't exist, it uses the name of the current poster... fine for my forum as I only allow post owners to edit their messages... but this is a crude hack and it will break when an admin or mod edits their post... so not good.

Does anyone know a better context that I can use? How to find out the equivalent of an $editpost array or the post id so that I can get the proper name.

Cheers

David K
Good idea. :) I've been essentially too lazy to fix this as this hack is basically not that important on my site.

MissKalunji
02-02-2005, 11:37 PM
It was doing weird things when a user edits a post... so I've created this work around for the bit of text that goes into functions_bbcode.php

// HACK : START : ME
global $post;
if ('' == $post[username]) {
$meUsername = $bbuserinfo[username];
} else {
$meUsername = $post[username];
}
$bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"red\">* $meUsername \\1</font>", $bbcode);
// HACK : END : ME


Essentially if you are editing a post the $post array does not exist, as another context is used instead. So you lose the username.

I've added a switch that tests for this, and if $post doesn't exist, it uses the name of the current poster... fine for my forum as I only allow post owners to edit their messages... but this is a crude hack and it will break when an admin or mod edits their post... so not good.

Does anyone know a better context that I can use? How to find out the equivalent of an $editpost array or the post id so that I can get the proper name.

Cheers

David K


Whats that fix for?

buro9
02-03-2005, 10:50 AM
Whats that fix for?
As I said: Essentially if you are editing a post the $post array does not exist, as another context is used instead. So you lose the username

So... when posts with /me in are being edited... the edited version no longer contains the username... so /me might have been "* buro9" in the original, but after edit it was "* " and no username... the fix above presumes the person editing is the person who performs the action and inserts their username.

It's a minor thing, but one that was noticed immediately on my board... so I put this hack to this hack in there.

Though a better solution is desirable.

sensimilla
02-03-2005, 01:09 PM
and whats the use for it ? retrieving forgiven nickname? :p

buro9
02-03-2005, 09:12 PM
and whats the use for it ? retrieving forgiven nickname? :p
Look... if you haven't seen the bug, or experienced it... cool :)

But if you've seen it, and it nags you... then a workaround is above.

You don't have to use it.

buro9
02-17-2005, 07:35 PM
Look... if you haven't seen the bug, or experienced it... cool :)

But if you've seen it, and it nags you... then a workaround is above.

You don't have to use it.
Erwin! I've got it!

Could you update your hack?


// HACK : START : ME
global $post;
if ('' == $post[username]) {
global $reputation;
if ('' == $reputation[username]) {
global $pm;
if ('' == $pm[fromusername]) {
$meUsername = $bbuserinfo[username];
} else {
$meUsername = $pm[fromusername];
}
} else {
$meUsername = $reputation[username];
}
} else {
$meUsername = $post[username];
}
$bbcode = preg_replace('#^/me (.*)$#im', "<span class=\"postAction\">* $meUsername \\1 *</span>", $bbcode);
// HACK : END : ME


Note I've changed one thing regards the formatting that you might not want to change... I use a stylesheet for it so that I can use different colours according to style in use.

But it's the nested if's that is important... solves /me for PM's and reputation bits :)

Erwin
02-17-2005, 09:37 PM
Erwin! I've got it!

Could you update your hack?


// HACK : START : ME
global $post;
if ('' == $post[username]) {
global $reputation;
if ('' == $reputation[username]) {
global $pm;
if ('' == $pm[fromusername]) {
$meUsername = $bbuserinfo[username];
} else {
$meUsername = $pm[fromusername];
}
} else {
$meUsername = $reputation[username];
}
} else {
$meUsername = $post[username];
}
$bbcode = preg_replace('#^/me (.*)$#im', "<span class=\"postAction\">* $meUsername \\1 *</span>", $bbcode);
// HACK : END : ME


Note I've changed one thing regards the formatting that you might not want to change... I use a stylesheet for it so that I can use different colours according to style in use.

But it's the nested if's that is important... solves /me for PM's and reputation bits :)
Awesome! :) I sure will...

Erwin
02-17-2005, 09:40 PM
Looking at your code, I still need the newreply.php bit... I'll try this out tonight...

buro9
02-17-2005, 09:51 PM
Looking at your code, I still need the newreply.php bit... I'll try this out tonight...
It doesn't fix the edit bug!

It's just the lack of username in reputation comments and private messages.

I'll look at the edit one now though :)