Jump to content


PHPBB2 user log in


  • You cannot reply to this topic
No replies to this topic

#1 aljosalo

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 14 January 2009 - 03:58 PM

I have On site Cutenews and I wont to make that PHPBB2 user can veiw more articles then the ones they are not login a Forum

the code to put in cutenews page where i wont to log user see this and not log user dot see at all

<?php
if( !$userdata['session_logged_in'] ) // Is the user NOT logged in?
$category = "#";//add here the CN categories for news to show when a user is not logged in
else
$category = "#";//add here the CN categories for news to show when a user is logged in
include('path/to/cutenews/show_news.php');
?>

this is the code I use to include in the page but this wont work,

<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'here right path to forum'; //Relative path to your PHPBB2 installation
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

$template = $_GET['template'];
unset($template);

// Links Array
$phpbb_links = array ( //start our array
'home' => append_sid("index.$phpEx"), // .$phpEx is the way PHPBB2 writes the .php file extension, change this to just .html if you use .html files or other file extensions.
'forums_home' => append_sid("forum/index.$phpEx"),
'tolist' => append_sid("toplist.$phpEx"), // notice the comma after each line
'downloads' => append_sid("downloads.$phpEx") // there is no comma on the last line
); // end our array

?>

I cant make it work if someone has any beter way to code this plz post it !!!!


THX





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users