snorlie1689 Posted January 12, 2010 Share Posted January 12, 2010 I'm trying to integrate my wiki+vb together, and having issues with changing the strings to match my database info. How would I change the following codes below, if my Server is: Localhost, DBuser: etc123, DBuserpass: 123, DBname: db123 $wgAuth = new AuthPlugin_vBulletin($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, "vb_"); I assume it's like this? $wgAuth = new AuthPlugin_vBulletin($localhost, $vb_etc123, $123, $wgDBname, "vb_db123");? Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/ Share on other sites More sharing options...
mikesta707 Posted January 12, 2010 Share Posted January 12, 2010 you probably want the literal strings, rather than variables $wgAuth = new AuthPlugin_vBulletin('localhost', 'vb_etc123', '123', $wgDBname, "vb_db123"); but I don't know what variables you have in your script, nor what values said variables may contain Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993784 Share on other sites More sharing options...
snorlie1689 Posted January 12, 2010 Author Share Posted January 12, 2010 I'm trying to do this: http://www.mediawiki.org/wiki/Extension:VBulletin/Users_Integration Wiki and VB on the same host/machine, but not the same database. I was wondering how would you change the strings to reflect the vb database, if the Server is: localhost, DBuser: db_etc123, DBuserpass: 123, DBname: db_db123 Which I assume this is how you do it: $wgAuth = new AuthPlugin_vBulletin("localhost", "db_etc123", "123", "db_db123", "vb_"); Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993790 Share on other sites More sharing options...
mikesta707 Posted January 12, 2010 Share Posted January 12, 2010 yeah your second example looks about right. Why don't you try it? Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993792 Share on other sites More sharing options...
snorlie1689 Posted January 12, 2010 Author Share Posted January 12, 2010 I've tried it. Nothing works. Been trying to figure out for days, but it doesn't seem to work at all. =/ Here's the site I'm testing this on: http://understructure.net/awiki3/ The log-in will stop working once you log out, always with incorrect password. There is no signs of integration with vb either. Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993802 Share on other sites More sharing options...
mikesta707 Posted January 12, 2010 Share Posted January 12, 2010 based on the documentation, and your info, $wgAuth = new AuthPlugin_vBulletin("localhost", "db_etc123", "123", "db_db123", "vb_"); SHOULD work. But the last parameter is what is confusing things I think. That is the prefix. Are you sure vb_ is the prefix? The prefix is basically the string before any of your tables that are connected to the wiki. You should have been able to set that up when you installed mediawiki. If you have phpmyadmin (or another tool like that) look at your wiki tables, and see if they have a common prefix. Whatever that is should be what you pass as the last parameter Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993811 Share on other sites More sharing options...
snorlie1689 Posted January 12, 2010 Author Share Posted January 12, 2010 The integration worked when I left the "prefix" blank (""). I do have myphpadmin. Is there any way to figure out the table prefix for the database? I originally imported the vb database through Putty, so there isn't any table prefix I can find. $wgAuth = new AuthPlugin_vBulletin("localhost", "understr_awiki", "vandeath", "understr_awikitest", ""); Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993832 Share on other sites More sharing options...
mikesta707 Posted January 12, 2010 Share Posted January 12, 2010 If there is no prefix, then leaving the prefix parameter blank is correct Quote Link to comment https://forums.phpfreaks.com/topic/188240-php-stringsvariable-help/#findComment-993838 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.