2012-03-22, 04:44 PM
For some reason it's not really evaluating this template:
Plugin code:
Hook used: member_profile_start
I'm also unsure of getting it to cache additional templates on pages so it doesn't have to use a query.
<tr>
<td class="trow1"><a href="{$settings['bburl']}/showgroup.php?gid={$socialgroup['sgid']}">{$socialgroup['name']}</a></td>
<td class="trow1">{$socialgroup['numdisc']}</td>
</tr>
Plugin code:
function socialgroups_member_profile()
{
global $db, $memprofile, $templates, $lang;
$userid = intval($_REQUEST['uid']);
$query = $db->query("SELECT groupsin FROM ".TABLE_PREFIX."users WHERE uid=$userid");
$meminfo = $db->fetch_array($query);
$sgids = $meminfo['groupsin'];
$socialgroupquery = $db->query("SELECT * FROM ".TABLE_PREFIX."socialgroups WHERE sgid IN ($sgids) ORDER BY name ASC");
while ($socialgroup = $db->fetch_array($socialgroupquery))
{
eval("\$socialgroups .= \"".$templates->get("profile_socialgroup_list")."\";");
}
}
Hook used: member_profile_start
I'm also unsure of getting it to cache additional templates on pages so it doesn't have to use a query.