News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Taking SMF registration and login/logout out of the forum

Started by jaBote, April 13, 2014, 05:15:50 PM

Previous topic - Next topic

jaBote

Hello! I'm trying to develop a community for a private MMO server (Ragnarök Online, for the good old times!  ;D) based on SMF plus an integrated custom control panel (CP) built upon SMF with some security measures in mind. Sadly, pre-built CPs for RO servers are fully skinnable but provide zero opportunity for integration and trusted people on the emulator forums have already told they have critical, unattended security issues (mostly XSS related) which sound ominous to me. These are my main reasons for building another CP powered by SMF: security and integration.

The problem after this is that, as a proper website, registration and login forms should be located outside of the forum in one of the main pages (using the SMF registration), not on the forum. Is there a way of taking the register and login/logout actions to a page outside of the main forums?

Thanks in advance for reading this!

P.S.: I've just stumbled upon this idea while writing this, I previously thought about remaking all of the SMF registration and login systems to a custom page based on SSI and using SMF basic security system, for which I've researched on the docs/wiki/forum for weeks, got a basic idea and was about to ask things a bit more interesting. Sorry if I feel noobie now, after a quick search I haven't found anything for this new and simpler idea that gets the job done in a smarter way, I suppose.

emanuele

The main idea is always the same: use SSI.php to get SMF "environment", and then from there do whatever you prefer.
If you can grab SSI.php from anywhere, you should then be able to either use SSI functions or to build on top of that what you want.

The wiki may or may not help (I didn't read the articles):
http://wiki.simplemachines.org/smf/Category:SSI
Judging by the name, that one should be what you are looking for:
http://wiki.simplemachines.org/smf/Website_Forum_Integration


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

jaBote

Thanks for your reply, but sadly that's not what I wanted. None of the Wiki articles I've read so far help with it.

Hope an example will make things more clear:
-> Change all "mycommunity.com/forum/index.php?action=login" to "mycommunity.com/login"; Also make that page the actual login page for the website (which will use the user system & permissions from SMF anyways).
-> Same with the register actions.

My idea is letting the people register on the web without having to use the forums URL.

Thanks again!

emanuele

So, you may create a /login/ directory with an index.php file containing something like that:
<?php
require_once('/path/to/forum/SSI.php');
global
$user_info;

if (
$user_info['is_guest'])
   
ssi_login('http://url_you_want.to/redirect');
else
   
ssi_logout();

appl the styling you want, then redirect via htaccess any access to action=login to that /login/ dir.

And something similar with the registration page.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

jaBote

Thanks for the valuable insight! Since I've got no tricks for the registration thing, I think I'll just change the template file for a custom one that just sends headers to the other registration page. Will test and keep posting here in case I find any serious problems. Please warn me in case I'll be doing something outrageous by doing that.

Topic solved (at the moment).

Many thanks!

Advertisement: