Couple of comments Tubedogg, first when upgrading my board from version 2, I had to comment out the parts in step2 and step21 about deleting the tables, it would not run until I did this.
Second below for upgrades we have the bottom part of code installed not what you show. so you need to change that in your script. Lastly if it can be done we need to be able to use the vb code in this if possible. I have it upgraded and running after doing the above.
Your instructions for Misc.php replacement
PHP Code:
if ($action=="faq") {
$templatesused = ""; // Only one template used so load it when called
include("./global.php");
$page = intval($page);
if (!$page)
$page = '';
eval("dooutput(\"".gettemplate("faq$page")."\");");
}
[B] This is what is actually in a version 2 misc.php file so I replaced it all with what you said put in. [/B]
But we have this installed from Version 2 of the hack
PHP Code:
if ($action=="faq") {
$templatesused = ""; // Only one template used so load it when called
include("./global.php");
if(isset($page)){$sql = "WHERE faqid='$page'";}
$query = "SELECT faqid,title FROM faq $sql ORDER BY showorder";
$faqs=$DB_site->query($query);
while ($faq=$DB_site->fetch_array($faqs)) {
if (isset($page)){$title = " > <a href=\"misc.php?s=$session[sessionhash]&action=faq&page=$faq[faqid]\">$faq[title]</a>";}
$faqbody .= "<br>
<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#555576\" width=\"100%\" align=\"center\"><tr><td>
<table cellpadding=\"4\" cellspacing=\"1\" border=\"0\" width=\"100%\">
<tr id=\"cat\">
<td bgcolor=\"#606096\"><a href=\"misc.php?s=$session[sessionhash]&action=faq&page=$faq[faqid]\"><normalfont color=\"#FFF788\"><b>$faq[title]</b></normalfont></a></td>
</tr>
<tr>
<td bgcolor=\"#F1F1F1\"><normalfont>
<ul>";
$questions=$DB_site->query("SELECT entryid,title,faqid FROM faqentries WHERE faqid='$faq[faqid]' ORDER BY showorder");
while ($question=$DB_site->fetch_array($questions)) {
$faqbody .= "<li><a href=\"misc.php?s=$session[sessionhash]&action=faq&page=$question[faqid]#$question[entryid]\">$question[title]</a></li>\n";
}
$faqbody .= " </ul>
</normalfont></td>
</tr>
</table>
</td></tr></table>";
}
if (isset($page)) {
$entries=$DB_site->query("SELECT entryid,title,text FROM faqentries WHERE faqid='$page' ORDER BY showorder");
while($entry=$DB_site->fetch_array($entries)){
$faqbody .= "
<br>
<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#555576\" width=\"100%\" align=\"center\"><tr><td>
<table cellpadding=\"4\" cellspacing=\"1\" border=\"0\" width=\"100%\">
<tr>
<td bgcolor=\"#606096\" id=\"cat\"><normalfont color=\"#FFF788\"><b><a name=\"$entry[entryid]\"></a>
$entry[title]
</b></normalfont></td>
</tr>
<tr>
<td bgcolor=\"#F1F1F1\"><normalfont>
$entry[text]
</normalfont></td>
</tr>
</table>
</td></tr></table>";
}
}
eval("dooutput(\"".gettemplate("faq")."\");");
}