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 12-25-2009, 06:58 PM
ageurtse ageurtse is offline
 
Join Date: Apr 2009
Location: almelo
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default howto add an extra tab to the members profile page

hello,

where can i find information about how to add an extra tab in the members profile page.
i'm trying to make an extra tab which displays all the attachments post by that user.

this is my first attempt to program somthing in vb so i have a lot of questions. and this is one.

i supose i make a new template, which displays the attachments. now i need that template loaded in a new tab in the members page.

so a lot of work and learning to do.

i don't think this link is going to work
https://vborg.vbsupport.ru/showthrea...light=profile*
Reply With Quote
  #2  
Old 12-25-2009, 07:22 PM
Vaupell's Avatar
Vaupell Vaupell is offline
 
Join Date: Apr 2008
Location: Esbjerg, Denmark
Posts: 1,036
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attachment 108145

Like that ?
Reply With Quote
  #3  
Old 12-25-2009, 07:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is an article in the vB3 forum which pretty much spells out how to do it. I think there are just a couple of small changes you need to make for vB4 (if any, I can't remember). Anyway, follow it, and if you have problems, post what you have and we'll see if we can see what is wrong.

[How-to] Add more tabs to the vB 3.7 profile pages
Reply With Quote
  #4  
Old 12-26-2009, 04:18 AM
ageurtse ageurtse is offline
 
Join Date: Apr 2009
Location: almelo
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the article lynne has point me to is working.

the next thing if i called the page direct http://localhost/forums/member.php?8...mymodification there is an empty page displayd.

if i go to members page itself then click on the mymodification tab the content is displayed, what could be wrong.

this is the code i have this far. the output needs to be formated and there needs to be a page counter so a lot of work to do.
PHP Code:
$blocklist array_merge($blocklist, array(
    
'mymodification' => array(
        
'class' => 'MyModification',
        
'title' => 'Bijlagen',
        
'hook_location' => 'profile_left_last'
    
)
));

class 
vB_ProfileBlock_MyModification extends vB_ProfileBlock
{
    var 
$template_name 'memberinfo_block_mymodification';

    function 
confirm_empty_wrap()
    {
        return 
false;
    }

    function 
confirm_display()
    {
        return (
$this->block_data['mymodification'] != '');
    }

    function 
prepare_output($id ''$options = array())
    {
          
$output "thumbnails <br>";

      
$attachments mysql_query("SELECT * FROM `vb3_attachment` where `userid`=".$this->profile->userinfo['userid']);
      while (
$post mysql_fetch_array($attachments))
      {
        
$output .= "<a target=blank href=attachment.php?attachmentid=".$post['attachmentid'].">";
        
$output .=  "<img border=0 src=attachment.php?attachmentid=".$post['attachmentid']."&thumb=1>";
        
$output .= "</a><br>" ;
      }

      
$this->block_data['mymodification'] = $output;
    }

Reply With Quote
  #5  
Old 12-26-2009, 04:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't believe you put tab=mymodification in the url to get to that tab. Just add #mymodification to the url and see if that works.
Reply With Quote
  #6  
Old 12-27-2009, 07:56 PM
ageurtse ageurtse is offline
 
Join Date: Apr 2009
Location: almelo
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there also a way to call a php page that should display his content in this newly created tab ?
Reply With Quote
  #7  
Old 12-27-2009, 09:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ageurtse View Post
is there also a way to call a php page that should display his content in this newly created tab ?
I've never done that, so I really don't know.
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 09:18 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.03973 seconds
  • Memory Usage 2,249KB
  • 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
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete