Customizing SMF > Portals, Bridges, and Integrations

SMF Signup Form Modification

(1/1)

MrLeN:
I have a website that has an existing signup area. However, I want people to be added to SMF after they sign up. So I have the following idea:

When my website visitors sign up to my existing website, the sugnup process generates a session username and password.

Once they are finished signup up, I will redirect them to the SMF signup page (along with the session username and password).

Now, on the SMF signup page, I want to edit the form so that the user cannot enter a username or password -- I will hardcode it into the form (with the session values), and I will make those input areas read only.

All I need to know is:

1). Where can I edit those input areas? Where's the files?

2). Where would it be best to ensure that theres a session_start(), so that my username and password values can be carried across? I will also need to add some kind of code like this, just under the session_start();


--- Code: ---if (!isset($_SESSION['username'])) {
  echo "Registration Disabled - please log into the main website to join these forums, where you will find the registration link.";
  exit;
}

--- End code ---

ie: The above code will exist because I don't want anyone to register on the forum unless they go through my existing registration proces first.

Edit: Oh, it's for SMF 2.0.2

MrLeN:
Here are the answers to my qeustions:

The template can be found at:

/Themes/Default/Register.template.php

session_start(); needs to be addded to the top of:

/index.php

..and this is what I added under session_start();


--- Code: ---if (isset($_GET['action'])) {
if ($_GET['action'] == "register") {
if (!isset($_SESSION['nz_username'])) {
  echo "To register on this forum, please log into the main website first.";
exit;
}
}
}

--- End code ---

Navigation

[0] Message Index

Go to full version