View Full Version : question hook profile_tabs_first
Easy5s.net
07-13-2015, 04:44 AM
i use hook profile_tabs_first to add custome and i have use code after to set default.
if (!$_REQUEST['tab'])
{
$_REQUEST['tab'] = 'mytab';
}
Now I have the following cases:
- if user no data, my tabs will be hidden and reset tab activitystream it default.
ForceHSS
07-13-2015, 04:56 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=317852" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=317852</a>
Easy5s.net
07-13-2015, 05:10 AM
https://vborg.vbsupport.ru/showthread.php?t=317852
not exactly my reviews, my English may not be good :confused:
Now I have the following cases:
- if user no data, my tabs will be auto hidden (not show tab name) and reset tab activitystream it default.
Sorry, I don't understand exactly what you're asking. profile_tabs_first is a template hook but you posted php code above, so I don't understand that.
It sounds like maybe you want your custom tab to be selected unless the user has no data for the custom tab, then you want activity stream selected?
Easy5s.net
07-13-2015, 10:44 AM
when user have data --> OK :up:
https://vborg.vbsupport.ru/external/2015/07/17.png
when user not data, tab stream activity not selected :(
https://vborg.vbsupport.ru/external/2015/07/18.png
Well, I guess you'd have to check to see if there's any data, and if not, don't set $_REQUEST['tab'] = 'mytab'; ?
Easy5s.net
07-13-2015, 10:59 AM
at hook member_execute_start i set code:
if (!$_REQUEST['tab']) $_REQUEST['tab'] = 'mytab';
if no, tab stream activity always default selected :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.