Hi,
I'd like to have the recipient name/profile link displayed on the public wall when a a user posts. Right now, user's can only see a user posted a wall message but there's no way to tell that it really wasn't their wall they posted on....
does that make sense?
I believe a little change to the following line(s) in the modules/boonex/wall/BxWallModule.php would do the trick.
$aVariables = array_merge($aVariables, array('post_wrote' => _t("_wall_wrote"), 'post_content' => stripslashes($aVariables['post_content'])));
I see this code in the file which looks like what I want it to do but not sure why it's not already showing up like this...
$aRecipentUrl = $aOther ." <a href=".getProfileLink($aRecipent)."><b>".getNickName($aRecipent)."</b></a>";
Does anyone have any hint as to what needs to be changed?
Thanks
/**
* Common public methods.
* Is used to display events on the Wall.
*/
function getSystem($aEvent) {
$sResult = "";
$sMethod = 'display' . str_replace(' ', '', ucwords(str_replace('_', ' ', $aEvent['type'] . '_' . $aEvent['action'])));
if(method_exists($this->_oTemplate, $sMethod))
$aResult = $this->_oTemplate->$sMethod($aEvent);
else if(isset($this->_aHandlers[$aEvent['type'] . '_' . $aEvent['action']])){
$aEvent['js_mode'] = $this->_bJsMode;
$aHandler = $this->_aHandlers[$aEvent['type'] . '_' . $aEvent['action']];
$aResult = BxDolService::call($aHandler['module_uri'], $aHandler['module_method'], array($aEvent), $aHandler['module_class']);
}
if((empty($aEvent['title']) && !empty($aResult['title'])) || (empty($aEvent['description']) && !empty($aResult['description'])))
$this->_oDb->updateEvent(array(
'title' => process_db_input($aResult['title'], BX_TAGS_STRIP),
'description' => process_db_input($aResult['description'], BX_TAGS_STRIP)
), $aEvent['id']);
$oComments = new BxWallCmts($this->_oConfig->getCommentSystemName(), $aEvent['id']);
return $this->_oTemplate->parseHtmlByContent($aResult['content'], array(
'post_id' => $aEvent['id'],
'bx_if:post_delete' => array(
'condition' => $this->_isCommentDeleteAllowed(),
'content' => array(
'js_view_object' => $this->_sJsViewObject,
'post_id' => $aEvent['id'],
'post_delete_txt' => _t('_wall_post_delete')
)
),
'comments_content' => $oComments->getCommentsFirst('comment')
));
}
function getCommon($aEvent) {
$sPrefix = $this->_oConfig->getCommonPostPrefix();
if(strpos($aEvent['type'], $sPrefix) !== 0) return "";
if((int)$aEvent['content'] > 0 && in_array($aEvent['type'], array($sPrefix . 'photos', $sPrefix . 'sounds', $sPrefix . 'videos'))) {
$sMediaType = str_replace($sPrefix, '', $aEvent['type']);
$aEvent = array_merge($aEvent, $this->_getCommonMedia($sMediaType, (int)$aEvent['content']));
if((int)$aEvent['content'] > 0)
$aEvent['content'] = stripslashes(_t('_wall_content_not_ready'));
else
$this->_oDb->updateEvent(array(
'content' => process_db_input($aEvent['content'], BX_TAGS_VALIDATE),
'title' => process_db_input($aEvent['title'], BX_TAGS_STRIP),
'description' => process_db_input($aEvent['description'], BX_TAGS_STRIP)
), $aEvent['id']);
}
$aAuthor = $this->_oDb->getUser($aEvent['object_id']);
$aVariables = array (
'author_thumbnail' => get_member_icon($aAuthor['id']),
'author_url' => getProfileLink($aAuthor['id']),
'author_username' => $aAuthor['username'],
'post_id' => $aEvent['id'],
'post_ago' => $aEvent['ago'],
'bx_if:post_delete' => array(
'condition' => $this->_isCommentDeleteAllowed(),