Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: bestnow on December 01, 2015, 04:16:36 PM

Title: searching for autoredirect plugin (block smf site total if u are guest)
Post by: bestnow on December 01, 2015, 04:16:36 PM
searching for something that block/redirect smf site to another site when u login from the other site u can check the smf site, but if u logout and then try to check smf site u autoredirect to another site that are not build in smf...

mvh
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: Kindred on December 01, 2015, 04:22:10 PM
ummmm....   why?


not really any good way to do that ....

you can load SSI.php and check $context['user']['is_logged']
and on another page, load SSI.php and use ssi_login();
but that would be on a separate web page, not in SMF....

You could edit index.php and bounce the user if $context['user']['is_logged'] is false...   but I am not sure what the actual effect of that would be.

I have to ask again... Why would you ever want to do something like that?

(and moving to coding, since this is not something that SMF would support)
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: bestnow on December 01, 2015, 04:37:42 PM
Quote from: Kindred on December 01, 2015, 04:22:10 PM
ummmm....   why?


not really any good way to do that ....

you can load SSI.php and check $context['user']['is_logged']
and on another page, load SSI.php and use ssi_login();
but that would be on a separate web page, not in SMF....

You could edit index.php and bounce the user if $context['user']['is_logged'] is false...   but I am not sure what the actual effect of that would be.

I have to ask again... Why would you ever want to do something like that?

(and moving to coding, since this is not something that SMF would support)



want my smf forum only for people that register/login u can call it vip.

mvh
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: Kindred on December 01, 2015, 04:46:45 PM
So, turn off guest browsing -- why do you need to force/redirect them to another page?  Let them login from the forum, if they have an account.(and turn on admin approval of registrations to limit the registrations to those who you want to have access)
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: bestnow on December 01, 2015, 05:02:37 PM
Quote from: Kindred on December 01, 2015, 04:46:45 PM
So, turn off guest browsing -- why do you need to force/redirect them to another page?  Let them login from the forum, if they have an account.(and turn on admin approval of registrations to limit the registrations to those who you want to have access)

if i turn off guest browsing ssi turn bad my code delete and get replace with this instead


mvh
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: Kindred on December 01, 2015, 05:26:36 PM
ummm... what?

that kind of display suggests that your paths are wrong.
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: bestnow on December 02, 2015, 06:26:27 PM
Quote from: bestnow on December 01, 2015, 04:16:36 PM
searching for something that block/redirect smf site to another site when u login from the other site u can check the smf site, but if u logout and then try to check smf site u autoredirect to another site that are not build in smf...

mvh
Title: Re: searching for autoredirect plugin (block smf site total if u are guest)
Post by: Kindred on December 03, 2015, 12:29:35 AM
Quote from: Kindred on December 01, 2015, 04:46:45 PM
So, turn off guest browsing -- why do you need to force/redirect them to another page?  Let them login from the forum, if they have an account.(and turn on admin approval of registrations to limit the registrations to those who you want to have access)