Since this has been requested several times now, and I've posted a solution before, here goes:
In /Sources/Display.php, find this:
// What are you gonna display if these are empty?!
if (empty($topic))
fatal_lang_error('no_board', false);
And add this after:
// Are we a guest?
if ($context['user']['is_guest'])
fatal_lang_error('cannot_view_topic_guest');
Then, in your Modifications.{language}.php, add this before the ?> and change the message:
$txt['cannot_view_topic_guest'] = 'The error you would like in here';
So if I'd like to have "Sorry, guest, but you are unable to view topics!" as error message, I'd put this in:
$txt['cannot_view_topic_guest'] = 'Sorry, guest, but you are unable to view topics!';
So now guests should be unable to view topics and instead get that message smashed in their face ;)
Nice trick :)
Thanks, and thank you for reminding me to post a trick for it ;)
Quote from: NanoSector on April 14, 2012, 04:36:33 AMSince this has been requested several times now, and I've posted a solution before, here goes:
In /Sources/Display.php, find this:
// What are you gonna display if these are empty?!
if (empty($topic))
fatal_lang_error('no_board', false);
And add this after:
// Are we a guest?
if ($context['user']['is_guest'])
fatal_lang_error('cannot_view_topic_guest');
Then, in your Modifications.{language}.php, add this before the ?> and change the message:
$txt['cannot_view_topic_guest'] = 'The error you would like in here';
So if I'd like to have "Sorry, guest, but you are unable to view topics!" as error message, I'd put this in:
$txt['cannot_view_topic_guest'] = 'Sorry, guest, but you are unable to view topics!';
So now guests should be unable to view topics and instead get that message smashed in their face ;)
Thank you!!