The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
This is impossible >.>
Okay, I've tried everything I can think of besides full integration which would eventually kill me but nothing works out :surprised:
What I'm trying to do is include my header and footer templates into another script (4images inf you're interested) Since I have important conditional statements, this requires the vbulletin conditionals What I've done: 1. Put Code:
<?php // # Set up php error reporting... error_reporting(E_ALL & ~E_NOTICE); // # Define important var's define('NO_REGISTER_GLOBALS', 1); // name of script define('THIS_SCRIPT', 'script'); // allows us to use custom templates in this script define('GET_EDIT_TEMPLATES', true); // # Cache templates // get special phrase groups $phrasegroups = array(); // get special data templates from the datastore $specialtemplates = array(); // pre-cache templates used by all actions $globaltemplates = array( '' ); // pre-cache templates used by specific actions $actiontemplates = array(); // # Get backend... chdir("/home/miyechi/public_html/"); require_once('./global.php'); // $template output's customtemplate1 eval('$headerinclude = "' . fetch_template('headerinclude') . '";'); eval('$header = "' . fetch_template('header') . '";'); eval('$navbar = "' . fetch_template('navbar') . '";'); // output's custometemplate2 (main template) eval('print_output("' . fetch_template('headergeneral') . '");'); ?> 3. I go to REQUIRE this new file in the header of the gallery script Code:
require("http://www.miyechi.com/includes/header.php"); Except the HUGE fact that the conditionals aren't working! The conditionals seem to be setting place before the userinfo is even outputed. So frustrating Anyone can shed a light onto this I know this is the lazy way to do it and I'm not exactly a php guru |
#2
|
||||
|
||||
Quote:
|
#3
|
||||
|
||||
Quote:
The main problem is, how do I make the require use the user info instead of just assuming the user is a guest? |
#4
|
||||
|
||||
Quote:
|
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
can you post the code where your conditionals are?
|
#7
|
||||
|
||||
Sure ^^; it's in my header and navbar templates. If it looks messy, forgive me
header Code:
<if condition="$avatarurl && !$show['guest']"><img src="$avatarurl" border="0"><else /><img src="http://images.miyechi.com/avatar/noavatar.gif" border="0"></if></a> <!-- breadcrumb, login, pm info --> <if condition="$bbuserinfo['userid']"> <td valign="top" nowrap="nowrap"> <div class="smallfont"> <span style="float:$stylevar[right]"> <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br> <if condition="$show['pmstats']"><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if><br> [<a href="http://www.miyechi.com/login.php?$session[sessionurl]do=logout&u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a>]</span> </div> </td> <else /> <td nowrap="nowrap" style="padding:0px"> <!-- login form --> <form action="http://www.miyechi.com/login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)"> <script type="text/javascript" src="clientscript/vbulletin_md5.js"></script> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"> <tr> <td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td> <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td> </tr> <tr> <td><input type="password" class="button" name="vb_login_password" value="$vbphrase[password]" size="10" accesskey="p" tabindex="2" onfocus="if (this.value == '$vbphrase[password]') this.value = '';" /></td> <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td> </tr> </table> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="login" /> <input type="hidden" name="forceredirect" value="1" /> <input type="hidden" name="vb_login_md5password" /> </form> <!-- / login form --> </td> </if> <!-- / breadcrumb, login, pm info --> http://www.miyechi.com/forum.php It's just trying to distinct between registered users and guests basically :/ |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|