Profile Photos Block where is it?

Greets everybody.

Where can I find Profile Photos Block or something like function GenProfilePhotosBlock() ?

I need to change there a couple of options. Cause my Add Photo link works not in German Language (funny). In english is all right.

I would like to make this "Add Photo" link permanent - it is easy for members. And He desappears after one Profile Photo upload.

Hat probably anyone already a ready solution for it?

TIA

Quote · 8 Mar 2010

Look, I have TWO languages on my site. English and German.

If I upload a profile photo when I on English am -> This photo goes to my Profile Album.

If I upload a profile photo when I on German am -> System makes a new Album my's Fotos where "Fotos" in German. And of course I can not see this picture in my profile photos block.

What will be when I got 12 Languages on my site? 12 profile Albums?

Quote · 8 Mar 2010

Hello!


1) This block is drawn by method serviceProfilePhotoBlock (BxPhotosSearch.php), which calls method getPhotoBlock. This link is generated only in case if data from given parameters weren't found.

2) Yes, problem with multilang "add photos" links exists and was fixed in ticket #1915, see SVN changeset #13766. Reason - in first variants of 'profile albums' we made them dependable from lang keys. But in this way isn't possible to provide selection of the same albums from diff langs. So we made that default name of album can be the one for all langs and is regulated via admin panel->modules->photos module->settings section. Ticket #1915 has finished this process.

Regard

Quote · 9 Mar 2010

thanks, Leonid.

Quote · 10 Mar 2010

Leonid, or anyone, can you please for me edit this function so, that a link "Add photo" and "Pagination Element" is there in all cases, if there are no photos, if there is one photo and if there are some photos..

---------------------------------------

