Вграждане на phpbb форум 2

Gamerz

Registered
Следвах указанията във предишната тема, но нещо не мога да разбера.

Ето това ми е кода на страницата, която ми отваря оригиналния форум:

Код:
<?

  define ('_VALID_INCLUDE', TRUE);
  $inforum = '1';
  $svar_forum_orig_intact = '1';
  include 'core.php';
  if (($cmscvar_site_enabled == '0' OR !$cmscvar_site_enabled))
  {
    exit ();
  }

  if (!(defined ('_VALID_CRINC')))
  {
    exit ();
    ;
  }

  echo '
';
  echo '<s';
  echo 'cript language="JavaScript" type="text/javascript">

</script>

';
  include 'templates/forum_setup.php';
?>

И има един код дето трябва да го сложа във всички пхп файлове.
Ето този:

Код:
<?
define('IN_PHPBB', true);
$phpbb_root_path ='forum/';
include($phpbb_root_path . 'config.php');
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
?>

на мястото на $phpbb_root_path
слагам $forums_forums искам да попитам правилно ли е и какво пропускам ?!
Идеята ми е да си вградя форума в сайта и той да стане като една страница на сайта.
 
Дава ли ти някакви грешки ?
Код:
<?
define('IN_PHPBB', true);
$phpbb_root_path ='forum/';
include($phpbb_root_path . 'config.php');
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
?>

Тук не се променя нищо!!!
 
Код:
<?php


//====================================================
// FORUM TEMPLATE NOTES
//-------------------------------------------------------------------
// For the default theme, I've decided to not have left / right boxes as
// I want the forums to take up the entire page, therefore left.php is
// not included and further down right.php is not included
//====================================================

//====================================================
// HEADER TEMPLATE
//-------------------------------------------------------------------

$filename = "templates/$skin/header.php";

if (file_exists($filename)) {
	include "$filename";
} else {
	echo "<B><font color=red>Warning: The file $filename does not exist!</font></B><br />";
}

//====================================================
// LEFT TEMPLATE
//-------------------------------------------------------------------

$filename = "templates/$skin/left.php";

if (file_exists($filename)) {
	include "$filename";
} else {
	echo "<B><font color=\"red\">Warning: The file templates/$skin/left.php does not exist!</font></B><br />";
}

//====================================================
// PAGE TEMPLATE
//-------------------------------------------------------------------
?>

<table cellpadding="0" cellspacing="0" border="0">
<tr>
	<td style="width: 6px;"></td>
	<td>

		<table cellpadding="0" cellspacing="0" border="0" width="787">
		<tr>
			<td><img src="images/div_forums.jpg"></td>
		</tr>

		<tr>
			<td width="787" style="background: url(images/pagebgg_f.jpg); border-left: 1px solid #B6B6B6; border-right: 1px solid #B6B6B6;">

			<table cellpadding="0" cellspacing="0" border="0" width="785">
			<tr>
				<td style="background: url(images/pagebg_f.jpg) repeat-x;">
<?
//====================================================

$page_fixed = preg_replace('/[^a-zA-Z0-9 *]/', '', $_REQUEST[show]);
if (!$page_fixed) {

	$filename = "forums/home.php";
	if (file_exists($filename)) {
		include "forums/home.php";
	} else {
		echo "<B><font color=red>Warning: The file $filename does not exist!</font></B><br />";
	}

} else {

	if ($page_fixed == 'forum') {
		$cpage = "forums/showforum.php";
	}

	if ($page_fixed == 'thread') {
		$cpage = "forums/thread.php";
	}

	if ($page_fixed == 'newthread') {
		$cpage = "forums/newthread.php";
	}

	if ($page_fixed == 'reply') {
		$cpage = "forums/reply.php";
	}

	if ($page_fixed == 'search') {
		$cpage = "forums/search.php";
	}

	if ($page_fixed == 'report') {
		$cpage = "forums/report.php";
	}

//====================================================
// LOAD REQUESTED PAGE
//-------------------------------------------------------------------

	if (file_exists($cpage)) {
		include "$cpage";
	} else {
		echo "<B><font color=\"red\">The requested page does not exist!</font></B><br />";
	}
}
//====================================================
// PAGE TEMPLATE CONTINUED
//-------------------------------------------------------------------
?>
				</td>
			</tr>
			</table>

			</DIV></td>
		</tr>
		<tr>
			<td><img src="images/forum_foot.gif"></td>
		</tr>
		<tr>
			<td><img src="images/spacer2.gif"></td>
		</tr>
		</table>
		 

		</td>
	</tr>
	</table>
<?

//====================================================
// DISPLAY THE RIGHT TEMPLATE
//-------------------------------------------------------------------

$filename = "templates/$skin/forum_right.php";

if (file_exists($filename)) {
	include "$filename";
} else {
	echo "<B><font color=\"red\">Warning: The file $filename does not exist!</font></B><br />";
}

//====================================================
// DISPLAY THE FOOTER TEMPLATE
//-------------------------------------------------------------------

$filename = "templates/$skin/footer.php";

if (file_exists($filename)) {
	include "$filename";
} else {
	echo "<B><font color=red>Warning: The file $filename does not exist!</font></B><br />";
}

echo "$footer_insert";
?>
</body>
</html>

Ето това ми е кода на страницата с форума. Идеята ми е как да махна оригиналния форум и да сложа phpbb форума ?! инсталирал съм го и всичко е готово само не мога да го добавя в страницата...
 

Back
Горе