
03-06-2003, 09:09 PM
|
 |
|
|
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally posted by dnd
hi boofo
i mean the navbar which shows above the posts in showthrad.php
|
Here you go.
Quote:
For the forum navbar replacement:
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));
}
--------------------
In forumdisplay.php, find:
--------------------
eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";");
--------------------
ABOVE it add:
--------------------
if ($bbuserinfo[userid]>0) {
$thread[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $thread[title]);
$thread[description] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $thread[description]);
} else {
$thread[title] = preg_replace("/(\[)(you)(])/siU", "you", $thread[title]);
$thread[description] = preg_replace("/(\[)(you)(])/siU", "you", $thread[description]);
}
--------------------
Still in forumdisplay.php, find:
--------------------
eval("\$forumbits .= \"".gettemplate("forumdisplay_forumbit_level$depth $tempext")."\";");
--------------------
ABOVE it add:
--------------------
if ($bbuserinfo[userid]>0) {
$forum[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $forum[title]);
$forum[description] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $forum[description]);
} else {
$forum[title] = preg_replace("/(\[)(you)(])/siU", "you", $forum[title]);
$forum[description] = preg_replace("/(\[)(you)(])/siU", "you", $forum[description]);
}
--------------------
Still in forumdisplay.php (for the <title>), find:
--------------------
eval("dooutput(\"".gettemplate('forumdisplay')."\" );");
--------------------
ABOVE it add:
--------------------
if ($bbuserinfo[userid]>0) {
$foruminfo[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $foruminfo[title]);
} else {
$foruminfo[title] = preg_replace("/(\[)(you)(])/siU", "you", $foruminfo[title]);
}
|
|