in reference with http://www.boonex.com/forums/topic/Title-of-view-photo-page.htm
Here is the steps to add an edit button in the photo view page.
in modules/boonex/photos/templates/classes/BxPhotosPageView.php at line143 add this
function isEditAllowed() {
$iId = getLoggedId();
$Admin = isAdmin();
if($this->aFileInfo['medProfId'] == $iId or $Admin) {
return true;
}
return false;
}
just after getBlockCode_ViewComments function
now come to line 186 and add this
'bx_if:edit' => array(
'condition' => $this->isEditAllowed(),
'content' => array(
'id' => $this->aFileInfo['medID'],
)
),
it will look like this
'bx_if:next' => array(
'condition' => $this->aFileInfo['nextItem'] > 0,
'content' => array(
'linkNext' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aNext['medUri'],
'titleNext' => $aNext['medTitle'],
'percent' => $this->aFileInfo['prevItem'] > 0 ? 50 : 100,
)
),
'bx_if:edit' => array(
'condition' => $this->isEditAllowed(),
'content' => array(
'id' => $this->aFileInfo['medID'],
)
),
save the file.
now come to modules/photos/template/base/view_unit.hml at line 17 after this
<div class="fileUnitPic" style="width:__width_ext__px;">
<img src="__pic__" class="fileUnitSpacer"/>__id__
</div>
add
<bx_if:edit>
<div class="button_wrapper" style="width:100%; center; background-color:#CCFF66 margin: 0;" onclick="window.open('<bx_url_root />m/photos/edit/__id__', '_blank', 'width=500,height=400,menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no') ">
<button class="form_input_submit" type="button">
<img alt="Edit" src="<bx_icon_url:edit.png />">
Edit </button>
</div>
<div style="width:100%; margin: 0;"><h4 align="center">Site Members, please use the <b>"edit"</b> button above to change the name of your image to what you want..</h4>
</div>
</bx_if:edit>
This will show edit button to its photos owner and admins. It will be hidden to other members and guests.
hope it will help you all. enjoy..