creating non-php member based site using SMF user database

Started by aaronsnet, October 13, 2004, 06:33:21 PM

Previous topic - Next topic

aaronsnet

Is there anyway to integrate the SMF SSI script into .shtml pages and create a member based site instead of using straight .php. I no nothing about PHP.

I would like to provide my users with a "members only" menu once they are logged in. When they click on a link within the "members only" menu, it would take them to another page, and would make sure they are actually logged in before allowing them to view the page.

I am really doubting that this will not be possible without php, but it never hurts to ask.

thanks!

[Unknown]

I'm afraid it isn't possible to do this without using any PHP at all.  You may be able to make an intermediary PHP file, however...

-[Unknown]

aaronsnet

thank you for your response..

Maybe channel people through a php script that makes sure that they are authenticated? Any ideas?

[Unknown]

Here's an example:

<?php

require_once('SSI.php');

if (
$user_info['is_guest'])
 die;

?>
Put the menu here.<br />
Only people who are logged in will see it ;).


Then name that file "member_menu.php" and do a regular SSI include ;).

-[Unknown]

aaronsnet

thanks!

SMF definetly rocks! cant wait to see what the future holds!

aaronsnet

How could I add an "access denied" and still let it show the menu? I have tried several times, and when I add the echo statement, it will not pass to the "you are logged in".


<?php

require_once('/home/aarono/public_html/nada/mb3/SSI.php');

if (
$user_info['is_guest'])
echo '<CENTER><H1>Access Denied</H1>';
die;
?>
<B>You are logged in!</B>


thanks!

kegobeer

Try this:

<?php

require_once('/home/aarono/public_html/nada/mb3/SSI.php');

if (
$user_info['is_guest'])
{
echo
'<CENTER><H1>Access Denied</H1>';
die;
}
?>
<B>You are logged in!</B>


If you have more than one statement after if, you need to use { and }.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

aaronsnet


Advertisement: