For the prreferences function, here is a quick one based off the MCCodes Lite version.
function pic_change()
{
if (isset($_POST['newpic']))
{
if (empty($_POST['newpic']))
{
echo '
You did not enter a new profile picture in the requested box.</p>';
}
else if (!@getimagesize($_POST['newpic']))
{
echo '
You haven\'t posted a valid image URL.</p>';
}
else
{
mysql_query("UPDATE `users` SET `display_pic`='". $_POST['newpic'] ."' WHERE `userid`=".$userid, $c);
echo '
You have successfully !</p>';
}
echo '
> [url="preferences.php?action=', __FUNCTION__ ,'"]Back[/url]';
}
else
{
echo '<h3>Pic Change</h3>
Please note that this must be externally hosted, [url="http://imageshack.us"]ImageShack[/url] is our recommendation. Any images that are not 150x150 will be automatically resized to fit our requirements.</p>
<form action="preferences.php?action=', __FUNCTION__ ,'" method="post">
New Pic: <input type="text" name="newpic" value="', $ir['display_pic'] ,'" />
<input type="submit" value="Change Picture" />
</form>';
}
}