Hi, my name's Blob.

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
Post Reply
proton2112
Registered User
Posts: 19
Joined: Sun Nov 27, 2005 1:02 am

Hi, my name's Blob.

Post by proton2112 »

And I'm everywhere! gahhhhhh :p

Can anyone provide me with a snippet of php that can be used to read and display, say, the now BLOB'd username field from phpbb_users? I'm hoping this is simple so I can fix the few mods I had before.

Thanks :)
geoffreak
Registered User
Posts: 591
Joined: Sat Feb 12, 2005 8:39 am
Contact:

Re: Hi, my name's Blob.

Post by geoffreak »

Just using phpbb's default $db commands should allow for BLOB parsing :)
Anime Revolution - Your new #1 source for All things anime and manga!
READ MY BLOG ALREADY!
proton2112
Registered User
Posts: 19
Joined: Sun Nov 27, 2005 1:02 am

Re: Hi, my name's Blob.

Post by proton2112 »

Well I should explain a bit more. The "mod" I wrote is a separate piece altogether from the forum code. I have a login form that will compare the hashed password to phpbb's to make sure the user is valid (that's the only link to the forum and the code exists outside the forum folders). However, it's choking trying to look them up now that the username field is blob'd. What I'm looking for is some actual php code that can read and display the username as a string like it used to be.

Thanks.
Paul UK
Registered User
Posts: 12
Joined: Mon May 21, 2007 11:17 am

Re: Hi, my name's Blob.

Post by Paul UK »

Why are these fields blobbed in the first place I want to know!
User avatar
cheater512
Registered User
Posts: 296
Joined: Sat Mar 05, 2005 11:27 pm
Location: Brisbane, Australia
Contact:

Re: Hi, my name's Blob.

Post by cheater512 »

Lets see you do UTF-8 without Blobs. ;)

Have you tried to use phpBB's $user class? That would probably make your life easier.
User avatar
Avaya
Registered User
Posts: 73
Joined: Thu Mar 08, 2007 7:08 pm
Location: Vancouver, Canada
Contact:

Re: Hi, my name's Blob.

Post by Avaya »

Ok, Noobie time. What's a Blob (besides a movie from the 70ies) and why should I care or be concerned?
My website: SixSeventyOne.net
Get the best! Browse with Image
User avatar
cheater512
Registered User
Posts: 296
Joined: Sat Mar 05, 2005 11:27 pm
Location: Brisbane, Australia
Contact:

Re: Hi, my name's Blob.

Post by cheater512 »

A Blob is a Binary Large Object. Basically a field for storing binary data.
.Johnny
Registered User
Posts: 7
Joined: Wed May 23, 2007 8:28 am

Re: Hi, my name's Blob.

Post by .Johnny »

What you can do is include some stuff from the phpBB3; i'm doing a similar thing, and it works ok. The only draw back is they used the functions for displaying the loginbox together with the verification section, so you would have to cut some code from the login_box() function if you do not want the phpBB code to create your loginbox.

this will handle all the cookie authenticated users so start with this:

Code: Select all

    define('IN_PHPBB', true);
    $phpbb_root_path = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],'/')+1).'../phpBB3/';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    require($phpbb_root_path . 'common.' . $phpEx);
    require($phpbb_root_path . 'includes/functions_user.' . $phpEx);
    require($phpbb_root_path . 'includes/functions_module.' . $phpEx);

    // Basic parameter data
    $id     = request_var('i', '');
    $mode    = request_var('mode', '');

    define('IN_LOGIN', true);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup('ucp');    
 
and then start your loginbox code, checking for the $_POST['login'] value (better look that up yourself, would be too much code and the changes you need to make are obvious)
Post Reply

Return to “phpBB Discussion”