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
/you, /me, /youid, /myid Hack Details »»
/you, /me, /youid, /myid Hack
Version: 1.4.2, by Deaths Deaths is offline
Developer Last Online: Mar 2009 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-12-2005 Last Update: 04-12-2005 Installs: 36
 
No support by the author.

1.4.2 has been released! Upgrade if /youid and /meid arent working!


To upgrade, just cut (not copy) the youid part above the /you part, and it'll work

This is a hack adds the following BB codes:


"/you" is replaced by the Username viewing the thread*
"/me" is replaced by the thread/post creator*
"/youid" is replaced by the UserID of the user viewing the thread.
"/myid" is replaced by the UserID of the poster of the post.

"/you is great!" Turns into:

Username is great!

"/me" is great!" Turns into:

"Deaths is great!"

"http://www.vbulletin.org/user.php?u=/youid" Turns into:

"http://www.vbulletin.org/user.php?u=123".

"http://www.vbulletin.org/register.php?refferer=/myid" Turns into:

"http://www.vbulletin.org/register.php?refferer=567".

Here are the instructions:
Optionally, you may follow the instructions in install.txt.
Both this post and the .txt file contain the exact same information.

Open includes/functions_bbcodeparse.php:

Find:
PHP Code:
$bbcode str_replace(array('>|||)''<|||)''"|||)'), array('>)''<)','")'), $bbcode); 
    } 
// end smilies 
Below, add:
PHP Code:
// /youid hack by Deaths (Apprentice) | http://www.xgnews.org
global $bbuserinfo;
                
$bbcode str_replace("/youid","" .$bbuserinfo['userid']. "",$bbcode);
// End /youid hack 
Below that, add:

PHP Code:
// /meid hack by Deaths (Apprentice) | http://www.xgnews.org 
  
global $post
  if (
'' == $post[userid]) { 
    global 
$reputation
    if (
'' == $reputation[userid]) { 
      global 
$pm
      if (
'' == $pm[fromuserid]) { 
        
$meUserid $bbuserinfo[userid]; 
      } else { 
        
$meUserid $pm[fromuserid]; 
      } 
    } else { 
      
$meUserid $reputation[userid]; 
    } 
  } else { 
    
$meUserid $post[userid]; 
  } 
  
$bbcode str_replace('/meid',"$meUserid"$bbcode); 
// End /meid hack 
Below that, add:

PHP Code:
// /you hack by Deaths (Apprentice) | http://www.xgnews.org
global $bbuserinfo
                
$bbcode str_replace("/you","<font color=\"#2DA72E\"><i>" .$bbuserinfo['username']. "</i></font> ",$bbcode);
// End /you hack 
Finally, below that, add:

PHP Code:
// /me hack by Deaths (Apprentice) | http://www.xgnews.org
// /me Hack
  
global $post;
  if (
'' == $post[username]) {
    global 
$reputation;
    if (
'' == $reputation[username]) {
      global 
$pm;
      if (
'' == $pm[fromusername]) {
        
$meUsername $bbuserinfo[username];
      } else {
        
$meUsername $pm[fromusername];
      }
    } else {
      
$meUsername $reputation[username];
    }
  } else {
    
$meUsername $post[username];
  }
  
$bbcode preg_replace('#^/me (.*)$#im'"<font color=\"red\">* $meUsername \\1 *</font>"$bbcode);  

// End /me hack 
Now, open newreply.php
Find:
PHP Code:
$pagetext trim(strip_quotes($pagetext)); 
Below, add:
PHP Code:
// /me Hack
$pagetext preg_replace('#^/me(.*)$#im'"[color=\"red\"]* $originalposter\\1[/color]"$pagetext);
// /me Hack 
This is my first publicly released hack, so it might be posible that I made a little mistake somewhere in the code, even though, - and maybe because - it is a very simple hack. If so, please post here, heh.

Hope you like it!

*I'm almost positive these hacks have already been released before, even though I couldn't find them.
I did not copy any code from anyone.
However, if you released this hack before I did, and wish to have the /you and /me hacks removed, please contact me by PM.

Supporters / CoAuthors

Show Your Support

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

Comments
  #62  
Old 08-20-2005, 12:09 AM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this conflicts with vBChat hack.

later
sonic
Reply With Quote
  #63  
Old 10-16-2005, 11:30 PM
Club3G Club3G is offline
 
Join Date: Aug 2004
Location: Orlando, Fl
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sonic3d
this conflicts with vBChat hack.

later
sonic
I'll expand on what he's saying here.

The hack works just fine on my forums, but in vbChat, any time someone IN the chat uses /me, it shows the name of whoever's logged in.

So if I were do a:
[high]* Club3G wishes the chat would work
[/high]

I'd see:
Chris wishes the chat would work

Bob would see:
Bob wishes the chat would work

Bill would see:
Bill wishes the chat would work

etc. Is there a way to only enable this within posts? Or, alternatively, disable it in other places?

Thanks much!
Reply With Quote
  #64  
Old 03-31-2007, 11:56 AM
rungok's Avatar
rungok rungok is offline
 
Join Date: Mar 2007
Location: Oslo
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone know how to make this work in v3.6.5? Please... I'm in a hurry. Just hours left....
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 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04785 seconds
  • Memory Usage 2,265KB
  • Queries Executed 19 (?)
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
  • (7)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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