to hide this on profile
SQL ALTER TABLE `users` ADD `showtwitt` INT( 1 ) NOT NULL DEFAULT '0'
the profile code
if ($ir['showtwitt']==1)
{
echo "
<script src='http://widgets.twimg.com/j/2/widget.js'></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 6000,
width: 500,
height: 500,
theme: {
shell: {
background: '#333333',
color: '#ffffff'
},
tweets: {
background: '#000000',
color: '#ffffff',
links: '#07d0eb'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('{$r['tusername']}').start();
</script>";
}
and the very end thing you added
function twitter_username()
{
global $ir,$c,$userid,$h;
print "<form action='preferences.php?action=twitterchange' method='post'>
Twitter Username: <input type='text' name='twitterchange' /><br />
<input type='submit' value='Change Name' /></form>";
}
function do_twitter_change()
{
global $ir,$c,$userid,$h;
if($_POST['twitterchange'] == "")
{
print "You did not enter a Twitter Username.<br />
<a href='preferences.php?action=twitterusername'>> Back</a>";
}
else
{
$_POST['twitterchange']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['twitterchange']);
mysql_query("UPDATE users SET tusername='{$_POST['twitterchange']}' WHERE userid=$userid",$c);
mysql_query("UPDATE users SET showtwitt='1' WHERE userid=$userid",$c);
print "Twitter username changed!";
}
}
now you could also do the way the pic one works to witch i can show you if you like it may end up working better