Thread: FAQ Edit v3
View Single Post
  #4  
Old 09-09-2001, 10:52 AM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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")."\");");

}
[
BThis 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 " &gt; <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")."\");");

Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01905 seconds
  • Memory Usage 1,808KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete