vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   /me - irc feature (https://vborg.vbsupport.ru/showthread.php?t=93171)

Boofo 07-31-2005 11:32 AM

Quote:

Originally Posted by hellsatan
It's no good if you are trying to explain to someone how to use it though ;)

"Just type /me then your message on a new line" becomes "Just type * Chris Mthen your message on a new line" -.-

How does that explain how to use the code, for example?

Satan

Well, they should already know how to use it as much as it has been around, but I do see your point and think it should be the start of the line only. After experimenting with it, it just doesn't look right in the middle of a sentence.

Satan

Dean C 07-31-2005 11:41 AM

Chris is right. It should only work at the start of a new line IMO. That's how I'll develop it when I get some time this week. The main problem is evil nested quotes :p

Boofo 07-31-2005 11:41 AM

Quote:

Originally Posted by hellsatan
It is now replacing all instances of "/me text" with "* Chris Mtext" -.-

The other version ignored /me commands that were not at the start of the line :)

Fix :p

Satan

Here's what I came up with to work until Dean gets a chance to fix his:

HTML Code:

$mepattern = '#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim';
if(preg_match($mepattern, $this->post['message']))
{
 $this->post['message'] = preg_replace($mepattern, '<b><font color=red>* ' . $this->post['username'] . ' $3</font></b>', $this->post['message']);
}

I'm, sure his fix will be better than this, but this will get you through until then. ;)

Tested and working. ;)

Boofo 07-31-2005 11:55 AM

The only thing I found wrong with it is when you quote a message with it, /me shows up instead of the name of the person who wrote the original post. How do we fix that?

Chris M 07-31-2005 12:44 PM

Works perfectly Bob :)

Like you say, there is only the quote issue to work around now :)

Satan

Chris M 07-31-2005 12:53 PM

I believe there may be a way to solve it, but it will require a file edit to class_bbcode.php :(

PHP Code:

function handle_bbcode_quote($message$username ''

I believe we could use the replacement code here, and set a variable, something like "isquotedme" to true, and then in the plugin check for if "isquotedme" is true...

Might work...

Satan

Boofo 07-31-2005 01:04 PM

The problem almost has to be with this line. The old vb3 version used pagetext.

HTML Code:

$this->post['message'] = preg_replace($mepattern, '<b><font color=red>* ' . $this->post['username'] . ' $3</font></b>', $this->post['message']);

Chris M 07-31-2005 01:07 PM

Quote:

Originally Posted by Boofo
The problem almost has to be with this line. The old vb3 version used pagetext.

HTML Code:

$this->post['message'] = preg_replace($mepattern, '<b><font color=red>* ' . $this->post['username'] . ' $3</font></b>', $this->post['message']);

[high]$this->post['message'][/high] is a result of this function in class_postbit.php:

PHP Code:

function parse_bbcode()
{
$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], $this->forum['forumid'], $this->post['allowsmilie']);


:)

Satan

Dean C 07-31-2005 01:26 PM

I've got the quote thingy working, just need to play around with when a user has multiple /me's within their quote :)

Boofo 08-01-2005 12:32 AM

Quote:

Originally Posted by Dean C
I've got the quote thingy working, just need to play around with when a user has multiple /me's within their quote :)

Can we have what you have so far then? ;)


All times are GMT. The time now is 11:57 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.01331 seconds
  • Memory Usage 1,749KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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