vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vBulletin Commands Not Working (https://vborg.vbsupport.ru/showthread.php?t=191362)

Hex_legend 09-19-2008 09:26 PM

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

Vackrick 09-20-2008 02:19 AM

I Can Only Say

Revert All Your Template To The Orignal Templates

ringleader 09-23-2008 11:12 AM

Try $bbuserinfo[username] or $bbuserinfo[userid]


All times are GMT. The time now is 02:16 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.01180 seconds
  • Memory Usage 1,810KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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