EllisLab text mark
Advanced Search
6 of 7
6
   
phpBB3 library
Posted: 18 December 2010 02:34 PM   [ Ignore ]   [ # 81 ]   [ Rating: 0 ]
Avatar
Joined: 2006-03-30
139 posts

I ran into the same error.  Try putting a check around that function.

if( ! function_exists(‘redirect’) )

 
Posted: 25 December 2010 11:56 AM   [ Ignore ]   [ # 82 ]   [ Rating: 0 ]
Avatar
Joined: 2006-03-30
139 posts

What I’m noticing is that each page load gets a new session in the phpbb session table.  It’s rather difficult to stay logged in that way.

[edit]

One little typo.  I swear, my obit will state I died of a fatal error, all because I forgot the ;

 
Posted: 31 January 2011 01:01 AM   [ Ignore ]   [ # 83 ]   [ Rating: 0 ]
Joined: 2011-01-27
1 posts

Hi.., I’m newbie in CI, anyone can give me step by step tutorial to use this library??

should I install phpBB first??
how should be the folder structure of phpBB integrate with CI??

sorry for my bad english..

 
Posted: 14 September 2011 01:20 PM   [ Ignore ]   [ # 84 ]   [ Rating: 0 ]
Avatar
Joined: 2011-09-09
4 posts

New version of phpbb library:
http://codeigniter.com/wiki/File:phpbb_library_1.2.zip/
Can’t change article because I am new member in this community.

Changed filename and name of the class due to update of CodeIgniter and added function for getting user session id.
You can use it in your controller with $this->phpbb->session_id().

Also, if you want to use log out form in your view you need to do this:
In your controller pass session_id to view with

$data['session_id'$this->phpbb->session_id();
$this->load->view('example'$data); 

Then in your view add this:

<form method="post" action="/forum/ucp.php?mode=logout&sid;=<?php echo $session_id ?>" />
     <
input type="hidden" name="redirect" value="../" />
     <
input type="submit" name="logout" value="Log out">
</
form
 
Posted: 30 July 2012 01:56 PM   [ Ignore ]   [ # 85 ]   [ Rating: 0 ]
Joined: 2012-07-29
3 posts

Anyway I can get an updated link for 1.2?

 
Posted: 30 July 2012 04:27 PM   [ Ignore ]   [ # 86 ]   [ Rating: 0 ]
Avatar
Joined: 2011-09-09
4 posts

Hi,
Thanks for asking. Since Wiki pages were moved to Github all the files are deleted and some of them, which are included in those Wiki pages are also moved to Github.
I couldn’t add upload it there so I created new repository: https://github.com/almirsarajcic/CI-phpBB3-library
By the way, this version isn’t official, original author probably doesn’t even know of it, but I made it so it could fit to new CI coding convention.

 
Posted: 30 July 2012 06:51 PM   [ Ignore ]   [ # 87 ]   [ Rating: 0 ]
Joined: 2012-07-29
3 posts

Thanks for the quick response almirsarajcic.

I see you talk about logging out. How do I login?

 
Posted: 31 July 2012 03:39 AM   [ Ignore ]   [ # 88 ]   [ Rating: 0 ]
Avatar
Joined: 2011-09-09
4 posts

You’re welcome.
For login you can use standard form:
https://gist.github.com/3214619

If you need log in and log out redirection outside of phpBB you will need to make some modifications to phpBB core. I forgot how to do that. Try this: http://www.phpbb.com/community/viewtopic.php?f=71&t=590016

 
Posted: 07 November 2012 07:33 PM   [ Ignore ]   [ # 89 ]   [ Rating: 0 ]
Avatar
Joined: 2011-05-05
10 posts

hi all
i would like to login from my web site login form not phpbb login box
is there is is any function to do this .

it was my problem but i found the soluation

by the way i add user using this

public function reg_from_ci_to_phpbb($name='',$email='',$password=''
  
{
  
      $user_row 
= array(
     
'username'              => strip_tags($name),
     
'user_password'         => phpbb_hash($password),
     
'user_email'            => $email,
     
'group_id'              => 2// by default, the REGISTERED user group is id 2
     
'user_timezone'         => (float) date('T'),
     
'user_lang'             => 'ar',
     
'user_type'             => '0',
     
'user_ip'               => $_SERVER['REMOTE_ADDR'],
     
'user_regdate'          => time(),
    );
    
   return 
user_add($user_row$cp_data);    
  

LogIn & LogOut code

function login($username$password$autologin$admin)
{
    
// use this only for localhost!!
    
global $config;
    
$config['cookie_domain''localhost';
    
    global 
$auth;
    
    
// Attempt authorization.  result can be used to send messages or perform
    // loggin success / fail logic.
    
$result $auth->login($username$password$autologintrue$admin);
}  

 
function logout()
{
    
global $user;
    
    
$user->session_kill();
    
$user->session_begin();
 Signature 

Some One You Can Trust
.(JavaScript must be enabled to view this email address)
http://about.me/melsnousy/

 
Posted: 26 November 2012 07:51 PM   [ Ignore ]   [ # 90 ]   [ Rating: 0 ]
Joined: 2012-11-11
17 posts

***NVM*** Managed to figure it out.

Anyone help me out with using the generate_text_for_display phpbb3 function.

Perhaps it could be added to this library or someone could post example of extracting list of posts from phpbb_posts and converting the post_text so it can show as html.

Would really appreciate it as ive been trying to get it to work and no luck :( And cant find any examples except pure php ones.

 
Posted: 10 January 2013 10:07 AM   [ Ignore ]   [ # 91 ]   [ Rating: 0 ]
Joined: 2013-01-10
1 posts

hi,


I’m receiving a 500 error when i load the library. Any suggestions on the htaccess settings required?

 
Posted: 09 April 2013 07:13 AM   [ Ignore ]   [ # 92 ]   [ Rating: 0 ]
Joined: 2013-04-09
1 posts

Very frustrating to see that this is working successfully with you guys.

I have now read this howto in phpBB3 library (EllisLab) and have tried other dirty workarounds without succeeding at all.

Error:

Fatal errorCall to a member function session_begin() on a non-object in /home/username/domainname/html/application/libraries/Phpbb.php on line 38 

Can someone of you please give me a answer/workaround on this subject asap?

 
6 of 7
6