vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   /me vB Code (https://vborg.vbsupport.ru/showthread.php?t=38069)

PsYc 08-25-2002 04:18 PM

does anyone got that to work with the shoutbox from TWTCommish

when i tried it only shows

* is doing this and that

without my username

anyone who got a fix for that?

Darth Cow 08-26-2002 07:57 PM

[high]* Darth Cow just installed :)
[/high]

I did one little modification that you guys might be interested in. It allows there to be vBcode before the /me and for /me to still be processed. Change:

PHP Code:

$bbcode preg_replace('#^/me (.*)$#im'"<font color=\"{timecolor}\">* $post[username] \\1</font>"$bbcode); 

To:

PHP Code:

$bbcode preg_replace('#(^|\[.*\])/me (.*)$#im'"\\1<font color=\"{timecolor}\">* $post[username] \\2</font>"$bbcode); 

That's all :). Nice simple hack :cool:.

Boofo 08-26-2002 08:00 PM

Any way to have it so it will process code before it AND after it? :)

Darth Cow 08-26-2002 11:29 PM

Quote:

Originally posted by Boofo
Any way to have it so it will process code before it AND after it? :)
I believe it already does :)

Testing....

[high]* Darth Cow this part is bold
[/high]

Also, I've created another "add on" for this hack :D. This code fixes the problems that occur when someone quotes a post with /me in it.

In newreply.php find:

PHP Code:

$pagetext=$postinfo[pagetext]; 

Below it add:

PHP Code:

// fix /me when quoted
    
$pagetext preg_replace("#(^|\[.*\])/me (.*)$#im""\\\1[color=\"#FF9C58\"]* $postinfo[username] \\\2[/color]"$pagetext);
// end fix /me 


Boofo 08-26-2002 11:49 PM

Don't forget the private.php. :)

Darth Cow 08-27-2002 05:20 AM

Quote:

Originally posted by Boofo
Don't forget the private.php. :)
Of course - thanks for reminding me :).

In private.php, find:

PHP Code:

$fromuserinfo=getuserinfo($message['fromuserid']); 

Below that add:

PHP Code:

// fix /me when quoted
    
$message["message"] = preg_replace("#(^|\[.*\])/me (.*)$#im""\\1[color=\"#FF9C58\"]* $fromuserinfo[username] \\2[/color]"$message["message"]);
// end fix /me 

Also, please note that I used the matching code for /me to what I had several posts above. This is matching it to /me when it follows just vBcode as well - it shouldn't cause much trouble just installing this part of the hack though :).

Boofo 08-27-2002 05:26 AM

No problem. :)

PsYc 08-27-2002 09:52 AM

mh how about the shoutbox do you have a fix for that too?

i posted it above your posts

meteore 08-27-2002 09:42 PM

is there a mean to makes it work with the quick reply box ?

NTLDR 08-27-2002 09:44 PM

Quote:

Originally posted by meteore
is there a mean to makes it work with the quick reply box ?
It should already work with the QRB, theres no reason I can see why it wouldn't.


All times are GMT. The time now is 09:09 PM.

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.01206 seconds
  • Memory Usage 1,747KB
  • 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
  • (6)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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