Hello,
A few month ago V@no helped me to organize my ACP when you add a lot of additional fields to your gallery.
I added a table separator between different sections. I do it like this:
Open admin_functions.php
Find:
function show_additional_fields($type = "image", $image_row = array(), $table = IMAGES_TEMP_TABLE, $i = 0) {
global $site_db, $lang;
$field_type_array = "additional_".$type."_fields";
global ${$field_type_array};
if (!empty(${$field_type_array})) {
$table_fields = $site_db->get_table_fields($table);
foreach (${$field_type_array} as $key => $val) {
if (!isset($table_fields[$key])) {
continue;
}
Add after:
if (in_array($key, array("user_extra_info")))
{
show_table_separator("user extra info");
}
It workt perfect till today. I encounter a problem:
What will happend if you have 2 additional fields for images and users with the same name? For example:
$additional_user_fields['user_extra_info'] = array($lang['user_extra_info'], "text", 0);
and
$additional_image_fields['user_extra_info'] = array($lang['user_extra_info'], "text", 0);
I believe you wil get the table seperator in images and users, but what about you don't want it in images? Only in users ACP.
How can we solve that?
Can we use something like:
if (in_array($key, user_row("user_extra_info")))
{
show_table_separator("user extra info");
}