Log in

View Full Version : vBulletin Commands Not Working


Hex_legend
09-19-2008, 09:26 PM
I have just installed a tab script here (https://vborg.vbsupport.ru/showthread.php?t=191106)

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 (http://www.thesocialrev.com/forum/member.php?u=1)

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
Array['userid']

Here is the content for the templates / files:

tab1.php


<?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


$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:</b> XXXXXXXX</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[profilepicsize] alt="">
<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[username] has not defined their general information, therefore this is a system message displayed to you. Until $userinfo[username] fills in their information, this 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


<!-- 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', cacheData: false, active: true }), tabView);
YAHOO.plugin.Dispatcher.delegate( new YAHOO.widget.Tab({ label: 'tab 2', dataSrc: 'tabsample2.php', cacheData: false }), tabView);
YAHOO.plugin.Dispatcher.delegate( new YAHOO.widget.Tab({ label: 'tab 3', dataSrc: 'tabsample3.php', cacheData: false }), 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]