Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 10-12-2014, 04:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #12  
Old 10-15-2014, 12:30 PM
Fields Fields is offline
 
Join Date: Jun 2014
Location: Germany
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why you don't use an add-on like Ozzy's here:

https://vborg.vbsupport.ru/showthread.php?t=302655
Reply With Quote
Благодарность от:
ozzy47
  #13  
Old 10-19-2014, 05:10 AM
TheAdminMarket's Avatar
TheAdminMarket TheAdminMarket is offline
 
Join Date: Jun 2013
Location: Thessaloniki, Greece
Posts: 511
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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.
Reply With Quote
  #14  
Old 10-19-2014, 08:50 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try with the template hook, profile_tabs instead.
Reply With Quote
  #15  
Old 10-19-2014, 09:33 AM
TheAdminMarket's Avatar
TheAdminMarket TheAdminMarket is offline
 
Join Date: Jun 2013
Location: Thessaloniki, Greece
Posts: 511
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();
--------------- Added [DATE]1413716087[/DATE] at [TIME]1413716087[/TIME] ---------------

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.
Reply With Quote
  #16  
Old 10-19-2014, 11:38 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No it looks right, try profile_tabs_last instead of first.
Reply With Quote
  #17  
Old 10-19-2014, 01:52 PM
TheAdminMarket's Avatar
TheAdminMarket TheAdminMarket is offline
 
Join Date: Jun 2013
Location: Thessaloniki, Greece
Posts: 511
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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);
So now I can have my tab as first, I can see the content when I'm accessing the profile page with &tab=dating#dating but I can't make it to be default even using Ozzy's mod.

I edit the template memberinfo:
From:
Code:
<vb:if condition="$selected_tab == 'activitystream' OR $selected_tab == ''">
To:
Code:
<vb:if condition="$selected_tab == 'activitystream'">
to avoid Activity tab to be preselected when $selected_tab == ''. I also added this condition to my own link. Nothing Still the Activity tab is preselected (but not highlighted).

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
Reply With Quote
  #18  
Old 10-19-2014, 03:26 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm glad you got it working.

Quote:
Originally Posted by NickTheGreek View Post
@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
LOL. You should *see* some of the sites that we have to view as Support Staff. I no longer look too closely at the content and focus only on the problem and that way my delicate sensibilities are not offended.
Reply With Quote
Благодарность от:
TheAdminMarket
  #19  
Old 10-19-2014, 03:36 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NickTheGreek View Post
Ok, Fixed after removing some code changes to member.php that I've did on the early suggestions here.
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.
Reply With Quote
  #20  
Old 10-19-2014, 03:49 PM
TheAdminMarket's Avatar
TheAdminMarket TheAdminMarket is offline
 
Join Date: Jun 2013
Location: Thessaloniki, Greece
Posts: 511
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
LOL. You should *see* some of the sites that we have to view as Support Staff. I no longer look too closely at the content and focus only on the problem and that way my delicate sensibilities are not offended.
Glad to know that except of very helpful person you're having good sense of humor Well, unlike you, once that I was on a same position I found myself walking on that the site for some hours, I created a profile and finally I got out forgeting at all that I was there to check an issue Men...... same all around the world :P

--------------- Added [DATE]1413737563[/DATE] at [TIME]1413737563[/TIME] ---------------

Quote:
Originally Posted by kh99 View Post
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.
NOOO !!! Sorry if you got this meaning. My English is not the best and sometimes misunderstandings can come up easily. Be sure that before your suggestions I already had did some tests. It's true that I tested your suggestions, but this in no way means that you've any responsibility for it. Finally you spent your valuable time trying to help me.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07873 seconds
  • Memory Usage 2,295KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete