PHP Code:
SELECT @cid:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'FAQ Manager';
DELETE FROM configuration WHERE configuration_group_id = @cid;
DELETE FROM configuration_group WHERE configuration_group_id = @cid;
INSERT INTO configuration_group VALUES (NULL, 'FAQ Manager', 'Set FAQ Manager Options', '1', '1');
SET @cid=last_insert_id();
UPDATE configuration_group SET sort_order = @cid WHERE configuration_group_id = @cid;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES
(NULL, 'Admin - Configuration Group ID', 'FAQ_LISTS_GROUP_ID_ALL', @cid, '<br/>Warning: Only change this if your FAQs Group ID has changed from the default<br /><br/>What is the configuration_group_id for FAQ Listings?<br/>', @cid, 1, NOW(), NULL, NULL),
(NULL, 'Admin - Maximum FAQ Categories FAQs Display List', 'MAX_DISPLAY_RESULTS_FAQ_CATEGORIES', '10', '<br/>Number of FAQs to list per screen in the admin display<br/>', @cid, 1, NOW(), NULL, NULL),
(NULL, 'FAQ Info - Breadcrumb Status', 'DEFINE_FAQ_BREADCRUMB_STATUS', '1', '<br/>Show the breadcrumb on the FAQ info pages?<br/>', @cid, 9, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),'),
(NULL, 'FAQ Info - Breadcrumb Seperator', 'FAQ_BREAD_CRUMBS_SEPARATOR', ':', '<br/>Enter the separator symbol to appear between links on the FAQ breadcrumb<br/><br/>Note: Include spaces with the &nbsp; symbol if you want them part of the separator.<br /><br/>Default = &nbsp;::&nbsp;', @cid, 10, NOW(), NULL, 'zen_cfg_textarea_small('),
(NULL, 'FAQ Info - Prev/Next Navigation Bar Status', 'FAQ_INFO_PREVIOUS_NEXT_STATUS', '1', '<br/>Show the prev/next navigation bar on the FAQ info pages?<br/>', @cid, 11, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),'),
(NULL, 'FAQ Info - Prev/Next Navigation Bar Position', 'FAQ_INFO_PREVIOUS_NEXT_POSITION', '1', '<br/>Set the location of prev/next navigation bar on the FAQ info pages<br/>', @cid, 12, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'Top of Page\'), array(\'id\'=>\'2\', \'text\'=>\'Bottom of Page\'), array(\'id\'=>\'3\', \'text\'=>\'Both Top & Bottom of Page\')),'),
(NULL, 'FAQ Info - Prev/Next Sort Order', 'FAQ_INFO_PREVIOUS_NEXT_SORT', '1', '<br/>Sort order of prev/next navigation bar on the FAQ info pages<br/>', @cid, 13, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'1\', \'text\'=>\'FAQ Name\'), array(\'id\'=>\'2\', \'text\'=>\'FAQ Name DESC\'), array(\'id\'=>\'3\', \'text\'=>\'FAQ Sort Order, FAQ Category Sort Order\'), array(\'id\'=>\'4\', \'text\'=>\'FAQ Category Sort Order\'), array(\'id\'=>\'5\', \'text\'=>\'Date Added DESC, FAQs Name\'), array(\'id\'=>\'5\', \'text\'=>\'Date Added DESC, FAQs Name\'), array(\'id\'=>\'7\', \'text\'=>\'FAQs Sort Order\')),'),
(NULL, 'FAQ Info - Back Button Status', 'FAQ_INFO_BACK_BUTTON', '1', '<br/>Show the back button on the FAQ info pages?<br/>', @cid, 14, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),'),
(NULL, 'FAQ Index - Max Display', 'MAX_DISPLAY_FAQS_ALL', '20', '<br/>Number of FAQs to show on the main FAQ index page<br/>', @cid, 20, NOW(), NULL, NULL),
(NULL, 'FAQ Index - Default Sort Order', 'FAQ_SORT_DEFAULT', '3', '<br/>Sets the default FAQ sort order<br />', @cid, 22, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'1\', \'text\'=>\'FAQ Name A - Z\'), array(\'id\'=>\'2\', \'text\'=>\'FAQs Name Z - A\'), array(\'id\'=>\'3\', \'text\'=>\'Category Name with Admin Sort Order\'), array(\'id\'=>\'4\', \'text\'=>\'Admin Defined Sort Order\'), array(\'id\'=>\'6\', \'text\'=>\'Date Added Oldest First\'), array(\'id\'=>\'7\', \'text\'=>\'Date Added Newest First\')),'),
(NULL, 'FAQ Index - Display Sorter', 'FAQ_ALL_DISPLAY_SORT_ORDER', '1', '<br/>Show the FAQ sorter on the FAQ index page?<br/>', @cid, 23, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),'),
(NULL, 'FAQ Index - Prev/Next Navigation Bar Status', 'FAQ_INDEX_PREVIOUS_NEXT_STATUS', '1', '<br/>Show the prev/next navigation bar on the FAQ index page?<br/>', @cid, 24, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),'),
(NULL, 'FAQ Index - Prev/Next Navigation Bar Position', 'FAQ_INDEX_PREVIOUS_NEXT_POSITION', '1', '<br/>Set the location of prev/next navigation bar on the FAQ index page<br/>', @cid, 25, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'Top of Page\'), array(\'id\'=>\'2\', \'text\'=>\'Bottom of Page\'), array(\'id\'=>\'3\', \'text\'=>\'Both Top & Bottom of Page\')),'),
(NULL, 'FAQ Index - Show Featured FAQs', 'SHOW_FEATURED_FAQS_INDEX', '1', 'Show featured FAQs on the main FAQ index page?', @cid, 26, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),'),
(NULL, 'FAQ Index - Max Display Featured FAQs', 'MAX_DISPLAY_SEARCH_RESULTS_FEATURED_FAQ', '5', '<br/>Number of featured FAQs to show on the main FAQ index page<br/>', @cid, 27, NOW(), NULL, NULL),
(NULL, 'FAQ Category Box - Show Counter', 'SHOW_FAQ_COUNTS', 'true', '<br/>Count recursively how many products are in each category<br/><br/>default=true<br/>', @cid, 50, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),' ),
(NULL, 'FAQ Category Box - Count Prefix', 'FAQ_CATEGORIES_COUNT_PREFIX', ' (', '<br/>What do you want to prefix the FAQ count with?<br/><br/>Default= " ("<br/>', @cid, 51, NOW(), NULL, 'zen_cfg_textarea_small(' ),
(NULL, 'FAQ Category Box - Count Suffix', 'FAQ_CATEGORIES_COUNT_SUFFIX', ')', '<br/>What do you want as a suffix to the FAQ count?<br/><br/>Default= ")"<br/>', @cid, 52, NOW(), NULL, 'zen_cfg_textarea_small(' ),
(NULL, 'FAQ Category Box - Categories with 0 FAQs Status', 'FAQ_CATEGORIES_COUNT_ZERO', '1', '<br/>Show FAQ Count for categories with no active FAQs?<br/>', @cid, 53, NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text\'=>\'On\')),' ),
(NULL, 'Display FAQ Name', 'FAQ_ALL_LIST_NAME', '2101', 'Do you want to display the FAQ Name?<br /><br />0= off<br />1st digit Left or Right<br />2nd and 3rd digit Sort Order<br />4th digit number of breaks after<br />', @cid, 82, NOW(), NULL, NULL);
INSERT IGNORE INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configFAQManager','BOX_CATALOG_FAQ_MANAGER','FILENAME_FAQ_MANAGER',CONCAT('gID=',@cid),'extras','Y',@cid);
Then go to admin > tools > install sql patches, paste the code and hit send. This will add the new settings to your admin without removing any of the faqs and categories that you created.
Bookmarks