2012-11-29, 04:01 PM
Hey,
I'm using the IPlog plugin of mybb, and now I'm willing to show a country flag on the user postbit where he's from.
I found out I have to put some code in the 'functions_post' file, but I don't think that is smart to do.
I've tried something like this:
and then copy
Which worked out well.
Is this a smart way to do so? If not, how should I do this then?
I'm using the IPlog plugin of mybb, and now I'm willing to show a country flag on the user postbit where he's from.
I found out I have to put some code in the 'functions_post' file, but I don't think that is smart to do.
I've tried something like this:
$userid = $post['uid'];
$getcountry_info = $db->query("SELECT `ipaddress` FROM `".TABLE_PREFIX."iplogs` WHERE `uid` = $userid ORDER BY `dateline` DESC LIMIT 1");
while ($row = $getcountry_info->fetch_assoc())
{
$post['usercountryflag'] = $row['ipaddress'];
}
and then copy
$post['usercountryflag'] = '';
aboveeval("\$post['user_details'] = \"".$templates->get("postbit_author_guest")."\";");
Which worked out well.
Is this a smart way to do so? If not, how should I do this then?