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
  #12  
Old 02-19-2005, 12:31 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, yoyoyo, I know
Reply With Quote
  #13  
Old 02-19-2005, 12:48 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks buro9, added it
Reply With Quote
  #14  
Old 03-01-2005, 02:39 PM
MicroLinux? MicroLinux? is offline
 
Join Date: Feb 2005
Location: Southeast, PA
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm.. is there any reason why this would work when it wants? Like sometimes it works, other times it doesnt.. Sometimes it displays /me sometimes it displays that poster's id... sometimes it displays /you others it says the user's id whose looking at it.. Seems.... weird :/
Reply With Quote
  #15  
Old 03-01-2005, 02:45 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should work like it should...

Your board is currently offline so I can't test it there, but it should work just fine...

If you can't find out if it works, send me a PM, and I'll look at it.
Reply With Quote
  #16  
Old 03-01-2005, 04:15 PM
MicroLinux? MicroLinux? is offline
 
Join Date: Feb 2005
Location: Southeast, PA
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its online now... go check it out.. plz
Reply With Quote
  #17  
Old 03-02-2005, 10:45 AM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's still offline for me...
Reply With Quote
  #18  
Old 03-12-2005, 10:00 AM
kcadd kcadd is offline
 
Join Date: Jan 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me installs...
Reply With Quote
  #19  
Old 03-13-2005, 09:51 AM
zell_11 zell_11 is offline
 
Join Date: Dec 2004
Location: Edinburgh- Scotland
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
// /meid hack by Deaths (Apprentice) | [url]http://www.xgnews.org[/url]
// /me Hack
  
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 preg_replace('#^/me (.*)$#im'"$meUserid"$bbcode);
// /me Hack

// End /meid hack 
Should be

PHP Code:
// /meid hack by Deaths (Apprentice) | http://www.xgnews.org
// /me Hack
  
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 preg_replace('#^/meid (.*)$#im',"<font color=\"red\">* $meUserid \\1 *</font>"$bbcode);
// /me Hack

// End /meid hack 
As the poster username and posters id both had /me as the bbcode

Hope this fixes the problems for people

after sorting it i noticed it wouldn't print the rest of the message so i sorted that aswell
Reply With Quote
  #20  
Old 03-13-2005, 02:34 PM
Deaths Deaths is offline
 
Join Date: Oct 2004
Location: Europe, Belgium
Posts: 679
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for pointing that out zell_11!

I'm suprised no-one noticed it before(including me ^^), and I apoligise for the late update (was on holliday).
Reply With Quote
  #21  
Old 03-14-2005, 11:34 AM
shungo shungo is offline
 
Join Date: Nov 2002
Location: France
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If i use the hack, the text color is not like the rest of the post... how to resolve this pls ?
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:44 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.07627 seconds
  • Memory Usage 2,347KB
  • 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
  • (9)bbcode_php
  • (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
  • (3)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