The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Member.php default tab
Hello,
Using the hook profile_tabs_first I've created a page tab with some extra user info. So far so good. As expected, it appears as first tab. The problem is that all core links to member.php redirect to "My Activity" tab. I thought that by placing my custom tab first the links will open the 1st tab. But not. Anyone knows how to set as default tab my custom tab? Manually changing the links to: member.php?u={vb:raw userid}&tab=mycustomtab#mycustomtab works fine, but it's almost impossible to change all core links. Thank you |
#2
|
|||
|
|||
Maybe you need to make your tab the default tab. In the navigation table there's a state field, and one of the bits says the tab is the default. Look in admin/navigation.php, where it does if ($_REQUEST['do'] == 'dodefault'), and maybe also in includes/functions_navigation.php.
|
#3
|
||||
|
||||
First of all thank you for your prompt attention. Really appreciated. I gave a look at navigation.php but I got a feeling that this file is for the site's navigation tabs, while I'm talking for the user's profile tabs.
|
#4
|
|||
|
|||
Oops, you're right, sorry. I saw "Activity" and thought you meant the navigation tab.
|
#5
|
||||
|
||||
See the attached screenshot to understand for which tabs I'm talking about.
|
#6
|
|||
|
|||
OK, in member.php there's this code:
Code:
if ($vbulletin->GPC['vmid'] AND !$vbulletin->GPC['tab']) { $vbulletin->GPC['tab'] = 'visitor_messaging'; } Code:
if (!$vbulletin->GPC['tab']) { $vbulletin->GPC['tab'] = 'my_tab'; } Edit: ...or maybe you also need to check $vbulletin->GPC['vmid'] like the code above. I don't know what that is. |
#7
|
||||
|
||||
I'll check your suggestion and I'll come back. Meanwhile I was checking the template MEMBERINFO and I found something that can helps, but still haven't tested it.
Code:
{vb:raw template_hook.profile_tabs_first} <vb:if condition="$blocks[activitystream]"><dd<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''"> class="userprof_module" <vb:else /> class="userprof_moduleinactive" </vb:if>><a id="activitystream-tab" href="{vb:link member, {vb:raw userinfo}, "tab=activitystream"}#activitystream" onclick="return tabViewPicker(this);">{vb:raw activity_phrase}</a></dd></vb:if> --------------- Added [DATE]1412791348[/DATE] at [TIME]1412791348[/TIME] --------------- Unfortunatelly your solution does not works, so I need to try with the template. That: Code:
$vbulletin->GPC['vmid'] |
#8
|
|||
|
|||
That makes sense. So what that code does is go to the visitor message tab if the url has a vmid. So you wouldn't want to check for a vmid, but it seems like you should be able to set $vbulletin->GPC['tab'] to a default.
|
#9
|
||||
|
||||
Quote:
To laught because from no solution we've in hands 2 solutions. Yours is better as PHP modification is easier than template. But the template also works. To cry because even if my tab becomes default, it does not shows data. Just a blank tab. The funny is that if I click another tab and then come back to my tab it shows the data. |
#10
|
||||
|
||||
Anyone??
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|