diff --git a/application/modules/default/views/scripts/partials/header/header.phtml b/application/modules/default/views/scripts/partials/header/header.phtml
index fee290431..a7077506b 100644
--- a/application/modules/default/views/scripts/partials/header/header.phtml
+++ b/application/modules/default/views/scripts/partials/header/header.phtml
@@ -1,401 +1,414 @@
.
**/
$helperFetchCategory = new Default_View_Helper_CatTitle();
$helperFetchCatParent = new Default_View_Helper_CatParent();
$getAuthUser = new Default_View_Helper_GetAuthUser();
$helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl();
$helperBuildBaseUrl = new Default_View_Helper_BuildBaseUrl();
$helperImage = new Default_View_Helper_Image();
$auth = Zend_Auth::getInstance();
$member = $getAuthUser->getAuthUser();
$phash = null;
$ltat = null;
if ($auth->hasIdentity()) {
$sess = new Zend_Session_Namespace('ocs_meta');
$phash = $sess->phash;
$ltat = $sess->openid;
}
$helperUserRole = new Backend_View_Helper_UserRole();
$userRoleName = $helperUserRole->userRole();
$isAdmin = false;
if (Default_Model_DbTable_MemberRole::ROLE_NAME_ADMIN == $userRoleName) {
$isAdmin = true;
}
$jsonmember = null;
if($member && !empty($member->username)){
$jsonmember=array(
'member_id' => $member->member_id,
'username' => $member->username,
'avatar' => $member->avatar,
'profile_image_url' => $member->profile_image_url,
'isAdmin' => $isAdmin
);
}
$serverUrl = $this->serverUrl();
$baseurl = Zend_Registry::get('config')->settings->client->default->baseurl;
//$baseurl = $helperBuildBaseUrl->buildBaserUrl();
// $baseurl = Zend_Registry::get('config')->settings->client->default->baseurl_meta;
$baseurlStore = Zend_Registry::get('config')->settings->client->default->baseurl_store;
$searchbaseurl = $this->buildSearchBaseUrl();
$sname = Zend_Registry::get('store_host');
$store_config = Zend_Registry::get('store_config');
$store_order = $store_config->order;
$store_name = $store_config->name;
$is_show_title = $store_config->is_show_title;
$last_char_store_order = substr($store_order, -1);
$is_show_real_domain_as_url = $store_config->is_show_real_domain_as_url;
+
$url_forum = Zend_Registry::get('config')->settings->client->default->url_forum;
$url_gitlab = Zend_Registry::get('config')->settings->client->default->url_gitlab;
$url_blog = Zend_Registry::get('config')->settings->client->default->url_blog;
$config_domain = $config = Zend_Registry::get('config')->settings->domain;
$url_openid = $config_domain->openid->host;
/** @var Zend_Controller_Request_Http $request */
$request = Zend_Controller_Front::getInstance()->getRequest();
$http_scheme = $request->getScheme();
$json_menu = $this->fetchMetaheaderMenuJson();
$json_tree = $this->fetchStoresForCatTreeJson();
$filter = new Local_Filter_Url_Encrypt();
//$thisurl = $helperBuildBaseUrl->buildBaserUrl();
$thisurl = "/";
if(isset($_GET['url'])) {
$thisurl = $_GET['url'];
}
$url_logout = "/logout?redirect=".$filter->filter($thisurl);
$url_login = "/logint?redirect=".$filter->filter($thisurl);
$cat_title = $helperFetchCategory->catTitle($this->cat_id);
$category_id = $this->cat_id;
$category_id_parent = $helperFetchCatParent->getCatParentId(array('project_category_id' => $category_id));
$cat_title_length = strlen($cat_title);
//check logo-width:
$logoWidth = (int)$this->template['header-logo']['width'];
$cat_title_left = (int)$logoWidth + (int)strlen($store_name)+120;
$tabs_left = (int)$this->template['header-nav-tabs']['absolute-left'];
$tabs_left += $cat_title_length*10;
//$idCat = Zend_Registry::isRegistered('store_category_list') ? Zend_Registry::get('store_category_list') : null;
//$helperUserRole = new Backend_View_Helper_UserRole();
//$userRoleName = $helperUserRole->userRole();
//$forum_url_postfix = Zend_Auth::getInstance()->hasIdentity() ? '/session/sso' : '';
+//Is stayInContext and in Teamplate is set a Footer Header == show the text from tmeplate in page header
+$stay_in_context = $store_config->stay_in_context;
+$header_links = $this->template['trademark']['text'];
+$show_header_links = false;
+if($stay_in_context == 1 && $header_links != '') {
+ $show_header_links = true;
+} else {
+ $header_links = "";
+}
+
$j_section = null;
if($this->cat_id>0)
{
$sm = new Default_Model_Section();
$s = $sm->fetchSectionForCategory($this->cat_id);
if($s && $s['section_id'])
{
$sectionStats = $sm->fetchSectionStatsLastMonth($s['section_id']);
$j_section = array();
$j_section['section_id'] = $s['section_id'];
$j_section['name'] = $s['name'];
$j_section['amount'] = $sm->fetchProbablyPayoutLastMonth($s['section_id']);
$j_section['amount_factor'] = $j_section['amount']*$sectionStats['factor'];
$goal = ceil( $j_section['amount_factor'] / 500 ) * 500;
$j_section['amount'] = number_format($j_section['amount'], 2, '.', '');
$j_section['amount_factor'] = number_format($j_section['amount_factor'], 2, '.', '');
$j_section['goal'] = ($goal ==0 ? 500: $goal);
$info = new Default_Model_Info();
$supporters = $info->getNewActiveSupportersForSectionUnique($s['section_id']);
$supporterMonths = $info->getSectionSupportersActiveMonths($s['section_id']);
$sp = array();
foreach ($supporters as $s) {
$t = array();
$t['username'] = $s['username'];
$t['profile_image_url'] = $helperImage->Image($s['profile_image_url'], array('width' => 100, 'height' => 100));
$t['sum_support'] = $s['sum_support'];
foreach ($supporterMonths as $m) {
if($m['member_id'] == $s['member_id'])
{
$t['active_months'] = $m['active_months'];
break;
}
}
$sp[] = $t;
}
$j_section['supporters'] = $sp;
//$j_section['supportersX'] = $supporters;
}
}
?>
inlineScript()->appendScript(
'$(document).ready(function(){
MenuHover.setup();
Popuppanel.setup();
LoginContainer.update();
PlingsRedirect.setup();
});'
);
diff --git a/application/modules/default/views/scripts/partials/header/template_pling_home.phtml b/application/modules/default/views/scripts/partials/header/template_pling_home.phtml
index d53c79177..eb96533ee 100755
--- a/application/modules/default/views/scripts/partials/header/template_pling_home.phtml
+++ b/application/modules/default/views/scripts/partials/header/template_pling_home.phtml
@@ -1,162 +1,174 @@
.
**/
$helperFetchCategory = new Default_View_Helper_CatTitle();
$helperFetchCatParent = new Default_View_Helper_CatParent();
$getAuthUser = new Default_View_Helper_GetAuthUser();
$helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl();
$helperBuildBaseUrl = new Default_View_Helper_BuildBaseUrl();
$helperImage = new Default_View_Helper_Image();
$auth = Zend_Auth::getInstance();
$member = $getAuthUser->getAuthUser();
$phash = null;
$ltat = null;
if ($auth->hasIdentity()) {
$sess = new Zend_Session_Namespace('ocs_meta');
$phash = $sess->phash;
$ltat = $sess->openid;
}
$jsonmember = null;
if($member && !empty($member->username)){
$jsonmember=array(
'member_id' => $member->member_id,
'username' => $member->username,
'avatar' => $member->avatar,
'profile_image_url' => $member->profile_image_url
);
}
$serverUrl = $this->serverUrl();
$baseurl = Zend_Registry::get('config')->settings->client->default->baseurl;
$searchbaseurl = $this->buildSearchBaseUrl();
$sname = Zend_Registry::get('store_host');
$store_config = Zend_Registry::get('store_config');
$store_order = $store_config->order;
$store_name = $store_config->name;
$is_show_title = $store_config->is_show_title;
$last_char_store_order = substr($store_order, -1);
+//Is stayInContext and in Teamplate is set a Footer Header == show the text from tmeplate in page header
+$stay_in_context = $store_config->stay_in_context;
+$header_links = $this->template['trademark']['text'];
+$show_header_links = false;
+if($stay_in_context == 1 && $header_links != '') {
+ $show_header_links = true;
+} else {
+ $header_links = "";
+}
+
$url_forum = Zend_Registry::get('config')->settings->client->default->url_forum;
$url_gitlab = Zend_Registry::get('config')->settings->client->default->url_gitlab;
$url_blog = Zend_Registry::get('config')->settings->client->default->url_blog;
$config_domain = $config = Zend_Registry::get('config')->settings->domain;
$url_openid = $config_domain->openid->host;
/** @var Zend_Controller_Request_Http $request */
$request = Zend_Controller_Front::getInstance()->getRequest();
$http_scheme = $request->getScheme();
$json_menu = $this->fetchMetaheaderMenuJson();
$json_tree = $this->fetchStoresForCatTreeJson();
$filter = new Local_Filter_Url_Encrypt();
//$thisurl = $helperBuildBaseUrl->buildBaserUrl();
$thisurl = "/";
if(isset($_GET['url'])) {
$thisurl = $_GET['url'];
}
$url_logout = "/logout?redirect=".$filter->filter($thisurl);
$url_login = "/logint?redirect=".$filter->filter($thisurl);
$cat_title = $helperFetchCategory->catTitle($this->cat_id);
$category_id = $this->cat_id;
$category_id_parent = $helperFetchCatParent->getCatParentId(array('project_category_id' => $category_id));
$cat_title_length = strlen($cat_title);
//check logo-width:
$logoWidth = (int)$this->template['header-logo']['width'];
$cat_title_left = (int)$logoWidth + (int)strlen($store_name)+120;
$tabs_left = (int)$this->template['header-nav-tabs']['absolute-left'];
$tabs_left += $cat_title_length*10;
echo $this->render('partials/header/metaheader.phtml');
?>
inlineScript()->appendScript(
'$(document).ready(function(){
MenuHover.setup();
Popuppanel.setup();
LoginContainer.update();
PlingsRedirect.setup();
});'
);