Profile Customization

Okay, a huge issue with Dolphin is that when members upload images to their profiles under the Customize Profile link, it appears across the screen repeating up and down.  No matter how much you beat on the CSS files it just won't correct. 

 

So, let's correct this issue and make the backgrounds more end user friendly and invite people to upload a background that will work for them.  Keep in mind, this is going to be part of a series I'm doing that will let your members have a ton of fun.  Keep up with it and you'll end up with some really cool profiles that will resolve in all browsers with Dolphin 6.1.6  & 6.1.4  I'm testing it out in both using all browsers, so it should work for most people.  Those who want to play with this in D7, please go for it.  I don't have the time to do them all right now.

 

To set up the profiles for your members it's as easy as this:

 


templates/base/scripts/BxBaseProfileView.php   (Yes, it's a php file for those who think all items are CSS controlled):

 

Now, find the following:

 


 

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;
 }


Replace it with the following (I'm just replacing the full function so it's easier for the newbies:


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;
       }
       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;
 }


 

Save, test by uploading backgrounds to your profiles and enjoy. 

***Note:  If I find this trick on Expertzz being charged for I will be coming after you.  Remember, it's time stamped with these forums and this is to simple to be charging people for.  In fact, it's something Boonex should of done a long time ago within the base set up. 

Quote · 13 Aug 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.