Registered Users - Already Existing Site and Database (Features)

by IMC Magazine, Wednesday, August 10, 2011, 05:48 (2967 days ago)

I have a website which already has an existing Registered Users Database. I would be greatly appreciating if the FORUM could recognize and manage the existing Registered Users SQL Table.

I have not had a chance yet to crack into the coding of the Forum, but I know this would not be the easiest thing to script... any existing scripts to do this? Any ideas how to do this? Thanks. I can make a nice donation to this project at the end of the month.

Assume User is Sign In Already, Drop Extra Features....

by IMC Magazine, Wednesday, August 10, 2011, 06:50 (2967 days ago) @ IMC Magazine

I'm looking at what my needs/wants for my specific project are...

All I want is the posting page to use an existing Username from the session_start()- I already have a session started with User Data, such as Username, User Id.

Eliminate the Login Page, I have my own Login Page.

Add a "Page Header" to all pages of the "little forum", my script does this:
include 'header.php';
echo $head_data; // Various scripts and CSS Styles
echo $body_tag; // Kinda important, I have my own <body> tag I use.
echo $body_data; // This is a Top Bar Menu, Very important I need this on every page.

Anyone involved in this "little forum" project that can address my needs EMail me.
We can work out compensation for your efforts.

Thanks.
RobbyR92@gmail.com

The design is great, I love this Forum script.

by IMC Magazine, Wednesday, August 10, 2011, 06:56 (2967 days ago) @ IMC Magazine

Just wanted to add how much I like this Forum's design. Thanks.

The design is great, I love this Forum script.

by Troy @, Wednesday, August 10, 2011, 14:33 (2967 days ago) @ IMC Magazine

Being an OpenSource project, I will gladly submit my 2 cents worth for free.
The way I accomplished this was simply add in my users to the mlf2_userdata table. All I needed was to add the username and user_type and password
Then, when my users logged into my site, I have SESSION['CFG'] class and set mlf2_user_id, and mlf2_user_type, then set the following:

$_SESSION['mlf2_user_id'] = $_SESSION['CFG']->mlf2_user_id; // 1 for moderator, 0 for regular user, 2 for admin;
$_SESSION['mlf2_user_name'] = $_SESSION['CFG']->username;
$_SESSION['mlf2_user_type'] = $_SESSION['CFG']->mlf2_user_type;

NOTE: mlf2 is the table prefix and $_SESSION['CFG'] is based off a class on my site. If you changed your table prefix, then change that accordingly.
Some data is not gathered doing the forum in this manner (such as Log In user's IP address, etc) but all that is being collected in other tables for my site.
The keys here are setting $_SESSION['mlf2_user_id'], $_SESSION['mlf2_user_name'], $_SESSION['mlf2_user_type']

Again, this works great for my site with a couple modifications to the tpl files to remove all My little forum login page references and to direct users to use my original site login.
When new users register on my site, I simply input the data into mlf2_userdata table at time of registration along with my original users table.

The design is great, I love this Forum script.

by Gary @, United Kingdom, Friday, August 17, 2012, 08:10 (2594 days ago) @ Troy

Hello there, appreciate this is over a year old but I am trying to achieve something similar, are you able to tell me which file you made these changes in please?

Thanks

Registered Users - Already Existing Site and Database

by Troy @, Wednesday, August 10, 2011, 14:37 (2967 days ago) @ IMC Magazine

Being an OpenSource project, I will gladly submit my 2 cents worth for free.
The way I accomplished this was simply add in my users to the mlf2_userdata table. All I needed was to add the username and user_type and password
Then, when my users logged into my site, I have SESSION['CFG'] class and set mlf2_user_id, and mlf2_user_type, then set the following:

$_SESSION['mlf2_user_id'] = $_SESSION['CFG']->mlf2_user_id; // 1 for moderator, 0 for regular user, 2 for admin;
$_SESSION['mlf2_user_name'] = $_SESSION['CFG']->username;
$_SESSION['mlf2_user_type'] = $_SESSION['CFG']->mlf2_user_type;

NOTE: mlf2 is the table prefix and $_SESSION['CFG'] is based off a class on my site. If you changed your table prefix, then change that accordingly.
Some data is not gathered doing the forum in this manner (such as Log In user's IP address, etc) but all that is being collected in other tables for my site.
The keys here are setting $_SESSION['mlf2_user_id'], $_SESSION['mlf2_user_name'], $_SESSION['mlf2_user_type']

Again, this works great for my site with a couple modifications to the tpl files to remove all My little forum login page references and to direct users to use my original site login.
When new users register on my site, I simply input the data into mlf2_userdata table at time of registration along with my original users table.

A good method, with some questions

by IMC Magazine, Wednesday, August 10, 2011, 18:48 (2967 days ago) @ Troy

Thanks Troy. I did something similar, but your method is better. One problem I have with this is that the encoding of the passwords uses "generate_pw_hash" which is incompatible with how I encode passwords (md5).

And I did the same thing with hiding the "mlf" login and registration page links.

I'm going to dig around the scripts some more and look into your method of accomplishing this. But my offer is still good if a project creator wants to really customize this Forum script to work with my website. Thanks.

A good method, with some questions

by Troy @, Wednesday, August 10, 2011, 20:37 (2966 days ago) @ IMC Magazine

When your users register, input their md5(password) into the mlf2_userdata table. The code still supports md5(password) as it appears that an older version of MLF used MD5. Just curious though, why do you need the correct password in that table? My method I showed doesn't require the passwords to be the same as the $_SESSION data is being populated based on users authenticating through my current system, not through MLF.

Oh, thats a good explanation... thx again

by IMC Magazine, Wednesday, August 10, 2011, 21:33 (2966 days ago) @ Troy

BTW... I assume the file you modified with the $_SESSION inputs is the main "index.php" file. It appears the creators of this open source project are much better coders than I am. The PHP is more like a program (exe) than a markup language.

kudos!

Avatar

Oh, thats a good explanation... thx again

by Auge ⌂ @, Sunday, August 14, 2011, 13:59 (2963 days ago) @ IMC Magazine

Hello

BTW... It appears the creators of this open source project are much better coders than I am. The PHP is more like a program (exe) than a markup language.

PHP is a programming language. What it is not, is a markup language.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Registered Users - Already Existing Site and Database

by IMC Magazine, Wednesday, August 10, 2011, 19:04 (2967 days ago) @ Troy

Another question, in which "mlf" file did you find & edit these variables?

RSS Feed of thread
powered by my little forum