Firefox PHP

Changing Text on the Log In Screen

Posted by shawn y. 
Changing Text on the Log In Screen
May 03, 2008 07:59PM
I've been running a message board for the past couple of months using Phorum and it's worked out great. (Really great, actually.) Anyway, for board users' privacy, I recently changed the forum settings so that only registered users can read the forum content; public users get the screen that says "Sorry, only registered users may read this forum." (See the image, below.) I'd like to change that message so that it briefly explains how to register, and doesn't result in potential users thinking that they are being turned away.

I've dug around in the template files and other Phorum documents, but can't find the string of text that I want to change. I'd like to know if there is someone that can help me out by directing me to the file by providing the file name.

Thanks in advance for the help with this. Big ups to the Phorum developers. It is definitely the best, most logically designed message board solution available.

Re: Changing Text on the Log In Screen
May 03, 2008 08:48PM
This string is defined in the language file (include/lang/english.php). You can change that file directly (search for the language key "PleaseLoginRead") or you could create a module to override that language string, so you won't have to redo the language file hack on upgrades. A module could be quite simple. Create a file mods/override_lang_strings.php and put the following in there:
<?php

/* phorum module info
hook:  common|override_lang_strings
title: Override language strings
desc:  This module overrides stock language strings.
*/

function override_lang_strings()
{
    global $PHORUM;
    $PHORUM['DATA']['LANG']['PleaseLoginRead'] = "Here goes your new text. Go wild!";
}

?>
After writing this file, go to the admin Modules page and enable the module "Override language strings".

That should do the trick. I didn't test the code, but with this number of lines there cannot be many bugs ;-)


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Changing Text on the Log In Screen
May 03, 2008 09:10PM
Thanks! VERY much appreciated!
Re: Changing Text on the Log In Screen
May 06, 2008 03:59AM
Maurice,

I just put that module in place and it works great. I'm stoked. Thanks again for the help!

Shawn
Sorry, only registered users may post in this forum.

Click here to login