MyBB Community Forums

Full Version: Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The option when signing up is to define your sex (male etc) but I cant find anywhere in the myBB software that shows what sex someone is. Sad

So my question is, how do I get it like the one at msgPlus! boards where it is shown in the postbit along with age?? I have already uploaded the images

How do you get rid of the group: bit?? Solved

Also, how do you get rid of the reputation part?? Solved by deleting $replink
I searched through the settings but couldn't find an option to turn it off. Is there one?? If not, this should be added in RC4.

Also, I made the online status link to the online page, but there is an overlap of underline (see attachment). How do I get rid of it Solved, I edited the wrong template

How do I make the underline color green?? Problem in firefox only (thanks Chris)

Also, it links when someone is offline or away, how do I get it to link only when the status is online?? Solved, edited postbit_online, not the main postbit template.

Maybe this could be in RC4??
To show the user's sex you will have to edit functions.php in the makepostbit function to include something like:

		if($post['fid3'] == "Male")
		{
			$sex = "Sex: <img src=\"".$theme['imgdir']."/male.gif\" />";
		}
		elseif($post['fid3'] == "Female")
		{
			$sex = "Sex: <img src=\"".$theme['imgdir']."/female.gif\" />";
		}
		else
		{
			$sex = "";
		}

Below:

			$reputation = getreputation($post['reputation']);
			eval("\$replink = \"".$templates->get("postbit_reputation")."\";");
		}

Then add $sex to your postbit template.

Search the forums here for information about the underline colours. Its a limitation (well not exactly - its how it works) with FireFox.
so something like this:
// Work out the reputation this user has
		if($post['usereputationsystem'] != "no")
		{
			if($mybbgroup['cangivereputations'] == "yes")
			{
				if(!$pmprevann)
				{
					$neglink = "<a href=\"javascript:reputation(".$post['pid'].", 'n');\"><img src=\"$theme[imgdir]/rep_neg.gif\" border=\"0\"></a>";
					$poslink = "<a href=\"javascript:reputation(".$post['pid'].", 'p');\"><img src=\"$theme[imgdir]/rep_pos.gif\" border=\"0\"></a>";
				}
				else
				{
					$neglink = "";
					$poslink = "";
				}
			}
			$reputation = getreputation($post['reputation']);
			eval("\$replink = \"".$templates->get("postbit_reputation")."\";");
		}

// Work out the age of this user
 if($post['fid3'] == "Male")
{
$sex = "Sex: <img src=\"".$theme['imgdir']."/male.gif\" />";
}
elseif($post['fid3'] == "Female")
{
$sex = "Sex: <img src=\"".$theme['imgdir']."/female.gif\" />";
}
else
{
$sex = "";
}

}
????
Yup, that should work.
and what about age nex to it??
$age = "";
if($post['birthday'])
{
	$membday = explode("-", $post['birthday']);
	if($membday[2])
	{
		$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
		$age = "Age: ". floor((time() - $membday) / 31557600);
	}
}

I haven't tested it, but that should work. Just use $age in the template.
Yip, works just fine. Can I post this on the myBB mods site?? People might enjoy it (I'll give you credit of coarse)
If you want, I dont mind.