First install the standard FAQ add-on as :
FAQ for Mantis(pbia@engineer.com)
=================================

Files affected
config_faq.php			New
css_faq.php			New
faq_add.php			New
faq_add_page.php		New
faq_delete.php			New
faq_delete_page.php		New
faq_edit_page.php		New
faq_menu_page.php		New & Modified
faq_update.php			New
faq_view_page.php		New & modified
custom_strings_inc.php		Modified
//4 FAQ option
$s_menu_faq_link = "FAQ";
$s_add_fqa = "Add a new FAQ";
$s_add_faq_title = "New FAQ";
$s_post_faq_button = "Post FAQ";
$s_question = "Question";
$s_answere = "Answere";
$s_delete_faq_sure_msg = "Are you sure you wish to delete this FAQ item? ";
$s_delete_faq_item_button = "Delete FAQ item";
$s_edit_faq_title = "Edit FAQ";
$s_update_faq_button = "Update FAQ";




Required setting(s) within config_inc.php :
	require( dirname( __FILE__ ).DIRECTORY_SEPARATOR."config_faq.php" );


SQL
CREATE TABLE mantis_faq_table (
id int(7) unsigned zerofill NOT NULL auto_increment,
project_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL,
poster_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL,
date_posted datetime DEFAULT '1970-01-01 00:00:01' NOT NULL,
last_modified datetime DEFAULT '1970-01-01 00:00:01' NOT NULL,
question varchar(255) NOT NULL,
answere text NOT NULL,
PRIMARY KEY (id),
KEY id (id),
KEY headline (question),
KEY project_id (project_id),
KEY date_posted (date_posted)
);


Now to be able to promote a bug/issue to FAQ do the following

Insert the following code into :
bug_view_page.php
bug_view_adcanced_page.php
just before <!-- Advanced View (if enabled) --> or <!-- Simple View (if enabled) -->




<?php // NUY.INFO
if ( config_get( 'faq_import')==ON) {
            if ( config_get( 'faq_project')== OFF) {
                        $proj_id = 0 ;
            } else{
                        $proj_id = $t_bug->project_id ;
            }

            $what_faq = config_get( 'faq_solution');
            if ( $what_faq == 1) {
                        $answer = $t_bug->description ;
            }
            if ( $what_faq == 2) {
                        $answer = $t_bug->additional_information ;
            }
            if ( $what_faq == 3) {
                        $answer  = $t_bug->description ;
                        $answer .= " " ;
                        $answer .= $t_bug->additional_information ;
            }
?>

<span class="small">
<?php print_bracket_link( 'faq_add.php?question=' . bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) .'&answere='.$answer .'&project_id='.$proj_id, lang_get( 'import_faq' ) )?>
</span>
<?php
 }
// NUY.INFO
?>


 
Add the following entries to config_faq.php
===========================================
# promote issue to FAQ
$g_faq_import = ON ;

# level is set here
# $g_faq_project = OFF => for all projects
# $g_faq_project = ON => for project issue belongs to
$g_faq_project                           = ON ;

# define resolution
# $g_faq_solution = 1 => Use description field
# $g_faq_solution = 2 => Use Additional information field
# $g_faq_solution = 3 => concatenate both
$g_faq_solution                          = 3 ;

Add the following entries to custom_strings_inc.php
===================================================
$s_import_faq = "Promote to FAQ";

