Wiki login is now your forum password

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Wiki login is now your forum password

Post by sinbad » Thu Jun 23, 2005 12:56 pm

The Wiki authentication procedure has changed and you now must use your forum username / password to log in to the wiki. By having a forum user you should automatically be able to log in on the wiki. I'm going to disable the password change feature on the wiki since it no longer has any purpose.

Let me know if there are any issues.
Last edited by sinbad on Thu Sep 22, 2005 10:25 pm, edited 1 time in total.
0 x

User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn » Thu Jun 23, 2005 1:28 pm

Cool
I can log in fine, so looks sweet.
0 x

User avatar
Feral
Halfling
Posts: 80
Joined: Thu May 26, 2005 9:12 pm
Location: NORTHERN California, USA

Post by Feral » Thu Jun 23, 2005 9:19 pm

Just to confirm, this forum account does indeed allow me to log into the wiki without incident.

A clever change (=
0 x

User avatar
Antiarc
Greenskin
Posts: 120
Joined: Thu Jan 23, 2003 8:40 am
Contact:

Post by Antiarc » Thu Jun 23, 2005 9:36 pm

Nice change. Should make things easier. :)
0 x

User avatar
Phantom
Greenskin
Posts: 106
Joined: Mon Aug 02, 2004 10:28 pm
Location: Helsinki, Finland

Post by Phantom » Sun Jun 26, 2005 10:25 pm

Yay!
0 x

User avatar
Aklix
Goblin
Posts: 222
Joined: Mon Dec 27, 2004 5:21 am
Contact:

Post by Aklix » Sun Jun 26, 2005 11:23 pm

Site idea stealer! lol Just kidding, mine wiki is even MORE integrated mwahahaha!
0 x

User avatar
BenO
Goblin
Posts: 241
Joined: Mon Apr 18, 2005 5:03 pm

Post by BenO » Mon Jun 27, 2005 7:23 am

\o/
0 x
Benjamin RIGAUD
Software Engineer

User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer » Tue Jun 28, 2005 10:24 pm

Will the wiki password I previously had have been changed to the one on the forum? (I'm still logged into the wiki so I didn't notice any change.)
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Tue Jun 28, 2005 11:52 pm

Yes, if you ever log in again, it will be your forum password. Your wiki password is defunct.
0 x

User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Can't Login

Post by Game_Ender » Thu Jun 30, 2005 9:57 pm

I can't seem to log in with my forum name "Game_Ender". Everytime I try it says there is no user by the name "Game Ender" (note no underscore). There is a user by the name "GameEnder", but my password doens't work and when I requested a password be emailed to me I didn't get it at my email address.

It seems the wiki doesn't like "_" but the forum software doesn't care.

Any help here?
0 x

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands

Post by :wumpus: » Fri Jul 01, 2005 3:11 pm

I had the same problem with the :'s in my name, I actually need to log in with "::wumpus:" and it works. But I did lose my delete/block(bureaucrat) rights.
0 x

Tsh't
Kobold
Posts: 26
Joined: Tue Apr 12, 2005 9:39 pm
Location: Paris - France
Contact:

Post by Tsh't » Tue Jul 05, 2005 10:32 pm

It won't let me log in with the ' in Tsh't :(
I think it's because ' is special character in MySQL...
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Wed Jul 06, 2005 9:11 am

The wiki has extra restrictions on the characters you can use in a username. For the moment just create another account without the silly characters ;)
0 x

User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer » Sun Jul 17, 2005 4:46 am

sinbad, could you PM or email me the method you used to get this hack to work? I would like to add it to my forums at www.newmars.com, I'd really appreciate it! :)

my email is joshcryer (at) gmail

PS I know you're a busy guy so feel free to wait until you have actual leisure time, no rush.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Sun Jul 17, 2005 5:10 pm

Here it is for anyone who might want it. It's pretty noddy stuff, and I'm no fan of PHP, but maybe it will help. :)

extensions/phpBBAuthPlugin/phpBBAuthPlugin.php:

Code: Select all

<?php
// Mediawiki authentication plugin for phpBB2 with mysql4
// By Steve Streeting 23 June 2005

require_once('AuthPlugin.php');

// Set the location of your phpBB folder relative to the wiki root
$PHPBB_LOCATION = "../phpBB2";

require_once($PHPBB_LOCATION . "/config.php");


class AuthPhpBB extends AuthPlugin 
{

	function AuthPhpBB() {

	}

	function connectdb() {
		global $dbhost, $dbuser, $dbpasswd, $dbname;

		$dbconnection = mysql_connect($dbhost, $dbuser, $dbpasswd)
   			or die('AuthPhpBB : Could not connect: ' . mysql_error());

		mysql_select_db($dbname, $dbconnection) or die('AuthPhpBB : Could not select database');

		return $dbconnection;
	}

	/**
	 * Check whether there exists a user account with the given name.
	 * The name will be normalized to MediaWiki's requirements, so
	 * you might need to munge it (for instance, for lowercase initial
	 * letters).
	 *
	 * @param string $username
	 * @return bool
	 * @access public
	 */
	function userExists( $username ) {
		global $table_prefix;
		
		$dbconnection = $this->connectdb();
		
		// MySQL queries are case insensitive anyway
		$query = "select username from ".$table_prefix."users where username ='". $username ."'";
		$result = mysql_query($query, $dbconnection) 
			or die('Query failed: ' . mysql_error());

		$numrows = mysql_num_rows($result);

		// Free resultset
		mysql_free_result($result);

		return $numrows > 0;
		
	}


	/**
	 * Check if a username+password pair is a valid login.
	 * The name will be normalized to MediaWiki's requirements, so
	 * you might need to munge it (for instance, for lowercase initial
	 * letters).
	 *
	 * @param string $username
	 * @param string $password
	 * @return bool
	 * @access public
	 */
	function authenticate( $username, $password ) {
		global $table_prefix;
	
		$dbconnection = $this->connectdb();

		$query = "select user_password from ".$table_prefix."users where username ='". $username ."'";
		$result = mysql_query($query, $dbconnection) 
			or die('Query failed: ' . mysql_error());

		if (mysql_num_rows($result) == 0)
		{
			return false;
		}
		else
		{
			$row = mysql_fetch_row($result);
			if ($row[0] == md5($password))
			{
				return true;
			}
			else
			{
				return false;
			}
				
		}
	}
	
	/**
	 * Return true if the wiki should create a new local account automatically
	 * when asked to login a user who doesn't exist locally but does in the
	 * external auth database.
	 *
	 * This is just a question, and shouldn't perform any actions.
	 *
	 * @return bool
	 * @access public
	 */
	function autoCreate() {
		return true;
	}
	
	/**
	 * Return true to prevent logins that don't authenticate here from being
	 * checked against the local database's password fields.
	 *
	 * This is just a question, and shouldn't perform any actions.
	 *
	 * @return bool
	 * @access public
	 */
	function strict() {
		return true;
	}
	
	/**
	 * When creating a user account, optionally fill in preferences and such.
	 * For instance, you might pull the email address or real name from the
	 * external user database.
	 *
	 * The User object is passed by reference so it can be modified; don't
	 * forget the & on your function declaration.
	 *
	 * @param User $user
	 * @access public
	 */
	function initUser( &$user ) {
		global $table_prefix;


		$dbconnection = $this->connectdb();
	
		// Just add email
		$query = "select user_email from ".$table_prefix."users where username ='". $user->mName ."'";
		$result = mysql_query($query, $dbconnection) 
			or die('Query failed: ' . mysql_error());

		if (mysql_num_rows($result) > 0)
		{
			$row = mysql_fetch_row($result);
			$user->mEmail = $row[0];
		}

	}
	

	
}

?>
Add to your LocalSettings.php:

Code: Select all

# Use phpBB Authentication
require_once( 'extensions/phpbbAuthPlugin/phpBBAuthPlugin.php' );
$wgAuth = new AuthPhpBB();
0 x

User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer » Sun Jul 17, 2005 6:25 pm

THANK YOU sinbad, really nice of ya to share!
0 x

User avatar
fog
Greenskin
Posts: 149
Joined: Sun Sep 19, 2004 6:00 pm
Location: Torino, ITALY
Contact:

unable to login

Post by fog » Mon Jul 18, 2005 4:56 pm

When I try to login (or I ask for my password) using "fog" the wiki tells me there is no "Fog" (note the capital F) user. What should I do?
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Mon Jul 18, 2005 5:58 pm

Strange, MySQL is case insensitive so it shouldn't matter. For example I'm 'Sinbad' on the wiki but 'sinbad' on the forum.
0 x

User avatar
fog
Greenskin
Posts: 149
Joined: Sun Sep 19, 2004 6:00 pm
Location: Torino, ITALY
Contact:

Post by fog » Mon Jul 18, 2005 11:12 pm

sinbad wrote:Strange, MySQL is case insensitive so it shouldn't matter. For example I'm 'Sinbad' on the wiki but 'sinbad' on the forum.
MySQL probably is but I still can't login.. :?
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Tue Jul 19, 2005 1:38 pm

I'm open to suggestions then. The code is shown above, it's not complex. I have a shedload of things on my plate right now so I'm afraid it'll be a while before I get time to look at it.
0 x

User avatar
c_dd2
Halfling
Posts: 79
Joined: Sun Jul 10, 2005 11:40 am
Location: Belgium
Contact:

Post by c_dd2 » Tue Jul 19, 2005 6:22 pm

I have exactly the say problem as fog have/had :? :( :oops:

I have already had problems elsewhere with the underscore ("_") in my nickname... But when registering here phpBB never complained and logs in perfectly. Only the wiki causes me the log in process problem :(
There is no user by the name "C dd2". Check your spelling, or use the form below to create a new user account.
(As with fog, notice the first letter being capital and also that my "_" has apparently disappeared... :shock:)

Is there anyway to fix this embarrassing problem? Anything I can do? :roll:

Thank you in advance.

c_dd2
0 x
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.

User avatar
c_dd2
Halfling
Posts: 79
Joined: Sun Jul 10, 2005 11:40 am
Location: Belgium
Contact:

Post by c_dd2 » Wed Jul 20, 2005 11:01 am

Ok, so far as there seems to be nothing that can be done for this problem, I created a second account "cdd2" which works fine for the wiki.

So it will be "c_dd2" (my real nickname) for the forum and "cdd2" (some kind of "proxy nickname" for now) for the wiki... Pretty useless and compicated and consumes lot of DB for nothing but that is the way it works...

It really is a pity that the forum/wiki integration has not been done correctly :(
0 x
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Wed Jul 20, 2005 1:51 pm

c_dd2 wrote:It really is a pity that the forum/wiki integration has not been done correctly :(
I already covered this. MediaWiki has stricter limits on user names than phpBB, which I haven't done anything about as yet. Feel free to chip in if you know better (the code is right there), I'm far too busy to mess about with this right now.
0 x

User avatar
c_dd2
Halfling
Posts: 79
Joined: Sun Jul 10, 2005 11:40 am
Location: Belgium
Contact:

Post by c_dd2 » Wed Jul 20, 2005 2:16 pm

Sorry sinbad, please do not get angry. It was just a constatation (I do not think this is an English world :lol:) from the user's point of view, not meaning to be an offense to you or anyone else in any way.

As I am quite good with PHP and like that language very much (my second preferred language with C++), I am going to look at the MediaWiki's code and your phpBB plug-in and, if I find whatever interesting, tell you what cool thing could be done to get rid of that f*cking (and silly, anyway) limitation.

I hope this will help you and the future users who get stuck with their nicknames.

Thank you for all your work sinbad, and please accept my apologizes if I hurt you :oops:

Greetings.

Nota bene: The problem with characters is not a MySQL limitation but, as sinbad says, a MediaWiki's limitation. The proof is that phpBB accept them without even opening the mouth ;)
0 x
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.

User avatar
c_dd2
Halfling
Posts: 79
Joined: Sun Jul 10, 2005 11:40 am
Location: Belgium
Contact:

Post by c_dd2 » Wed Jul 20, 2005 8:45 pm

Humm, seems like I cannot get it working, sorry :s

I am not a MediaWiki guru... I do not find exactly and I have lots of difficulties with the i18n (internalization: UTF-8 and the like). Also, I am fight with OGRE, so I have no more time trying this. Sorry :oops:

I hope you will finally get it work, you surely knows it more than me :roll:
0 x
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.

Post Reply