vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   /me code Version 3 (https://vborg.vbsupport.ru/showthread.php?t=59698)

Erwin 01-04-2004 10:00 PM

/me code Version 3
 
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! ;)

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!

[high]* MGM clicks install
[/high]

MGM out

SnowBot 01-05-2004 02:21 AM

nice little mod, thanks fella :)

Koutaru 01-05-2004 02:35 AM

[high]* Koutaru clicks install.
[/high]

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

[high]* Exero clicks install
[/high]
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.


All times are GMT. The time now is 03:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01190 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete