vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   howto add an extra tab to the members profile page (https://vborg.vbsupport.ru/showthread.php?t=231175)

ageurtse 12-25-2009 06:58 PM

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*

Vaupell 12-25-2009 07:22 PM

1 Attachment(s)
Attachment 108145

Like that ?

Lynne 12-25-2009 07:52 PM

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

ageurtse 12-26-2009 04:18 AM

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;
    }



Lynne 12-26-2009 04:32 PM

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.

ageurtse 12-27-2009 07:56 PM

is there also a way to call a php page that should display his content in this newly created tab ?

Lynne 12-27-2009 09:06 PM

Quote:

Originally Posted by ageurtse (Post 1939703)
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.


All times are GMT. The time now is 10:10 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.01173 seconds
  • Memory Usage 1,735KB
  • 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)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