Advertisement:

Author Topic: Display. HTML instead of error message on '?action=register'  (Read 314 times)

Offline SMiFFER

  • Full Member
  • ***
  • Posts: 450
I have disabled registration on one of my forums.
There now comes the error message correctly mentioning that.
That is the error message listed as '$txt['registration_disabled']' in the file 'Errors.english-utf8.php'

I would display an .html file if I knew where I must put that into and switch off the display of that error message.

What file do I have to amend?

Thanks ahead! Any constructive help greatly appreciated!
« Last Edit: May 22, 2020, 08:21:16 AM by SMiFFER »
At least this last step these last 7 steps (getting more again???) must be completed for SMF2.1 RC3.
And these 74 88 89 (getting more???) for SMF2.1 Final.
Last Full Version: 2.0 Final released almost 9 years ago on 20110604

QUOTE OF Aleksi "Lex" Kilpinen: "That version is old enough to go to school itself."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,310
Re: Error message on '?action=register'
« Reply #1 on: May 22, 2020, 08:11:49 AM »
Why not put the content you want to show into that $txt entry?

Offline SMiFFER

  • Full Member
  • ***
  • Posts: 450
Re: Error message on '?action=register'
« Reply #2 on: May 22, 2020, 08:17:54 AM »
Why not simply answer my question first?


Found it myself. Simply amend line 52 in file '/forum/Sources/Register.php'

replace
       fatal_lang_error('registration_disabled', false);
by
      redirectexit('http://www.mysite.com/register.html');
At least this last step these last 7 steps (getting more again???) must be completed for SMF2.1 RC3.
And these 74 88 89 (getting more???) for SMF2.1 Final.
Last Full Version: 2.0 Final released almost 9 years ago on 20110604

QUOTE OF Aleksi "Lex" Kilpinen: "That version is old enough to go to school itself."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,310
Re: Display. HTML instead of error message on '?action=register'
« Reply #3 on: May 22, 2020, 08:28:07 AM »
Because as per usual you assert that your solution is the only possible solution. I’m not sure it is in this case by way of the fact that I think you only did register not register2 as well which means spammers can just bypass your redirection.

But what would I know, eh? It’s not like I helped build the software you’re using or anything.

Offline SMiFFER

  • Full Member
  • ***
  • Posts: 450
Re: Display. HTML instead of error message on '?action=register'
« Reply #4 on: May 22, 2020, 08:39:07 AM »
Okay, then? Have you got anything constructive to add here at all?
So far you have not offered anything substantial - as always.
At least this last step these last 7 steps (getting more again???) must be completed for SMF2.1 RC3.
And these 74 88 89 (getting more???) for SMF2.1 Final.
Last Full Version: 2.0 Final released almost 9 years ago on 20110604

QUOTE OF Aleksi "Lex" Kilpinen: "That version is old enough to go to school itself."

Offline m4z

  • Just a monkey with a typewriter
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,026
  • /mɛs/
Re: Display. HTML instead of error message on '?action=register'
« Reply #5 on: May 22, 2020, 09:04:42 AM »
I guess patching the txt string would be easier in general. Both options aren't really update-proof, though. (But we don't have any better option. :-X)


I’m not sure it is in this case by way of the fact that I think you only did register not register2 as well which means spammers can just bypass your redirection.

Can you explain in more detail how that mechanism works and why not addressing register2 is a problem? That would be helpful. :-*
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,310
Re: Display. HTML instead of error message on '?action=register'
« Reply #6 on: May 22, 2020, 10:07:28 AM »
Well, I did tell you how to solve it for both cases in one go - change the language string to your content. But I guess that wasn’t constructive enough. Especially as answering you is usually a waste of time because you don’t want to consider that you might be wrong about how to do whatever you think you need to do.

As for the underlying problem, action=register is the registration form, action=register2 is the bit that happens when the form is submitted. Thing is in 2.0 you don’t *need* to go to action=register first, depending on configuration (and I fully expect the OP to have ended up with that configuration) such that you could just brute force attempt to hit action=register2 and never get the redirection the OP asked for.

Though as usual for the OP, he never explains why he wants things, and usually tries to do things that are well intentioned but misinformed about their consequences and then gets pissy when people don’t immediately give him exactly what he asked for.

The problem is most people usually find that getting exactly what they ask for has all kinds of unexpected gotchas, but that’s how I earn very large $$$ in my day job, by listening to what the client says they want, ignoring them and doing something to actually solve their problem, because their solution is usually well intentioned but misinformed.

Offline SMiFFER

  • Full Member
  • ***
  • Posts: 450
Re: Display. HTML instead of error message on '?action=register'
« Reply #7 on: May 22, 2020, 10:14:08 AM »
Oh, speaking of listening to the client: When do you learn to do that and take your own medicine?
I said HTML! And I can not put a whole external page with functions into the text line. Period.
No need to break off another completely useless and anal discussion about nothing before
ANY solution for the actual matter is provided.

It really feels as if you want or need to discuss everything to death in each and every thread where I ask something
and at the same time you NEVER come with a constructive solution. It's only blah-blah, never a solution for what is asked from you!

*I* run this test here. -> It's my test. Not yours.
*I* asked it. -> It's my question. Not yours.
*I* created this thread. -> It's my thread.  Not yours. And I decide when I derail it.

And because you mentioned the term 'help' - from your behaviour in each and every of my threads
I rather got the impression that you 'helped' delay the release of SMF with your unnecessary discussions!
This is a good example of how "pseudo-intellectually" someone can easily derail a topic here,
just by bringing the scope entirely away
from the actual question and blowing a simple matter up without any sense or use.

Conclusion: Highly probable it is very largely your fault that the last released final version of SMF is almost 9 years old...

I wish you best success and much luck in your day job, cause from what everybody can see here, YOU NEED IT.
At least this last step these last 7 steps (getting more again???) must be completed for SMF2.1 RC3.
And these 74 88 89 (getting more???) for SMF2.1 Final.
Last Full Version: 2.0 Final released almost 9 years ago on 20110604

QUOTE OF Aleksi "Lex" Kilpinen: "That version is old enough to go to school itself."

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,324
  • Gender: Female
  • Kitty kitty Kat!
Re: Display. HTML instead of error message on '?action=register'
« Reply #8 on: May 22, 2020, 10:52:01 AM »
That is a long list of false accusations to avoid the simple fact that he's trying to solve your problems in a good way, yet you refuse the solutions given.

This is a forum for support, to solve problems. And he's trying to solve your problems in the best way. It's as simple as that.

If you don't want to accept those solutions, that's on you. No one can force you, truly. It's your right. But when someone is giving of their time to try to help, it's also their right to refuse to do something they don't think is wise. Even if you don't want the given solutions, being courteous goes a long way.
« Last Edit: May 22, 2020, 11:04:56 AM by Gwenwyfar »

Offline SychO

  • Lead Customizer
  • SMF Hero
  • *
  • Posts: 1,695
  • Gender: Male
    • SychO9 on GitHub
    • SychO
Re: Display. HTML instead of error message on '?action=register'
« Reply #9 on: May 22, 2020, 11:27:06 AM »
It seems like you are too focused about shutting Arantor's response to consider his answer to the problem. I and many others would have suggested exactly the same solution provided by Arantor before suggesting something else.

And as he also mentioned, your solution will work when guests access ?action=register but it won't when they access ?action=register2, it might be a small detail but it's a detail a good developer would take care of, that's why Arantor tried to give you the best solution.
Take the initiative

Offline m4z

  • Just a monkey with a typewriter
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,026
  • /mɛs/
Re: Display. HTML instead of error message on '?action=register'
« Reply #10 on: May 22, 2020, 11:51:09 AM »
Oh, speaking of listening to the client: When do you learn to do that and take your own medicine?
I said HTML! And I can not put a whole external page with functions into the text line. Period.

To be fair, I interpreted your request to only require "simple" HTML, which is possible in the text string.


I rather got the impression that you 'helped' delay the release of SMF with your unnecessary discussions!
[…]
Conclusion: Highly probable it is very largely your fault that the last released final version of SMF is almost 9 years old...

This isn't even remotely close to the truth (from what I read about), but I understand you're angry.
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,310
Re: Display. HTML instead of error message on '?action=register'
« Reply #11 on: May 22, 2020, 11:57:12 AM »
Quote
Conclusion: Highly probable it is very largely your fault that the last released final version of SMF is almost 9 years old...

I left the team in spring 2010 prior to the final release of 2.0.0 after the management spat. (The final release was June/July 2011. You can't blame me for that holdup. Even if I did still contribute bug fixes in that time.)

I rejoined the team in autumn 2013 during 2.1 Alpha 1 and quit in spring 2014 still during 2.1 Alpha 1, having implemented likes, alerts, and a system to handle this efficiently.

I haven't been a team member since 9th February 2014. You can't blame me for holding up 2.1, except in so far as I forked it in 2017 after being unimpressed by what I saw happening in the code, to go away and rebuild it as a I saw fit; this did not slow anything down, merely I didn't contribute to making it faster, I guess.

Offline SMiFFER

  • Full Member
  • ***
  • Posts: 450
Re: Display. HTML instead of error message on '?action=register'
« Reply #12 on: Yesterday at 07:34:06 AM »
This isn't even remotely close [...], but I understand you're angry.

Aha.

Btw: I also solved the register2 "issue" (that has never been one really)
At least this last step these last 7 steps (getting more again???) must be completed for SMF2.1 RC3.
And these 74 88 89 (getting more???) for SMF2.1 Final.
Last Full Version: 2.0 Final released almost 9 years ago on 20110604

QUOTE OF Aleksi "Lex" Kilpinen: "That version is old enough to go to school itself."