Template integration prob

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
crazykiller_dude
Registered User
Posts: 33
Joined: Sun Apr 24, 2005 7:52 am

Template integration prob

Post by crazykiller_dude »

I keep getting this error.

Fatal error: Cannot redeclare class template in /home/hjkclanc/public_html/forum/includes/template.php on line 30

Im trying to place that Login integration into my sites template. But when i tried placing it in it came up with that error

Heres my code.

Code: Select all

<?php 
define('IN_PHPBB', true); 
$phpbb_root_path = '../forum/';
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 
 
// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, Test); 
init_userprefs($userdata); 
// 
// End session management 
//
?>
<?php
include('config.php');
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM site_content
WHERE name='header'") or die(mysql_error()); 

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table 
echo $row['content'];
?> 
<?php
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM site_content
WHERE name='menul'") or die(mysql_error()); 

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table 
echo $row['content'];
?>
<?php
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM site_content
WHERE name='home'") or die(mysql_error()); 

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table 
echo $row['content'];
?>
<?php 
define('IN_PHPBB', true); 
$phpbb_root_path = '../forum/';
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

$user_id = $userdata[session_user_id];

// Get a specific result from the "master_users" table
$result = mysql_query("SELECT * FROM master_users
WHERE user_id = $user_id") or die(mysql_error()); 
$row = mysql_fetch_array( $result );

if( $userdata['session_logged_in'] ) 
			{ 

if ( $row[user_id] == 0 ) 
	{
		echo "<b>User ID</b>:". $row[user_id];
	} 
else if ( $row[user_id] >= 1 && $row[user_id] <=5)
	{
		echo "<b>User ID</b>:<font color='red'><b> ". $row[user_id] ."</b></font>";
	} 
else
{
		echo "<b>User ID</b>:<font color='black'><b> ". $row[user_id] ."</b></font>";
}

if( $userdata['session_logged_in'] ) 
   { 
      echo('<br><b>Username</b>: '. $row[username]);
   } 

       
if ( $row[user_new_privmsg] == 0 ) 
	{
		echo "<br><b>PM's</b>: <a href='http://hjkclan.com/forum/privmsg.php?folder=inbox'><b>0 New</b></a>";
	} 
else 
	{
		echo "<br><b>PM's</b>: <a href='http://hjkclan.com/forum/privmsg.php?folder=inbox'><font color='red'><b>". $row[user_new_privmsg] ." New</b></font></a>";
	} 

			       }
else
		{
		echo "You are not logged in!!!";
		}
?>
<?php
include('config.php');
 
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM site_content
WHERE name='menur'") or die(mysql_error()); 

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table 
echo $row['content'];
?>
<?php
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM site_content
WHERE name='footer'") or die(mysql_error()); 

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result ); // Print out the contents of each row into a table 
echo $row['content'];
?>

Locked

Return to “2.0.x Support Forum”