# Forum Access



## Cody24 (Jun 29, 2011)

I have a free forum on my website from Simple Machines.

For example

How would I be able to get my website to configure with the forum, so that if people are logged into the forum, they then can get access to

If they're not logged in, then they can't have access to


----------



## BPCS (May 26, 2012)

Whats the site written in? You might try filling a session var when someone logs in, check for that var when /ford loads. If it's not found or has no value redirect to the login page.


----------



## Elvandil (Aug 1, 2003)

Cody24 said:


> I have a free forum on my website from Simple Machines.
> 
> For example
> 
> ...


Careful about posting links. Your post just might turn into spam.


----------



## tomdkat (May 6, 2006)

SMF might have some kind of website integration function or feature that might do what you want. Have you looked into SMF plugins?

Peace...


----------



## Cody24 (Jun 29, 2011)

BPCS said:


> Whats the site written in? You might try filling a session var when someone logs in, check for that var when /ford loads. If it's not found or has no value redirect to the login page.


Site is written in basic html nothing too fancy.


----------



## Cody24 (Jun 29, 2011)

tomdkat said:


> SMF might have some kind of website integration function or feature that might do what you want. Have you looked into SMF plugins?
> 
> Peace...


I have asked on SMF forum, still waiting for some reply. I don't see any SMF plugin that would be able to do this.


----------



## tomdkat (May 6, 2006)

I believe SMF supports "Single Sign On". Would a "Single Sign On" (SSO) approach work for you?

Peace...


----------



## Cody24 (Jun 29, 2011)

Here is the fix if anyone was wondering via from SMF.


```
<?php
require_once('../forum/SSI.php');
is_not_guest();
?>
```


----------



## tomdkat (May 6, 2006)

Thanks for posting the solution! Did someone reply to your inquiry or did you find that info somewhere on the SMF site/forum?

Peace...


----------



## Cody24 (Jun 29, 2011)

Someone on the SMF forum replied to me.

You just need to put that code on top of the page, and make sure your site is written in php. It seems too easy, but it works!


----------



## fitch7000 (May 30, 2012)

Cody - Thanks for delving in into the issue & teaching us


----------



## Cody24 (Jun 29, 2011)

Ran into a snag..

Is there a way to disable cookies on my website?

The login prompt doesn't work well sometimes, you have to clear out your cookies before it works.


----------



## tomdkat (May 6, 2006)

If your site is being served by an Apache web server, you might be able to disable cookies using some directives you can put in a .htaccess (that's "dot-htaccess") file in the root directory of your site. I'll post more info when I have some.

EDIT: Ok, see if the CookieTracking directive will help. You'll need to find out if the web server serving your site content supports this directive or not. You could always ask your website host for help with this. 

Peace...


----------



## Cody24 (Jun 29, 2011)

That looks like it would work, but I realized I don't want to disable cookies.

Then the members would have to login every time they come back to the site. There must be something that's goofed up with the code.


----------

