Back to vBulletin 3.0 Add-Ons

/me code Version 3
Mod Version: 3.00, by Erwin

This modification is in the archives.
vB Version: 3.0.7 Rating: (1 vote - 5.00 average) Installs: 200
Released: 05 Jan 2004 Last Update: Never Downloads: 13
Not Supported  

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.

PHP Code:
// /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:

PHP Code:
// end smilies 
PASTE code copied BELOW.

3. Open newreply.php

Find:

In 3.0.6 or less:
PHP Code:
$pagetext trim(strip_quotes($pagetext)); 
In 3.0.7:
PHP Code:
$pagetext trim(htmlspecialchars_uni($pagetext)); 
PASTE code copied BELOW.

4. Lastly, open private.php

Find:

PHP Code:
$pagetext trim($pagetext); 
PASTE code copied BELOW.

Done!

Download

No files for download.

Supporters / CoAuthors

  • buro9
  • Edgewize

Similar Mods

BB Code Enhancements Spoiler BB code [Animation version] vBulletin 4.x Add-ons

vblts.ru supports vBulletin®, 2022-2024