Advertisement:

Author Topic: Disable self registration  (Read 849 times)

Offline sonnyh

  • Semi-Newbie
  • *
  • Posts: 47
Disable self registration
« on: July 08, 2019, 08:15:09 AM »
Hi,
I have the self register turned off.
Is there a way to remove the "Register" button?
If not is there a way to change the message that pops up when register is selected?

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: Disable self registration
« Reply #1 on: July 08, 2019, 08:35:44 AM »
You can disable registrations all together ;).

Admin --> Members --> Registration --> Settings --> Method of registration employed for new members: Registration Disabled
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,435
Re: Disable self registration
« Reply #2 on: July 08, 2019, 08:49:19 AM »
You can disable registrations all together ;).

Admin --> Members --> Registration --> Settings --> Method of registration employed for new members: Registration Disabled

they said they have done that already, that does not remove the registration button.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: Disable self registration
« Reply #3 on: July 08, 2019, 08:57:53 AM »
Then the OP would have to do manual edits :-\.

PS: Why doesn't the Registration button disappear when registrations are disabled? Seems logical to make it appear and disappear based on whether the forum's admin wants registrations enabled or disabled. 
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,566
  • Gender: Male
    • Kindred-999 on GitHub
Re: Disable self registration
« Reply #4 on: July 08, 2019, 09:17:31 AM »
note: not fully tested...


Code: (in Subs.php -- search for) [Select]
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),


Code: (replace with) [Select]
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'] && ($modSettings['registration_method'] <> 3),
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,370
Re: Disable self registration
« Reply #5 on: July 08, 2019, 12:24:13 PM »
Why doesn't the Registration button disappear when registrations are disabled? Seems logical to make it appear and disappear based on whether the forum's admin wants registrations enabled or disabled. 

This has been done in 2.1, and I think it's a bad idea, especially if there's no contact link on the forum.  People visiting a forum they're interested in for first time expect to see some means or instructions for registering.  If there's nothing, it leaves them floundering with no way to join the forum, and no explanation why they can't.  We sometimes see posts here from people who are unable to join forums, and have no way of contacting a forum admin.

I think it's a bad idea. >:(

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,435
Re: Disable self registration
« Reply #6 on: July 08, 2019, 12:42:25 PM »
usually those that cant register and come here, cannot complete registration due to a question they cannot answer not because the registration is disabled.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,370
Re: Disable self registration
« Reply #7 on: July 08, 2019, 12:50:20 PM »
There are various reasons why people come here with registration questions, most commonly that they can't register and there's no way to contact an admin.  But that kind of misses the point.  Running a public forum with no registration or contact link is a good way to discourage visitors from ever returning.  In 2.0 there's at least a message that registration is disabled, it's better than giving them nothing.  I've restored the button and message on my RC2 work install, it's not a big deal and provides a basic courtesy to visitors.


Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: Disable self registration
« Reply #8 on: July 08, 2019, 08:28:56 PM »
You have a point there Sir Osis of Liver... but... if it's a private forum and the owner doesn't want anyone to register or contact him/her, IMO that's a valid reason to have the Registration button disabled. He/she might not want visitors returning... in the admin's eyes, maybe discouraging visitors to visit the site is a good thing ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline sonnyh

  • Semi-Newbie
  • *
  • Posts: 47
Re: Disable self registration
« Reply #9 on: July 08, 2019, 09:14:15 PM »
Thank you for the replies.
This is, in fact, a private forum, where registration is done by the admin based on certain required vetting.

The code provided by "Kindred" was helpful and did remove one of the registration buttons on the guest page.
Thank you Kindred.

There is one other are on the right of the guest page that says " Welcome, Guest. Please login or register" which I would also like to get rid of.

I would appreciate any suggestions.

Again, thank you for all the replies.

Best,
Sonny

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,370
Re: Disable self registration
« Reply #10 on: July 08, 2019, 09:52:42 PM »
You can edit the text here -

/Themes/default/languages/index.english.php

Code: [Select]

$txt['welcome_guest'] = 'Welcome, <strong>%1$s</strong>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';


  or remove it here -

index.template.php

Code: [Select]

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<div class="info">', sprintf($txt['welcome_guest'], $txt['guest_title']), '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
<div class="info">', $txt['quick_login_dec'], '</div>';


Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,370
Re: Disable self registration
« Reply #11 on: July 08, 2019, 10:01:55 PM »
if it's a private forum and the owner doesn't want anyone to register or contact him/her, IMO that's a valid reason to have the Registration button disabled. He/she might not want visitors returning... in the admin's eyes, maybe discouraging visitors to visit the site is a good thing ;).

My two production forums are private, invitation only.  Registration is disabled on my family forum, admin approval on my support forum.  I don't have any problem with the registration button, have never had a bot register or spammer post on either forum.  If visitors or spiders are seeing the forum, it's unavoidable, but has no effect on the forum or my members.  It's just not a problem.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,697
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Disable self registration
« Reply #12 on: July 08, 2019, 11:28:29 PM »
Why doesn't the Registration button disappear when registrations are disabled? Seems logical to make it appear and disappear based on whether the forum's admin wants registrations enabled or disabled. 

This has been done in 2.1, and I think it's a bad idea, especially if there's no contact link on the forum.  People visiting a forum they're interested in for first time expect to see some means or instructions for registering.  If there's nothing, it leaves them floundering with no way to join the forum, and no explanation why they can't.  We sometimes see posts here from people who are unable to join forums, and have no way of contacting a forum admin.

I think it's a bad idea. >:(

Going off topic, but I agree with you. I believe the original idea to keep the button and offer an explanation was done just because of this. It can be confusing to find a forum that you don't know how to register to, or are unsure if you even can.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline sonnyh

  • Semi-Newbie
  • *
  • Posts: 47
Re: Disable self registration
« Reply #13 on: July 09, 2019, 08:47:40 AM »
Thanks to Sir Osis of Liver for location of "Welcome Guest line"

Thank you all for the help and discussion regarding this issue.

Best,
Sonny

Offline Mareid

  • Jr. Member
  • **
  • Posts: 134
Re: Disable self registration
« Reply #14 on: August 07, 2019, 04:49:51 PM »
I want to do the same thing, disable the "Register" button.  What I've done is provided a forum called "Click HERE to register or retrieve a lost password/user ID" and within that forum are just two posts, one telling potential registrants to send an email to webmaster@manasotaweaversguild.com, and the other saying how to retrieve a lost password.  Still, my unsophisticated potential users are confused and click the "Register" button in the menu above, which leads to more confusion when they get the "Registrations are disabled" message.  I'd also like to get rid of the search box (not shown in the screenshot) in the upper right corner, but I can live with that.





Kindred's code worked great!
« Last Edit: August 07, 2019, 05:09:42 PM by Mareid »