我是疯子 我怕谁?

所有的东西都是乱弹和自己的技术积累和网络见闻

vbb3在iis下的存档功能hack

tcsm | 22 四月, 2005 00:03

IIS Archive Hack

NOTICE
: This hack doesn't fix the PDA part!  I didn't look into that part yet.
-----------------------------------------------------------------------------------------------
/
archive/global.php
-----------------------------------------------------------------------------------------------

Find:

// check to see if server is too busy. this is checked at the end of session.php
if ((!empty($servertoobusy) AND $bbuserinfo['usergroupid'] != 6) OR $vboptions['archiveenabled'] == 0 OR strpos(SAPI_NAME, 'apache') === false)
{
    
exec_header_redirect("$vboptions[bburl]/$vboptions[forumhome].php");
}

Remove:

OR
strpos(SAPI_NAME, 'apache') === false

Find
:
echo
"$indent<li><a href="f-$forumid.html">$forum[title]</a></li>n";

Replace:
echo
"$indent<li><a href="?f=$forumid">$forum[title]</a></li>n";

Find:

$navarray[] = "<a href="f-$forumid.html">" . $forumcache["$forumid"]['title'] . "</a>";

Replace:

$navarray[] = "<a href="?f=$forumid">" . $forumcache["$forumid"]['title'] . "</a>";


Find:
echo
"<a href="$link$i.html">$i</a>n";

Replace:
echo
"<a href="?$link$i">$i</a>n";



-----------------------------------------------------------------------------------------------
/
archive/index.php
-----------------------------------------------------------------------------------------------


Find and comment out:
if (
strpos($_SERVER['PHP_SELF'] , '/archive/index.php/') === false)
{
    
exec_header_redirect("$vboptions[bburl]/archive/index.php/");
}


Find:

else
{
    
$do = 'index';
}

Add After:

$f = $_GET['f'];
$t = $_GET['t'];
$p = $_GET['p'];

Find:

echo
"t<li><a href="t-$thread[threadid].html">$thread[title]</a>" . iif($pda, " <i>(" . construct_phrase($vbphrase['x_replies'], $thread['replycount']) . ")</i>") . "</li>n";

Replace:

echo
"t<li><a href="?t=$thread[threadid]">$thread[title]</a>" . iif($pda, " <i>(" . construct_phrase($vbphrase['x_replies'], $thread['replycount']) . ")</i>") . "</li>n";



Find: (This find may be out of order since I added it last)

print_archive_page_navigation($foruminfo['threadcount'], $vboptions['archive_threadsperpage'], "f-$foruminfo[forumid]-p-");

Replace:

print_archive_page_navigation($foruminfo['threadcount'], $vboptions['archive_threadsperpage'], "?f=$foruminfo[forumid]&p=");

评论

发表评论
 authimage
 
Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LifeType - Design by BalearWeb