function getPhotoBlock ($aParams = array()) {
$aShowParams = array('showRate' => 1, 'showPaginate' => 0, 'showViews' => 0, 'showDate' => 0, 'showLink' => 0, 'showFrom' => 0);
if (count($aParams) > 0) {
foreach( $aParams as $sKeyName => $sKeyValue ) {
switch ($sKeyName) {
case 'PID':
$this->aCurrent['restriction']['owner']['value'] = (int)$sKeyValue;
break;
case 'Category':
$this->aCurrent['restriction']['category']['value'] = strip_tags($sKeyValue);
break;
case 'Tag':
$this->aCurrent['restriction']['tag']['value'] = strip_tags($sKeyValue);
break;
case 'Limit':
$this->aCurrent['paginate']['perPage'] = (int)$sKeyValue;
break;
case 'DisplayPagination':
if ($sKeyValue == 1)
$aShowParams['showPaginate'] = 1;
break;
case 'DisplayViews':
if ($sKeyValue == 1)
$aShowParams['showViews'] = 1;
break;
case 'DisplayWhenAgo':
if ($sKeyValue == 1)
$aShowParams['showDate'] = 1;
break;
case 'DisplayLink':
if ($sKeyValue == 1)
$aShowParams['showLink'] = 1;
break;
case 'DisplayProfile':
if ($sKeyValue == 1)
$aShowParams['showFrom'] = 1;
break;
}
}
}
$this->aCurrent['paginate']['perPage'] = 20;
$aFilesList = $this->getSearchData();
$iCnt = $this->aCurrent['paginate']['totalNum'];
if ($iCnt) {
$aUnit = array();
$aUnits = array();
if (defined('BX_PROFILE_PAGE') || defined('BX_MEMBER_PAGE')) {
$iPhotoWidth = 294;
$sImgWidth = 'style="width:' . $iPhotoWidth . 'px;"';
}
else {
$iPhotoWidth = (int)$this->oModule->_oConfig->getGlParam('file_width');
$iPhotoWidth = ($iPhotoWidth > 1) ? $iPhotoWidth : 600;
$sImgWidth = '';
}
foreach ($aFilesList as $iKey => $aData) {
$sPicUrl = $this->getImgUrl($aData['Hash'], 'icon');
$aUnits[] = array(
'imageId' => $iKey + 1,
'picUrl' => $sPicUrl
);
$sPicLinkElements .= 'aPicLink['.($iKey + 1).'] = '.$aData['id'].';';
if ($iKey == 0) {
$aAdd = array('switchWidth' => ($iPhotoWidth + 2), 'imgWidth' => $sImgWidth);
$aUnit['switcherUnit'] = $this->getSwitcherUnit($aData, $aShowParams, $aAdd);
}
}
$aUnit['moduleUrl'] = BX_DOL_URL_ROOT . $this->oModule->_oConfig->getBaseUri();
$aUnit['bx_repeat:iconBlock'] = $aUnits;
$aUnit['count'] = $iCnt;
$aUnit['contWidth'] = $iCnt * 40;
$aUnit['picWidth'] = $iPhotoWidth;
$aUnit['picBoxWidth'] = $aUnit['switchWidth'] = $iPhotoWidth + 2;
$aUnit['switchWidthOut'] = $aUnit['switchWidth'] + 4;
if ($aUnit['contWidth'] > $aUnit['picWidth']) {
$bScroller =  true;
$aUnit['containerWidth'] = $aUnit['picBoxWidth'] - 72;               
}
else {
$bScroller = false;
$aUnit['containerWidth'] = $aUnit['contWidth'];
}
$aUnit['bx_if:scrollerBack'] = array(
'condition' => $bScroller,
'content' => array(1)
);
$aUnit['bx_if:scrollerNext'] = array(
'condition' => $bScroller,
'content' => array(1),
);

$aUnit['picLinkElements'] = $sPicLinkElements;
if ($aShowParams['showPaginate'] == 1) {
$aLinkAddon = $this->getLinkAddByPrams();
$oPaginate = new BxDolPaginate(array(
'page_url' => $aUnit['changeUrl'],
'count' => $iCnt,
'info' => false,
'per_page' => 1,
'page' => $this->aCurrent['paginate']['page'],
'per_page_changer' => false,
'page_reloader' => false,
'on_change_page' => 'getCurrentImage({page})',
));
$aUnit['paginate'] = $oPaginate->getPaginate();
}
else
$aUnit['paginate'] = '';

$this->oTemplate->addCss('search.css');
return $this->oTemplate->parseHtmlByName('photo_switcher.html', $aUnit);
}
elseif ($this->oModule->_iProfileId != 0 && $this->oModule->_iProfileId == (int)$this->aCurrent['restriction']['owner']['value']) {
ob_start();
?>
<div class="paginate">
<div class="view_all" style="background-image:url(__img_src__)">           
<a href="__lnk_url__" title="__lnk_title__">__lnk_content__</a>
</div>
</div>
<?
$sCode = ob_get_clean();
$sLinkTitle = _t('_bx_photos_add');
$sNickName = getNickName($this->oModule->_iProfileId);
//K//$sCaption = uriFilter(_t('_bx_photos_profile_album_name', $sNickName));//K//
$sCaption = uriFilter(str_replace('{nickname}', $sNickName, $this->oModule->_oConfig->getGlParam('profile_album_name')));
$aUnit = array(
'img_src' => $this->oTemplate->getIconUrl('more.png'),
'lnk_url' => $this->oModule->_oConfig->getBaseUri() . 'albums/my/add_objects/' . $sCaption . '/owner/' . $sNickName,
'lnk_title' => $sLinkTitle,
'lnk_content' => $sLinkTitle
);
return MsgBox(_t('_Empty')) . $this->oTemplate->parseHtmlByContent($sCode, $aUnit);
}
return MsgBox(_t('_Empty'));
}

------------------------

thanks in advance

Quote · 10 Mar 2010

$aShowParams = array('showRate' => 1, 'showPaginate' => 0, 'showViews' => 0, 'showDate' => 0, 'showLink' => 0, 'showFrom' => 0);

Look at all those 1's and zero's   hmmm .....

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 10 Mar 2010

$aShowParams = array('showRate' => 1, 'showPaginate' => 0, 'showViews' => 0, 'showDate' => 0, 'showLink' => 0, 'showFrom' => 0);

Look at all those 1's and zero's   hmmm .....

Thanks I am testing... But I doubt it work

Quote · 10 Mar 2010

I am sorry. No it is doesnt work.

It should look somehow this way, that some if's and elseif's to edit. And from aUnit in both if's - just one $aUnit to make.

A little bit hard for me. Is it?

Quote · 10 Mar 2010

Hello denast!

Just try to change elseif in this line:

elseif ($this->oModule->_iProfileId != 0 && $this->oModule->_iProfileId == (int)$this->aCurrent['restriction']['owner']['value']) {

ti simple if

Regard

Quote · 11 Mar 2010
 
 
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.