Loving this extension. However, I’m getting duplicate entries in the drop down list - lists the same name 10 times for each member. Anyone else got this problem?
Yes, I get 5. Incidently I have 5 sites in my MSM install. Maybe an issue with MSM?
LG Member List works fine, but I would prefer to use as Field Frame Matrix a la NG Member List.
Loving this extension. However, I’m getting duplicate entries in the drop down list - lists the same name 10 times for each member. Anyone else got this problem?Yes, I get 5. Incidently I have 5 sites in my MSM install. Maybe an issue with MSM? LG Member List works fine, but I would prefer to use as Field Frame Matrix a la NG Member List.
Ah yes, it’ll be an MSM issue as by no coincidence I have 10 sites…
To fix the Multisite Manager issues there’s a simple fix.
Add “$PREFS” to the list of globals (around line 118)
http://labs.nakedgremlin.com/ee/ng_member_list/
function _display_field($field_name, $field_data, $field_settings) {
global $IN, $DSP, $LANG, $DB, $FNS, $PREFS;And add some to the SQL that selects specific to the current site. (around line 150) $sql .= ’ AND site_id = ‘.$PREFS->ini(‘site_id’).” “;
$sql .= ' WHERE '.$this->db_prefix.'_members.member_id ';
// add the site line below. .
$sql .= ' AND site_id = '.$PREFS->ini('site_id')." ";
$sql .= $FNS->sql_andor_string($ids, 'group_id', $this->db_prefix.'_members');Very handy extension NG, thanks. I was experiencing weirdness with LG Member List and FieldFrame so switched to this instead. I’m using Matrix so admins can add/remove multiple members (rows) to an entry. All good except on my template where all I can seem to output is one member, me! Here’s the code for my Matrix custom field…
<ul>
{my_custom_matrix_field}
{exp:query sql="SELECT member_id, group_id, screen_name, email FROM exp_members WHERE member_id={my_col_name}"}
<li{switch='| class="alt"'}><a href="mailto:{email}">{screen_name}</a></li>
{/exp:query}
{/my_custom_matrix_field}
</ul>If there are two rows/members in my entry, the template just outputs my screen name twice, ignoring the member_id passed into my query. Any ideas?
You might try changing the sql query to spit out something that isn’t named the exact same thing as EE tags.
{exp:query sql="SELECT member_id, group_id, screen_name, email AS custom_member_id, custom_group_id, custom_screen_name, custom_email FROM exp_members WHERE member_id={my_col_name}"}
<li{switch='| class="alt"'}><a href="mailto:{custom_email}">{custom_screen_name}</a></li>Thanks Chris, but I’m getting an error…
MySQL ERROR:
Error Number: 1054
Description: Unknown column 'custom_group_id' in 'field list'
Query: SELECT member_id, group_id, screen_name, email AS custom_member_id, custom_group_id, custom_screen_name, custom_email FROM exp_members WHERE member_id=3I’m not an SQL guy, so any pointers much appreciated.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.