vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Adding a New Tab in Member Profile (https://vborg.vbsupport.ru/showthread.php?t=235860)

BirdOPrey5 01-10-2011 12:33 AM

The two 408 templates have an error in the code, there's an extra single quote (') after the word "test" in the conditionals. You'll get an error if you try to save the templates without fixing it. Once fixed it worked great on my 4.0.8.

Edit- Actually there's quite a few extra single quotes in 408 data tab as well breaking the style, it seems there's an extra single quote after each red test in the code. Once they are all removed it works well.

computer22 04-09-2011 09:18 PM

I have a problem with my profile tab, when loading it it's displaying it like in the picture about the red line. When I click the "button" then it turns right into the correct color and format (below red line)

http://images.glua.info/?di=113023873364

Does anyone know what could cause that?

cellarius 05-23-2011 02:04 PM

Yep, the profile tabs template has changed a little in previous versions.

I would advise not to create a specific template for your tab - template nr. 1 (my_data_tab) in the tutorial is actually unnecessary. I call the standard memberinfo_tab instead and prefill the necessary variables. Saves you one template. PHP for this looks like that:

PHP Code:

if (isset($vbulletin->GPC['tab']))
{
    
$selected_tab $vbulletin->GPC['tab'];
}
$blockinfo['title'] = "Test Title";
$blockid "test";
$taburl $memberurl fetch_seo_url('member'$prepared) . "&tab=test#test";

$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_last'] .= $templater->render(); 

Also, the hook where the plugin needs to reside is member_complete, not member_build_blocks_start. Else the direct link to the tab by URL (member.php?123-testuser&tab=test#test) will not work properly.

Pandemikk 06-14-2011 02:34 AM

I can't get this to work. I used the above's PHP code for the plugin and the my_data_data_408 for the template.

The tab shows up fine but when I click it nothing is shown in the box.

cellarius 06-14-2011 05:15 AM

Have you seen my post directly over yours?

Pandemikk 06-14-2011 06:20 AM

Yes, I used your PHP code for the plugin and the my_data_data_408 for the template.

Pandemikk 06-15-2011 03:32 PM

Really need some help with this. It's driving me nuts that vB still hasn't a decent article on these member profile tabs.

Pandemikk 06-20-2011 04:24 AM

++++ you +++++++ then.

cellarius 06-20-2011 06:54 AM

I'm sure that this childish behaviour is going to get you LOTS of help.

Pandemikk 06-20-2011 05:43 PM

I already tried mature and exasperated behavior to no avail. Didn't have much hope for childish, but it did lift my spirits a bit which is always a plus.

Anyway, this thread is really outdated or just full of bad code. I've managed to clean it up a little but still can not get the tab to show via its AJAX call. Going to the tab via direct link shows up fine. It's weird. Has anybody got this working yet? I'd assume so.


All times are GMT. The time now is 12:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01207 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete