Page 1 of 1

Sorry, but only ....... can access this forum.

Posted: Tue Sep 25, 2007 7:13 pm
by steve8675537
ok so i've changed the group settings so only some people can view a certain forum, if you not one of those people you get this message.

Sorry, but only ...... can access this forum.

I want to find the ...... part so i can edit it. I've looked about 5 times in lang_main.php and lang_admin.php (hope thats right?) but i just cant see what line its on. I actually changed it before you see but i cant for the life of me find it again.

Re: Sorry, but only ....... can access this forum.

Posted: Tue Sep 25, 2007 7:21 pm
by sq8
steve8675537 wrote:ok so i've changed the group settings so only some people can view a certain forum, if you not one of those people you get this message.
Have you checked the template files?

Re: Sorry, but only ....... can access this forum.

Posted: Tue Sep 25, 2007 7:25 pm
by Brf
lang_main.php:

Code: Select all

//
// Auth related entries
//
// Note the %s will be replaced with one of the following 'user' arrays
$lang['Sorry_auth_announce'] = 'Sorry, but only %s can post announcements in this forum.';
$lang['Sorry_auth_sticky'] = 'Sorry, but only %s can post sticky messages in this forum.'; 
$lang['Sorry_auth_read'] = 'Sorry, but only %s can read topics in this forum.'; 
$lang['Sorry_auth_post'] = 'Sorry, but only %s can post topics in this forum.'; 
$lang['Sorry_auth_reply'] = 'Sorry, but only %s can reply to posts in this forum.';
$lang['Sorry_auth_edit'] = 'Sorry, but only %s can edit posts in this forum.'; 
$lang['Sorry_auth_delete'] = 'Sorry, but only %s can delete posts in this forum.';
$lang['Sorry_auth_vote'] = 'Sorry, but only %s can vote in polls in this forum.';

// These replace the %s in the above strings
$lang['Auth_Anonymous_Users'] = '<b>anonymous users</b>';
$lang['Auth_Registered_Users'] = '<b>registered users</b>';
$lang['Auth_Users_granted_access'] = '<b>users granted special access</b>';
$lang['Auth_Moderators'] = '<b>moderators</b>';
$lang['Auth_Administrators'] = '<b>administrators</b>';

Re: Sorry, but only ....... can access this forum.

Posted: Tue Sep 25, 2007 7:43 pm
by steve8675537
thanks alot done. i hate to ask for things like this but i really couldn't see it!

Re: Sorry, but only ....... can access this forum.

Posted: Tue Sep 25, 2007 8:35 pm
by Ricky_Racer
This probably isn't the explaination you are looking for, but hopefully it will help you to understand it better.
In my viewonline php file I have added,

Code: Select all

//-- add mod : ip's in viewonline v.1.0.2a [Ricky_Racer] -----------------------
// A special Thank You to Encoder for this section :D
if( !$userdata['session_logged_in'] || !isset($userdata))
{
	$redirect = append_sid('viewonline.'.$phpEx);
	$template->assign_vars(array(
		'META' => "<meta http-equiv=\"refresh\" content=\"5;url=login.$phpEx?redirect=$redirect\">")
	);
	$message = sprintf($lang['Sorry_auth_viewonline'], $lang['Auth_Registered_Users'] ). '<br /><br />' . sprintf($lang['Click_to_register'], '<a href="' . append_sid('profile.'.$phpEx.'?mode=register') . '">', '</a>');
	message_die(GENERAL_MESSAGE, $message);
}
//-- end mod : ip's in viewonline v.1.0.2a [Ricky_Racer] -----------------------
Notice the partial line $message = sprintf($lang['Sorry_auth_viewonline'], $lang['Auth_Registered_Users'].
It correspondes with what I have added to my language/lang_english/lang_main.php file,

Code: Select all

//-- add mod : ip's in viewonline v.1.0.2a [Ricky_Racer] -----------------------
$lang['Sorry_auth_viewonline'] = 'Sorry, but only %s can view Who is online.';
//-- end mod : ip's in viewonline v.1.0.2a [Ricky_Racer] -----------------------
and what was all ready there

Code: Select all

$lang['Auth_Registered_Users'] = '<b>registered users</b>';
So when a not logged in visitor attempts to view viewonline.php they see
Information wrote:Sorry, but only registered users can view Who is online.

Click Here to Register. Registration is FREE !!!
Image

Re: Sorry, but only ....... can access this forum.

Posted: Tue Sep 25, 2007 10:03 pm
by steve8675537
thanks ricky that helps :)