News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Site Login

Started by buttonbasher, March 29, 2004, 01:12:23 PM

Previous topic - Next topic

buttonbasher

Im looking for a script, so i can login at my site (not the forum) with the same cookie tha the forum uses.

MrCue

SSI will make all the member info availiable.
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

so i can just include it?

MrCue

I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /data/members/paid/p/s/psflames.nl/htdocs/test/test.php:8) in /data/members/paid/p/s/psflames.nl/htdocs/test/SSI.php on line 92

well i get this error

i used this

----------------------------------------test.php--------------------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<?php
include ("SSI.php");
?>

</body>
</html>
------------------------------------------------------------------------------------

MrCue

----------------------------------------test.php--------------------
<?php
include ("SSI.php");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

</body>
</html>
------------------------------------------------------------------------------------

Because of the headers, it must be the first thing, before anything is sent to the browser.
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

Yawh but now i get a blank screen?

hxxp:test.psflames.nl/test.php [nonactive]

MrCue

#7
Ok, so you want to know what it makes availiable?
Sorry. I thought you wanted me to correct the test page, which didnt have any data in it anyway.


<?php
include ("SSI.php");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<pre>
<?php print_r(get_defined_vars()); ?>
</pre>
</body>
</html>
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

no sorry, your a great helper

could you look at it again, it looks kinda strange :) :)

i just want that login thing like the babylon user info

MrCue

Yeh, its basiacly everything that PHP knows.
If you view source it may look more readable.

I have modified the above, to include <pre> & </pre> which should format it on the page better.


Search for
user_info   & user_settings
Those contain user data.
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

but how can i get that login?

MrCue

The SSI knows if the user is loged in or is a guest.

http://www.simplemachines.org/community/ssi_examples.php
<?php ssi_login(); ?> if you need a login form.
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

ow okey, the login form works, but how can is show that userinfo if im logged in, and if youre not logged in the loginform

MrCue


if($user_info['is_guest']) {
    
ssi_login();
} else {
    
//User info
    
echo 'Welcome' $user_info['realName'];
}


Have a play, its  really quite informative.
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

Thank you!!

i will try somethings

only that realname, is that to show your nickname?, cuz it aint working but.. which tags can is use like that [realname]?

MrCue

do this
<pre><?php print_r($user_info); ?></pre>
Now look at what values you have avaliable

to use one just do

echo $user_info['KEY FROM THE PRINT_R'];
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

buttonbasher

how can i show the memberlist?

Advertisement: