This will be a thread where I share my new mods that I want to make avail for all :)
First is a mod to allow an image ( remotely hosted, you enter a url )for your profile ( I have one with an animated gif, so yes that works ^^ )
AVATAR MOD FOR PROFILE:
in
account.php :
find:
PHP Code:
$query = "SELECT * FROM ".$prefix."users WHERE username='$loggedinname'";
$result = mysql_query($query);
$num = mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$newmessagenotify=@mysql_result($result,$i,"newmessagenotify");
$website=@mysql_result($result,$i,"website");
$aim=@mysql_result($result,$i,"aim");
$yahoo=@mysql_result($result,$i,"yahoo");
$msn=@mysql_result($result,$i,"msn");
right at the end add:
PHP Code:
$avatar=@mysql_result($result,$i,"avatar");
find:
PHP Code:
</p>
<p>MSN Username:
<input name='msn' type='text' id='msn' value='".$msn."'>
<input name='act' type='hidden' id='act' value='changesettings'>
</p>
right after add:
PHP Code:
<p>Avatar:
<input name='avatar' type='text' id='avatar' value='".$avatar."'>
</p>
In
accountpost.php find:
PHP Code:
$website = $_POST["website"];
$website = secure($website);
$aim = $_POST["aim"];
$aim = secure($aim);
$yim = $_POST["yim"];
$yim = secure($yim);
$msn = $_POST["msn"];
$msn = secure($msn);
right at the end add:
PHP Code:
$avatar= $_POST["avatar"];
$avatar= secure($avatar);
then lower there:
PHP Code:
$query = "UPDATE ".$prefix."users SET yahoo='".$yim."' WHERE username='".$loggedinname."'";
mysql_query($query);
$query = "UPDATE ".$prefix."users SET msn='".$msn."' WHERE username='".$loggedinname."'";
mysql_query($query);
Add at the end:
PHP Code:
$query = "UPDATE ".$prefix."users SET avatar='".$avatar."' WHERE username='".$loggedinname."'";
mysql_query($query);
in
profile.php find:
PHP Code:
$usersname=@mysql_result($result,$i,"username");
$usergroup=@mysql_result($result,$i,"usergroup");
$website=@mysql_result($result,$i,"website");
$aim=@mysql_result($result,$i,"aim");
$yahoo=@mysql_result($result,$i,"yahoo");
$premium=@mysql_result($result,$i,"premium");
$membersince=@mysql_result($result,$i,"membersince");
$uid=@mysql_result($result,$i,"uid");
ADD at the end:
PHP Code:
$avatar=@mysql_result($result,$i,"avatar");
Find :
PHP Code:
$article_title = $userdisp."'s Profile:";
$article_content = "<b><u>".$lang_basic_info."".$usersname.":</u></b><br><br>
ADD after that:
PHP Code:
<img src='".$avatar."' border=0 width='200' height ='200><br>
<p></p>
LAST thing!!
in
SQL add to adopts_users a new field:
avatar varchar (120) utf8_general_ci NULL
I think that's all --- if not, let me know :) have fun and you can change the size allowed, etc !! I am not sure about how secure this is, so might want to either allow only certain members to do this--- or find a way to make it more secure -- that's something I am not sure how to do -- but you can do a lot with this!