vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   [How-to] Add more tabs to the vB 3.7 profile pages (https://vborg.vbsupport.ru/showthread.php?t=165554)

zmmmzz 04-11-2008 04:45 PM

this is awesome.

Makc666 04-12-2008 11:13 AM

Quote:

Originally Posted by zmmmzz (Post 1488386)
this is awesome.

Maybe, but...

In vBulletin 3.6.* I had such code in product:
Code:

<plugin active="1" executionorder=5" product="test">
<title>Test - member complete</title>
<hookname>member_complete</hookname>
<phpcode><![CDATA[if (THIS_SCRIPT == 'member')
{
        $test = "Hellow!";
        if ($vbulletin->options[test_auto])
                {
                        $footer = $test.$footer;
                }
}]]></phpcode>
</plugin>

Question: How to add $test to the new tab?

This one doesn't work:
Code:

        function prepare_output($id = '', $options = array())
        {
                $this->block_data['test'] = "$test";
        }


TECK 04-15-2008 11:37 AM

Nice info Miss Morgan, thank you. :)

Kicks 04-17-2008 10:55 AM

how to add some profilefields now in this tab ?

--------------- Added [DATE]1208516534[/DATE] at [TIME]1208516534[/TIME] ---------------

no one an idea ?

M-Tuning 04-20-2008 08:16 AM

How to display tabs only for certain usergroups?

I have been trying some stuff out but I get an error whatever I do:

Parse error: syntax error, unexpected '<' in .....

King Kovifor 04-27-2008 07:37 PM

Quote:

Originally Posted by m-tuning (Post 1494996)
How to display tabs only for certain usergroups?

I have been trying some stuff out but I get an error whatever I do:

Parse error: syntax error, unexpected '<' in .....

It appears there is < within your PHP code. Please post in the programming discussions for help.

WhaLberg 05-01-2008 01:13 AM

Quote:

Originally Posted by Makc666 (Post 1488957)
Maybe, but...

In vBulletin 3.6.* I had such code in product:
Code:

<plugin active="1" executionorder=5" product="test">
<title>Test - member complete</title>
<hookname>member_complete</hookname>
<phpcode><![CDATA[if (THIS_SCRIPT == 'member')
{
        $test = "Hellow!";
        if ($vbulletin->options[test_auto])
                {
                        $footer = $test.$footer;
                }
}]]></phpcode>
</plugin>

Question: How to add $test to the new tab?

This one doesn't work:
Code:

        function prepare_output($id = '', $options = array())
        {
                $this->block_data['test'] = "$test";
        }


This won't work. Why? Because there is no variable named as $test in the function prepare_output. You need to have it there.

Example:
PHP Code:

function prepare_output($id ''$options = array())
{
    
$visitedcountries "Turkiye, Kazakistan, Kirgizistan, Turkmenistan, Uzbekistan";
    
$this->block_data['visitedcountries'] = $visitedcountries;        


How do I know that? Thought on this about half an hour and noticed after that. :D

Code Monkey 05-02-2008 03:00 PM

Thanks for this Calorie. Saved me a lot of leg work.

skhms 05-02-2008 06:53 PM

This was usefull, thanks!

/SK

Blackhat 05-03-2008 04:15 PM

Ok, finaly I got it to show my users flash players from youtube

PHP Code:

$blocklist array_merge($blocklist, array(
    
'mediabox' => array(
        
'class' => 'MediaBox',
        
'title' => 'Mediabox',
        
'hook_location' => 'profile_left_last'
    
)
));

class 
vB_ProfileBlock_MediaBox extends vB_ProfileBlock
{
    var 
$template_name 'memberinfo_block_mediabox';

    function 
confirm_empty_wrap()
    {
        return 
false;
    }

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

    function 
prepare_output($id ''$options = array())
    {
        
$this->block_data['mediabox'] = '
        
        <object width="676" height="386">
        <param name="movie" value="http://www.youtube.com/cp/'
.$this->profile->userinfo['field17'].'"></param>
        <param name="wmode" value="transparent"></param>
        
        <embed src="http://www.youtube.com/cp/'
.$this->profile->userinfo['field17'].'" type="application/x-shockwave-flash" wmode="transparent" width="676" height="386"></embed>
        </object>
        
        '
;
    }




All times are GMT. The time now is 07:34 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01327 seconds
  • Memory Usage 1,757KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_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