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

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
User avatar
steve8675537
Registered User
Posts: 215
Joined: Mon Mar 19, 2007 6:02 pm
Location: phpbb3 newbie

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

Post 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.
sq8
Registered User
Posts: 96
Joined: Thu Sep 06, 2007 7:24 pm

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

Post 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?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

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

Post 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>';
User avatar
steve8675537
Registered User
Posts: 215
Joined: Mon Mar 19, 2007 6:02 pm
Location: phpbb3 newbie

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

Post by steve8675537 »

thanks alot done. i hate to ask for things like this but i really couldn't see it!
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

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

Post 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
User avatar
steve8675537
Registered User
Posts: 215
Joined: Mon Mar 19, 2007 6:02 pm
Location: phpbb3 newbie

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

Post by steve8675537 »

thanks ricky that helps :)
Locked

Return to “2.0.x Support Forum”