2010-07-07, 07:49 PM
2010-07-07, 08:05 PM
i don't exactly get what your trying to do
but i think if you hook into showthread start and call the variable in the function
then you can just add {$post['mycountry']} in the postbit template depending on where you want it
sorry if this isn't what your looking for
but i think if you hook into showthread start and call the variable in the function
then you can just add {$post['mycountry']} in the postbit template depending on where you want it
sorry if this isn't what your looking for
2010-07-07, 08:09 PM
I tried
Then
I tried showthread_start as thee hook too
$plugins->add_hook("postbit", "mycountry");
Then
function mycountry($post)
{
global $mybb, $theme, $post, $lang, $db, $flag;
$query = $db->simple_select("userfields", $mycountry, "ufid = ".$mybb->user['uid']);
$fid = $db->fetch_field($query, $mycountry);
$flag = $db->query("SELECT code FROM ".TABLE_PREFIX."countries WHERE name = '".$fid."'");
$post['mycountry'] = $br."<img src=\"./images/mycountry/flags/".$flag.".png\" title=\"".$flag."\" align=\"center\"> ";
}
I tried showthread_start as thee hook too