The fix for
[HIGH]online.php[/HIGH] file, to display nice links, is below.
There are 2 methods, the easy or the hard way.
METHOD 1 (easy)
FIND:
Code:
$loc=preg_replace("/\?s=[a-z0-9]{32}(&)?/","?",$loc);
REPLACE WITH:
Code:
$loc=preg_replace("/\?s=[a-z0-9]{32}(&)?/","?",$loc);
$loc = preg_replace( '~archive/~' , 'forumdisplay.php?forumid=' , $loc );
$loc = preg_replace( '~forumdisplay/f-~' , 'forumdisplay.php?forumid=' , $loc );
$loc = preg_replace( '~showthread/t-~' , 'showthread.php?threadid=' , $loc );
$loc = preg_replace( '~-p-[0-9]~' , '' , $loc );
$loc = preg_replace( '~.html~' , '' , $loc );
METHOD 2 (cool way)
FIND:
Code:
case 'spider':
$userinfo[where] = "Search Engine Spider";
break;
REPLACE WITH:
Code:
case 'spider':
$userinfo[where] = "Search Engine Spider";
break;
case 'archive':
$userinfo[where] = "$bbtitle <b>Archive</b> <a href='archive/'>Main Index</a>";
break;
case 'archiveforumdisplay':
if (!$forum[forumid][$userinfo[forumid]] or (!$forum[canview][$userinfo[forumid]] and $hideprivateforums)) {
$userinfo[where] = "Viewing <b>Archive</b> Forum";
} else {
$userinfo[where] = "Viewing <b>Archive</b> Forum <a href='forumdisplay/f-$userinfo[forumid].html'>".$forum[forumid][$userinfo[forumid]]."</a>";
}
break;
case 'archiveshowthread':
if (!$thread[title][$userinfo[threadid]] or !$forum[canview][$thread[forumid][$userinfo[threadid]]] or (!$forum[canviewothers][$thread[forumid][$userinfo[threadid]]] and $thread[postuserid][$userinfo[threadid]] != $bbuserinfo[userid])) {
$userinfo[where] = "Viewing <b>Archive</b> Thread";
} else {
$userinfo[where] = "Viewing <b>Archive</b> Thread <a href='showthread/t-$userinfo[threadid].html'>".$thread[title][$userinfo[threadid]]."</a>";
}
break;
FIND:
Code:
$loc=preg_replace("/\?s=[a-z0-9]{32}(&)?/","?",$loc);
REPLACE WITH:
Code:
$loc=preg_replace("/\?s=[a-z0-9]{32}(&)?/","?",$loc);
$loc = preg_replace( '~archive/~' , 'archive.php' , $loc );
$loc = preg_replace( '~forumdisplay/f-~' , 'archiveforumdisplay.php?forumid=' , $loc );
$loc = preg_replace( '~showthread/t-~' , 'archiveshowthread.php?threadid=' , $loc );
$loc = preg_replace( '~-p-[0-9]~' , '' , $loc );
$loc = preg_replace( '~.html~' , '' , $loc );
FIND:
Code:
case '/robots.txt':
$userinfo[activity] = 'spider';
break;
REPLACE WITH:
Code:
case '/robots.txt':
$userinfo[activity] = 'spider';
break;
case 'archive.php':
$userinfo[activity] = 'archive';
break;
case 'archiveforumdisplay.php':
$blowup = explode('=', $token1);
$forumid = intval($blowup[1]);
$forumids .= ",$forumid";
$userinfo[activity] = 'archiveforumdisplay';
$userinfo[forumid] = $forumid;
break;
case 'archiveshowthread.php':
if (strstr($token1,'threadid')) {
$blowup = explode('=', $token1);
$threadid = intval($blowup[1]);
$threadids .= ",$threadid";
$userinfo[activity] = 'archiveshowthread';
$userinfo[threadid] = $threadid;
} else if (strstr($token2,'threadid')) {
$blowup = explode('=', $token2);
$threadid = intval($blowup[1]);
$threadids .= ",$threadid";
$userinfo[activity] = 'archiveshowthread';
$userinfo[threadid] = $threadid;
}
break;