HomeUnityBlogs
 
 
mrpowless

How to move photo block to center 6.1

If you wanna move the main photo block to center then open:
templates/base/scripts/bxbaseprofileview.php

back it up and lets try it out!
In : function showBlockPhoto( $iCol, $bNoDB = false )

find:
if( $iCol == 1 ) { <<<change 1 to 2

and:
if( $this -> _aProfile['Couple'] && $iCol != 1 ) { <<also change 1 to 2
save and go see

To fix the third picture block popping up use junto's function open templates/base/scripts/bxbaseprofileview.php and replace the whole function bold is added:

function showBlockPhoto( $iCol, $bNoDB = false )
{
if( $iCol == 1 ) {
$iPID = $this -> _iProfileID;
$sNickName = $this -> _aProfile['NickName'];
} elseif( $iCol == 2 ) {
if( !$this -> _aProfile['Couple'] )
return;

} elseif( $iCol == 3 ) {
if( !$this -> _aProfile['Couple'] )
return;


$iPID = $this -> _iProfileID;
//$iPID = (int)$this -> _aProfile['Couple'];
$sNickName = $this -> _aProfile['NickName'] . '(2)';
}

$oPhotos = new ProfilePhotos( $iPID );
$oPhotos -> getActiveMediaArray();

if( $this -> _aProfile['Couple'] && $iCol != 1 ) {
$aCoupleInfo = getProfileInfo($this->_aProfile['Couple']);
if ($aCoupleInfo['Picture']==0) {
$oPhotos = new ProfilePhotos( $this->_aProfile['Couple'] );
$oPhotos -> getActiveMediaArray();
}
$ret = $oPhotos -> getMediaBlock($aCoupleInfo['PrimPhoto'], true);
} else {
$ret = $oPhotos -> getMediaBlock(0);
}

if ($bNoDB) {
return DesignBoxContent( _t( '_PROFILE Photos', $sNickName ), $ret, 1 );
} else {
echo DesignBoxContent( _t( '_PROFILE Photos', $sNickName ), $ret, 1 );
}
}
bad
2
good
 
 

Comments

LHAdmin
LHAdmin 57 days agocomment permalink
 
thanks, Mrpowless

Unfortunately, I'm experiencing 6.1 displaying two photo blocks on each profile. One is labeled "Nickname Photos" and the second simply "Photos". Your tip moves the "Nickname Photos" block, but the additional block simply moves itself to the top of another column! Any thoughts?
Additionally, I noticed when I attempt to set a new default profile photo, it will not display in the profile and the generic icons disappear from both profile blocks (leaving blank boxes).
What a mess -- and I am running a clean install with no mods.
 
bad
0
good
 
 
jungtho
jungtho 57 days agocomment permalink
 
I have the same problem... if I ad a third colomn into my profil I got at the top a second profil photo... it´s a clean installation...
 
bad
0
good
 
 
johno
johno 57 days agocomment permalink
 
Yep exact same problem with me.....add a third column and it mystriously adds another photo block. Would be nice to get that fixed quick. Any suggestions PLEASE!
 
bad
0
good
 
 
defendersown
defendersown 57 days agocomment permalink
 
Did you guys try to move the photo gallery block into the other column, thinking it would move the profile photo? Or did you just create the new column and move some other block into it?

I have been back and forth with Mrpowless several times today, working on this exact problem. I am considering just deleting Dolphin from my server and reinstalling, but I don't want to do that if it won't help.

He proposed to me what seemed to be a viable solution, resetting the "PageCompose" table in the database using the v61.sql file, but it has not worked. He told me to follow his tutorial, http://www.i8nexus.com/test/vids/resetprofilefields.htm, replacing "ProfilesDesc" with "PageCompose." If you guys want to try it and see if it works for you, that would be great. If it does, let me know how you made it work.
 
bad
0
good
 
 
defendersown
defendersown 57 days agocomment permalink
 
By the way, the v61.sql file is located in /install/sql/v61.sql.
 
bad
0
good
 
 
johno
johno 56 days agocomment permalink
 
i`m afraid I don`t want to be messing with the code in the database. This Photo Block is just automatically generated when you create/add a thrid column, without doing anything further. Sure ly there is some bug somewhere. Anyone with a solution would be very welcome as this one is hindering my progress.
 
bad
0
good
 
 
jungtho
jungtho 52 days agocomment permalink
 
Open BxBaseProfileView.php



Go to line 197 :



It looks like this :

---

function showBlockPhoto( $iCol, $bNoDB = false )
{
if( $iCol == 1 ) {
$iPID = $this -> _iProfileID;
$sNickName = $this -> _aProfile['NickName'];
} elseif( $iCol == 2 ) {
if( !$this -> _aProfile['Couple'] )
return;

---



Change it to this:



---

function showBlockPhoto( $iCol, $bNoDB = false )
{
if( $iCol == 1 ) {
$iPID = $this -> _iProfileID;
$sNickName = $this -> _aProfile['NickName'];
} elseif( $iCol == 2 ) {
if( !$this -> _aProfile['Couple'] )
return;

} elseif( $iCol == 3 ) {
if( !$this -> _aProfile['Couple'] )
return;

---



Save and upload the file....
 
bad
1
good
 
 
intel
intel 37 days agocomment permalink
 
i have a problem with second pics in my couple profil...

i have profile page FIRST column at 67%,
and SECOND column at 33%...

and on first column is OK pics, but in second column there is pics cutted on the right side, because second column is 33%.

is there way to change it, so i get SECOND pics on FIRST column?

i asked AndreyP and he says to me i must change it on
templates\base\scripts\BxBaseProfileView.php
function showBlockPhoto( $iCol, $bNoDB = false )

but i don't know what i must change here to get it on first column

anybody who know?
 
bad
0
good
 
 
2979
2979(positive) 35 days agocomment permalink
 
Hi Darren,

Any chance you might be able to make this a video tutorial as well so we can see the final result after all is done. I have tried to do this from what you have told us but I am not getting any results. All I need is one pic for a couples profile not two. I also don't need all the same duplicate fields for the couples profiles. Ex: zip code,

Thanks,

Tom
 
bad
1
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
mrpowless Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.622111082077