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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2009, 05:45 PM
Omegatron Omegatron is offline
 
Join Date: Feb 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with New Profile Tab

Hey guys a little question here. Porting over a 3.8 mod done in 3.8 style rewrote the template according to vb 4.0 style turned on the mod and was trying to work out getting it to display.

Now have not dove into the php side of code too much with templater calls etc but I notices the tab is already viewable even though I am working on the code. All the html and correct variables are printed out in the html source of the page even though as noted I have not done any registering of variables etc.

http://www.reeftalk.com/forums/members/1-Chuck-S

I hit gallery tab and its empty but as noted even though the template seems to be passed fine in the html source so any ideas how to make it viewable?
Reply With Quote
  #2  
Old 11-16-2009, 06:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You just need to create the tab - this is an example from my own plugin:
hook_location - member_complete:
Code:
if ($selected_tab == 'your_variable') 
{ 
$template_hook['profile_tab_first'] .= '<dd class="selected"><a id="your_variable-tab" href="'.$vbulletin->input->fetch_relpath().'#your_variable-content" onclick="return tabViewPicker(this);">My Tab</a></dd>'; 
} 
else 
{ 
$template_hook['profile_tab_first'] .= '<dd><a id="your_variable-tab" href="'.$vbulletin->input->fetch_relpath().'#your_variable-content" onclick="return tabViewPicker(this);">My Tab</a></dd>'; 
}
Reply With Quote
  #3  
Old 11-16-2009, 07:12 PM
Omegatron Omegatron is offline
 
Join Date: Feb 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually not any modding needed. It was a template error really. The default vb3 way of doing things works fine. I updated my template the real issue was I mistakenly surrounded my code with a div tag because I had actually viewed the source of the page to get the layout etc instead of looking at the other templates in admin. I removed the div tag that surrounded it and it displays fine.

http://www.reeftalk.com/forums/members/1-Chuck-S
Reply With Quote
  #4  
Old 11-16-2009, 09:15 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, so they finally fixed that. Glad to hear it. I'll have to go change mine. (In the previous versions you had to manually add the tab like I wrote above.)
Reply With Quote
  #5  
Old 11-16-2009, 10:26 PM
Omegatron Omegatron is offline
 
Join Date: Feb 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.reeftalk.com/forums/members/1-Chuck-S" target="_blank">http://www.reeftalk.com/forums/members/1-Chuck-S</a>

well the tab shows and works if you click it and click another all works fine

However the problem I have to begin with is if you scan down the page you see the info being printed when the selected messages tab by default displays.

If I click a tab everything is fine. Does your code help this?
Reply With Quote
  #6  
Old 11-16-2009, 10:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't tried this on beta 3 yet. It was working on beta 2, but if they have fixed the issue with the tab, I will try it on beta 3 one of these days. But yes, mine was working fine and showing when it should. You do have to do something to define when it is selected though, and I have no idea what you did to define that.
Reply With Quote
  #7  
Old 11-16-2009, 10:47 PM
Omegatron Omegatron is offline
 
Join Date: Feb 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well I tried your line. Did you also have to define any templates because I did not have to.
Reply With Quote
  #8  
Old 11-16-2009, 11:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Define any templates where? I use templates for some of my output, yes, if that is what you are asking.
Reply With Quote
  #9  
Old 11-16-2009, 11:47 PM
Omegatron Omegatron is offline
 
Join Date: Feb 2003
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well the old way we just did this

Code:
class vB_ProfileBlock_ppProfile extends vB_ProfileBlock
{
	var $template_name = 'memberinfo_block_ppProfile';
Can you post an example of how you did yours I am thinking I need to rewrite this thing more than it is.
Reply With Quote
  #10  
Old 11-16-2009, 11:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And you still do that. I thought you meant do I use more templates besides that for my output there. My plugin gets a list of threads, so I use a template for those threads that I go through in a while loop. Then, I use that output in the $template_name template.
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 08:47 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.04046 seconds
  • Memory Usage 2,249KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_code
  • (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
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete