Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.
I know this is a customization issue and for the most part, I have been pretty good at figuring out what I want to accomplish and coming up with a solution but I feel in this case, since I am 99% to where I need to be, hopefully you can look over what I have done thus far and help me with the finishing item :)
As the title states, I want to have the About Me tab on the user profile page to be the default view ONLY if there has been no activity in the wall stream. This could be a good future feature but for now I will show you what I have done: I feel I am not calling the right variable so hopefully that is all I need to do:
In the templates/mytemplate/layouts/stream/base.php file I did the following test successfully:
if (count($activities) == 0) {
<div class="tester">equals zero</div>
}
and ...
if (count($activities) > 0) {
<div class="tester">more than zero</div>
}
so i was able to establish if there are no activities then 'do this'.
I then went to the tabs.php file in applications/tabs.php
foreach ($apps as $app) {
//special case for active tab (about me and fix will follow the backend settings)
$active = true; if (count($activities) == 0) {
if($app->id == 'feeds-special'){
$config = CFactory::getConfig();
$active = ($config->get('default_profile_tab') == 1) ? true : false;
}elseif($app->id == 'aboutme-special'){
$config = CFactory::getConfig();
$active = ($config->get('default_profile_tab') == 0) ? true : false;
}
if (trim($app->data) != '') {
?>
<a<?php echo (!$active || $i++) ? '' : ' class="active"' ?>
href="#joms-app--<?php echo $app->id; ?>"><?php echo JText::_($app->title); ?></a>
<?php
}
}else {
I feel like the $activities variable is not being called in the tabs page and was hoping you could tell what I need to place at the top of the page to call that variable?
Hopefully this makes sense.
If there is actually an easier way to accomplish this, I would also be open that any suggestions :)
Thanks for all your hard work!
Adam
PS. I just noticed that with what I did, it actually does make the About Me tab active, however it doesn't switch the display:none inline style so hopefully that helps in narrowing it down some
STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER