This topic was marked solved by Nao, on October 19th, 2014, 12:39 AM
Member's List Custom Fields do not line up

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: Member's List Custom Fields do not line up
« Reply #15, on October 12th, 2014, 02:05 PM »
Quote from BurkeKnight on October 12th, 2014, 02:02 PM
Man... Look at your own screenshot!!!!

What I am saying is right there!

Look at where it says GitHub on the title bar, compared to where it shows your link in the member's line.
Take it easy will you i'm not asking for an custom field facebook of what ever option.

Re: Member's List Custom Fields do not line up
« Reply #16, on October 12th, 2014, 02:12 PM »
Quote from CerealGuy on October 12th, 2014, 02:02 PM
Look at your screenshot, the Titles/values are in the wrong order. Title is github, but field is online.
That is what I've been saying, but it seems that Freñçh does not notice it.

Does not matter what the field is, it does that on all.
If add more, they all have the titles before the Online title, yet all field values are after website.

Jurien

  • All i want is a couple days off
  • Posts: 132

Re: Member's List Custom Fields do not line up
« Reply #18, on October 12th, 2014, 02:23 PM »
My first screenshot showed same thing, just different field name and value...

I tried to go in and see if I could fix it, but the way it is coded, I have no idea how to fix it...LOL

Jurien

  • All i want is a couple days off
  • Posts: 132

Re: Member's List Custom Fields do not line up
« Reply #20, on October 12th, 2014, 03:01 PM »
If it was okay, we'd not be having this discussion... ;)

The custom fields are put in after that bit of code.
That is why I have been unable to figure out a fix.

core/app/Memberlist.php
Code: [Select]
// Set up the columns...
$context['columns'] = array(
'is_online' => array(
'label' => $txt['online_status'],
'width' => '60',
),
'name' => array(
'label' => $txt['username']
),
'email' => array(
'label' => $txt['email'],
'width' => '25'
),
'website' => array(
'label' => $txt['website'],
'width' => '70',
'link_with' => 'website',
),
'group' => array(
'label' => $txt['position']
),
'registered' => array(
'label' => $txt['date_registered']
),
'posts' => array(
'label' => $txt['posts'],
'width' => '115',
'colspan' => '2',
'default_sort_rev' => true,
)
);

$context['colspan'] = 0;
$context['disabled_fields'] = isset($settings['disabled_profile_fields']) ? array_flip(explode(',', $settings['disabled_profile_fields'])) : array();
foreach ($context['columns'] as $key => $column)
{
if (isset($context['disabled_fields'][$key]) || isset($column['link_with'], $context['disabled_fields'][$column['link_with']]))
{
unset($context['columns'][$key]);
continue;
}

$context['colspan'] += isset($column['colspan']) ? $column['colspan'] : 1;
}

// Are there any custom fields for the memberlist? (Ordering as per the member options code!)
$context['custom_fields'] = array();
$request = wesql::query('
SELECT col_name, field_name, can_see
FROM {db_prefix}custom_fields
WHERE show_mlist = {int:show_mlist}
ORDER BY position',
array(
'show_mlist' => 1,
)
);
while ($row = wesql::fetch_assoc($request))
{
$row['can_see'] = explode(',', $row['can_see']);
foreach ($row['can_see'] as $k => $v)
$row['can_see'][$k] = (int) $v;
if (!we::$is_admin && count(array_intersect($row['can_see'], we::$user['groups'])) == 0)
continue;

// We get this both for the main column list and for our own reference for later.
$context['custom_fields'][$row['col_name']] = array(
'label' => $row['field_name'],
'no_sort' => true,
);
$context['colspan']++;
}
if (!empty($context['custom_fields']))
$context['columns'] = array_insert($context['columns'], 'id_group', $context['custom_fields']);

add_linktree($txt['members_list'], '<URL>?action=mlist');

$context['can_send_pm'] = allowedTo('pm_send');

// Jump to the sub action.
if (isset($subActions[$context['listing_by']]))
$subActions[$context['listing_by']][1]();
else
$subActions['all'][1]();
}

// List all members, page by page.

core/html/Memberlist.template.php
Code: [Select]
// Display each of the column headers of the table.
foreach ($context['columns'] as $column)
{
// We're not able (through the template) to sort the search results right now...
if (isset($context['old_search']))
echo '
<th', isset($column['class']) ? ' class="' . $column['class'] . '"' : '', isset($column['width']) ? ' style="width: ' . $column['width'] . 'px"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>', $column['label'], '</th>';
// This is a selected column, so underline it or some such.
elseif ($column['selected'])
echo '
<th class="nowrap', isset($column['class']) ? ' ' . $column['class'] : '', '" style="width: auto"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . '><a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . ' <span class="sort_' . $context['sort_direction'] . '"></span></a></th>';
// This is just some column... show the link and be done with it.
else
echo '
<th', isset($column['class']) ? ' class="' . $column['class'] . '"' : '', isset($column['width']) ? ' style="width: ' . $column['width'] . 'px"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>', $column['link'], '</th>';
}
echo '
</tr>
</thead>
<tbody>';

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: Member's List Custom Fields do not line up
« Reply #21, on October 13th, 2014, 08:11 PM »Last edited on October 13th, 2014, 08:21 PM
Changed this line in Memberslist.php,not sure if this is really necessary ?
Code: [Select]
// Set up the columns...
$context['columns'] = array(
'is_online' => array(
'label' => $txt['online_status'],
'width' => '60',
                           'class' => 'first_th',   
Looks the way it should be when logged in as an regular member,but when logged in as an administrator it's been still mixed up :hmm:

 Ledenlijst.png - 23.76 kB, 928x132, viewed 78 times.


Re: Member's List Custom Fields do not line up
« Reply #22, on October 13th, 2014, 08:30 PM »
Well, what is there in what you posted, has nothing to do with the custom profile fields, but it is strange that you have 3 value areas that seem a bit out of sorts, color and shape wise.

However, I do not see any custom fields listed in that screenshot, so I can't tell if anything changed in that regard.

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: Member's List Custom Fields do not line up
« Reply #23, on October 15th, 2014, 03:17 PM »
Quote from BurkeKnight on October 13th, 2014, 08:30 PM
However, I do not see any custom fields listed in that screenshot, so I can't tell if anything changed in that regard.
Well it didn't,i quit searching and unticked the show on memberlist box,thus no custom fields on memberslist anymore.

Nao

  • Dadman with a boy
  • Posts: 16,078


Nao

  • Dadman with a boy
  • Posts: 16,078
Re: Member's List Custom Fields do not line up
« Reply #27, on October 18th, 2014, 11:32 PM »
Working here... Just tested with the 'Facebook' field.

Just in case you didn't notice, I was implying that the latest commit has the fix...

Jurien

  • All i want is a couple days off
  • Posts: 132