Estaba viendo que la ventana pop up que me abre la banderita, en la lista, donde dice "Agregar a (USUARIO) a tu lista de amigos" figura en todos el mismo nombre que el que está primero en la lista y no segun a cada uno, mire el código pero no se que cambiar del plugin.
Alguno tiene idea?
Código:
// <a href="javascript:;" onClick="MyBB.popupWindow('misc.php?action=hmflags&cnam=$post[fid1]&pf=1', 'hmflags', 450, 500);"><img src="images/pais/$post[fid1].png" alt="$post[fid1]" title="$post[fid1]" width="50" height="45"></a>
if($post["fid".$cppid.""])
{
$post['bandera'].= "<br /><a href=\"javascript:;\" onclick=\"MyBB.popupWindow('misc.php?action=hmflags&cnam={$post["fid".$cppid.""]}&pf={$cppid}', 'hmflags', 490, 500);\"><img src=\"{$mybb->settings['bburl']}/images/pais/{$post["fid".$cppid.""]}.png\" alt=\"{$post["fid".$cppid.""]}\" title=\"{$post["fid".$cppid.""]}\" width=\"50\" height=\"45\">";
}
}
function hmflags_page()
{
Global $mybb, $db, $lang, $theme, $headerinclude;
$lang->load("hmflags");
if($_GET['action']=="hmflags")
{
if($_GET['order'])
{
if($_GET['order']=="username")
{
$selord=" selected=\"selected\"";
}
elseif($_GET['order']=="postnum")
{
$selord2=" selected=\"selected\"";
}
if($_GET['ad'])
{
if($_GET['ad']=="desc")
{
$selad=" selected=\"selected\"";
}
}
$orderby="ORDER BY ".$_GET['order']." ".$_GET['ad']."";
}
$consulta=$db->query("SELECT * FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (u.usergroup=g.gid) LEFT JOIN ".TABLE_PREFIX."userfields f ON (u.uid=f.ufid) WHERE fid".$_GET['pf']."='".$_GET['cnam']."' ".$orderby."");
$num=$db->num_rows($consulta);
while ($userlist=$db->fetch_array($consulta))
{
if($userlist['image'])
{
if(!empty($mybb->user['language']))
{
$language = $mybb->user['language'];
}
else
{
$language = $mybb->settings['bblanguage'];
}
$userlist['image'] = str_replace("{lang}", $language, $userlist['image']);
$userlist['image'] = str_replace("{theme}", $theme['imgdir'], $userlist['image']);
$userlist['image'] ="<img src=\"{$userlist['image']}\" alt=\"{$userlist['usertitle']}\" title=\"{$userlist['usertitle']}\"><br />";
}
if($userlist['postnum'] >= 1)
{
$searchpost="<br />(<a href='{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$userlist['uid']}' target='_blank' title='{$lang->sthread}'>{$lang->sthread}</a> - <a href='{$mybb->settings['bburl']}/search.php?action=finduser&uid={$userlist['uid']}' target='_blank' title='{$lang->spost}'>{$lang->spost}</a>)";
}
else
{
$searchpost=null;
}
if($userlist['usertitle'])
{
$userlist['usertitle'].="<br />";
}
$lang->add_contact = $lang->sprintf($lang->add_contact, $userlist[username]);
$users['username'] = format_name($userlist['username'], $userlist['usergroup'], $userlist['displaygroup']);
$users['profilelink'] = build_profile_link($users['username'], $userlist['uid']);
$lista.="<tr><td class=\"trow1\" align=\"center\"><img src=\"{$userlist['avatar']}\" title=\"{$lang->avatar_title} {$userlist[username]}\" alt=\"\" width=\"80\" height=\"80\"></td>
<td class=\"trow1\" align=\"left\" valign=\"top\"></b>{$users['profilelink']}</b><br />
{$userlist['usertitle']}
{$userlist['image']}
<span class=\"smalltext\">
<a href=\"{$mybb->settings['bburl']}/private.php?action=send&uid={$userlist[uid]}\" target=\"_blank\" title=\"{$lang->send_private} {$userlist[username]}\">{$lang->send_private} {$userlist[username]}</a><br />
<a href=\"{$mybb->settings['bburl']}/usercp.php?action=do_editlists&my_post_key={$mybb->post_code}&add_username={$userlist[username]}\" title=\"{$lang->add_contact}\" target=\"_blank\">{$lang->add_contact}</a>
{$searchpost}</span></td>
<td class=\"trow1\" align=\"center\">{$userlist['postnum']}</td></tr>";
}
$page = "<html><head><title>{$lang->ptitle} {$_GET[cnam]}</title>
{$headerinclude}</head><body align=\"left\">
<table class=\"tborder\" border=\"0\" cellpadding=\"{$theme['tablespace']}\" cellspacing=\"{$theme['borderwidth']}\" style=\"width:95%\">
<tbody><tr>
<td class=\"thead\" colspan=\"3\" align=\"left\"><strong>{$lang->ptitle} {$_GET[cnam]} - {$num} {$lang->num_members}</strong></td>
</tr>
<tr>
<td class=\"tcat\"><span class=\"smalltext\"><strong>{$lang->avatar}</strong></span></td>
<td class=\"tcat\" align=\"left\"><span class=\"smalltext\"><strong>{$lang->username}</strong></span></td>
<td class=\"tcat\" align=\"center\" width=\"10%\"><span class=\"smalltext\"><strong>{$lang->posts}</strong></span></td>
</tr>
{$lista}
<tr>
<td class=\"tfoot\" colspan=\"3\" style=\"padding:13px;\"><form action=\"misc.php\" method=\"get\">
<input name=\"action\" value=\"hmflags\" type=\"hidden\">
<input name=\"cnam\" value=\"{$_GET['cnam']}\" type=\"hidden\">
<input name=\"pf\" value=\"{$_GET['pf']}\" type=\"hidden\">
<select name=\"order\">
<option value=\"uid\">{$lang->order_by_rdate}</option>
<option value=\"username\"{$selord}>{$lang->order_by_username}</option>
<option value=\"postnum\"{$selord2}>{$lang->order_by_nposts}</option>
</select>
<select name=\"ad\">
<option value=\"asc\">{$lang->order_asc}</option>
<option value=\"desc\"{$selad}>{$lang->order_desc}</option>
</select>
<input class=\"button\" value=\"{$lang->go}\" type=\"submit\">
</form></td>
</tr>
</table></body></html>";