The events moved from the profile to the navigation bar - for supported themes

This commit is contained in:
Michael Vogel 2015-09-30 18:50:44 +02:00
parent 2e8caf7f27
commit 68a6f0298e
8 changed files with 41 additions and 24 deletions

View file

@ -408,6 +408,7 @@ if(! class_exists('App')) {
public $videoheight = 350; public $videoheight = 350;
public $force_max_items = 0; public $force_max_items = 0;
public $theme_thread_allow = true; public $theme_thread_allow = true;
public $theme_events_in_profile = true;
// An array for all theme-controllable parameters // An array for all theme-controllable parameters
// Mostly unimplemented yet. Only options 'stylesheet' and // Mostly unimplemented yet. Only options 'stylesheet' and

View file

@ -664,6 +664,7 @@ if(! function_exists('profile_tabs')){
); );
if ($is_owner){ if ($is_owner){
if ($a->theme_events_in_profile)
$tabs[] = array( $tabs[] = array(
'label' => t('Events'), 'label' => t('Events'),
'url' => $a->get_baseurl() . '/events', 'url' => $a->get_baseurl() . '/events',

View file

@ -240,6 +240,7 @@ function nav_set_selected($item){
'settings' => null, 'settings' => null,
'contacts' => null, 'contacts' => null,
'manage' => null, 'manage' => null,
'events' => null,
'register' => null, 'register' => null,
); );
$a->nav_sel[$item] = 'selected'; $a->nav_sel[$item] = 'selected';

View file

@ -179,6 +179,10 @@ function events_content(&$a) {
); );
} }
if ($a->theme_events_in_profile)
nav_set_selected('home');
else
nav_set_selected('events');
$editselect = 'none'; $editselect = 'none';
if( feature_enabled(local_user(), 'richtext') ) if( feature_enabled(local_user(), 'richtext') )
@ -249,6 +253,7 @@ function events_content(&$a) {
$o =""; $o ="";
// tabs // tabs
if ($a->theme_events_in_profile)
$tabs = profile_tabs($a, True); $tabs = profile_tabs($a, True);

View file

@ -9,6 +9,8 @@ function notes_init(&$a) {
$which = $a->user['nickname']; $which = $a->user['nickname'];
nav_set_selected('home');
// profile_load($a,$which,$profile); // profile_load($a,$which,$profile);
} }

View file

@ -17,6 +17,8 @@ function photos_init(&$a) {
return; return;
} }
nav_set_selected('home');
$o = ''; $o = '';
if($a->argc > 1) { if($a->argc > 1) {

View file

@ -15,6 +15,8 @@ function videos_init(&$a) {
return; return;
} }
nav_set_selected('home');
$o = ''; $o = '';
if($a->argc > 1) { if($a->argc > 1) {

View file

@ -10,6 +10,9 @@
*/ */
function vier_init(&$a) { function vier_init(&$a) {
$a->theme_events_in_profile = false;
set_template_engine($a, 'smarty3'); set_template_engine($a, 'smarty3');
$baseurl = $a->get_baseurl(); $baseurl = $a->get_baseurl();