boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parse Error

 
Post new topic   Reply to topic    boardom Forum Index -> Template help
View previous topic :: View next topic  
Author Message
Legba



Joined: 21 Apr 2004
Posts: 3

PostPosted: Wed Apr 21, 2004 2:23 pm    Post subject: Parse Error Reply with quote

Everything seemed to be working fine untill I tried making my own template. Basically, I just wanted to use the same look as the rest of my page (or rather, the look it will have once I've finished updating it), so I just pasted the relevant code right into my default layout.

However, I was met with Parse error: parse error in /home/hackma3/public_html/dmw_journal/index.php on line 247, which is strange, because that correspons with the line </HTML> in my template. I tried removing </HTML>, and I then got a parse error for the line with the </BODY> tag in it. I'm a bit flumoxed... It's probably an error futher up in the page, but... The layout works fine on it's own as well, as you can see from http://www.hackwurld.com/main.php.

Anyways, if anyone could give me a helping hand, I'd be greatfull.


Code follows:
Code:
<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; include ("blog.header.php"); ?>

<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="../dmw2.css" />
<TITLE>Dead Men Walking: Main </TITLE>
</HEAD>
<BODY BACKGROUND="../img/bgplanet.gif">

<?php

$phpbb_root_path = '../forum/';
define ('IN_PHPBB', true);
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('<tt><b>phpBB Fetch All:</b>
$phpbb_root_path is wrong and does not point to your forum.</tt>');
}

include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
@$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);

//
// When set to true the script will check postings and other
// things against the permissions of the user who views the
// script. If no permission for the particular action exists the
// script will not fetch and display the data.
//
// true = enabled
// false = disabled (default)
//
// IMPORTANT: Using auth check will require these two lines in
// your script to work properly:
//

$CFG['auth_check'] = false;
$CFG['posts_hide_sticky'] = true;
$CFG['posts_limit'] = 1;
 
$menu = phpbb_fetch_topics(array(8, 24));
$news = phpbb_fetch_posts(18);
$main = phpbb_fetch_topics(23);


// 8 is Next Game
// 24 is Navigation
// 18 is News forum
// 23 is Main
// 14 is News


phpbb_disconnect();

//
// Hint:
//
// If you are curious what's in the $news array
// --> uncomment the following line
// You will see all elements of the array along with
// their keys and values.
//

// echo ('<pre>'); print_r($menu); die();

?>


<TABLE HEIGHT="100%" CELLSPACING="0" CELLPADDING="0">
 <TR>
  <TD>

   <TABLE WIDTH="200" CELLSPACING="0" CELLPADDING="0">
    <TR>
     <TD>

   <?php

   for ($i = 0; $i < count($menu); $i++) {

   ?>

      <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="menu">
       <TR>
        <TD CLASS="menu_navigation">
           <?php echo $menu[$i]['topic_title']; ?>
        </TD>
       </TR>
       <TR>
        <TD CLASS="paragraph">
        </TD>
       </TR>
       <TR>
        <TD CLASS="leftright">
         <?php echo $menu[$i]['post_text']; ?>
        </TD>
       </TR>
        <TR>
        <TD CLASS="paragraph">
        </TD>
       </TR>
       </TABLE>
     </TD>
    </TR>
    <TR>
     <TD CLASS="paragraph">
     </TD>
    </TR>
    <TR>
     <TD>
   
   <?php
   
   }
   
   ?>

      <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="menu">
       <TR>
        <TD CLASS="menu_navigation">
         News
        </TD>
       </TR>

      <?php

      for ($i = 0; $i < count($news); $i++) {

      ?>

        <TR>
        <TD CLASS="paragraph">
         </TD>
        </TR>
       <TR>
        <TD>
         <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR>
           <TD CLASS="left">
            <?php echo date('d/M/y', $news[$i]['post_time']); ?>
           </TD>
           <TD CLASS="rigth">
            
           </TD>
          </TR>
         </TABLE>
         </TD> 
       </TR>
      <TR>
        <TD CLASS="leftright">
         <?php echo $news[$i]['post_text']; ?>
        </TD>
       </TR>
       <TR>
        <TD CLASS="right">
         - <?php echo $news[$i]['username']; ?>
        </TD>
       </TR>
   
      <?php
   
      }
   
      ?>
        <TR>
        <TD CLASS="paragraph">
         </TD>
       </TR>
      </TABLE>
     </TD>
    </TR>
   </TABLE>

  </TD>
  <TD WIDTH="12">
  </TD>
  <TD>

   <?php

   for ($i = 0; $i < count($main); $i++) {

   ?>

   <TABLE WIDTH="600" HEIGHT="100%" CELLSPACING="0" CELLPADDING="0" CLASS="main">
    <TBODY VALIGN="top">
    <TR>
     <TD CLASS="main_navigation">
        <?php echo $main[$i]['topic_title']; ?>
     </TD>
    </TR>
    <TR>
     <TD CLASS="paragraph">
     </TD>
    </TR>
    <TR>
     <TD VALIGN="top">

   <!-- // b2 loop start -->
   <?php while($row = mysql_fetch_object($result)) { start_b2(); ?>


<?php the_date("d.m.y","<h1>","</h1>"); ?>

<p>
<?php permalink_anchor(); ?>

<strong><?php the_title(); ?></strong> (category: <strong><?php the_category() ?></strong>)<br />
<?php the_content(); ?><?php link_pages("<br />Pages: ","<br />","number") ?>
<br />
<em>posted by <strong><?php the_author() ?></strong> @ <a href="<?php permalink_link() ?>"><?php the_time() ?></a></em>
<br />
<a href="<?php comments_link() ?>"><?php comments_number("no comments", "1 comment", "% comments") ?></a>

</p>

<?php include ("b2comments.php"); ?>


   <!-- // this is just the end of the motor - don't touch that line either :) -->
   <?php } ?>



     </TD>
    </TR>
    <TR>
     <TD HEIGHT="50">
     </TD>
    </TR>
     <TD VALIGN="bottom">
         <CENTER> <FONT SIZE="1">HackMaster, HackMaster Association, and Garweeze Wurld are trademarks of Kenzer and Company. All rights reserved. </FONT> </CENTER>
     </TD>
    </TR>
    </TBODY>
   </TABLE>
  </TD>
 </TR>
 </TBODY>
</TABLE>

</BODY>
</HTML>



Emanuel
Back to top
View user's profile Send private message
Legba



Joined: 21 Apr 2004
Posts: 3

PostPosted: Wed Apr 21, 2004 6:04 pm    Post subject: Reply with quote

Having toyed around with it for a while, I'm wondering if the problem could be the fact that I'm using php_fetch_all to grab information of the forum. Once I integrated the $blog=1; and include ("blog.header.php"); lines in my already present php script, I got a new error, saying Fatal error: Cannot redeclare get_userdata() (previously declared in /home/hackma3/public_html/dmw_journal/b2-include/b2functions.php:382) in /home/hackma3/public_html/forum/includes/functions.php on line 80. So there's a conflict in that both use the same name for a varible... is there any way to change the name of the variable for b2?


Emanuel
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Template help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group