
03-29-2004, 09:19 AM
|
 |
|
|
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by masahiko
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:
PHP Code:
// ********************* PARSE BBCODE TAGS ***************************
ABOVE, ADD:
PHP Code:
// /me Hack
global $post;
$bbcode = preg_replace('#^/me (.*)$#im', "<div><span class=\"highlight\">* $post[username] \\1</span></div>", $bbcode);
// /me Hack
newreply.php
Find:
PHP Code:
$pagetext = trim(strip_quotes($pagetext));
UNDERNEATH, ADD:
PHP Code:
// /me Hack
$pagetext = preg_replace('#^/me(.*)$#im', "[highlight]* $originalposter\\1[/highlight]", $pagetext);
// /me Hack
private.php
Find:
PHP Code:
// quote reply
$originalposter = fetch_quote_username($pm['fromusername']);
UNDERNEATH, ADD:
PHP Code:
// /me Hack
$pm['message'] = preg_replace('#^/me(.*)$#im', "[highlight]* $originalposter\\1[/highlight]", $pm['message']);
// /me Hack
Find:
PHP Code:
$pm['message'] = parse_pm_bbcode($pm['message'], $pm['allowsmilie']);
ABOVE IT, ADD:
PHP Code:
// /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?
|