Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2008, 09:26 PM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin Commands Not Working

I have just installed a tab script here

I am experiencing a little problem with the vBulletin commands, I was hoping someone could help me.

I didn't post this in the modification thread, as this isn't so much a problem with a modification, as it is calling proper vB templates, but the templates are not calling the correct commands.

here is the link for you

I have put the tab content in MEMBERINFO and told it to pull template name (maintab) which now contains the contents of MEMBERINFO.

Trouble with this now, is it won't recognise $userinfo[username] or $userinfo[userid]

I have even tried $vbulletin->userinfo['userid'] which just shows
Code:
Array['userid']
Here is the content for the templates / files:

tab1.php

PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################

error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''maintab'); // change this to the filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################

// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array('iconcache');

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################

require_once('./global.php');
require_once(
'./includes/functions_forumdisplay.php');

// ############# MODIFICATION CONTROL OPTIONS ############################

$mod_options['portal_threads_forumid'] = '1,2,3,4,5';     // Add the forumid(s) you would like to display threads from in your news module. Seperate each with a comma.
$mod_options['portal_threads_maxthreads'] = '15';    // Set this for the Max Number of Threads to Display.
$mod_options['portal_threads_maxchars'] = '30';      // Set This for the Max Number of Characters you want to Display for the Thread Title.
$mod_options['portal_threads_cutoffdate'] = '120';   // Enter a number of days that represents a threshold for recent threads. 
$mod_options['portal_threads_orderby'] = 'thread.dateline';
$mod_options['portal_threads_orderby'] = 'lastpost'// if you want Ramdom replace with: RAND() 
$mod_options['portal_threads_direction'] = 'DESC';   // 
$mod_options['portal_threads_showicon'] = '1';       // 1=ON 0=OFF

// ## DO NOT EDIT BELOW THIS POINT UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING ##

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

eval('print_output("' fetch_template('maintab') . '");');

?>
maintab

PHP Code:
$stylevar[htmldoctype]
<
html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude

$usercss
$memberinfo_css
<style type="text/css" id="vbulletin_tabctrl_css">
@
import url("clientscript/vbulletin_tabctrl.css?v=$vboptions[simpleversion]");
<if 
condition="$show['rtl']">@import url("clientscript/vbulletin_tabctrl_rtl.css?v=$vboptions[simpleversion]");</if>
</
style>

<
script type="text/javascript" src="clientscript/vbulletin_tabctrl.js?v=$vboptions[simpleversion]"></script>

<
title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>

<if 
condition="$userinfo['userid'] == $bbuserinfo['userid']">
<
script type="text/javascript" src="clientscript/vbulletin_profilefield_edit.js?v=$vboptions[simpleversion]"></script>
</if>
<
script type="text/javascript">
<!--
vbphrase['server_failed_respond_try_again'] = "$vbphrase[server_failed_respond_try_again]";
vbphrase['edit_value'] = "$vbphrase[edit_value_js]";

<if 
condition="$show['post_visitor_message']">
function 
goto_post_pm()
{
    
vB_TabCtrls['profile_tabs'].switch_tab('visitor_messaging');
    
fetch_object('visitor_messaging').scrollIntoView();

    var 
textarea fetch_object('visitor_message_form_textarea');
    if (
textarea)
    {
        
textarea.focus();
        
textarea.select();
    }
    return 
false;
}
</if>
-->
</
script>

</
head>
<
body>


<!-- 
begin user css -->
<
div align="right"><b>Creation Date:</bXXXXXXXX</div>
<
div id="usercss" class="floatcontainer">

<
div id="content_container">
    <
div id="content">


        <
div id="main_userinfo" class="floatcontainer">
</
div>
</
div>
<
center><h2>$userinfo[username]</h2></center>

<
table border="0">
<
tr>
<
td>
<if 
condition="$prepared['profilepicurl']">
<
img src="$prepared[profilepicurl]$prepared[profilepicsizealt="">
<else />
<
img src="http://www.thesocialrev.com/forum/nopic.jpg">
</if>
</
td>
<
td>
<
b>User ID:</b$vbulletin->userinfo['userid']<br>
<
b>XP Level:</b$userinfo[usertitle]<br>
<
b>Posting Level:</b$prepared[reputationdisplay]<br>
<
b>Posts:</b$userinfo[posts]
</
td>
</
tr>
</
table
<
br><br>

<
table border="1" width="1200" height="100">
<
tr>
<
td>
<if 
condition="$userinfo[field10]">$userinfo[field10] <else /> $userinfo[usernamehas not defined their general informationtherefore this is a system message displayed to youUntil $userinfo[usernamefills in their informationthis will continue to show.</if>
</
td>

</
tr>
</
table
<
br><br>
<
center>
<
table border="0">
<
tr>
<
td>&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>MSN Messenger:</b$bbuserinfo[msn]</td>
</
tr>
<
tr>
<
td><b>Location:</b> <if condition="$userinfo[field2]">$userinfo[field2] <else /> Not Defined.</if></td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>Yahoo Messenger:</b$bbuserinfo[yahoo]</td>
</
tr>
<
tr>
<
td>&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><b>AIM Messenger:</b$bbuserinfo[aim]</td>
</
tr>
</
table
</
center>
<
br><br>
<
b>Favorite Board(s):</b><br />
<
table border="1">
<
tr>
<
td align="center"><if condition="$userinfo[field5]">$userinfo[field5] <else /> Board Link 1 Here &nbsp;&nbsp;</if></td><td><center><if condition="$userinfo[field6]">$userinfo[field6] <else /> Board Link 2 Here &nbsp;&nbsp;</if></center></td>
</
tr>
<
tr>
<
td><center><if condition="$userinfo[field7]">$userinfo[field7] <else /> Board Link 3 Here &nbsp;&nbsp;</center></if></td><td><center><if condition="$userinfo[field8]">$userinfo[field8] <else /> Board Link 4 Here &nbsp;&nbsp;</if></center></td>
</
tr>
</
table
MEMBERINFO

PHP Code:
<!-- YUI Tabs Display Start -->

<
div id="tab_container"></div>

<
script type="text/javascript">
var 
tabView = new YAHOO.widget.TabView();

    
YAHOO.plugin.Dispatcher.delegate( new YAHOO.widget.Tab({ label'tab 1'dataSrc'tabsample1.php'cacheDatafalseactivetrue }), tabView);
    
YAHOO.plugin.Dispatcher.delegate( new YAHOO.widget.Tab({ label'tab 2'dataSrc'tabsample2.php'cacheDatafalse }), tabView);
       
YAHOO.plugin.Dispatcher.delegate( new YAHOO.widget.Tab({ label'tab 3'dataSrc'tabsample3.php'cacheDatafalse }), tabView);
       
tabView.appendTo('tab_container');

</
script>

<!-- 
YUI Tabs Display End  --> 
Hope you can help
Reply With Quote
  #2  
Old 09-20-2008, 02:19 AM
Vackrick Vackrick is offline
 
Join Date: Apr 2008
Location: Taiwan
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I Can Only Say

Revert All Your Template To The Orignal Templates
Reply With Quote
  #3  
Old 09-23-2008, 11:12 AM
ringleader's Avatar
ringleader ringleader is offline
 
Join Date: Dec 2006
Location: Dublin, Ireland
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try $bbuserinfo[username] or $bbuserinfo[userid]
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 11:36 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.04505 seconds
  • Memory Usage 2,265KB
  • 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
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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