The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
I am unsure what the current status is. You are able to set the default to your tab but the data is blank? Can we get a link to view the problem?
|
#13
|
||||
|
||||
@Fields
Unfortunately, does not works even with that Mod, but thank you for your help. @Lynne I've some doubts sharing the link as it's an Adult Dating (but 100% NOT porn site). But as it currently has only 2-3 fake profiles for testing, in case that you don't have moral problems for the content, the link is: http://www.xxx24.gr/member.php?3-Rene&tab=dating#dating The tab uses the hook: member_complete and the template hook: profile_tabs_first. I also removed from the activity tab the code that makes it presected if there is no "&tab=...." in the link. As you can see by clicking the link, the tab opens normally as first tab, but it does not has content. Click any other tab and then back to mine and you'll see that funny issue. The content is there now. Maybe the hook: member_complete is wrong and seems that I must use another one. Don't really know. |
#14
|
||||
|
||||
Try with the template hook, profile_tabs instead.
|
#15
|
||||
|
||||
I'm already using profile_tabs as master template hook for the content. The template hook profile_tabs_first is for the position of the tab. See me code below:
Code:
require_once(DIR . '/includes/class_postbit.php'); require_once(DIR . '/includes/functions_user.php'); require_once(DIR . '/dating/includes/functions.php'); if (isset($vbulletin->GPC['tab'])) { $selected_tab = $vbulletin->GPC['tab']; } $blockinfo['title'] = $vbphrase["erotic_profile"]; $blockid = "dating"; $taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=dating#dating"; // Drawing the Tab $templater = vB_Template::create('memberinfo_tab'); $templater->register('selected_tab', $selected_tab); $templater->register('relpath', $relpath); $templater->register('blockinfo', $blockinfo); $templater->register('blockid', $blockid); $templater->register('taburl', $taburl); $template_hook['profile_tabs_first'] .= $templater->render(); // Page Template $templater = vB_Template::create('microdating_profile_tab'); ..... $template_hook['profile_tabs'] .= $templater->render(); Looking in my code again, I got a feeling that I've did something just the opposite. The code must be on the hook profile_tab_first and the tab in the profile_tabs. |
#16
|
||||
|
||||
No it looks right, try profile_tabs_last instead of first.
|
#17
|
||||
|
||||
The code below was missing from the actual tab code that's why content didn't appeared on the first access.
Code:
$templater->register('selected_tab', $selected_tab); I edit the template memberinfo: From: Code:
<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''"> Code:
<vb:if condition="$selected_tab == 'activitystream'"> What frustates me mostly is that vB uses globally the displayorder feature. From forums to Navigation Manager. Was so big deal to add such feature for profile tabs? --------------- Added [DATE]1413730930[/DATE] at [TIME]1413730930[/TIME] --------------- Edited: I clear the browser's cache and now I've one more strange issue. My tab appears preselected (but not highlighted) but if you see carefully you'll find the activity report about my data. In simple words in one tab there is content of 2 tabs http://www.xxx24.gr/member.php?3-Rene --------------- Added [DATE]1413732196[/DATE] at [TIME]1413732196[/TIME] --------------- Ok, Fixed after removing some code changes to member.php that I've did on the early suggestions here. Also Ozzy's mod helped me to determine the correct hook. Instead to post the full solution here, I prefer to post an Article for those who maybe are interest to add their own tab as first tab and make it preselected. It should be a full article for building a tab. Otherwise if you've the tab ready and you just want to make it preselected, Ozzy's mod does the work fine. Thank you all for your help. --------------- Added [DATE]1413735496[/DATE] at [TIME]1413735496[/TIME] --------------- Here is the full Article for those who maybe interest for building a new tab from scratch. https://vborg.vbsupport.ru/showthread.php?p=2519390 |
#18
|
||||
|
||||
I'm glad you got it working.
Quote:
|
Благодарность от: | ||
TheAdminMarket |
#19
|
|||
|
|||
Glad you got it working finally. Just for the record, if you're refering to my suggestions, I never meant to suggest that you should make any changes to member.php, only that you shoud look at that code to see what a plugin would need to do. Sorry if I wasn't clear enough.
|
#20
|
||||
|
||||
Quote:
--------------- Added [DATE]1413737563[/DATE] at [TIME]1413737563[/TIME] --------------- Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|