If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Zen Cart Code Suggestions / Admin configuration values, show name of constant in the title

Admin configuration values, show name of constant in the title

Started by torvista on 18 Dec 2016, 1:53 PM · Views: 57

Results 1 to 4 of 4
18 Dec 2016, 1:53 PM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Admin configuration values, show name of constant in the title

Suggestion
I find a pop-up/title on the value more convenient than pasting the description into a search field in the Developers Tool Kit.
In admin/configuration.php I added a title

<td class="dataTableContent"><?php echo htmlspecialchars($cfgValue, ENT_COMPAT, CHARSET, TRUE); ?></td>

to

<td class="dataTableContent" title="<?php echo $configuration->fields['configuration_key']; //mod added key ?>"><?php echo htmlspecialchars($cfgValue, ENT_COMPAT, CHARSET, TRUE); ?></td>

and for overkill, in the info boxes

$heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

to

$heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b> ' . $cInfo->configuration_key);//mod added key

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Dec 2016, 4:32 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Admin configuration values, show name of constant in the title

Here's a built-in way:

  1. Do a quick search on this key: ADMIN_CONFIGURATION_KEY_ON in Dev Toolkit, and set it to 1 (default is 0).

  2. Now anytime you're looking in the Configuration menu, the key you're looking at will display in the title of the right-hand sidebar (infoboxes).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Dec 2016, 9:18 AM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Admin configuration values, show name of constant in the title

Do a quick search on this key: ADMIN_CONFIGURATION_KEY_ON in Dev Toolkit, and set it to 1 (default is 0).

I found the result of the search to be not editable.
I needed to manually enter the gID=6 in the url to get to this option:
https://www.shop.com/ADMIN_FOLDER/configuration.php?gID=6

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Dec 2016, 1:33 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Admin configuration values, show name of constant in the title

That's because gID=6 (Modules) is registered to "not display on the menus".