Hi there,
I want to show Author name in photo page view and of course I have to link it to its profile page.
Well,in /modules/boonex/photos/classes/
we have Bxphotopageview.php. ( I added the red lines)
in line 54 we got this:
$aReplacement = array(
'file_type' => '_blank',
'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(),
'fileUri' => $this->aFileInfo['medUri'],
'fileKey' => $this->aFileInfo['Hash'],
'fileExt' => $this->aFileInfo['medExt'],
'iViewer' => $this->iProfileId,
'ID' => (int)$this->aFileInfo['medID'],
'Owner' => (int)$this->aFileInfo['medProfId'],
'OwnerName' => $this->aFileInfo['NickName'],
'profileURL' => $this->aFileInfo['profileURL'],
'AlbumUri' => $this->aFileInfo['albumUri'],
'Tags' => bx_php_string_apos($this->aFileInfo['medTags']),
'TitleSetAsAvatar' => $this->aFileInfo['medProfId'] == $this->iProfileId ? _t('_bx_photos_set_as_avatar') : '',
'sbs_bx_' . $this->oConfig->getUri() . '_title' => $aButton['title'],
'sbs_bx_' . $this->oConfig->getUri() . '_script' => $aButton['script']
);
and in line 152 we got this:
$aUnit = array(
'pic' => $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file'),
'width_ext' => $iWidth + 2,
'width' => $iWidth,
'fileTitle' => $this->aFileInfo['medTitle'],
'profileURL' => (int)$this->getProfileLink['owner'], // I REALLY NEED THIS LINE PLEASE!!!!
'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $this->aFileInfo['Rate']): '',
'favInfo' => $this->oDb->getFavoritesCount($this->aFileInfo['medID']),
'viewInfo' => $this->aFileInfo['medViews'],
'albumUri' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'browse/album/' . $this->aFileInfo['albumUri'] . '/owner/' . $this->aFileInfo['NickName'],
'NickName' => $this->aFileInfo['NickName'],
'albumCaption' => $this->aFileInfo['albumCaption'],
'bx_if:prev' => array(
'condition' => $this->aFileInfo['prevItem'] > 0,
'content' => array(
'linkPrev' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aPrev['medUri'],
'titlePrev' => $aPrev['medTitle'],
'percent' => $this->aFileInfo['nextItem'] > 0 ? 50 : 100,
)
In /modules/boonex/photos/templates/base/
there is view_unit.html
in the beginning we have this:
<div class="fileUnit">
<div class="navPanel" style="width:__width_ext__px;">
<div class="navPanelLink">
Author: <a href="__albumUri__">__NickName__</a>
<bx_text:_sys_album />: <a href="__albumUri__">__albumCaption__</a>
</div>
Adding the red lines now I have The author name in the photo page view but I missing the link to its profile page.
Could someone show me the correct way to write this line
'profileURL' => (int)$this->getProfileLink['owner'], ???
many thanks