Back to vBulletin 3.0 Add-Ons

/you, /me, /youid, /myid Hack
Mod Version: 1.4.2, by Deaths

This modification is in the archives.
vB Version: 3.0.7 Rating: (1 vote - 5.00 average) Installs: 36
Released: 13 Feb 2005 Last Update: 13 Apr 2005 Downloads: 7
Not Supported  

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.

Download

This modification is archived and cannot be downloaded.

Supporters / CoAuthors

  • buro9

Similar Mods

Spam Killer Hack v1.0 (includes Lesane's Store Hack Addon) vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024