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)

Erwin 10-16-2002 01:46 AM

Quote:

Originally posted by kill yourself
how would you make it bold..

so it would say

* kill yourself blah blah blah
but in bold.

In functions.php, find:

PHP Code:

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

Replace with:

PHP Code:

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

As simple as that.

FleaBag 10-29-2002 07:31 PM

Installed and working on 2.2.8. :)

Larry@IOG 10-29-2002 09:33 PM

Thansk works great on 2.2.8 one question though how would I make the me text bold?

Larry

Larry@IOG 10-29-2002 09:33 PM

Sorry I yes how to get bold now LOL Should have looked

Larry

JonP 11-09-2002 07:05 AM

I got the problem with the green as well, I just edited the time color posted above to the actual color I wanted.

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

Natch 11-13-2002 03:45 AM

/me loves it !

/me this this thread was VERY hard to find!

luvjeffrey 12-11-2002 03:44 PM

/me Installed

Silenced Soul 12-12-2002 04:36 PM

[high]* Silenced Soul installs this hack :D[/high]

Diva 12-15-2002 11:25 PM

/me does the happy dance

Thank you, FireFly... AGAIN!

S@NL - Pascal 12-27-2002 01:01 PM

Did anybody see that "/me" is not translated in any way if I look at the topic review when I do a post reply ?

I solved this by adding this code in newreply.php :
(I use the vBcode style [me=user] [/me] solution)

find in newreply.php :
PHP Code:

  $threadreviewbits '';
  while (
$post=$DB_site->fetch_array($posts)) {
    if (
$postcounter++ < $maxposts) { 

after this add :

PHP Code:

$post[pagetext] = preg_replace('#^/me(.*)$#im'"[me=$post[username]]\\1[/me]"$post[pagetext]); 

One other thing : I have a user with a ' in his name : B'Ram. The vBcode parser failes when [me=B'Ram] is used. How can this be solved ?

Logik 12-31-2002 06:15 PM

/me loves fireflys brilliance

:bandit: FireFly. How long have you been involved with PHP?

CookieGirl 01-29-2003 07:33 AM

I had to change the call to bbcodeparse() in showthread.php too. I didn't see that edit in the .txt file, but hey, it works, and I love it!

For those who are not getting it to work: just add ',1' to the parameters of the function call.

pugmy 02-04-2003 05:43 PM

/me tests it.

formerEVO? 02-17-2003 06:41 PM

/me scratched head

it doesnt work for me...i'm using 2.3.0 and most of the edited parts of adminfunctions are gone...HELP!

andyrose 02-24-2003 05:17 AM

[high]* andyrose installed this hack on 2.2.9 at www.neomega.net/forum, and it works great.[/high]

Kriek 03-02-2003 08:58 PM

It's working on 2.2.6 for me (Administrator), but NOT for my users.

Xyphen 03-04-2003 01:18 AM

/me says it works perfectly fine on vB2.3.0 and Thanks Chen!

Dan 03-06-2003 09:28 PM

/me clicks installs and loves it.

Great hack!

Seby 03-29-2003 08:27 AM

I installed it on 2.3.0 RC1 and it doesnt work :(

http://www.cscentral.com/forums/show...750#post179750

Boofo 03-30-2003 08:55 AM

Quote:

12-27-02 at 09:01 AM S@NL - Pascal said this in Post #170
Did anybody see that "/me" is not translated in any way if I look at the topic review when I do a post reply ?

I solved this by adding this code in newreply.php :
(I use the vBcode style [me=user] [/me] solution)

find in newreply.php :
PHP Code:

  $threadreviewbits '';
  while (
$post=$DB_site->fetch_array($posts)) {
    if (
$postcounter++ < $maxposts) { 

after this add :

PHP Code:

$post[pagetext] = preg_replace('#^/me(.*)$#im'"[me=$post[username]]\\1[/me]"$post[pagetext]); 

One other thing : I have a user with a ' in his name : B'Ram. The vBcode parser failes when [me=B'Ram] is used. How can this be solved ?

You need to add this instead of what you have there.

PHP Code:

$reviewmessage bbcodeparse($post[pagetext],$threadinfo[forumid],$post[allowsmilie],1); 

I have a member that has an apostrophe in their name and it works fine for me. The line you are using for the me code is all wrong. This is what it is supposed to be. There should be no me= in there.

PHP Code:

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


Oblivion Knight 04-11-2003 03:23 PM

Thanks FireFly :)
Working with no troubles at all on 2.3.0 RC3..

[high]* Oblivion Knight clicks install.[/high]

Synicide 04-17-2003 10:20 PM

installed and working on 2.3 :D

Legendary Kid 04-22-2003 01:47 AM

Nice

[high]* Legendary Kid clicks instaLL ;)[/high]

kdog316 04-24-2003 03:52 PM

i get this erorr after installing everything and trying to access my forum

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/kdog316/public_html/forums/admin/functions.php on line 925

Fatal error: Call to undefined function: vbsetcookie() in /home/kdog316/public_html/forums/admin/sessions.php on line 205

kdog316 04-24-2003 05:38 PM

i got it to work but it still gives me the green gross color what do i put in timecolor do i put yellow or #ffff33

padblaz 05-23-2003 06:47 AM

[high]* padblaz loves this hack
[/high]
[high]* padblaz thanks you for it :)[/high]

ogden2k 06-02-2003 02:22 PM

[quote]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);
                       
                       

               


This is what I ahve in newrepy:
Code:

$postdate=vbdate($dateformat,$postinfo[dateline]);
    $posttime=vbdate($timeformat,$postinfo[dateline]);
    $pagetext=$postinfo[pagetext];
    $pagetext = trim(preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext));
    eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
           
  }
}

