vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Pls converse navtab 4.1 to 4.2 for me (https://vborg.vbsupport.ru/showthread.php?t=283451)

Easy5s.net 05-25-2012 11:29 PM

Pls converse navtab 4.1 to 4.2 for me
 
Here's the code used to create my navbar tab for the script, but it does not work on 4.2, please write again for me, thanks a lot :)

PHP Code:

if (defined('VB_AREA') AND $vbulletin->credit['enabled']) {
    if (
defined('credit_SCRIPT')) {
        
$vbulletin->options['selectednavtab'] = 'credit';
        
        
$templater vB_Template::create('credit_navbar_tab');
            
$templater->register('links',$link);
        
$template_hook['navtab_end'] .= $templater->render();
    } else {
        global 
$credit_active_items;
        require_once(
DIR '/credit/functions.php');
        
        
$template_hook['navtab_end'] .= vB_Template::create('credit_navbar_tab')->render();
        
        if (
is_array($credit_active_items[$vbulletin->userinfo['userid']])) {
            
$items2show fetchItemFromCache(
                
$credit_active_items[$vbulletin->userinfo['userid']]
                , 
$vbulletin->credit['phpfile'] . '?do=myitems&itemid=%1$s#item%1$s'
                
'itemid'
                
true
                
true
            
);

            foreach (
$items2show as $items2show_tmp) {
                foreach (
$items2show_tmp as $item2show) {
                    
$useHead false;
                    
$fulllink $item2show['fulllink'];
                    
$link $item2show['link'];
                    
$text 
                        
$item2show['name']
                        . 
iif($item2show['status_str'],' ' $item2show['status_str'])
                        . 
iif($item2show['count'] > 1," x<strong style=\"color:red\">$item2show[count]</strong>");
                        
                    
$templater vB_Template::create('credit_navbar_popup_menu_bit');
                        
$templater->register('useHead'$useHead);
                        
$templater->register('fulllink'$fulllink);
                        
$templater->register('link'$link);
                        
$templater->register('text'$text);
                    
$template_hook['credit_navbar_popup_menu_more'] .= $templater->render();
                }
            }
        }
        
        (
$hook vBulletinHook::fetch_hook('credit_navbar_popup_menu')) ? eval($hook) : false;
        
        
$templater vB_Template::create('credit_navbar_popup_menu_bit');
            
$templater->register('useHead'false);
            
$templater->register('fulllink'true);
            
$templater->register('link''#');
            
$templater->register('text'$vbulletin->credit['name'] . ': ' $vbulletin->userinfo['credit']);
        
$template_hook['credit_navbar_popup_menu_more'] .= $templater->render();
        
        
$templater vB_Template::create('credit_navbar_link');
            
$templater->register('template_hook',$template_hook);
        
$template_hook['navbar_after_calendar'] .= $templater->render();
    }


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

bump .

AusPhotography 05-26-2012 09:21 AM

Scrap that and create the new tab menu structure in the Navigation manager via AdminCP

Add plugins as needed (if needed).

Easy5s.net 05-26-2012 12:27 PM

I can use the Navigation manager but can not write plug so it does not work, please help me step by step.

AusPhotography 05-26-2012 10:07 PM

Quote:

Originally Posted by Easy5s.net (Post 2333047)
I can use the Navigation manager but can not write plug so it does not work, please help me step by step.

Options:
a) Learn to code a plugin (not that hard) -- http://php.net/docs.php
b) Pay someone

:D


All times are GMT. The time now is 06:25 AM.

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.01053 seconds
  • Memory Usage 1,753KB
  • 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
  • (4)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