Display. HTML instead of error message on '?action=register'

Started by SMiFFER, May 22, 2020, 07:43:48 AM

Previous topic - Next topic

SMiFFER

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!
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Arantor

Why not put the content you want to show into that $txt entry?

SMiFFER

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');
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Arantor

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.

SMiFFER

Okay, then? Have you got anything constructive to add here at all?
So far you have not offered anything substantial - as always.
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

m4z

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)


Quote from: Arantor on May 22, 2020, 08:28:07 AM
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

Es gibt hier im Forum ein deutsches Support-Board!

Arantor

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.

SMiFFER

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.
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Gwenwyfar

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.
"It is impossible to communicate with one that does not wish to communicate"

SychO

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.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

m4z

Quote from: SMiFFER 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.

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


Quote from: SMiFFER on May 22, 2020, 10:14:08 AM
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

Es gibt hier im Forum ein deutsches Support-Board!

Arantor

QuoteConclusion: 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.

SMiFFER

Quote from: m4z on May 22, 2020, 11:51:09 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)
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Advertisement: