I would like to add a list of common social networking site profile links to the profile on one of my sites. I currently have a single website link by using a PHP block, but I would like to have the following sites (using the profile fields name I gave them:
Google (for Google+ profiles)
Skype
LINKEDIN
FACEBOOK1
TWITTER1
I am currently using some code that okweb posted here a while back, and it works well, but I think I will mess this up if I try to do this myself. Does anyone want to give me a hand on this? What would be really cool is if we could make it so that it would just skip a blank entry, rather than giving the message "No Website Link Yet" as it does now.
global $p_arr;
$Memb = (int)$p_arr[ID];
$arr = db_arr("SELECT `Website` FROM `Profiles` WHERE `ID` = $Memb");
$website = $arr[Website];
echo "
<table class=form_advanced_table cellspacing=0 cellpadding=0>
";
if(strlen($website) > 1)
{
echo "
<tr>
<td class=caption>My website:</td>
<td class=value>
<a href=http://$website target=_blank><b>$website</b></a>
</td></tr>
";
}
if(strlen($website) < 1)
{
echo "
<tr>
<td class=caption></td>
<td class=value>
<b>No website link yet</b>
</td></tr>
";
}
echo "
</table>
";