scottdallas wrote:This is wonderful. I was always hoping someone would figure out how to mix the two. I have cnr and phpbb3 installed and working almost seamlessly on scodal.com but I am NOT using this hack yet. I hesitate to do so because I get about 30 spammers that sign up on my forum per day EVEN WITH complex captcha registration and I'm not sure I want that many spammers signing up on cnr too. Does anyone else deal with this crap or found a solution to slow down the spammers? I have it set so I have to manually check user accounts and approve them. How can I happily use this hack?
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forum/'; //Path to forum
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('ucp');
//Store phpBB data
$phpbb_template = $template;
$phpbb_user = $user;
$template = '';
//Show news
include("news/head.php");
//Restore phpBB data
$user = $phpbb_user;
$template = $phpbb_template;
?><?php
//Store phpBB data
$phpbb_template = $template;
$phpbb_user = $user;
$template = '';
//Show news
$number=5;
include("news/show_news.php");
//Restore phpBB data
$user = $phpbb_user;
$template = $phpbb_template;
?><?php include './PATH_TO_CUTENEWS/head.php'; ?>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './PATH_TO_PHPBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
<?php
//Store phpBB data
$phpbb_template = $template;
$phpbb_user = $user;
$template = '';
$user = '';
//Show Cutenews Posts
include $cutepath.'/show_news.php';
//Restore phpBB data
$user = $phpbb_user;
$template = $phpbb_template;
?>Fatal error: SQL ERROR [ mysql4 ]
Table 'meditcom_cutenews.phpbb_sessions' doesn't exist [1146]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists. in /home/meditcom/public_html/forum/includes/db/dbal.php on line 657<?php
if (!$user->data['is_registered']){
echo("<h2><img src='images/icons/user.gif' alt='' border='0'> Please sign in</h2>");
echo("<form method='post' action='".$phpbb_root_path."ucp.php?mode=login'>");
echo("<div class='text-news'><p>Username: <a href='http://www.mediumwideshot.com/forums/ucp.php?mode=register'>register</a>");
echo("<br />");
echo(" <input type='text' name='username' size='45' value=''>");
echo("<br />");
echo(" Password: <a href='http://www.mediumwideshot.com/forums/ucp.php?mode=sendpassword'>lost password?</a>");
echo("<br />");
echo(" <input type='password' name='password' size='45' value=''>");
echo("<br />");
echo("<input class='formbutton' type='submit' name='login' value='LOGIN'>");
echo("<input type='hidden' name='redirect' value='../".$_SERVER['PHP_SELF']."'>");
echo("<br /></p></div></form>");
}
else
{
echo '<h2><img src="images/icons/user.gif" alt="" border="0"> Welcome ' .$user->data['username'].'</h2>
<table width="99%"><tr><td width="20%">
<img src="'.$phpbb_root_path.'/download/file.php?avatar=' .$user->data['user_avatar'].'" width="95%" height="95%">
</td>
<td width="80%" valign="top">
<div class="text-news"><p> ' .$user->data['user_new_privmsg'].' new, ' .$user->data['user_unread_privmsg'].' unread messages<br>
<a href="'.$phpbb_root_path.'/search.php?search_id=unreadposts">unread posts</a>
<a href="'.$phpbb_root_path.'/search.php?search_id=newposts">new posts</a>
<a href="'.$phpbb_root_path.'/ucp.php?mode=logout&sid='.$user->data['session_id'].'&redirect='.$returnAddress.'">Logout</a></p></div>
</td></tr></table>
';
}
?><?php include 'cutenewsfolder/head.php'; ?>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'forums/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?> gamezonline wrote:For People still having problems integrating phpbb3 to there homepage try this
at the very top of page before anything else add code
- Code: Select all
<?php include './PATH_TO_CUTENEWS/head.php'; ?>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './PATH_TO_PHPBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>
where you want your news to show post use code
- Code: Select all
<?php
//Store phpBB data
$phpbb_template = $template;
$phpbb_user = $user;
$template = '';
$user = '';
//Show Cutenews Posts
include $cutepath.'/show_news.php';
//Restore phpBB data
$user = $phpbb_user;
$template = $phpbb_template;
?>
Return to Additional Downloads
Users browsing this forum: No registered users and 0 guests