Customizing SMF > SMF Coding Discussion

Editing Error pages

(1/2) > >>

Redric:
SMF Version: 2.0.2

I have 2 passworded boards on my forum, and a lot of times users hotlink the threads inside of these boards, so it shows guests and members
"An Error Has Occurred!
This board is password protected and you have not provided the correct password during this session
Please enter the board password:"

What I would like to do is edit it so that each board has a distinct Error message, so that I can put the hint in the error page.  Worst case I would like to be able to do something like

"Board 1: Hint is blah blah blah
Board 2: Hint is blarghle blargh"

I'd like to know which SMF file contains this information so that I can modify it.  I'm sorry if I posted in the wrong area, I wasn't sure if this belongs in SMF 2.x support or Coding Discussion.

K@:
If I've understood what you want, have a look at (Believe it or not) Errors.english.php in the default theme's "languages" directory.

Kindred:
do note, editing that file edits your general error messages.
If you want error messages specific to the error (in other words, error_message_1 for board 1, etc) then you'll have to modify the coding....

Redric:

--- Quote from: K@ on June 07, 2012, 04:16:38 PM ---If I've understood what you want, have a look at (Believe it or not) Errors.english.php in the default theme's "languages" directory.

--- End quote ---
I'm using a custom theme, does that make a difference?


--- Quote from: Kindred on June 07, 2012, 04:23:02 PM ---do note, editing that file edits your general error messages.
If you want error messages specific to the error (in other words, error_message_1 for board 1, etc) then you'll have to modify the coding....

--- End quote ---
That was a concern I was thinking about, but I'm willing to be lazy and just have both hints added to the generic error page for simplicity on my part.

Redric:
The Errors.english.php file didn't have the information for board password errors.  Or at the very least I couldn't find the information for board password errors in the file.

Is it maybe in a different file?

Navigation

[0] Message Index

[#] Next page

Go to full version