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)

Dean C 08-01-2005 10:38 AM

You can see how I'm testing it and see if you can get anywhere:

PHP Code:

    $msg 
    
'
    [quote=DeanC]
    adsfasd
[high]    * Dean C tesats [/high]
    lala
    [quote=Bob]
[high]    * Dean C testss again [/high]
    [/quote]
    asdfadsf
    [/quote]
    
[high]    * Dean C RAWRs [/high]
    '
;
    
$mepattern '#[\r\n\t]+(/me[\s]{1}([^\r\n]+))#i';
    
preg_match_all($mepattern$msg$matchess);
    foreach(
$matchess[1] AS $mekey => $mematch)
    {
        
$pattern str_replace(' ''[\s]{1}'$mematch);
        
$pattern str_replace('/me''\/me'$pattern);
        if(
preg_match('#\[quote=(.*?)\].*' $pattern '.*\[\/quote]#ims'$msg$finalmatches))
        {
            
$user $finalmatches[1];
        }
        else
        {
            
$user 'User';
        }
        
$msg str_replace($mematch'<b>* ' $user ' ' $matchess[2]["$mekey"] . '</b>'$msg);
        unset(
$pattern$finalmatches);
    }    
    echo 
nl2br($msg); 


Christine 08-04-2005 12:47 AM

Thanks for working on this one, Dean. Was a favorite for our members. :)

Am ready to test as soon as you have something you want us to try!

Roxie 08-06-2005 01:30 AM

when my members post links that have http://me in it - such as http://members.com - it replaces with their name - http://usernamembers.com

ThePimp 08-09-2005 05:15 AM

I'm not sure if this has been posted yet, but, I found an issue using this plugin... When posting a link to http://www.yoursite.com/member.php?u=123455

The /me in the URL gets parsed as BBCode.

It was breaking some links on my site. Just a note for you to maybe look into.

GrendelKhan{TSU 08-09-2005 06:51 AM

installed RC 1 :D thx!

Boofo 08-09-2005 09:16 AM

Dean, are you ever going to fix this, buddy? ;)

Gizmo5h1t3 08-09-2005 09:29 PM

working fine on RC2 here

Boofo 08-09-2005 09:38 PM

Quote:

Originally Posted by Gizmo5h1t3
working fine on RC2 here

Try quoting it. ;)

Andreas 08-09-2005 10:12 PM

An idea for the Quote Issue:
Hook: bbcode_create
PHP Code:

$this->tag_list['option']['quote']['callback'] = 'handle_external';
$this->tag_list['option']['quote']['external_callback'] = 'me_quote_handler';
$this->tag_list['no_option']['quote']['callback'] = 'handle_external';
$this->tag_list['no_option']['quote']['external_callback'] = 'me_quote_handler';

if (!
function_exists('me_quote_handler'))
{
    function 
me_quote_handler(&$parser$message$username)
    {
        if (
$username)
        {
            
$message preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''<b><font color=red>* ' $username ' $3</font></b>'$message);
        }
        else
        {
            
$message preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''& #47;me $3'$message);
        }
        return 
$parser->handle_bbcode_quote($message$username);
    }



Boofo 08-09-2005 10:21 PM

Take the other code out or use this with it?


All times are GMT. The time now is 07:52 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.01321 seconds
  • Memory Usage 1,756KB
  • 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
  • (2)bbcode_php_printable
  • (1)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