vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   PHP Code Removes NavBar? Help ASAP Please! (https://vborg.vbsupport.ru/showthread.php?t=167447)

micky007 01-10-2008 06:13 PM

PHP Code Removes NavBar? Help ASAP Please!
 
Hey Guys,

Im trying to add a php code that will show up under the navigation bar and the php code is the following:

PHP Code:

<?php

if ( isset($_GET['f']) )
{
    if ( 
$_GET['f'] == 34 )
    {
        echo 
'<center>test</center>';
    }
}

?>

Now for some reason it remove the navigation bar and when i add that code under all of the code thats in the template navbar i get this warning from VB.

Quote:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /srv/www/vhosts/forums.****.co.uk/httpdocs/includes/adminfunctions_template.php(3596) : eval()'d code on line 215
Can anyone help me please?

MoT3rror 01-10-2008 07:21 PM

In the place you want to put it in the template use this code.
Quote:

<if condition="$_GET['f'] == 34">
//text that is shown when the condition is meant
</if>

micky007 01-10-2008 07:37 PM

Cheers !

but for some reason the background image on the table doesnt showup :(

ragtek 01-10-2008 08:47 PM

instead of $_GET['f'] its nicer if you use <if condition="$forumid==34">
and what exactly have you written?

micky007 01-20-2008 02:49 PM

thanks for the reply, but no images will show. this is the source i have put in.

Code:


<if condition="$forumid==44">
<head>
<style type="text/css">
<!--
.style1 {
        color: #FFFFFF;
        font-weight: bold;
}
-->
</style>
</head>

<body>
<div align="center">

  <table width="569" height="104" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td background="http://img237.imageshack.us/img237/5152/lottohk5.gif" valign="top"><table width="100%" height="98" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="47" colspan="3">&nbsp;</td>
          <td colspan="4" valign="bottom"><div align="center"><span class="style1">Next Draw: Saturday 26th January </span></div></td>
          </tr>
        <tr>
          <td width="20%"><div align="center"><strong>&nbsp;
            </strong><span class="style1">Last Weeks<br />
            Results:</span></div></td>
          <td width="13%"> &nbsp;&nbsp;&nbsp;&nbsp;<strong>10</strong></td>
          <td width="11%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>24</strong></td>
          <td width="16%"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;28</strong></td>
          <td width="13%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>37</strong></td>
          <td width="13%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;39</strong></td>
          <td width="14%">&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;&nbsp;&nbsp;40</strong></td>
        </tr>
      </table></td>
    </tr>
  </table>

</div>
</body>
</if>

also its not Imageshack as iv also tried using my own host.

ragtek 01-20-2008 03:06 PM

why are you using head&body in the code
and where exactly did you put this code in?

micky007 01-20-2008 03:07 PM

i dont really know, im weird.

I put it at the very bottom of Navbar Template so it shows under the nav bar.

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

ok never mind sorted it by adding it to the CSS background


All times are GMT. The time now is 07:21 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.01376 seconds
  • Memory Usage 1,732KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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