Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
/me - irc feature Details »»
/me - irc feature
Version: 1.00, by Dean C Dean C is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 Beta 3 Rating:
Released: 07-29-2005 Last Update: 07-29-2005 Installs: 136
Uses Plugins
Is in Beta Stage  
No support by the author.

[/me - irc feature]

Information
  • [high]vBulletin Version:[/high] 3.5.x
  • [high]Author:[/high] Dean Clatworthy
  • [high]Copyright:[/high] You may use this modification at your own risk. I cannot and will not be held responsible for any damage you may cause to your forums during installation or thereafter. You may not distribute this modification in whole or parts and anyone found doing so faces risk of prosecution. All my modifications are released at vBulletin.org and anyone found releasing them elsewhere also faces risk of prosecution. You may not translate this modification without my prior permission.
  • [high]Donations:[/high] I release my modifications for free. If you wish to donate please contact me and I will give you my details. All donations are graciously appreciated.
What does this modification do?
This modification simply duplicates the /me feature of irc. It will replace "/me does this action" with "* username does this action".

Installation

1/

Upload the me-hack.xml file via the plugin uploader in the AdminCP

Please Click Install!
If you installed this modifcation please click the install button. It'll help you keep up to date with future releases and important bugfixes, security updates.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 10-04-2005, 08:11 PM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok here's a major overhaul of the /me command, this version rewrite the /me line to [action=username]text[/username]. This solution provides better cusomization and easier usage. Plus it also work in other plugins that parse bb code.

By default it forces a definition for [action] but you can simply override is by specifing it in the custom bbcode.
The default replacement is: <span style="font-weight: bold;">* {option} {param}</span>

This product also contains a few plugins postfixed with "(legacy support)" (disabled by default). This adds backwards compatibility for posts that only have the old "/me ..." stuff. However, the legacy code has a minor bug where "/me" is used inside a quote.

Also an entry for "/me" is added to the vbCode overview page.
Reply With Quote
  #83  
Old 10-04-2005, 09:04 PM
Moparx Moparx is offline
 
Join Date: Jul 2004
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

with legacy mode active im seeing stuff like this:

has a return after it:
* Moparx waves<br />

has a smilie next to it:
* Moparx starts up a fire pit. <img src="images/smilies/evil.gif" border="0" alt="" title="Evil" class="inlineimg" />
Reply With Quote
  #84  
Old 10-05-2005, 06:15 AM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah... figures.. ok here's a fix. Replace the content of the "/me main" plugin with:
Code:
if (!function_exists("bbcode_irc_me"))
{
  $bbcode_irc_me_parser = null;

  function bbcode_irc_me($username, $text)
  {
    global $bbcode_irc_me_parser, $vbulletin;
    if ($bbcode_irc_me_parser == null)
      $bbcode_irc_me_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());

    $mask = $bbcode_irc_me_parser->tag_list["option"]["action"]["html"];
    $res = str_replace(array("%2\$s", "%1\$s"), array($username, $text), $mask);
    return $res;
  }
}

$ircme_pattern = "/(^|\s)\/me ([^\r\n]+)/is";
the produced HTML however isn't validator valid, but shouldn't produce rendering issues.

or install the newer product .xml
Reply With Quote
  #85  
Old 10-05-2005, 06:30 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't this reg ex work just as well?

PHP Code:
 #^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim 
Reply With Quote
  #86  
Old 10-05-2005, 10:52 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by El_Muerte
ah... figures.. ok here's a fix. Replace the content of the "/me main" plugin with:
Code:
if (!function_exists("bbcode_irc_me"))
{
$bbcode_irc_me_parser = null;
 
function bbcode_irc_me($username, $text)
{
global $bbcode_irc_me_parser, $vbulletin;
if ($bbcode_irc_me_parser == null)
$bbcode_irc_me_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
 
$mask = $bbcode_irc_me_parser->tag_list["option"]["action"]["html"];
$res = str_replace(array("%2\$s", "%1\$s"), array($username, $text), $mask);
return $res;
}
}
 
$ircme_pattern = "/(^|\s)\/me ([^\r\n]+)/is";
the produced HTML however isn't validator valid, but shouldn't produce rendering issues.

or install the newer product .xml
How do we get it to show up in highlight or a certain color?

Also, how do we avoid this?

Quote:
The * Boofo hack is working now.
If /me comes after the first word, it shouldn't be parsed.
Reply With Quote
  #87  
Old 10-05-2005, 11:48 AM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to change the way the /me is displayed simply add the [action] vbcode tag.

for example the replacement:
HTML Code:
<span style="font-weight: bold; color: red;">* {option} {param}</span>
will make "/me does this" be displayed as:
* El_Muerte does this

in order for /me to only be replaced at the beginning of a line edit the "/me main" plugin to use the regex:
PHP Code:
$ircme_pattern "/(^|\n|\r)\/me ([^\r\n]+)/is"
or you could simply add to something like "the [noprase]/me[/noparse] doesn't work now"

wth, why does [ color=red]text[/color] make the text green?!
Reply With Quote
  #88  
Old 10-05-2005, 09:01 PM
Moparx Moparx is offline
 
Join Date: Jul 2004
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks again El_Muerte.
Your product is working perfectly
Reply With Quote
  #89  
Old 10-10-2005, 10:07 PM
Salazar's Avatar
Salazar Salazar is offline
 
Join Date: May 2003
Location: Austria
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doesn't work for me in 3.5.0

I uploaded the plugin but it doesn't do anything me text is still displayed as "/ me does something" (without space of course)

Any ideas? And yes, I activated the plugin.

EDIT: Nevermind, it works now
Reply With Quote
  #90  
Old 10-10-2005, 10:10 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Salazar -- You need to upload this as a product. Use the link from El_Muerte's post. I can confirm this is working on 3.5 Gold.

@ El_Muerte -- thanks, working like a charm in big, bold red. Question -- what are the disabled legacy support plugins for? Can those just be deleted?
Reply With Quote
  #91  
Old 10-11-2005, 12:29 AM
Moparx Moparx is offline
 
Join Date: Jul 2004
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you used previous /me hacks (say on 3.0.x) the legacy mode will allow them to be shown correctly
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:40 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04956 seconds
  • Memory Usage 2,313KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete