CuteNewsRU PHPBB3 Integration V1.0

Download plugins, language packs and stuff.

Postby Hawk » Wed Mar 10, 2010 7:45 am

Np, glad to help :D
User avatar
Hawk
 
Posts: 248
Joined: Tue Aug 29, 2006 9:00 pm

Postby scottdallas » Sun Mar 14, 2010 8:01 pm

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?
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby DarkSlim » Sun Mar 14, 2010 8:41 pm

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?


You can search for hacks for phpbb that will help you against spambots
here are some:
Link 1
Link 2
Link 3
:)
User avatar
DarkSlim
 
Posts: 296
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby mdfro » Mon Mar 15, 2010 11:56 pm

Im having some issues with the integration. When a user registers for my forum, it creates the user in the cutenews database. Im having issues with the code to integrate phpbb3 into my website with cutenews. All the support ive read is spread about of 10 pages which is kind of confusing.

I've tried several different ways to do this. Here is where im at:

In <head> as er0z suggested
Code: Select all
<?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;
?>


Where I want to show_news.php:

Code: Select all
<?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;

    ?>


Im receiving this error on my page:
Catchable fatal error: Object of class user could not be converted to string in /home/broproj1/public_html/news/inc/show.news.php on line 24

I have read the support on this forum, and also over at phpbb and nothing is working.
mdfro
 
Posts: 4
Joined: Mon Mar 15, 2010 11:53 pm

Postby gamezonline » Tue May 11, 2010 5:30 am

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;
   ?>
gamezonline
 
Posts: 8
Joined: Sun Feb 08, 2009 3:17 am

Postby Goberg » Fri May 14, 2010 3:36 am

Do I have to install cutenews and phpbb in the same mySQL database or something?

I use two databases on my website, they are named meditcom_cutenews and meditcom_phpbb3. When I try to register a user in the phpBB forums after installing this hack I get this error message:
Code: Select all
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
Goberg
 
Posts: 79
Joined: Thu Jan 18, 2007 2:31 pm

Postby Goberg » Sun May 30, 2010 2:24 pm

Sorry for double posting, but its been a while since my last comment.

It is working good for me on my site now, if a member signs up for my forums they also gets registered in cutenews.ru. Thing is though, that I have a login box on my site, this login box logs the user into the forums (phpbb3). Would it be an easy update to get them to log into cutenews as well so they can comment on news articles without having to log in again? Sort of logging into two sessions at the same time or something? I'm not very good at php so I don't really know how to work this.

Here is the code I'm using for my login box:
Code: Select all
<?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&amp;sid='.$user->data['session_id'].'&amp;redirect='.$returnAddress.'">Logout</a></p></div>
</td></tr></table>
';
}
?>


I also of course have this on the top of my file:
Code: Select all
<?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();
?>
Goberg
 
Posts: 79
Joined: Thu Jan 18, 2007 2:31 pm

Postby Goberg » Mon Jun 21, 2010 4:25 am

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;
   ?>


I am still having issues with this. The news are showing up correctly, and so is the login box. The problem occurs when using the <?=cn_title(); ?> function. Any ideas on how to resolve that?
Goberg
 
Posts: 79
Joined: Thu Jan 18, 2007 2:31 pm

Postby gamezonline » Sat Jun 26, 2010 4:47 am

I know this is a 1 in a million shot question. but is there any way that if i post/edit a news it will make a forum topic with what i just posted in a section i tell it to (say the news section on the forum)? and if so where would be the starting point to make a plug-in for that?
gamezonline
 
Posts: 8
Joined: Sun Feb 08, 2009 3:17 am

Postby Hawk » Sun Jun 27, 2010 10:04 am

atm there is no such feature. I'm guessing it would be quite complicated to program it.
User avatar
Hawk
 
Posts: 248
Joined: Tue Aug 29, 2006 9:00 pm

Previous

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 0 guests