Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

SSI login landing page

Aloittaja sight|i|picture, maaliskuu 06, 2007, 02:54:16 IP

« edellinen - seuraava »

sight|i|picture

Here's the deal:

I am using SSI for a login on my index page of my site. I would like to make it so that if a member logins from the index page of my site (not the forums) they stay on the index page of the site. (*Not getting swept off to the forums)

I noticed that on the SMF site (Here) that if you log into the forums from the forums page you get sent off to the main page of the SMF site so I know it is possible to do. (The redirection upon login)

The kicker is that I want to make it so that if somebody bookmarked the forums and logs into the forums there at the forums they stay at the forums after login.

Wrap up:

- If at main site and login - stay at main site
- If at forums and login - stay at forums

Is this possible to do with SSI & PHP?

Site in question is http://www.lanpartynw.com
sightpicture

Remaker

This is simple.

On your main page just include SSI.php and call ssi_login fuction.

example:

ssi_login('http://www.lanpartynw.com');


The example above will redirect after a succesfull login to your main site.
Remaker - My blog

sight|i|picture

#2
I'm not sure I follow you all the way...

Something like this?

<!--#include virtual="/forumse/SSI.php?ssi_function=ssi_login('http://www.lanpartynw.com');" -->

Or do I have to put ssi_login('http://www.lanpartynw.com'); into the SSI.php file within the forums?  And then call up the function=ssi_login

edit:

Ok, I see.... the ssi_login() only works if you have .php files (index.php) I am using index.shtml so I would have to use and server side include:
<!--#include virtual="/forumse/SSI.php?ssi_function=login" -->
I can't seem to get:
<!--#include virtual="/forumse/SSI.php?ssi_function=ssi_login" -->
ssi_login to work with my .shtml pages.

What I need is to be able to still use the include virtual code and have the user stay on the index.shtml page after successful login.  *I did see the other thread about redirection etc... but since I am not using .php files for my main site I don't think the answer is there.

I believe there is a way to do this with .shtml files and the SSI.php login or ssi_login fuctions.
sightpicture

sight|i|picture

sightpicture

DarkCyntax

Add them to your main page before everything...

sight|i|picture

Lainaus käyttäjältä: DarkCyntax - maaliskuu 12, 2007, 06:15:17 AP
Add them to your main page before everything...

Ok... I added ssi_login('http://www.lanpartynw.com'); to the top of my page:
<?php require("/home/servername/username/sitename/forumname/SSI.php"); login('http://www.lanpartynw.com');?>


I took out the ssi_login because I can't seem to get ssi_login to work. Only ssi_function=login works.  :-\

Now when a user logs in they get a Server Temporary out of service error. ??
sightpicture

DarkCyntax

#6
Uhm...mean the redirecting code, not ssi_login().
I would need to watch the source on my syte to remember what the code was in php.
This has been mentioned in several posts so you might get better understanding by searching this forum try "ssi_login redirect" or mail me.
[email protected]

EDIT: Ok, found it try this

sight|i|picture

Lainaus käyttäjältä: DarkCyntax - maaliskuu 13, 2007, 05:49:48 AP
Uhm...mean the redirecting code, not ssi_login().
I would need to watch the source on my syte to remember what the code was in php.
This has been mentioned in several posts so you might get better understanding by searching this forum try "ssi_login redirect" or mail me.
[email protected]

EDIT: Ok, found it try this


I've read that thread by "andrea" before. I believe I found the issue. My pages are .shtml pages not .php pages on my main site. Therefor I can't use the ssi_login or the call up for the $_SESSION['login_url'] etc...  I am now planning on changing all my pages over to .php so that I can take advantage of other useful PHP stuff.
sightpicture

ELa

hxxp:www.ampmnet.net [nonactive]

DarkCyntax

Lainaus käyttäjältä: ELa - maaliskuu 13, 2007, 12:37:56 IP
Çok karışık


English please so everyone can understand
Çok karışık = too complex

Lainaus käyttäjältä: sight|i|picture - maaliskuu 13, 2007, 09:41:53 AP
Lainaus käyttäjältä: DarkCyntax - maaliskuu 13, 2007, 05:49:48 AP
Uhm...mean the redirecting code, not ssi_login().
I would need to watch the source on my syte to remember what the code was in php.
This has been mentioned in several posts so you might get better understanding by searching this forum try "ssi_login redirect" or mail me.
[email protected]

EDIT: Ok, found it try this


I've read that thread by "andrea" before. I believe I found the issue. My pages are .shtml pages not .php pages on my main site. Therefor I can't use the ssi_login or the call up for the $_SESSION['login_url'] etc...  I am now planning on changing all my pages over to .php so that I can take advantage of other useful PHP stuff.

That would be for the best I think and some great scripts can be found for php if you look around. You can view .php files offline with "xampp" (in virtual server).
Or the hard way...:P

Advertisement: