<% echo $this->placeholder('notifications'); %>
<% if(Registry::isRegistered('fallbackactive')) { %>
Fallback-Hack aktiv! Diese Seite wurde noch nicht überarbeitet und funktioniert womöglich nicht richtig!
<% } %>
<% if(Registry::isRegistered('session') && (Registry::get('session')->obSeen < 1)) { %>
<% } %>
<% if ($this->detection->isMobile() || $this->detection->isTablet()): %>
<% endif %>
<%
try
{
/* Buttons */
if ($this->myPage) {
$editButton = '
';
}
else
{
}
/* for testing */
$friendButton = '
Als Freund';
$chatButton = '
Chat';
$shareButton = '
Share';
$likeButton = '';
/* end for testing */
/* Main Box Content */
$mainBoxHtml = '';
// Real name
$fullname = null;
if ($this->myPage) {
$fullname = $this->user->getUserData()->getFullName();
} else {
$userData = new UserDataPrivacy($this->user->getUserData());
$fullname = $userData->getFullName();
}
if ($fullname) {
if ($this->myPage) {
/*
$info = '
privacy';
*/
switch ($this->user->getSetting()->getSetting(UserSetting::DISPLAY_REALNAME)) {
case UserSetting::PERMISSION_ALL:
$infoText = Szene1_Translate::_("privacyNameInfoPermissionAll");
break;
case UserSetting::PERMISSION_REGISTERED:
$infoText = Szene1_Translate::_("privacyNameInfoPermissionRegistered");
break;
case UserSetting::PERMISSION_FRIENDS:
$infoText = Szene1_Translate::_("privacyNameInfoPermissionFriends");
break;
case UserSetting::PERMISSION_ONLY_ME:
$infoText = Szene1_Translate::_("privacyNameInfoPermissionOnlyMe");
break;
default:
$infoText = null;
}
if ($infoText) {
$infoText .= "
" . Szene1_Translate::_("changeThisSettingInCockpitPrivacy");
}
}
$fullname = '
(' . $fullname . ')';
}
//title
/* Microformat - vCard
* fn,n,nickname,category > rel="tag",photo=userpic,role/org=status,locality=city,region=OÖ
*
*/
/* Userpic */
$myPage = $this->myPage;
$user = $this->user;
//TODO: get data for $_ without Weblife1...
$bla = new Weblife1_User_Page_Addon_Main(0);
$_ = $bla->build($this->user, $this->myPage);
if( !$myPage &&
!Weblife1_User_Object::checkShowDetail(
Registry::get('session')->user->getId(),
$user->getId(),
$user->getSetting()->getUserphotoPermission()
))
{
// todo pirvacy > new Translate
$image = '
';
}
else
{
/*
$myPicGalleryLink = '
'
.Szene1_Translate::_('morePhotosOfX',array($this->user->getUserName()))
.'';
*/
if($this->userPageOrigUrl){
$image ='
';
$image .= $myPicGalleryLink;
}
else{
//no image
$image = '
';
}
}
/* End Userpic */
/* User status */
/* TODO WEG */
if( !$myPage &&
!Weblife1_User_Object::checkShowDetail(
Registry::get('session')->user->getId(),
$user->getId(),
$user->getSetting()->getStatusHistoryPermission(),
UserSetting::STATUS_PERMISSION_ALL,
UserSetting::STATUS_PERMISSION_REGISTERED,
UserSetting::STATUS_PERMISSION_FRIENDS,
UserSetting::STATUS_PERMISSION_NO_ONE
))
{
$userstatus = '';
}
else
{
$statusMsg = false;
if(isset($_['statusMessage']) && !empty($_['statusMessage']))
{
$statusMsg = $_['statusMessage'];
}
$statusOffset = false;
if(isset($_['statusMessageTimeOffset']) &&
!empty($_['statusMessageTimeOffset']))
{
$statusOffset = $_['statusMessageTimeOffset'];
}
if($this->myPage)
{
$nav =
'
/ '
. ''
. Szene1_Translate::_('changeMyStatus')
. ''
. '';
}
$userstatus = '';
if(isset($_['statusObj']))
{
$userstatus .=
Html_UserStatusGenerator::buildUserpageMyStatusBox(
$_['statusObj'],
$_['statusCommentCount']);
}
else
{
if($this->myPage)
{
$nav =
'
/ '
. ''
. Szene1_Translate::_('changeMyStatus')
. ''
. '';
}
$userstatus .=
'
'
. '
'
. '
'
. ''
. (($user->isOnline()) ? 'online' : 'offline')
. ''
. $nav
. '
'
. '
';
}
}
/* End User status*/
/*TODO*/
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$gender = '
';
$status = 'offline';
if($this->user->isOnline()){
$status = 'online';
}
$status = '
';
}
/* meetmeAT */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$scao = new Szene1_Mapper_SimpleContentAddOns('meetpoint');
$result = $scao->getRecentMeetpointEntriesByUserId($this->user->getId(), SimpleContentAddOns_Interface::TYPE_SZENE1_EVENT, 1);
if(is_array($result) && count($result) > 0)
{
$meetText = 'Am '
.$result[0]['eventTime']
.' in
'
.$result[0]['eventName']
.''
.' @ '
.'
'
.$result[0]['eventLoc']
.'';
$meetText = '
Triff mich demnächst:'.$meetText.'';
}
}
/* end meetmeAT */
$mainBoxHtml ='
'
. $editButton
.'
'.$image.'
';
$mainBoxHtml .='
'.$meetText.'
';
$mainBoxHtml .='
';
/* Group Box */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$groupBoxTitle .= Szene1_Translate::_('groups'). ':
'.Szene1_Translate::_('XIsMemberOfTheFollowingGroups',$userName).'';
if(Registry::get('session')->loggedIn===true &&
Registry::get('session')->user->getId()==$this->userId)
{
$createNewGroup = Szene1_Translate::_('createNewGroup');
$groupBoxTitle .= '
';
$groupBoxTitle .= '
';
$groupBoxTitle .= '
';
}
$html .= '
';
$avatars = $this->userGroupsAvatar;
foreach($this->groups as $group)
{
if($group instanceof Group)
{
$html .= ' ';
if(isset($avatars[$group->getId()]) && $avatar_url = $avatars[$group->getId()])
{
$html .= '
';
}
else
{
$html .= '
';
}
$html .= '
';
if(strlen($group->getTitle(true))>15)
{
$grpTitle = trim(substr($group->getTitle(true),0,15).'...');
}
else
{
$grpTitle = trim($group->getTitle(true));
}
if(empty($grpTitle))
{
$grpTitle = $group->getName();
}
$html .= '
';
$currentUserRule = $group->getUserRule();
if($currentUserRule!==false &&
$currentUserRule >= 0 &&
$currentUserRule <= 3)
{
$html .= '
';
$html .= '
';
$html .= '
'.Szene1_Translate::_(Html_GroupGenerator::$userMemberRules[$group->getUserRule()]).'
';
$html .= '
';
$html .= '
';
}
$category = Szene1_Translate::_('category');
$html .= '
';
$html .= '
';
$html .= '
'.Weblife1_Group_Category::getBreadCrum($group->getType()).'
';
$html .= '
';
$html .= '
';
$html .= '
';
if(Registry::get('session')->loggedIn &&
$group->getUserRule(Registry::get('session')->user->getId()) > Szene1_Mapper_Group::MEMB_RULE_NO_MEMBER)
{
$html .= '
';
}
else
{
$html .= '
';
}
$html .= '
';
if(Registry::get('session')->loggedIn &&
$group->getUserRule(Registry::get('session')->user->getId()) >= Szene1_Mapper_Group::MEMB_RULE_ADMIN)
{
// $html .= '
';
$html .= '
';
$html .= '
';
// $html .= '
';
}
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
}
}
$html .= ' -
';
$html .= '
';
$groupBoxHtml .= $html;
}
/* End Group Box */
/* Friends Box */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$bla = new Weblife1_User_Page_Addon_Friends(0);
$_Friends = $bla->build($this->user, $this->myPage);
$isFirstGroup = true;
$count = 0;
if(!empty($_Friends))
{
foreach($_Friends as $groupName => $friends)
{
if(!$groupName || !is_array($friends))
{
continue;
}
if(count($friends) > 0)
{
foreach($friends as $friend)
{
if($count >= 18)
{
//break;
// TODO Count all Friends 4 Title
}
else
{
$htmlFriendsBox .=
'
';
}
$count++;
}
}
}
}
else
{
$htmlFriendsBox .=
'
'
. Szene1_Translate::_('XHasNoFriendsOnHisList',$user->getUserName())
. '';
}
$htmlMoreButton = '
';
$friendscount = $count;
$friendsBoxTitle = '
'.$this->user->getUserName() . '`s Friends ';
$friendsBoxHtml = '
';
}
/* End Friends Box */
/* Media Box */
/* TODO last Photo / Video Thumb > not Album Thumbs */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$bla = new Weblife1_User_Page_Addon_PhotoVideo(0);
$_Video = $bla->build($this->user, $this->myPage);
$mediaBoxTitle = '
'.Szene1_Translate::_('Fotos & Videos').'';
$html = '
';
$count = 0;
//$html = var_export($_Video['photolink'], true);
if(is_array($_Video['photos']) &&
count($_Video['photos']) >= 1 &&
!empty($_Video['photolink']))
{
foreach($_Video['photos'] as $photo)
{
if(empty($photo))
{
continue;
}
$count++;
$html .=
'- '
. ''
. ''
. ''
. '
';
if($count==2)
{
if(count($_Video['videos']) >= 1)
{
break;
}
}
else if($count==3)
{
break;
}
}
}
if(is_array($_Video['videos']) &&
count($_Video['videos']) >= 1 &&
!empty($_Video['videolink']) &&
$count < 3)
{
foreach($_Video['videos'] as $video)
{
if(empty($video))
{
continue;
}
$count++;
$html .=
'- '
. ''
. ''
. ''
. '
';
if($count==3)
{
break;
}
}
}
if($count==0)
{
/**
* Do not show box if it is empty!
*/
/*TODO Show Upload!!!*/
//return null;
$html =
''
. Szene1_Translate::_('noMediaFound')
. '';
}
$html .= '
';
$mediaBoxHtml = $html;
}
/* End mediaBox */
/* Stats */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$html = '
';
$statsBoxTitle = 'Statistik';
$statsBoxHtml = $html;
}
/* End Stats */
/*if header outside*/
/* Games */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$gamesBoxTitle = Szene1_Translate::_('Szene1 Games');
$gamesBoxHtml .='
';
}
/* End Games */
} catch(Exception $e) // should catch the interrupt exceptions //TODO: change it!
//TODO: display limitedInfo-Info
{
}
if (!function_exists('buildSearchLink')) {
function buildSearchLink($searchKey, $searchValue, $label)
{
if(!$searchKey || !$searchValue)
{
return $label;
}
else
{
return
'
'
. $label
. '';
}
}
}
if (!function_exists('doLine')) {
function doLine($label, $text, $width = null, $bottomPad = null)
{
if(is_numeric($width))
{
$style .= 'width:' . $width . 'px;';
}
if(is_numeric($bottomPad))
{
$style .= 'padding-bottom:' . $bottomPad . 'px;';
}
if(!empty($style))
{
$style = 'style="' . $style . '" ';
}
$dt = '
'. $label . '';
$dd = '
' . $text . '';
return $dt.$dd;
}
}
/* contentAd */
$adHtml = Szene1_Ads::getInstance()->getBanner(Szene1_Ads::BANNER_CONTENT_1);
$ad2Html = Szene1_Ads::getInstance()->getBanner(Szene1_Ads::BANNER_CONTENT_2);
%>
<% if ($this->detection->isMobile() || $this->detection->isTablet()): %>
<% endif %>
<% if (!$this->detection->isMobile() && !$this->detection->isTablet()): %>
<% echo Szene1_Ads::getInstance()->getBanner(Szene1_Ads::BANNER_SITEBAR) %>
<% endif %>