News:

Wondering if this will always be free?  See why free is better.

Main Menu

Simple User integration, SMF 1.1 RC2

Started by Enc0der, March 21, 2006, 03:47:58 AM

Previous topic - Next topic

Enc0der

Hi

I'm planning on adding a users-commenting system on some of the pages on my site.
I want to use this simple script: http://www.project-angel.com/index.php?pa=tutorials&cat=PHP&id=16
It's a great script example for me because it's simple, elegant and I can use a custom 'id' for each page.

The only thing I want to add is an integration with SMF's users database.
Instead of asking the user for it's Nickname, I want to allow posting only to SMF-logged-in users, and automatically use their UserID value.
If the user is not logged-in (or not registered at all), it should just tell them to do so, and send them to the forum.. it's not really necessary to integrate the login/register stuff as well, but if it's a simple manner, well.. :P

I want to use the UserID and not UserName/RealName because I'm planning on displaying the comments with links to the poster's profile.
I will, however, must be able to display the poster's RealName, from it's ID that is saved on the database.



I was searching the forum for docs about SSI.php and SMF_API.PHP, but didn't found anything relevant..
I just need some simple "functions": is_logged_in(), get_logged_user_id(), get_user_realname($user_id)

I use SMF 1.1 RC2.

any help ?
many thanks! :)

digitalexpl0it

I'm also looking for a function that will display a user name or some way to access the cookie to shoot into a mysql statement for a shout box im writing outside of the forum.

Advertisement: