To All:
Is there a way to display the login page when a user accesses your wiki. For example, when somebody goes to http://yourwiki.com they are forwarded to the main page (http://yourwiki.com/index.php/Main_Page). Is there a way to display the page http://yourwiki.com/index.php?title=Special:Userlogin instead of the main page? I want my users to login first before seeing anything.
Thanks.
----------------------------------- Jason Spirko Systems Administrator Xoran Technologies
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
Is there a way to display the login page when a user accesses your wiki. For example, when somebody goes to http://yourwiki.com they are forwarded to the main page (http://yourwiki.com/index.php/Main_Page). Is there a way to display the page http://yourwiki.com/index.php?title=Special:Userlogin instead of the main page? I want my users to login first before seeing anything.
I would expect that's a matter of configuring Apache. However, do you want already logged in users to be taken to the login page as well, or should they go to the main page?
I would like already logged-in users to go to the main page.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Thomas Dalton Sent: Friday, July 27, 2007 10:26 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
Is there a way to display the login page when a user accesses your wiki. For example, when somebody goes to http://yourwiki.com they are forwarded to the main page (http://yourwiki.com/index.php/Main_Page). Is there a way to display the page http://yourwiki.com/index.php?title=Special:Userlogin instead of the main page? I want my users to login first before seeing anything.
I would expect that's a matter of configuring Apache. However, do you want already logged in users to be taken to the login page as well, or should they go to the main page?
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
On 7/27/07, Jason Spirko jspirko@xorantech.com wrote:
Is there a way to display the login page when a user accesses your wiki. For example, when somebody goes to http://yourwiki.com they are forwarded to the main page (http://yourwiki.com/index.php/Main_Page). Is there a way to display the page http://yourwiki.com/index.php?title=Special:Userlogin instead of the main page? I want my users to login first before seeing anything.
The page title in MediaWiki:Mainpage will be set as the main page, so you can put Special:Userlogin there. This won't actually force people to log in, though: It'll just prompt them to if they visit yourwiki.com. If you want to force people to log in before they can see anything, take a look at http://www.mediawiki.org/wiki/Manual:Preventing_access
The page title in MediaWiki:Mainpage will be set as the main page, so you can put Special:Userlogin there. This won't actually force people to log in, though: It'll just prompt them to if they visit
yourwiki.com.
If you want to force people to log in before they can see anything, take a look at http://www.mediawiki.org/wiki/Manual:Preventing_access
The only problem with this method (changing Mediawiki:Mainpage) is once a user logs in they are taken back to the Special:UserLogin page, not the Main Page. Is there anyway to accomplish this and redirect back to the Main Page?
Thanks.
----------------------------------- Jason Spirko Systems Administrator Xoran Technologies
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
On 28/07/07, Jason Spirko jspirko@xorantech.com wrote:
The only problem with this method (changing Mediawiki:Mainpage) is once a user logs in they are taken back to the Special:UserLogin page, not the Main Page. Is there anyway to accomplish this and redirect back to the Main Page?
The approach I'd use for this is to write a quickie special page extension which checks to see if the user is logged in, and if so, issues a redirect to the "actual" main page, otherwise, redirects to Special:Userlogin, with a "returnto" value that is the title of this main page.
A more adventurous approach might be to hack Title::newMainPage() to do the check.
Rob Church
On 28/07/07, Rob Church robchur@gmail.com wrote:
The approach I'd use for this is to write a quickie special page extension which checks to see if the user is logged in, and if so, issues a redirect to the "actual" main page, otherwise, redirects to Special:Userlogin, with a "returnto" value that is the title of this main page.
Rob:
I appreciated your direction, but unfortunately I am not well versed in PHP and just beginning MediaWiki. I just don't know where to begin. Could you please just describe how I check if somebody is logged-in and how to use the returnto value you described?
Thanks for all you help.
----------------------------------- Jason Spirko Systems Administrator Xoran Technologies
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
Jason Spirko wrote:
On 28/07/07, Rob Church robchur@gmail.com wrote:
The approach I'd use for this is to write a quickie special page extension which checks to see if the user is logged in, and if so, issues a redirect to the "actual" main page, otherwise, redirects to Special:Userlogin, with a "returnto" value that is the title of this main page.
Rob:
I appreciated your direction, but unfortunately I am not well versed in PHP and just beginning MediaWiki. I just don't know where to begin. Could you please just describe how I check if somebody is logged-in and how to use the returnto value you described?
Thanks for all you help.
Instead of writing to the special page:
global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin");
exit(0);
#TODO: Send the redirect using the Mediawiki function.
Platonides wrote:
Instead of writing to the special page:
global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin");
exit(0);
#TODO: Send the redirect using the Mediawiki function.
Thanks Platonides, where would I place this code? I tried in the LocalSettings.php and it does not seem to work.
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
Sorry Platonides, I forgot the error message:
Fatal error: Call to a member function isLoggedIn() on a non-object in C:\xampp\htdocs\xoran\wiki\includes\xoran_custom.php on line 195
// // Begin: Check if user is logged-in, if not force login page // global $wgUser; Line 195 -> if ( $wgUser->isLoggedIn() ) { header("Location: /index.php/Main_Page"); //Issues a 302 Redirect } else { header("Location: /index.php?title=Special:Userlogin&returnto=Main_Page"); }
exit(0);
#TODO: Send the redirect using the Mediawiki function.
Thanks.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jason Spirko Sent: Sunday, July 29, 2007 8:09 PM To: 'MediaWiki announcements and site admin list' Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
Platonides wrote:
Instead of writing to the special page:
global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin");
exit(0);
#TODO: Send the redirect using the Mediawiki function.
Thanks Platonides, where would I place this code? I tried in the LocalSettings.php and it does not seem to work.
............................................................................ ........ This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
............................................................................ ........ This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
Jason Spirko wrote:
Thanks Platonides, where would I place this code? I tried in the LocalSettings.php and it does not seem to work.
Write an special page.
<?php class MainPageLoginRedirect extends SpecialPage { function MyExtension() { SpecialPage::SpecialPage("MainPageLoginRedirect"); }
function execute( $par ) { global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin");
exit(0); #TODO: Send the redirect using the Mediawiki function. } } ?>
I'd probably take it in this direction:
<?php class MainPageLoginRedirect extends SpecialPage { function MyExtension() { SpecialPage::SpecialPage("MainPageLoginRedirect"); }
function execute( $par ) { global $wgUser, $wgOut; $wgOut->disable(); if ( $wgUser->isLoggedIn() ) { $title = Title::newFromText(wfMsgForContent('realmainpage')); if (!$title) $title = Title::newFromText('Main Page'); } else { $title = Title::newFromText('Special:UserLogin'); } header("Location: /wiki/Special:UserLogin");
exit(0); #TODO: Send the redirect using the Mediawiki function. } } ?>
And set [[MediaWiki:Realmainpage]] to the real main page.
-- Jim R. Wilson (jimbojw)
On 7/30/07, Platonides Platonides@gmail.com wrote:
Jason Spirko wrote:
Thanks Platonides, where would I place this code? I tried in the LocalSettings.php and it does not seem to work.
Write an special page.
<?php class MainPageLoginRedirect extends SpecialPage { function MyExtension() { SpecialPage::SpecialPage("MainPageLoginRedirect"); } function execute( $par ) { global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin"); exit(0); #TODO: Send the redirect using the Mediawiki function. } } ?>
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Whoops - copy-paste error:
header("Location: /wiki/Special:UserLogin");
Should be:
header("Location: ".$title->getURL());
On 7/30/07, Jim Wilson wilson.jim.r@gmail.com wrote:
I'd probably take it in this direction:
<?php class MainPageLoginRedirect extends SpecialPage { function MyExtension() { SpecialPage::SpecialPage("MainPageLoginRedirect"); } function execute( $par ) { global $wgUser, $wgOut; $wgOut->disable(); if ( $wgUser->isLoggedIn() ) { $title = Title::newFromText(wfMsgForContent('realmainpage')); if (!$title) $title = Title::newFromText('Main Page'); } else { $title = Title::newFromText('Special:UserLogin'); } header("Location: /wiki/Special:UserLogin"); exit(0); #TODO: Send the redirect using the Mediawiki function. } } ?>
And set [[MediaWiki:Realmainpage]] to the real main page.
-- Jim R. Wilson (jimbojw)
On 7/30/07, Platonides Platonides@gmail.com wrote:
Jason Spirko wrote:
Thanks Platonides, where would I place this code? I tried in the LocalSettings.php and it does not seem to work.
Write an special page.
<?php class MainPageLoginRedirect extends SpecialPage { function MyExtension() { SpecialPage::SpecialPage("MainPageLoginRedirect"); } function execute( $par ) { global $wgUser; if ( $wgUser->isLoggedIn() ) header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect else header("Location: /wiki/Special:UserLogin"); exit(0); #TODO: Send the redirect using the Mediawiki function. } } ?>
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 30/07/07, Jim Wilson wilson.jim.r@gmail.com wrote:
I'd probably take it in this direction:
Just for shits 'n giggles, here's a third take on it - http://wiki.anubite.co.uk/snippets/SpecialMain - files renamed to .txt to avoid web server incompetence.
Set $wgRealMainPage to the title of the main page, and edit MediaWiki:Mainpage, changing it to "Special:Main".
Note that in both the previous examples, the constructor has an invalid name, and use of exit() is a bad idea.
Rob Church
Note that in both the previous examples, the constructor has an invalid name,
Pasted from example extension ;-)
and use of exit() is a bad idea.
I wasn't sure how to avoid output. So i quitted the script. Yes, i know it being crap :-)
Rob:
I have taken the two files you provided, renamed them and placed them in the following directory:
./includes/SpecialMain.page.php ./includes/SpecialMain.php
I have changed Mediawiki:Mainpage to point to Special:Main. I have not changed my main page, so it is the default title "Main Page". When I try to access a page anonymously, I am presented with a message stating:
Login Required: You must log in to view other pages.
Can they be sent directly to the login page if they are not logged in?
Sorry for so many questions, I am very new to all this.
Thanks.
----------------------------- Jason Spirko Systems Administrator Xoran Technologies Inc.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Monday, July 30, 2007 5:44 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
On 30/07/07, Jim Wilson wilson.jim.r@gmail.com wrote:
I'd probably take it in this direction:
Just for shits 'n giggles, here's a third take on it - http://wiki.anubite.co.uk/snippets/SpecialMain - files renamed to .txt to avoid web server incompetence.
Set $wgRealMainPage to the title of the main page, and edit MediaWiki:Mainpage, changing it to "Special:Main".
Note that in both the previous examples, the constructor has an invalid name, and use of exit() is a bad idea.
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
On 31/07/07, Jason Spirko jspirko@xorantech.com wrote:
Can they be sent directly to the login page if they are not logged in?
If that's what you want, then your original question was very misleading, although this makes more sense.
IIRC, the OutputPage::loginToUse() method is what needs to be modified here; set it to redirect straight to the login page (or just instantiate the Userlogin special page and call its execute() method).
Rob Church
Rob:
I'm sorry, my intentions were not to mislead anybody. I was looking for a way to make users login first, then be directed to the wiki.
I apologize for any confusion. I am new to MediaWiki and PHP. I'm struggling to get this up and running for my company and implement the features they would like to see.
I appreciate the help you all have given me so far.
----------------------------- Jason Spirko Systems Administrator Xoran Technologies Inc.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Tuesday, July 31, 2007 5:25 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
On 31/07/07, Jason Spirko jspirko@xorantech.com wrote:
Can they be sent directly to the login page if they are not logged in?
If that's what you want, then your original question was very misleading, although this makes more sense.
IIRC, the OutputPage::loginToUse() method is what needs to be modified here; set it to redirect straight to the login page (or just instantiate the Userlogin special page and call its execute() method).
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
On 01/08/07, Jason Spirko jspirko@xorantech.com wrote:
I'm sorry, my intentions were not to mislead anybody. I was looking for a way to make users login first, then be directed to the wiki.
I apologize for any confusion. I am new to MediaWiki and PHP. I'm struggling to get this up and running for my company and implement the features they would like to see.
I appreciate the help you all have given me so far.
Perhaps it would be useful if you could briefly restate the problem, assuming none of the solutions provided to date have been helpful, so we can understand what we're being asked?
Some indication of expected behaviour would be great.
Rob Church
Rob:
We are using MediaWiki for our company wiki, when a employee goes to our wiki they are taken to the main page and then they are able to navigate through the site. I want the employees to login *before* they are directed to the main page (or any page for that matter).
I use namespace protection throughout the site and to make it simpler for the employees it would be easier if they logged in first (every employee has an account w/permission to edit various namespaces). Some employees are confused by the login "errors" they receive when they want to edit a page. After I explain that its not an error and that they need to login to edit pages they understand. But I'm just trying to curb these panic attacks by making them login before they are even allowed to access the site.
I hope this makes sense...
----------------------------- Jason Spirko Systems Administrator Xoran Technologies Inc.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Tuesday, July 31, 2007 9:49 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
On 01/08/07, Jason Spirko jspirko@xorantech.com wrote:
I'm sorry, my intentions were not to mislead anybody. I was looking for a way to make users login first, then be directed to the wiki.
I apologize for any confusion. I am new to MediaWiki and PHP. I'm struggling to get this up and running for my company and implement the features they would like to see.
I appreciate the help you all have given me so far.
Perhaps it would be useful if you could briefly restate the problem, assuming none of the solutions provided to date have been helpful, so we can understand what we're being asked?
Some indication of expected behaviour would be great.
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
We have a similar setup to what you require, except that we allow the Main Page to be seen by everyone.
Below is the section of configuration from our LocalSettings.php to achieve this:
Hope this helps,
Graeme
# # The following line should be commented, otherwise these settings will # throw away the settings on DefaultSettings.php (you probably don't want this). # With this line commented you will only overwrite the settings you explicitly # define here (that's what you probably want). #$wgGroupPermissions = array(); $wgGroupPermissions['*' ]['createaccount'] = false; $wgGroupPermissions['*' ]['read'] = false; $wgGroupPermissions['*' ]['edit'] = false;
#Prevent new user registrations $wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1);
# Pages anonymous (not-logged-in) users may see $wgWhitelistRead = array ("Main Page", "Special:Userlogin");
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jason Spirko Sent: 01 August 2007 03:11 To: 'MediaWiki announcements and site admin list' Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
Rob:
We are using MediaWiki for our company wiki, when a employee goes to our wiki they are taken to the main page and then they are able to navigate through the site. I want the employees to login *before* they are directed to the main page (or any page for that matter).
I use namespace protection throughout the site and to make it simpler for the employees it would be easier if they logged in first (every employee has an account w/permission to edit various namespaces). Some employees are confused by the login "errors" they receive when they want to edit a page. After I explain that its not an error and that they need to login to edit pages they understand. But I'm just trying to curb these panic attacks by making them login before they are even allowed to access the site.
I hope this makes sense...
Jason Spirko Systems Administrator Xoran Technologies Inc.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Tuesday, July 31, 2007 9:49 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
On 01/08/07, Jason Spirko jspirko@xorantech.com wrote:
I'm sorry, my intentions were not to mislead anybody. I was looking for a way to make users login first, then be directed to the wiki.
I apologize for any confusion. I am new to MediaWiki and PHP. I'm struggling to get this up and running for my company and
implement the
features they would like to see.
I appreciate the help you all have given me so far.
Perhaps it would be useful if you could briefly restate the problem, assuming none of the solutions provided to date have been helpful, so we can understand what we're being asked?
Some indication of expected behaviour would be great.
Rob Church
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.............................................................. ...................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
CAUTION: This message was sent via the Public Internet and its authenticity cannot be guaranteed.
************************************************ The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email. ************************************************
Graeme:
I have similar settings in my LocalSettings.php:
# allow all users to view forbidden error page $wgGroupPermissions['*']['viewforbidden'] = true;
# Disable reading by anonymous users $wgGroupPermissions['*']['read'] = false;
# But allow them to read the login page $wgWhitelistRead = array( "Special:Userlogin" );
This is close to what I am looking for. Anonymous users navigating to the site immediately receive a message stating they must login and cannot proceed further until they login. But I would like them to be sent to the login form instead of receiving the message.
Is this just not possible?
----------------------------- Jason Spirko Systems Administrator Xoran Technologies Inc.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Thompson, Graeme (AELE) Sent: Wednesday, August 01, 2007 3:02 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
We have a similar setup to what you require, except that we allow the Main Page to be seen by everyone.
Below is the section of configuration from our LocalSettings.php to achieve this:
Hope this helps,
Graeme
# # The following line should be commented, otherwise these settings will # throw away the settings on DefaultSettings.php (you probably don't want this). # With this line commented you will only overwrite the settings you explicitly # define here (that's what you probably want). #$wgGroupPermissions = array(); $wgGroupPermissions['*' ]['createaccount'] = false; $wgGroupPermissions['*' ]['read'] = false; $wgGroupPermissions['*' ]['edit'] = false;
#Prevent new user registrations $wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1);
# Pages anonymous (not-logged-in) users may see $wgWhitelistRead = array ("Main Page", "Special:Userlogin");
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jason Spirko Sent: 01 August 2007 03:11 To: 'MediaWiki announcements and site admin list' Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
Rob:
We are using MediaWiki for our company wiki, when a employee goes to our wiki they are taken to the main page and then they are able to navigate through the site. I want the employees to login *before* they are directed to the main page (or any page for that matter).
I use namespace protection throughout the site and to make it simpler for the employees it would be easier if they logged in first (every employee has an account w/permission to edit various namespaces). Some employees are confused by the login "errors" they receive when they want to edit a page. After I explain that its not an error and that they need to login to edit pages they understand. But I'm just trying to curb these panic attacks by making them login before they are even allowed to access the site.
I hope this makes sense...
Jason Spirko Systems Administrator Xoran Technologies Inc.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Tuesday, July 31, 2007 9:49 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
On 01/08/07, Jason Spirko jspirko@xorantech.com wrote:
I'm sorry, my intentions were not to mislead anybody. I was looking for a way to make users login first, then be directed to the wiki.
I apologize for any confusion. I am new to MediaWiki and PHP. I'm struggling to get this up and running for my company and
implement the
features they would like to see.
I appreciate the help you all have given me so far.
Perhaps it would be useful if you could briefly restate the problem, assuming none of the solutions provided to date have been helpful, so we can understand what we're being asked?
Some indication of expected behaviour would be great.
Rob Church
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.............................................................. ...................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
CAUTION: This message was sent via the Public Internet and its authenticity cannot be guaranteed.
************************************************ The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email. ************************************************
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
.................................................................................... This message (including any attachments) contains confidential and proprietary information intended only for the addressee. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete this message and attachments from your system. If you have any questions about this e-mail please notify the sender immediately. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.
Jason Spirko wrote:
Rob:
I have taken the two files you provided, renamed them and placed them in the following directory:
./includes/SpecialMain.page.php ./includes/SpecialMain.php
I have changed Mediawiki:Mainpage to point to Special:Main. I have not changed my main page, so it is the default title "Main Page". When I try to access a page anonymously, I am presented with a message stating:
Login Required: You must log in to view other pages.
Can they be sent directly to the login page if they are not logged in?
Sorry for so many questions, I am very new to all this.
Thanks.
Have you added Special:Main to $wgWhitelistRead ? As far as your users only start by Special:Main, it could work for you.
mediawiki-l@lists.wikimedia.org