<% 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 %>
<%
if (!function_exists('buildSearchLink')) {
function buildSearchLink($searchKey, $searchValue, $label)
{
if(!$searchKey || !$searchValue)
{
return $label;
}
else
{
return
'
'
. $label
. '';
}
}
}
if($this->error)
{
$mainBoxHtml = $this->error;
/* Recommendations */
if(count($this->friendSuggestions)) {
$testBoxTitle = Szene1_Translate::_('didYouMean');
$testBoxHtml .= '
';
$userStatus = ($friend['online'] ? 'online':'offline');
foreach ($this->friendSuggestions as $friend){
$testBoxHtml .='-
'.$friend['name'].'
';
}
}
$userSearch = Szene1_Translate::_('userSearch');
$testBoxHtml .= ''.$userSearch.'';
$testBoxHtml .= '
';
}
else{
/* Buttons */
if ($this->myPage) {
$editButton = '
';
}
else
{
/* FRIEND */
if(!$this->isFriend)
{
$friendButton = '
Als Freund';
}
/* CHAT */
if($this->loggedIn && !$this->ignored)
{
$chatButton = '
Chat';
// Flirtbutton
$flirtButton = '
Zuzwinkern';
}
/* NEW-PN */
$newPn = Szene1_Translate::_('newMessage');
$pnButton = '
'.$newPn.'';
/* LIKE-BUTTON */
$likeButton = $reportButton = '';
if($this->loggedIn)
{
/* REPORT BUTTON */
$reportButton = '
User melden';
}
}
/* Share / Wall */
//$shareFacebook = Szene1_Translate::_('shareFacebook');
//$shareButton = '
Share';
/*$shareButton = '
'.$shareFacebook.'';*/
/* 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
/* 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 */
/* 4 Fotos from first Useralbum */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$bla = new Weblife1_User_Page_Addon_PhotoVideo(0);
$fotos = $bla->buildOnlyFotos($this->user, $this->myPage);
if(is_array($fotos['photos']) &&
count($fotos['photos']) >= 2 &&
!empty($fotos['photolink']))
{
$html_top_pics = '
';
$count = 0;
foreach($fotos['photos'] as $photo => $url)
{
if(empty($photo))
{
continue;
}
$count++;
if($count>5)
break;
$html_top_pics .=
'- '
. ''
. ''
. ''
. ''
. ''
. '
';
}
$html_top_pics .= '
';
}
}
/* Profil Details */
$detailBoxTitle = Szene1_Translate::_('profileDetails');
/* Limited Profile Information */
if(!$myPage &&
!Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
/* ???????????????????????????????? */
if($this->loggedIn)
{
$notify ='
'
. Szene1_Translate::_('onlyFriendsCanSeeThisUserpage')
. '';
}
else
{
$notify ='
'
. Szene1_Translate::_('onlyRegisteredUsersCanSeeThisUserpage')
. '';
}
/* ???????????????????????????????? */
foreach(array(
'age',
'loveState'
) as $key)
{
if(!isset($_[$key]) || empty($_[$key]))
{
continue;
}
$searchKey = 'search' . ucfirst(strtolower($key));
if($key == 'zodiacSign' &&
Registry::get('state')->getCode() == 'AT')
{
$txt =
'
' . $_[$key] . '';
}
else
{
if(isset($_[$searchKey]))
{
$txt = buildSearchLink($searchKey, $_[$searchKey], $_[$key]);
}
else
{
$txt = $_[$key];
}
}
$details .= '
'.Szene1_Translate::_($key).': '.$txt . ' / ';
}
if(isset($_['originLabel']) && isset($_['lastOnline']) &&
!empty($_['originLabel']) && !empty($_['lastOnline']))
{
$flag = '
';
if($_['searchDistrict'] > 0)
{
$txt = '
'.$_['originLabel'].' '.$flag;
/*buildSearchLink(
'searchDistrict',
$_['searchDistrict'],
$_['originLabel']
).$txt;*/
}
elseif($_['searchProvince'] > 0)
{
$txt = '
'.$_['originLabel'].' '.$flag;
/*buildSearchLink(
'searchProvince',
$_['searchProvince'],
$txt
);*/
}
$details .= '
'.Szene1_Translate::_('provenance').': '.$txt . ' / ';
}
else
{
$details .= '
'.Szene1_Translate::_('provenance').': '.Szene1_Translate::_('addressNotFound') . ' / ';
}
//throw new Weblife1_User_Page_Renderer_Interrupt();
}
/* End Limited Detail Information */
/* Full Detail Information */
if( $myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
if(isset($_['state']) && !empty($_['state'])) // wer hat das bitte state genannt? das ist der "user"status z.b. fotograf
{
switch($_['state'])
{
case 'Fotograf':
$txt = '
'.$_['state'].'';
break;
case 'Forum-Team':
$txt = '
'.$_['state'].'';
break;
case 'Szene1-Team':
$txt = '
'.$_['state'].'';
break;
default:
$txt = $_['state'];
}
$status_team = '
'.Szene1_Translate::_('state').': | '.$txt . ' |
';
}
/* if(isset($_['visits']) && !empty($_['visits']))
{
$detailBoxHtml .= doLine(Szene1_Translate::_('Visited'),Szene1_Translate::_('XTimesInY',array($_['visits'], $_['month'])));
}*/
if(isset($_['memberSince']) && !empty($_['memberSince']))
{
$memberSince = '
'.Szene1_Translate::_('memberSince').': | '.$_['memberSince'] . ' |
';
}
if(isset($_['lastOnline']) && !empty($_['lastOnline']))
{
$lastOnline = '
'.Szene1_Translate::_('lastOnline').': | '.$_['lastOnline'] . ' |
';
}
if(isset($_['originLabel']) && !empty($_['originLabel']))
{
$flag = '
';
if($_['searchDistrict'] > 0)
{
$txt = '
'.$_['originLabel'].' '.$flag;
/*buildSearchLink(
'searchDistrict',
$_['searchDistrict'],
$_['originLabel']
).$txt;*/
}
elseif($_['searchProvince'] > 0)
{
$txt = '
'.$_['originLabel'].' '.$flag;
/*buildSearchLink(
'searchProvince',
$_['searchProvince'],
$_['originLabel']
).$txt;*/
}
$provenance = '
'.Szene1_Translate::_('provenance').': | '.$txt . ' |
';
}
else
{
$details .= '
'.Szene1_Translate::_('provenance').': | '.Szene1_Translate::_('addressNotFound') . ' |
';
}
$cmCounter = 0;
foreach(array(
'age',
'type',
'size',
'eyeColor',
'weight',
'loveState',
'hairColor',
'location',
'hairLength',
'zodiacSign',
'occupation',
'orientation'
) as $key)
{
if(!isset($_[$key]) || empty($_[$key]))
{
continue;
}
$searchKey = 'search' . ucfirst(strtolower($key));
if($key == 'zodiacSign' &&
Registry::get('state')->getCode() == 'AT')
{
$txt =
'
' . $_[$key] . '';
}
elseif($key == 'occupation')
{
$txt =
'
' . $_[$key] . '';
}
elseif($key == 'type')
{
$txt =
'
' . $_[$key] . '';
}
elseif($key == 'loveState')
{
$txt =
'
' . $_[$key] . '';
}
elseif($key == 'age')
{
$txt =
'
' . $_[$key] . '';
}
else
{
if(isset($_[$searchKey]))
{
$txt = buildSearchLink($searchKey, $_[$searchKey], $_[$key]);
}
else
{
$txt = $_[$key];
}
}
if($key == 'age'){
$age = '
'.Szene1_Translate::_($key).': | '.$txt . ' |
';
}
else if($key == 'loveState'){
$loveState = '
'.Szene1_Translate::_($key).': | '.$txt . ' |
';
}
else{
$details .= '
'.Szene1_Translate::_($key).': | '.$txt . ' |
';
}
}
}
/* Full Detail Information */
/* End Profil Detail */
/*TODO*/
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$gender_tip = ($this->user->getGender() == 'm') ? 'männlich' : 'weiblich';
$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, 3);
if(is_array($result) && count($result) > 0)
{
foreach($result as $key => $val)
{
$meetText .=
$result[$key]['eventTime']
.' in
'
.$result[$key]['eventName']
.''
.' @ '
.'
'
.$result[$key]['eventLoc']
.'';
}
}
else
{
$meetText = '
Trag dich auf einem
Event in den Meetpoint ein um deinen Freunden zu zeigen wo man dich trifft!
';
}
$meetText = '
Triff mich demnächst:'.$meetText;
}
/* end meetmeAT */
if(time() < mktime(0,0,0,4,30,2013))
{
$ad_tag_loreal = '
';
}
$thumbClassName = $this->userPhotoExists ? 'no-pic' : 'with-pic';
$buttons = ''. $buttonBday . $friendButton . $pnButton . $chatButton . $shareButton . $flirtButton . $likeButton . $reportButton . $ad_tag_loreal;
$buttons = trim($buttons) ? '
'.$buttons .'
' : '';
$mainBoxHtml .='
'
. $editButton .'
'.$image.'
'.$buttons.'
';
/*todo need funktion of hiding content*/
$showMore = Szene1_Translate::_('showMore');
$showLess = 'weniger anzeigen';
$jsShow = 'if (this.innerHTML==\''.$showMore.'\') {
document.getElementById(\'moredetails\').toggle();
this.update(\''.$showLess.'\');
}
else {
this.update(\''.$showMore.'\');
document.getElementById(\'moredetails\').toggle();
}';
$showMoreLink = '
'.$showMore.'';
if($notify)
{
$userInfos = $notify . $details;
}
else
{
$userInfos = '
| |
';
$userInfos .= $loveState. $provenance . $status_team . $lastOnline .$age .$details. $memberSince;
$userInfos .= '
';
}
$mainBoxHtml .='
'.$this->user->getUserName().$fullname.'
';
$mainBoxHtml .= $html_top_pics;
$mainBoxHtml .= '
'.$userInfos.'
'.$meetText.'
';
/* Profile / About Box */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$abouttext = $this->user->getUserCharacter()->getParsedAboutText();
$username = $this->user->getUserName();
if(!empty($abouttext))
{
$aboutHtml = nl2br($abouttext);
/*
$jsAboutToggle = 'Effect.toggle(\'user_about\',\'blind\',{delay:0});Effect.toggle(\'user_about_short\',\'blind\',{delay:0});';
$showMoreLink = '
'.$showMore.'';
$showLessLink = '
'.$showLess.'';
$abbouttextShort = Filter::truncate($abouttext, 200, '...', true, true);
$aboutHtmlShort .= '
'.$abbouttextShort.' ';
if(strlen($abouttext) > strlen($abbouttextShort))
{
$aboutHtml = '
'.nl2br($abouttext).'... '.$showLessLink.'
';
$aboutHtmlShort .= $showMoreLink;
}
$aboutHtmlShort .= '
';
*/
}
elseif($myPage)
{
$aboutHtml =
'
Hier kannst du einen persönlichen Text über dich verfassen.';
}
if($aboutHtml)
{
$mainBoxHtml .='
'.'About me'.'
'
.$aboutHtml
//.$aboutHtmlShort
.'';
}
}
$mainBoxHtml .='
'; //vcard
/* End About */
/* 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 */
/* Wall Box */
if($this->wallFilter)
{
if (Registry::isRegistered('mobile-detection')) {
$mobileDetection = Registry::get('mobile-detection');
if($mobileDetection->isMobile() || $mobileDetection->isTablet()){
$underStitial = \Szene1_Ads::getInstance()->getUnderStitial();
$wallBoxHtml .= $underStitial .'
' ;
}else{
$wallBoxHtml .= \Szene1_Ads::getInstance()->getOutStreamAd();
}
}
$wallBoxTitle = "Newsfeed";
$wallBoxHtml .= Generator_Base::createWallTabs($this->wallTabs,'wall-tabs');
$wallBoxHtml .= '';
//if($this->loggedIn) {
if($this->meetpoints)
{
$this->result = $this->meetpoints;
$wallBoxHtml .= '
';
/* include Event-Search Template */
ob_start();
include './application/views/szene1/search/events.phtml';
$wallBoxHtml .= ob_get_contents();
ob_end_clean();
/* end include Event-Search Template */
$wallBoxHtml .= '
';
}
else
{
if($this->postOnWall)
{
$wallBoxHtml .= Generator_Base::createWallInput($this->username, $this->userPic,!$this->myPage);
}
if($this->displayWall)
{
$wallBoxHtml .= Generator_Base::createWall($this->wall, $this->wallFilter);
}
else
{
$wallBoxHtml = Szene1_Translate::_('nopermissiontoseewall');
}
}
/*}
else
{
$wallBoxHtml .= '
'.Szene1_Translate::_('onlyRegisteredUsers').'';
}*/
}
else
{
$wallBoxHtml .= '
'.Szene1_Translate::_('onlyFriendsCanSeeMyTimeline').'';
}
/* End Wall 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;
$friends = Base::getListOfFriends($user->getId(), 18);
if(!empty($friends) )
{
$count = count($friends);
$fList = array();
foreach($friends as $friendId => $friend)
{
$fName = $friend['name'];
$htmlFriendsBox .=
'
';
}
}
else
{
$htmlFriendsBox .=
'
'
. Szene1_Translate::_('XHasNoFriendsOnHisList',$user->getUserName())
. '';
}
$htmlMoreButton = '
';
$friendscount = $count;
$friendsBoxTitle = '
'.$this->user->getUserName() . '`s Friends';
$friendsBoxHtml = '
';
}
/* End Friends Box */
/* Common Friends Box */
if(Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$countCommonFriends = 0;
if(!empty($this->commonFriends) )
{
$commonFriendsBoxHtml = '';
$countCommonFriends = $this->commonFriendsCount;
$fList = array();
foreach($this->commonFriends as $friendId => $friend)
{
$fName = $friend['name'];
$commonFriendsBoxHtml .=
'
';
}
$commonFriendsBoxTitle = 'Gemeinsame Freunde ('.$countCommonFriends.')';
$commonFriendsBoxHtml = '
'
. $commonFriendsBoxHtml
. '
';
}
/*
else
{
$commonFriendsBoxHtml .=
'
'
. Szene1_Translate::_('XHasNoFriendsOnHisList',$user->getUserName())
. '';
}
*/
}
/* End Common 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.$test;
}
/* End Stats */
/* Group Box */
if($myPage || Weblife1_User_Object::checkShowDetail(Registry::get('session')->user->getId(), $user->getId(), $user->getSetting()->getUserpagePermission()))
{
$myGroups = Szene1_Translate::_('myGroups');
$groupBoxTitle = '
' .$myGroups . '';
$html = '';
$isFirstGroup = true;
if(!empty($this->groups))
{
foreach($this->groups as $group)
{
if(!($group instanceof Group))
{
continue;
}
if($isFirstGroup == false)
{
$html .= ' • ';
}
else
{
$isFirstGroup = false;
}
$label = $group->getTitle(true);
$html .=
'
'
. ''
. ' '
. ((empty($label)) ? $group->getName() : $label)
. ' '
. '';
}
}
else
{
$html .=
'
'
. Szene1_Translate::_('XIsNotMemberOfAnyGroup', $user->getUserName())
. '';
}
$groupBoxHtml = $html;
}
/* End GroupBox */
/*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 */
/* Dates Box*/
if($this->appointments)
{
$yourDates = Szene1_Translate::_('yourDates');
$calendarBoxTitle = '
'.$yourDates.'';
$calendarBoxHtml .= Generator_Calendar::getReminderSmall($this->appointments);
}
} // else
/* contentAd */
$adHtml = Szene1_Ads::getInstance()->getBanner(Szene1_Ads::BANNER_CONTENT_1);
$ad2Html = Szene1_Ads::getInstance()->getBanner(Szene1_Ads::BANNER_CONTENT_2);
/* adminBox */
if($this->adminAccess)
{
$adminBoxTitle = 'Backend-Menü für ' . $this->user->getUserName() . ' #'.$this->user->getId();
$adminBoxHtml = Generator_Userpage::buildBackendMenu($this->user, E);
}
/* Webradio */
$radioBoxTitle = '
Szene1 - Singlesuche';
$radioBoxHtml .= '
';
/* Like Box*/
$likeBoxTitle = 'Facebook';
$likeBoxHtml = '
';
/* End Like Box*/
/* Wink At User */
if($this->doWink) {
$mainBoxHtml .= '';
}
$adsenseBox = '';
$customAdsHtml = "
";
%>
<% 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 %>