Quote:
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]);
}