vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   question hook profile_tabs_first (https://vborg.vbsupport.ru/showthread.php?t=319454)

Easy5s.net 07-13-2015 04:44 AM

question hook profile_tabs_first
 
i use hook profile_tabs_first to add custome and i have use code after to set default.
Code:

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

Quote:

Originally Posted by ForceHSS (Post 2550071)

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.

kh99 07-13-2015 10:36 AM

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

kh99 07-13-2015 10:54 AM

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:

Code:

if (!$_REQUEST['tab']) $_REQUEST['tab'] = 'mytab';
if no, tab stream activity always default selected :(


All times are GMT. The time now is 09:12 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.00975 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete