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)

Admin 04-29-2002 10:00 PM

/me vB Code
 
Here's a another not-very-useful-yet-fun hack. ;)

It's very simple, it just mimics IRC's /me action. So if you type this:
/me runs fast
(note: it must be on its own line!)
It will become:
[high]* FireFly runs fast
[/high]
It parses this code in showthread.php and private.php, only.

After you install the hack, find this line in functions.php:
Code:

          $bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"{timecolor}\">* $post[username] \\1</font>", $bbcode);
And change {timecolor} to whatever color you want the line to be.

Forgot to mention, you must install this fix by smachol:
https://vborg.vbsupport.ru/showthrea...threadid=35894
For this hack to work! (thanks Kura for reminding me)

READ:
To fix the bug where users who quote other people get the /me tag messed up, replace this code in newreply.php:
Code:

    $pagetext = preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext);
With this:
Code:

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

Attached is the vbHacker install file, and a plain text file is in the next post.

Enjoy! :)

Admin 04-30-2002 10:38 AM

A text version of the installation file.

Webmasta XT 04-30-2002 10:42 AM

I don't get this hack, lol

NTLDR 04-30-2002 10:51 AM

Thanks FireFly!!

[high]* NTLDR thinks I will be installing when I get home :D[/high]

ForKmaN 04-30-2002 10:55 AM

CHAMPION! :)

[high]* ForKmaN installs[/high]

Bald Bouncer 04-30-2002 11:07 AM

/me considers the install

kinda fun!

Floris 04-30-2002 11:26 AM

[high]* Floris will install this later on :)
[/high]
Very nice FireFly, saved me the time to create it, since I have this on my ToDo list for a while already :P

DjSap 04-30-2002 11:31 AM

/me is the biggest pimp in the world...nice hack

Sparkz 04-30-2002 11:33 AM

Nice one. I was actually gonna do this one this evening, but I guess I can go grab some beers instead :p

Velocd 04-30-2002 11:34 AM

/me falls down *

Tungsten 04-30-2002 11:45 AM

[high]* Tungsten has been toying with this for a while now -- Firefly ROCKS! :D[/high]

Velocd 04-30-2002 12:07 PM

Can you make this color changeable with different styles. Cause I have more than 1 style, and yellow goes good with my dark style, but not my light style. Maybe add a place for it in the sytles/colors area of admin cp.

/me is surprised by Firefly's new avatar

Sparkz 04-30-2002 12:23 PM

it uses { timecolor} by default. You surely have ONE replacement-color that you can use in all your styles?

WallStreat 04-30-2002 12:35 PM

[high]* WallStreat is trying it :)[/high]

KuraFire 04-30-2002 01:01 PM

[high]* KuraFire thinks this rocks :)
[/high]

*installed*

N!ck 04-30-2002 01:27 PM

/me thinks it's already installed on vbulletin.org

Velocd 04-30-2002 01:54 PM

Quote:

Originally posted by Sparkz
it uses { timecolor} by default. You surely have ONE replacement-color that you can use in all your styles?
Thats odd, when I use { timecolor } it doesn't use the color I specified for my time color, it uses bright green (a default color usually assigned to a unassigned color value)

John 04-30-2002 02:06 PM

/me dances

snyx 04-30-2002 02:27 PM

/me likes toast

Admin 04-30-2002 02:32 PM

/me created a monster

Anyway, Velocd, use {timecolor} (i.e without the spaces around { and }).

KeithMcL 04-30-2002 03:09 PM

/me sees what going on now!

Chris M 04-30-2002 04:17 PM

/me likes this Hack!!!

This is great FireFly...

It is something all of our Members love to annoy each other with! Perfecto!

Satan

Neo 04-30-2002 06:58 PM

[high]* neo Likes Chens Avatar :p[/high]

CeleronXL 04-30-2002 07:04 PM

[high]* CeleronXL Installed.
[/high]

Works great. :p

Chris M 04-30-2002 08:26 PM

[high]* Chris M will install when he sees people stop using the /me hack...
[/high]

/me's alter-ego slaps hellsatan round the face...

[high]* Chris M decides to get right on it!:D
[/high]

Satan

JulianD 04-30-2002 10:03 PM

[high]* JulianD thinks this hack is fun as hell :p[/high]

Neo 04-30-2002 10:53 PM

/me knows this is already out of hand :\

DWZ 05-01-2002 12:41 AM

[high]* DWZ installs hack
[/high]

umm... I dont know if its my colors, but It looks bright green on my forums... anyway to change that?

http://www.consoleradar.com/forums/s...id=385#post385

EchoHype.com 05-01-2002 01:10 AM

/me Loves it =)

DWZ 05-01-2002 03:30 AM

Quote:

Originally posted by FireFly
[high]* DWZ runs fast
[/high]
I just noticed when you quote someone, it says the person quoting it is saying it...

TECK 05-01-2002 03:39 AM

Quote:

Originally posted by FireFly
[high]* nakkid runs fast
there is a little bug firefly, you can see it for yourself... the original / me code is replaced by my own name... ;)
[/high]
however is easy to fix it... do this:
find:
PHP Code:

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


replace it with:
PHP Code:

if ($dome) {
  global 
$post,$originalposter;
  
$bbcode preg_replace('#^/me (.*)$#im'"<font color=\"#FF9C58\">* $post[username] \\1</font>"$bbcode);
  if (
$bbcodeid==6) {
    
$bbcode preg_replace('#^/me (.*)$#im'"<font color=\"#FF9C58\">* $originalposter \\1</font>"$bbcode);
  }


ouuuupss i forgot a dollar.. ;) fixed.

TECK 05-01-2002 03:43 AM

this is wierd? why it shows large font in the post above?
Quote:

however is easy to fix it... do this:
find:
i never select it and when i look at "edit post", there is normal text in there.. hmmm...

DWZ 05-01-2002 03:57 AM

just tried that nakkid...

But it comes up like this on my forum:
Quote:

* DWZ 
When I edit the post, you know, see whats there, i see:
Code:

/me tests new hack
Link: http://www.consoleradar.com/forums/s...id=385#post385

Any ideas?

TECK 05-01-2002 04:06 AM

Code:

if ($dome) {
  global $post,$originalposter;
  $bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"#FF9C58\">* $post[username] \1</font>", $bbcode);
  if ($bbcodeid==6) {
    $bbcode = preg_replace('#^/me (.*)$#im', "<font color=\"#FF9C58\">* $originalposter \1</font>", $bbcode);
  }
}

it helps if i add a $.. lol. try it and let me know.

MarkG 05-01-2002 09:01 AM

nakkid, if it works on 2.2.5 it doesnt on 2.0.3

Mark Hewitt 05-01-2002 09:05 AM

[high]* Mark Hewitt slaps FireFly around a bit with a large trout :D[/high]

TECK 05-01-2002 09:08 AM

Quote:

Originally posted by MarkG
nakkid, if it works on 2.2.5 it doesnt on 2.0.3
hmm... i didnt try it, i went with the logic...
[high]* nakkid waits for firefly to hit him with the illogic bat... :)[/high]

Chris M 05-01-2002 09:20 AM

[high]* Chris M thinks that nakkid has a point, and awaits FireFly's repsonse...
[/high]

/me's alter-ego agrees wholeheartedly...

:D

I would say it would not, but if you do try it, make sure you backup the files you edit!

Satan

Admin 05-01-2002 10:08 AM

Ok, fixed the bug, see post #1 for the fix.
It invloves editing newreply.php, BTW. Nakkid, I'd love to tell you what's wrong but I really don't know what you tried to do with your code... what's that $bbcodeid variable?

DWZ 05-01-2002 10:32 AM

Quote:

Originally posted by FireFly
Ok, fixed the bug, see post #1 for the fix.
It invloves editing newreply.php,

great, that worked :D

thanks :)

EDIT: been having a look, and im finding that when someone replies, it will say the person who original said, did that thing, but all the color is gone... you follow? this is what i mean: http://www.consoleradar.com/forums/s...id=399#post399 the post above that is what i said to start off with...

Now, I also just tested PMs, its basically the reverse, I have the original problem with it saying the person who wrote the reply is doing the action, yet it is in color.


All times are GMT. The time now is 04:46 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.01540 seconds
  • Memory Usage 1,800KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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