class Ragtek_NUNS_Model_Notifications extends XenForo_Model{
public function setUser($user){
$this->_user = $user;
}
public function getPhraseParams($threadId = 0, $thread = NULL){
$options = XenForo_Application::get('options');
$params = array(
'user' => $this->_user,
'boardname' => $options->boardTitle,
'homeUrl' => $this->_getStartUrl(),
'logoLink' => $this->_getStartLogoUrl(),
'username' => $this->_user['username'],
'profileurl' => XenForo_Link::buildPublicLink('full:members', $this->_user),
'ip' => (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false),
'threadId' => $threadId,
'welcomeThread' => XenForo_Link::buildPublicLink('full:threads', $thread, array(),true)
);
return $params;
}
protected function _getStartUrl(){
$options = XenForo_Application::get('options');
return ($options->homePageUrl ? $options->homePageUrl : XenForo_Link::buildPublicLink('index')) . '/';
}
protected function _getStartLogoUrl(){
$options = XenForo_Application::get('options');
return ($options->boardUrl ? $options->boardUrl : XenForo_Link::buildPublicLink('full:index')) . '/';
}
}