Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
/me code Version 3 Details »»
/me code Version 3
Version: 3.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 01-04-2004 Last Update: Never Installs: 200
 
No support by the author.

Updated version 2.00 thanks to buro9!

Updated version 3.00 thanks to Edgewize!

New in version 3.00:
Correct parsing in quotes, private messages etc.

Okay, this is the famous /me code first created by Chen. All credits go to him. I'm just putting up instructions on how to do this in vB3. It's very easy.

Typing "/me is great!" gives you this:

* Erwin is great!


You make changes to THREE php files only.

1. Copy this piece of code:

Change "red" to whatever color you want.

PHP Code:
// /me hack
if (THIS_SCRIPT == 'newreply' && !isset($bbcode) && isset($pagetext))
        
$pagetext preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''$1* '.$postinfo['username'].' $3'$pagetext);
elseif (
THIS_SCRIPT == 'private' && !isset($bbcode) && isset($pagetext))
        
$pagetext preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''$1* '.$pm['fromusername'].' $3'$pagetext);
elseif (isset(
$bbcode) && $dobbcode && is_array($GLOBALS['post']))
        
$bbcode preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''$1* '.$GLOBALS['post']['username'].' $3'$bbcode);
elseif (isset(
$bbcode) && $dobbcode && $GLOBALS['previewpost'])
        
$bbcode preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''$1* '.$GLOBALS['bbuserinfo']['username'].' $3'$bbcode);
elseif (isset(
$bbcode) && $dobbcode && isset($GLOBALS['fromuserinfo']))
        
$bbcode preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim''$1* '.$GLOBALS['fromuserinfo']['username'].' $3'$bbcode);
// /me hack 
2. Open functions_bbcodeparse.php:

Find:

PHP Code:
// end smilies 
PASTE code copied BELOW.

3. Open newreply.php

Find:

In 3.0.6 or less:
PHP Code:
$pagetext trim(strip_quotes($pagetext)); 
In 3.0.7:
PHP Code:
$pagetext trim(htmlspecialchars_uni($pagetext)); 
PASTE code copied BELOW.

4. Lastly, open private.php

Find:

PHP Code:
$pagetext trim($pagetext); 
PASTE code copied BELOW.

Done!

Supporters / CoAuthors

Show Your Support

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

Comments
  #142  
Old 03-29-2004, 07:48 PM
masahiko's Avatar
masahiko masahiko is offline
 
Join Date: Mar 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
This doesn't seem to working when previewing a PM and doesn't work in the show_pm. It works great in the quote pm, though. Also, if I use other fonts for this, it doesn't seem to work. The link below will show you the testing thread for this.

http://www.bearfacts2.com/forums/showthread.php?t=437

Any idea how to fix the pm stuff and the different font stuff?
i updated my post with a fix for the pm previews.

i'm assuming that you're using font tags around the /me text. if you're using my code then it'll never work because the /me part isn't the first thing on the line. you'll have to use one of the preg changes i gave you erlier. i'm using my own hack verbatum so i'm not going to test that. if you do change it you'll have to watch for conflicts in the code thats being replaced. if you have one tag that changes the font inside another font tag, the inside one will take over.
Reply With Quote
  #143  
Old 03-31-2004, 08:04 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using that preg_replace you posted didn't fix it. It still doesn't work with other fonts for me. And it STILL doesn't work in the show_pm. When viewing a pm with the /me code, you see the /me code. It works great in preview mode and quoting a private message, but not viewing a private message from someone who has the /me code in it. Does that make any sense?
Reply With Quote
  #144  
Old 04-06-2004, 04:21 AM
kanezfan kanezfan is offline
 
Join Date: Oct 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

maybe i'm an idiot, but i'm trying to install this on vb3 gold and I when i use find on either dreamweaver or wordpad, i can't find
Code:
 $pagetext = trim(strip_quotes($pagetext));
in newreply.php. Am i retarded or can you tell me what line it's on? i think it's me though, because when i scroll down the file in Dreamweaver, if i search for just pagetext, it doesn't find it, but i can see the word pagetext right there in the file. it's pissing me off, but that's what you get for trying to install a hack at 1:30 in the morning.
Reply With Quote
  #145  
Old 04-09-2004, 02:36 AM
RixiuS RixiuS is offline
 
Join Date: Jul 2003
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what about newthread?
Reply With Quote
  #146  
Old 04-09-2004, 05:22 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 kanezfan
maybe i'm an idiot, but i'm trying to install this on vb3 gold and I when i use find on either dreamweaver or wordpad, i can't find
Code:
 $pagetext = trim(strip_quotes($pagetext));
in newreply.php. Am i retarded or can you tell me what line it's on? i think it's me though, because when i scroll down the file in Dreamweaver, if i search for just pagetext, it doesn't find it, but i can see the word pagetext right there in the file. it's pissing me off, but that's what you get for trying to install a hack at 1:30 in the morning.
You need to get a better editor. Try EditPlus 2.
Reply With Quote
  #147  
Old 04-10-2004, 05:12 AM
ChuanSE's Avatar
ChuanSE ChuanSE is offline
 
Join Date: Feb 2003
Posts: 311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hehehe Boofo, he should find it with notepad

But hey, the line has to be pasted without spaces at the end, etc...
Otherwise he says "can't find" indeed.
Reply With Quote
  #148  
Old 04-11-2004, 02:07 PM
Stray's Avatar
Stray Stray is offline
 
Join Date: Mar 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using the hack_me.php version and I was wondering how I'd go about making the text bold and putting another asterisk at the end of the phrase.
Reply With Quote
  #149  
Old 04-12-2004, 11:59 AM
BarHopper BarHopper is offline
 
Join Date: Mar 2003
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.game-realms.net/vb/showthread.php?p=11874#post11874" target="_blank">http://www.game-realms.net/vb/showth...1874#post11874</a>

how can i change the colour? The red doesnt really suit it at all.
Reply With Quote
  #150  
Old 04-13-2004, 05:16 AM
Synicide Synicide is offline
 
Join Date: Dec 2002
Location: Providence, RI
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BarHopper
http://www.game-realms.net/vb/showth...1874#post11874

how can i change the colour? The red doesnt really suit it at all.
Works perfectly. I love you all.

[high]* Synicide throws kisses to everybody.[/high]
Reply With Quote
  #151  
Old 04-14-2004, 01:26 AM
Edgewize Edgewize is offline
 
Join Date: Jan 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone is having trouble with my original hack_me.php version posted a few pages back, then I'm at a loss. It must be a conflict with another poorly written hack because all that my code does is insert code tags before and after the /me line, as if they were typed by the user himself. There is no way that vB tags can cause a post or a thread to just 'disappear' unless some custom change has been made to the bbcode parser.

For the record, the original hack_me version that I posted in this thread works fine for my vB 3.0 Gold sites.
Reply With Quote
Reply


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:20 PM.


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.05168 seconds
  • Memory Usage 2,334KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_php
  • (3)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
  • (2)pagenav_pagelinkrel
  • (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