PDA

View Full Version : Adding Configuration group to admin menu?



fluccs
11-13-2011, 04:48 AM
Im trying to integrate the newsdesk module into a new 2.5 store and have ran into one bizzare issue that i cant explain...

I have added the text to the core to identify the new configuration group:


define('BOX_CONFIGURATION_NEWSDESK', 'NewsDesk');
define('BOX_CONFIGURATION_NEWSDESK_LISTING', 'Listing Settings');
define('BOX_CONFIGURATION_NEWSDESK_FRONTPAGE', 'Frontpage Settings');
define('BOX_CONFIGURATION_NEWSDESK_REVIEWS', 'Reviews Settings');
define('BOX_CONFIGURATION_NEWSDESK_STICKY', 'Sticky Settings');

I have added the jqmenu lines to the configuration.php file:


tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK, BOX_CONFIGURATION_NEWSDESK, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_L ISTING, BOX_CONFIGURATION_NEWSDESK_LISTING, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_F RONTPAGE, BOX_CONFIGURATION_NEWSDESK_FRONTPAGE, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_R EVIEWS, BOX_CONFIGURATION_NEWSDESK_REVIEWS, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_S TICKY, BOX_CONFIGURATION_NEWSDESK_STICKY, 'TOP') .
'</ul>' .

to filenames.php i have added the links to the configuration groups:


define('FILENAME_CONFIGURATION_NEWSDESK_LISTING', FILENAME_CONFIGURATION . '?gID=7576');
define('FILENAME_CONFIGURATION_NEWSDESK_FRONTPAGE' , FILENAME_CONFIGURATION . '?gID=7577');
define('FILENAME_CONFIGURATION_NEWSDESK_REVIEWS', FILENAME_CONFIGURATION . '?gID=7578');
define('FILENAME_CONFIGURATION_NEWSDESK_STICKY', FILENAME_CONFIGURATION . '?gID=7579');


foe some reason however i cannot get the menu to display the menu option within the configuration menu

Ive checked the database and the group is enabled and the same in the admin files, its allowed yet still no joy it refuses to show.

Have i missed something else that needs to be adjusted?

pgmarshall
11-13-2011, 09:05 AM
Have you added the new box in admin/includes/menu.php?

Regards.

fluccs
11-13-2011, 01:30 PM
Its not actually a new box im entering though?

Its just options to add into the configuration.php dropdown menu

pgmarshall
11-14-2011, 12:50 AM
That should work then! Best to double check that you have enabled the menu and items for display in admin files (I know you said you had done this but double check).Try viewing the source of the admin page and see if there is any of the code turning up - or anything in full caps in the source.Check you have put the defines in the correct filenames.php file (ie. the one in admin).Otherwise PM me a login to your admin and I will take a look to see if I can spot anything obvious.Regards.

fluccs
11-14-2011, 01:23 AM
Ok thanks for your advise i can see the code of the newsgroup sub section groups is showing up in the code but not displaying in the menu. it seems like the top level of this option isnt showing and thats where the issue may lie?

the jqmenu lines in configuration.php must be wrong

currently its:


$contents = ( tep_admin_jqmenu(FILENAME_CONFIGURATION_GENERAL_SE TTINGS, BOX_CONFIGURATION_GENERAL_SETTINGS, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_GENERAL_SE TTINGS, BOX_CONFIGURATION_MYSTORE, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_MIN_VALUES , BOX_CONFIGURATION_MIN_VALUES, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_MAX_VALUES , BOX_CONFIGURATION_MAX_VALUES, 'TOP') .
'</ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_IMAGES, BOX_CONFIGURATION_IMAGES, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_IMAGES, BOX_CONFIGURATION_IMAGES, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_MOPICS, BOX_CONFIGURATION_MOPICS, 'TOP') .
'</ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_CUSTOMER_D ETAILS, BOX_CONFIGURATION_CUSTOMER_DETAILS, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_SHIPPING, BOX_CONFIGURATION_SHIPPING, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_PRODUCT_LI STING, BOX_CONFIGURATION_PRODUCT_SETTINGS, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_PRODUCT_LI STING, BOX_CONFIGURATION_PRODUCT_LISTING, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_PRODUCT_IN FO, BOX_CONFIGURATION_PRODUCT_INFO, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_PRODUCT_PR ICE_BREAKS, BOX_CONFIGURATION_PRODUCT_PRICE_BREAKS, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_STOCK, BOX_CONFIGURATION_STOCK, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_DOWNLOAD, BOX_CONFIGURATION_DOWNLOAD, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_PRINT, BOX_CONFIGURATION_PRINT, 'TOP') .
'</ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_EMAIL, BOX_CONFIGURATION_EMAIL, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_MC, BOX_CONFIGURATION_MC, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_WYSIWYG, BOX_CONFIGURATION_WYSIWYG, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_TEMPLATES, BOX_CONFIGURATION_TEMPLATES, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_TEMPLATES, BOX_CONFIGURATION_TEMPLATE_SETUP, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_PAGE_MODUL ES, BOX_CONFIGURATION_PAGE_MODULES, 'TOP') .
tep_admin_jqmenu(FILENAME_HEADING_BOXES, BOX_HEADING_BOXES, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_INFO_PAGES , BOX_CONFIGURATION_INFO_PAGES, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_WELCOME, BOX_CONFIGURATION_WELCOME, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_OFS, BOX_CONFIGURATION_OFS, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_OPC, BOX_CONFIGURATION_OPC, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_SLIDESHOW, BOX_CONFIGURATION_SLIDESHOW, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_SLIDESHOW, BOX_CONFIGURATION_SLIDESHOW_SETTINGS, 'TOP') .
tep_admin_jqmenu(FILENAME_SLIDESHOW, BOX_TOOLS_SLIDESHOW, 'TOP') .
'</ul></li>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_CORNER_BAN NERS, BOX_CONFIGURATION_CORNER_BANNERS, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_CONTACT, BOX_CONFIGURATION_CONTACT, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_RECAPTCHA, BOX_CONFIGURATION_RECAPTCHA, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NOTIFICATI ONS, BOX_CONFIGURATION_NOTIFICATIONS, 'TOP') .
'</ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_WISHLIST, BOX_CONFIGURATION_WISHLIST, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_AFFILIATE, BOX_CONFIGURATION_AFFILIATE, 'TOP') .
tep_admin_jqmenu(FILENAME_TOOLS_RECOVER_CART, BOX_TOOLS_RECOVER_CART, 'TOP') .
tep_admin_jqmenu(FILENAME_ARTICLES_CONFIG, BOX_ARTICLES_CONFIG, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK, BOX_CONFIGURATION_NEWSDESK, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_L ISTING, BOX_CONFIGURATION_NEWSDESK_LISTING, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_F RONTPAGE, BOX_CONFIGURATION_NEWSDESK_FRONTPAGE, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_R EVIEWS, BOX_CONFIGURATION_NEWSDESK_REVIEWS, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_NEWSDESK_S TICKY, BOX_CONFIGURATION_NEWSDESK_STICKY, 'TOP') .
'</ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_SEO_URLS, BOX_CONFIGURATION_SEO, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_SEO_URLS, BOX_CONFIGURATION_SEO, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_SEO_POPOUT , BOX_CONFIGURATION_SEO_POPOUT, 'TOP') .
'</ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_EDITOR, BOX_CONFIGURATION_EDITOR, 'TOP') .
tep_admin_jqmenu(FILENAME_CONFIGURATION_GOOGLE_ANA LYTICS, BOX_CONFIGURATION_GOOGLE, 'TOP', 'submenu') . '<ul>' .
tep_admin_jqmenu(FILENAME_CONFIGURATION_GOOGLE_ANA LYTICS, BOX_CONFIGURATION_GOOGLE_ANALYTICS, 'TOP') .
tep_admin_jqmenu(FILENAME_GOOGLE_SITEMAP, BOX_CONFIGURATION_GOOGLE_SITEMAP, 'TOP') .
'<li><a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=89', 'NONSSL') . '">' . BOX_CONFIGURATION_GOOGLE_MAPS . '</a></li>' .
'</ul>');

i suspect something is wrong with the listings as the Articles Management menu option shows and then the next one to display in the top level of the configuration menu is SEO URL's

i just see where the problem in the string is however?

fluccs
11-14-2011, 01:32 AM
ahh bingo found the issue... he top level of the newsdesk menu wasnt listed in filenames.php

thanks for helping point me in the right direction with this...

pgmarshall
11-14-2011, 03:38 AM
No problem ... glad you got it fixed.