This is a trick and Part 1 of a series to make the Profile Customize Option in Dolphin 6 user friendly and one that your members want to use. Currently, let's be honest, it sucks.
In this step we are going to do something very simple, but it will clean up your site's custom profiles, making them more fun for your members. Getting rid of the crazy repeat of custom background images and fix the background so the page scrolls and the background remains still. It's pretty simple, and no, it's not done in the CSS files. Follow along and have fun giving your members another great little item that allows their profiles to look professional. Best of all, it resolves identical in all browsers, meaning you don't have to get fancy for each or settle for less than awesome in just one.
function genProfileCSS( $ID )
{
global $site;
$ret = '';
$query = "SELECT * FROM `ProfilesSettings` WHERE `IDMember` = '$ID'";
$arr = db_arr( $query );
if ( $arr['IDMember'] )
$ret = "<style type=\"text/css\">
body
{
background-image: url( {$site['profileBackground']}{$arr['BackgroundFilename']});
background-color: {$arr['BackgroundColor']};
background-repeat:repeat;
}
div#right_column_content
{
color: {$arr['FontColor']};
font-size: {$arr['FontSize']}px;
font-family: {$arr['FontFamily']};
}
div#divUnderCustomization
{
color: {$arr['FontColor']};
font-size: {$arr['FontSize']}px;
font-family: {$arr['FontFamily']};
}
</style>";
return $ret;
}
Now you get to replace it with this:
function genProfileCSS( $ID )
{
global $site;
$ret = '';
$query = "SELECT * FROM `ProfilesSettings` WHERE `IDMember` = '$ID'";
$arr = db_arr( $query );
if ( $arr['IDMember'] )
$ret = "<style type=\"text/css\">
body
{
background-image: url( {$site['profileBackground']}{$arr['BackgroundFilename']});
background-color: {$arr['BackgroundColor']};
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center center;
}
div#right_column_content
{
color: {$arr['FontColor']};
font-size: {$arr['FontSize']}px;
font-family: {$arr['FontFamily']};
}
div#divUnderCustomization
{
color: {$arr['FontColor']};
font-size: {$arr['FontSize']}px;
font-family: {$arr['FontFamily']};
}
</style>";
return $ret;
}
Now you have a crisp, clean appearance on your Profiles. Highly recommend your members upload larger background images. Next post will deal with how to allow these profiles to flow through. Told you it wasn't in a CSS file! LOL!!!
***Note: If you think your going to sell this trick on expertzzz or any other site, keep in mind it is date/time stamped and I will find out and come after you. This is to simple an item to rip people off by charging them for what amounts to 2 lines of additional code and a correction to 1 line.
I think I purchased a mod a year ago which did the same thing as what you posted above. I wasn't too happy with the mod, never worked as designed so i uninstalled it as fast as i installed.
purchased 2 mods from express neither one worked the way it was designed to work and haven't purchased any since.
been looking at 2 mods i love to purchase but having lost money on the last 2 mods im in the will see stage.lol
thank u
Keep in mind, this will center the image from left to right and top to bottom. If your image is small then it's hidden behind the page code () (boxes that appear on the screen with content.
To change the color from white, go to the Customize Profile screen and set a new background color to go with the image. Yes, you still have to select a color. If the color changes, then yours is working, the image is just to narrow/short see more