How do I add the code fix? Also, how do I fix the preview view?

ogden2k 06-02-2003 04:32 PM

Actually, I got it fixed. Thanks anyways! ;)

Intex 06-03-2003 08:21 PM

Nice hack Firefly - thanks :cool:.

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

007 06-04-2003 04:31 AM

When making a new reply if you scroll down and read the past posts, it still shows

/me

and does not convert those phrases... Would it be possible to do this?

Boofo 06-04-2003 05:29 AM

In newreply.php, try adding this:

PHP Code:

$pagetext trim(preg_replace('#(^|\[.*\])/me (.*)$#im'"\\1[COLOR=\"yellow\"]* $originalposter \\2[/COLOR]"$pagetext)); 

right above this:

PHP Code:

eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";"); 


gmarik 06-04-2003 06:02 AM

Clicking all the way down: install it!
Chen, respect!

Salazar 06-06-2003 07:02 AM

Thank you FireFly!

It works perfectly with my 2.3.0

Salazar

Boofo 06-06-2003 07:20 AM

Quote:

06-04-03 at 12:31 AM 006 said this in Post #190
When making a new reply if you scroll down and read the past posts, it still shows

* 006

and does not convert those phrases... Would it be possible to do this?

Did the above code work for you?

007 06-06-2003 07:29 AM

No it didn't work Boofo, but it's not a big deal. :) Thanks though. :)

Boofo 06-06-2003 07:56 AM

Sorry to hear that. That is the same code I use and it works fine for me.

Mystic XL 06-07-2003 05:17 AM

k, i installed it, and now hwne I try to PM people (private.php) I get a blank page.

Mystic XL 06-08-2003 12:18 PM

any help???????

otacon 06-09-2003 07:15 PM

/me hates installing stuff but will install this thing.

Kriek 06-22-2003 11:50 PM

Unquestionably works a great deal better on 2.3.0 than 2.2.6

/me clicks install -- again


All times are GMT. The time now is 04:53 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.01810 seconds
  • Memory Usage 1,814KB
  • 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
  • (3)bbcode_code_printable
  • (10)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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