Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: BurkeKnight on October 11th, 2014, 05:37 PM

Title: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 11th, 2014, 05:37 PM
Member's List Custom Fields title and data do not line up.

(http://bkd.pw/Misc/MemberList.png)
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 09:03 AM
Where did you get this,it's not data from Wedge !!....Something must went wrong when you importing SMF data into Wedge 
I see something completely different (manage members)

 :edit: Should mention that I have done a clean install of Wedge
 
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 12th, 2014, 12:22 PM
Did you miss the word Custom?
Meaning custom profile fields...

For some odd reason, when have custom profile fields show in memberlist, that happens.

So no, it is not info from before I converted, nor did anything go wrong during the conversion. ;)
And yes, I had already thought that, and double checked on a test site....LOL
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 12:47 PM
Quote from BurkeKnight on October 12th, 2014, 12:22 PM
For some odd reason, when have custom profile fields show in memberlist, that happens.
:hmm: How are you doing this,can not mimicking this.
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 12th, 2014, 12:57 PM
Fresh install, set up a custom profile field, have it check marked to show on memberlist. (Yes, you can use one of the templates, it does it to them, too)
Then go view the forum memberlist.
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 01:05 PM
I'm sorry but really do not know what you mean,could you take a screenshot of the custom profile settings.
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 12th, 2014, 01:09 PM
Okay, lets try this again...

Go to Admin Panel.
Under Members -> Member Options -> Profile Fields

Add Profile Field.

Use one of the templates.

Make sure the box for show on memberlist is checked.

Save.

Go look at the memberlist, not the Admin panel one, but the main one.
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 01:14 PM
I know how to add an extra profile field  Github profile field into profile(http://wedge.org/pub/off/8685/create-and-add-a-github-profile-field-into-profile/msg296342/#msg296342)
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 12th, 2014, 01:20 PM
Okay, but have you made sure it is set to show on memberlist, then go look at the memberlist?

(http://bkd.pw/Misc/Edit_Profile_Field.png)
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 01:28 PM
You main the Facebook plugin template ??
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 12th, 2014, 01:30 PM
No.. I said Custom Profile Field, not plugin.

When add custom profile fields, you can select from templates.
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 12th, 2014, 01:51 PM
I just set up another test site, nothing done to it, except to add the same custom profile field, and getting same results.
I have since set permissions, so guests can see the memberlist:

http://www.bkdevelopment.cc.nf/index.php?action=mlist
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 01:56 PM
I'm sorry but without using your creation (had to login as a regulier member) i get an completely different members list then what's being showing by you in the first place.So i still do not get your point.
Title: Re: Member's List Custom Fields do not line up
Post by: 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.
Title: Re: Member's List Custom Fields do not line up
Post by: CerealGuy on October 12th, 2014, 02:02 PM
Quote from Freñçh on October 12th, 2014, 01:56 PM
I'm sorry but without using your creation (had to login as a regulier member) i get an completely different members list then what's being showing by you in the first place.So i still do not get your point.
Look at your screenshot, the Titles/values are in the wrong order. Title is github, but field is online.
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien 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.
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight 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.
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 02:21 PM
I'm sorry I was referring to your first screenshot,i see now what you main and you're right i just not saw it directly
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight 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
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 12th, 2014, 02:35 PM
Memberlist seems to be okay to me ?
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight 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>';
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 13th, 2014, 08:11 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:

Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight 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.
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien 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.
Title: Re: Member's List Custom Fields do not line up
Post by: Nao on October 18th, 2014, 08:27 PM
Lemme have a look at this topic now...
Posted: October 18th, 2014, 08:21 PM

Can you confirm fixed..?
Title: Re: Member's List Custom Fields do not line up
Post by: BurkeKnight on October 18th, 2014, 09:50 PM
Fixed? No, not fixed...
Unless not showing custom fields is a "fix"... ;)
Title: Re: Member's List Custom Fields do not line up
Post by: Nao on October 18th, 2014, 11:05 PM
AFAIK my only mistake was in forgetting to rename id_group to group in one line..?
Title: Re: Member's List Custom Fields do not line up
Post by: Nao 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...
Title: Re: Member's List Custom Fields do not line up
Post by: Jurien on October 19th, 2014, 12:21 AM
Great confirm fixed :cool: