Profile Photo Block

The profile photo block, along with the profile photo switcher is a very clunky way to look at profile photos on the member's profile page.  Why Boonex went this route is not clear to me as it is just very clunky solution.  The way they had it in Dolphin 6 was a better solution although I don't know if there was a way to resize the images down; it pulled out the resized uploaded image to display.  However, that block used javascript and had thumbnail images and previous-next control.

The profile switcher adds thumbnails but you need both the profile photo block and the switcher block which also shows the profile photo, at least remove that.

A quick fix to make the profile photo block a bit better and to remove the redundant switcher so that you don't have two profile photo block on the page is to just add pagination to the profile photo block.  You don't get the thumbnails.  I would like to have a much better solution and maybe when I understand the photo search function a bit better I will have something that uses jquery.

Make the following changes in the BxPhotoSearch.php around lines 284 (7.1.x) to turn on pagination and to remove the one photo limit.

    function serviceProfilePhotoBlock ($aParams)
    {
        if(!isset($aParams['PID']) || empty($aParams['PID']))
            return '';

        $sOwner = getUsername($aParams['PID']);
        $sCaption = str_replace('{nickname}', $sOwner, $this->oModule->_oConfig->getGlParam('profile_album_name'));
        $sLink = $this->getCurrentUrl('album', 0, uriFilter($sCaption)) . '/owner/' . $sOwner;

        $aParams['LinkUnitTo'] = $sLink;
        $aParams['DisplayRate'] = 0;
        $aParams['DisplayPagination'] = 1;
        $aParams['DisplayLink'] = 0;
        $aParams['Limit'] = '';

        return $this->getProfilePhotoBlock($aParams);
    }

Geeks, making the world a better place
Quote · 21 Sep 2013

As I look through the code, I see that the width of the image of the profile photo is hardcoded into the script.

in the getPhotoBlock function:

if (defined('BX_PROFILE_PAGE') || defined('BX_MEMBER_PAGE')) {
                $iPhotoWidth = 259;
                $sImgWidth = 'style="width:' . $iPhotoWidth . 'px;"';

 

Which is why even if you increase the column that the profile photo is in, the profile photo will remain the same size.  That needs to be more flexible; maybe min and max widths?  Something to play with.

Edit: what is really needed if the profile photo is going to be in a column is for one to be able to set the width based on what one sets the column width to be.  That way you can have the photo width match the column width for best display; of course the photo should not be resized up.  While I can do this by editing code, that is not the elegant way this should be done.

Geeks, making the world a better place
Quote · 21 Sep 2013

I totally hate the way that the profile photo is separated in its own block, so I went a step further, and created a block in which the DescriptionMe text wraps around the Avatar image. Here is what I put in a php block called About Me:

include_once (BX_DIRECTORY_PATH_MODULES . 'boonex/avatar/include.php');
$profileID = getID( $_GET['ID'] );

  $rProfile = mysql_query("SELECT * FROM Profiles WHERE ID = '$profileID'");
while ($row_profile = mysql_fetch_array($rProfile)) {
$Avatar = $row_profile["Avatar"];
$DescriptionMe = $row_profile["DescriptionMe"];
}
?>
<table width="100%">
  <tr>
    <td width="13" align="left" valign="top"> </td>
    <td><table width="85" border="0" align="left" cellpadding="5" cellspacing="0">
<tr>
<td align="center" valign="top">
<img src="<?php  
  echo BX_AVA_URL_USER_AVATARS . $Avatar . BX_AVA_EXT; // avatar image
 ?>" width="85" height="105"></td>
</tr>
</table><?php echo $DescriptionMe ?></td>
  </tr>
</table>
<?php { }

image added to see what it looks like. But again, this is with the Avatar and not the Profile Picture deal. For our usage, the avatar was enough. I never really understood why there is the avatar module and a profile pic deal.

avatar with description1.png · 670.5K · 397 views
caredesign.net
Quote · 21 Sep 2013

 

I never really understood why there is the avatar module and a profile pic deal.

Profile photos is more of a dating site thing.  On a dating site you want to be able to see a photo of someone you may be interested in.  I have both on the social site I set up and most of the users put in photos of interest instead of photos of them.  On a site where you don't care about a photo; and many members don't post photos of themselves, the avatar module allows them to put up some silly little photo of anything, animals, cartoons, etc.

Your "About Me" block is nice; thanks for sharing.

Geeks, making the world a better place
Quote · 21 Sep 2013

thanks GG - I should have posted one with more text to see how it really looks, so i am doing now.

avatar with description2.png · 787.3K · 439 views
caredesign.net
Quote · 21 Sep 2013

Yes, that is a good idea.  For the type of site you are running, that is a much better solution.  It looks much more professional than the avatar and profile photo way.

I did notice the right padding is not matching the left padding.

Geeks, making the world a better place
Quote · 21 Sep 2013

yes, thank you GG. One of the many small details I am still working on for that site - lol

caredesign.net
Quote · 21 Sep 2013

 

yes, thank you GG. One of the many small details I am still working on for that site - lol

Yes, a lot of people don't realise the amount of time it takes to go through the css and such and lay things out.  One of my current jobs is fixing a template someone purchased that has a lot of layout issues in my opinion; especially for a template they paid for.  

Geeks, making the world a better place
Quote · 21 Sep 2013

These are awesome tips :)

The other day, I found a site that has something I thought was totally cool....

It had a profile block that looked like a hybrid between Profile Image and Avatar...

It looked something like this-

 Profile Block 1

and

Profile Block 2

Cool-Profile Block 2.jpg · 35.4K · 898 views
Cool-Profile Block.jpg · 60.7K · 892 views
Quote · 21 Sep 2013

It would be cool to have something like a profile block builder

Quote · 21 Sep 2013

Yes, that is sort of like a cross between the avatar and personal stats.  That would be a nice little thing to have.

Geeks, making the world a better place
Quote · 21 Sep 2013

Just to say...Thank you for this addon, milion times thank you...

Quote · 29 Dec 2013
 
 
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.