Version: 1.00, by Mutt
Developer Last Online: Mar 2013
Version: 2.2.x
Rating:
Released: 02-27-2003
Last Update: Never
Installs: 38
No support by the author.
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=38069&highlight=vbcode" target="_blank">Inspired by FireFly's /me vB Code</a>
When reading the /me hack thread I started laughing at the idea of a [you] tag. This isn't much of a hack, but it was fun. Put [you] in the thread and it is replaced by the person's name who is reading the thread. if it is a guest, [you] is simply replace by the word you.
I had to change this to a text file to avoid problems. Should be fine now
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Hey Boofo, I think dnd means that in a thread, at the top, it doesn't display the username but instead [you], look at the picture below to see what I mean. Ignore the big title part of it
Yesterday at 10:46 PM MetalGearMaster said this in Post #63 Hey Boofo, I think dnd means that in a thread, at the top, it doesn't display the username but instead [you], look at the picture below to see what I mean. Ignore the big title part of it
MGM out
You have to add it to the navbar and the thread title in the showthread.php. Try the following and let me know if that takes care of it.
Code:
For the forum navbar replacement:
Still in functions.php, find:
-------------------
function makenav($id,$idtype="forum",$highlightlast=1) {
global $DB_site,$nav_url,$nav_title,$session,$threadcache;
-------------------
REPLACE it with:
--------------------
function makenav($id,$idtype="forum",$highlightlast=1) {
global $DB_site,$nav_url,$nav_title,$session,$threadcache,$bbuserinfo;
-------------------
Find:
-------------------
$nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
$nav_title=$foruminfo[title];
-------------------
AFTER it add:
--------------------
if ($bbuserinfo['userid']>0) {
$nav_title = trim(preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $nav_title));
} else {
$nav_title = trim(preg_replace("/(\[)(you)(])/siU", "you", $nav_title));
}
-------------------
For the forumjump replacement:
Still in functions.php, find:
-------------------
if (!$hideprivateforums) {
$forumperms['canview']=1;
}
--------------------
ABOVE it add:
--------------------
if ($bbuserinfo[userid]>0) {
$forum[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $forum[title]);
} else {
$forum[title] = preg_replace("/(\[)(you)(])/siU", "you", $forum[title]);
}
--------------------
In showthread.php (for <title>):
Find:
--------------------
eval("dooutput(\"".gettemplate("showthread")."\");");
--------------------
ABOVE it add:
--------------------
if ($bbuserinfo[userid]>0) {
$thread[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $thread[title]);
} else {
$thread[title] = preg_replace("/(\[)(you)(])/siU", "you", $thread[title]);
}