sabret00the
01-26-2003, 04:27 AM
i'm sure for a coder of any more experience than myself this is a peice of :p but for me i've stumbled, basically i'm trying to make the online.php say "Viewing Journal of {username} but i've stumbled, i tried to adapt apfeifer "Show Who's Profile User is Viewing in Who's Online" hack to accomodate my needs, but upon testing realised i just didn't do anything, help me please, someone!!! :)
Open online.php and find
global $thread, $post, $forum, $event, $gotforum, $hideprivateforums, $bbuserinfo, $timeformat, $enableemail, $enablepms, $bbtitle, $usergroupdef, $numberguests;
just before the semi-colon add
, $DB_site;
Now find
case 'gallery':
$userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>";
break;
and directly below it add
case 'journal':
$userid = explode("=", $userinfo[location]);
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid'");
$username=$DB_site->fetch_array($username);
if (!$username[username]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing journal of <a href='journal.php?journalid=$userid&action=view&s=$session[sessionhash]'>$username[username]</a>";
}
break;
Now find
case 'gallery.php':
$userinfo[activity] = 'gallery';
break;
and directly below it add
case 'journal.php':
$userinfo[activity] = 'gallery';
break;
Save, Close and upload ;)
Open online.php and find
global $thread, $post, $forum, $event, $gotforum, $hideprivateforums, $bbuserinfo, $timeformat, $enableemail, $enablepms, $bbtitle, $usergroupdef, $numberguests;
just before the semi-colon add
, $DB_site;
Now find
case 'gallery':
$userinfo[where] = "Viewing Picture <a href='gallery.php?s=$session[sessionhash]'>Gallery</a>";
break;
and directly below it add
case 'journal':
$userid = explode("=", $userinfo[location]);
$username=$DB_site->query("SELECT username FROM user WHERE userid='$userid'");
$username=$DB_site->fetch_array($username);
if (!$username[username]) {
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
} else {
$userinfo[where] = "Viewing journal of <a href='journal.php?journalid=$userid&action=view&s=$session[sessionhash]'>$username[username]</a>";
}
break;
Now find
case 'gallery.php':
$userinfo[activity] = 'gallery';
break;
and directly below it add
case 'journal.php':
$userinfo[activity] = 'gallery';
break;
Save, Close and upload ;)