<% 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->showInviteFriendForm) {
$friendInviteForm = '
';
$friendInviteTitle = Szene1_Translate::_('addFriendCap');
}
/* for testing */
if($this->myPage)
{
$editButton = '
';
}
$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) {
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
/* 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 .='
';
/* Interests */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
//tags
if(isset($_['tags']) &&
($_['tags'] instanceof Weblife1_Tag_Container))
{
$txt = '';$icon = '';
if($myPage)
{
$selId = 'userpage_box_tageditor_selector';
$profileInterestsBoxCorner = array();
$headlink = array( 'kind' => Szene1_Html_BoxLayout::CORNER_ICON,
'onclick' => '$(\'' . $selId . '\').getStyle(\'display\')==\'none\' '
. '? $(\'' . $selId . '\').show() '
. ': $(\'' . $selId . '\').hide(); return false;',
'classes' => 'ICON16_BW_EDIT',
'title' => 'Edit',
'link' => '/cockpit/interests'
);
$profileInterestsBoxCorner[] = $headlink;
$editAllInterests = Szene1_Translate::_('editAllInterests');
$txt .=
'
'
. '
'
. '
'
. Szene1_Translate::_('chooseInterestAreaToEdit')
. '
'
. ''
. '
'
. '
'
. '
'
. ''
. '
'
. '';
}
$interestsBoxTitle .= Szene1_Translate::_('interests');
$interestsBoxHtml .= $txt .Generator_Tag::buildUserpageTags($_['tags']);
}
}
/* End Interests */
/* Friends Box */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$isFirstGroup = true;
$count = 0;
if(!empty($this->friendgroups))
{
foreach($this->friendgroups as $groupName => $friends)
{
if(!$groupName || !is_array($friends))
{
continue;
}
if($myPage)
{
$gId = $this->fGroups[$groupName];
//$editable = 'contenteditable="true"'; //html5 replace with some js stuff
$editable = 'id="fg_'.$gId.'" onclick="Friendship.groupRename($(this).up(),'.$gId.');return false;"';
}
$friendsList .= '
'.$groupName.'';
$friendsList .= '';
$friendsList .= '
';
$friendsList .= '
';
if(count($friends) > 0)
{
foreach($friends as $friend)
{
if($this->myPage) //icon-16-delete-circle float-r
{
$editFriend ='';
$editFriend .='';
}
$friendsList .=
'-
'.$editFriend.'
'.$friend.'
';
$count++;
}
}
else
{
$friendsList .=
''
. Szene1_Translate::_('XHasNoFriendsOnHisList',$user->getUserName())
. '';
}
$friendsList .='
';
}
}
else
{
$friendsList .=
'
'
. Szene1_Translate::_('XHasNoFriendsOnHisList',$user->getUserName())
. '';
}
$htmlMoreButton = '
';
$friendscount = $count;
$friendsBoxTitle = $this->user->getUserName() . '`s Friends ('.$friendscount.')';
$jsDropDown = 'onclick="javascript:if($(\'dropdownGroups\').style.display == \'none\') {
$(\'dropdownGroups\').style.display = \'block\';
} else {
$(\'dropdownGroups\').style.display = \'none\';
} "';
/*dropdown*/
if(!empty($this->friendgroups))
{
$friendsGroups .= '
';
}
/*end dropdown*/
$createGroupMess = Szene1_Translate::_('createNewFriendsGroup');
$friendsBoxHtml .= '
';
$friendsBoxHtml .= '
'
. $friendsList
. '
';
}
/* 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 %>