Hello torrenttrader community.
This is a simple mod that allow each user to choice their own background image.
Lets start the modifications.
First,
Run SQL commands in your database
" by the link of other background image you want.
Save it and open account.php
Find
add
Save it and you're done!
Hope you like it :angry: :D
This is a simple mod that allow each user to choice their own background image.
Lets start the modifications.
First,
Run SQL commands in your database
" by the link of other background image you want.Save it and open account.php
Find
ALTER TABLE `users` ADD `userbg` VARCHAR( 500 ) NOT NULL DEFAULT ''Now, in your main theme folder open header.phpadd
style="background: url(<?=$userbg2?>) 50% no-repeat fixed;"
after
<BODY
and after
</head>
add
<?
$id = $CURUSER['id'];
$get = mysql_query("SELECT * FROM users WHERE id=$id") or die(mysql_error());
$got = mysql_fetch_array($get);
$userbg = $got['userbg'];
if ($userbg == '')
$userbg2 = "http://demo.dzinerstudio.com/smf2/Themes/zone99_20/images/custom/body_bg.jpg";
else
$userbg2 = $userbg;
?>
or you can replace "print("<TR><TD align=right class=table_col2><B>" . AVATAR_URL . ":</b> </td><TD align=left class=table_col2><input name=avatar size=50 value=\"" . htmlspecialchars($CURUSER["avatar"]) .
"\"><br />\n<i>Link to your externally hosted avatar image: 80x80px</i></td></tr>");
and after add
print("<TR><TD align=right class=table_col2><B>Background:</b> </td><TD align=left class=table_col2><input name=userbg size=50 value=\"" . htmlspecialchars($CURUSER["userbg"]) .
"\"><br />\n<i>Link to your externally hosted background image.</i></td></tr>");
Now find
$avatar = $_POST["avatar"];
and after add
if(!$imgtype['mime']){
show_error_msg(("FAILED"), 'file is not an image');
}elseif(
$imgtype['mime'] = 'image/gif' |
$imgtype['mime'] = 'image/jpeg' |
$imgtype['mime'] = 'image/png' |
$imgtype['mime'] = 'image/psd' |
$imgtype['mime'] = 'image/bmp' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/jp2' |
$imgtype['mime'] = 'image/iff' |
$imgtype['mime'] = 'image/vnd.wap.wbmp' |
$imgtype['mime'] = 'image/xbm' |
$imgtype['mime'] = 'image/vnd.microsoft.icon'
){
$userbg = $_POST["userbg"];
}else{
show_error_msg(("FAILED"), 'file is not an image');
}
Then find
$updateset[] = "avatar = " . sqlesc($avatar);
and add after
$updateset[] = "userbg = " . sqlesc($userbg);Save it and you're done!
Hope you like it :angry: :D