Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
pimpoff
New Member
New Member



Joined: Sep 25, 2003
Posts: 21

PostPosted: Tue Sep 30, 2003 7:19 pm Reply with quote

Hello, I have added a cgi irc client to my nuke site. I want to make it very simple so i have a login forum which fills the Nickname field with Anonymous, now would it be possible for me to retrive the name that person is under and fill the forum wtih it? Lets say i have this module only for regged people.

edit:
If the php file which contains this form has nothing really to do with nuke. It is just a index.php file I put in /modules/Chat
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 01, 2003 11:28 am Reply with quote

This code will retrieve the username when called within a module (index.php) file, for instance. Make sure your index.php file has included mainfile.php.
Code:
global $user, $cookie;

if (is_user($user)) {
    cookiedecode($user);
    $username = $cookie[1];
}
else $username = "Anonymous";

Now, you can just pass the username via the url to your irc client. The client will have to extract the username.
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©