Advertisement:

Author Topic: Site Login  (Read 8554 times)

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Site Login
« on: March 29, 2004, 01:12:23 PM »
Im looking for a script, so i can login at my site (not the forum) with the same cookie tha the forum uses.

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #1 on: March 29, 2004, 01:13:59 PM »
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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #2 on: March 29, 2004, 01:17:48 PM »
so i can just include it?

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #3 on: March 29, 2004, 01:18:14 PM »
yes
I am neither a Pessimist nor an Optimist, Just a Realist.

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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #4 on: March 29, 2004, 01:23:50 PM »
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>
------------------------------------------------------------------------------------

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #5 on: March 29, 2004, 01:27:39 PM »
----------------------------------------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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #6 on: March 29, 2004, 01:30:04 PM »
Yawh but now i get a blank screen?

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

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #7 on: March 29, 2004, 01:41:37 PM »
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>
« Last Edit: March 29, 2004, 01:46:05 PM by MrCue »
I am neither a Pessimist nor an Optimist, Just a Realist.

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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #8 on: March 29, 2004, 01:44:46 PM »
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

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #9 on: March 29, 2004, 01:47:11 PM »
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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #10 on: March 29, 2004, 01:49:02 PM »
but how can i get that login?

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #11 on: March 29, 2004, 01:51:03 PM »
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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #12 on: March 29, 2004, 01:54:46 PM »
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

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #13 on: March 29, 2004, 01:57:41 PM »

if($user_info[&#39;is_guest&#39;]) {
    
ssi_login();
} else {
    
//User info
    
echo &#39;Welcome&#39; . $user_info[&#39;realName&#39;];
}


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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #14 on: March 29, 2004, 02:01:11 PM »
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]?

Offline MrCue

  • Full Member
  • ***
  • Posts: 533
  • Gender: Male
  • Chief Architect
    • Installation of SMF
Re: Site Login
« Reply #15 on: March 29, 2004, 02:03:12 PM »
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

Offline buttonbasher

  • Newbie
  • *
  • Posts: 9
Re: Site Login
« Reply #16 on: March 30, 2004, 10:12:48 AM »
how can i show the memberlist?