PDA

View Full Version : Integration with vBulletin - MediaWiki/vBulletin Single Sign-On


Pages : [1] 2

NoeJeko
05-06-2009, 10:00 PM
Overview:
This hack provides single sign-on capability for MediaWiki using your vBulletin users. You must ensure your cookie path in Admin CP is set to '/' for this to work. Also, I have not tested this if your wiki and your forums are on different subdomains - but as long as your have your cookie domain set properly it *should* work. This is not a user bridge - it is a complete single sign-on using your vBulletin user repository.

The install process has been extremely simplified in version 2.x of this product. You only have to edit LocalSettings.php, import a product, and change a setting in your Admin Control Panel. It's been completely packaged as a vBulletin product - unlike the previous hacked up version, heh. I didn't originally plan to release this so I designed it so it worked - not so it could be redistributed. I searched high and low for a functional MediaWiki bridge - almost bought NuHIT's product, and then realized it had been abandoned for over a year.

This hack no longer requires an edit to class_core.php.

I'll do my best to support it, but I can make no promises.

This thread is for discussion of this mod on vB 3.8.x. For vB 3.7.x, please use the MediaWiki/vBulletin Single Sign-On 3.7 thread (https://vborg.vbsupport.ru/showthread.php?t=191186)

Demo of plugin in action: MyMMOGames - Multiplayer Gaming and Media Community (http://www.mymmogames.net/)

Also, if you use memcached - ensure you do not cache sessions. If you do, restart it at least once a week. If you don't, you'll end up with invalid session errors out of MediaWiki.

Requirements:
MediaWiki Version: 1.11.0-1.14.0
vBulletin Version: 3.6.9-3.8.2

Features:
- Provides single sign on capability between vBulletin and Mediawiki. vBulletin user repository is used
- Configurable sysop/bureaucrat groups
- Configurable disallowed user groups
- Configurable "Who's Online" display
- Counts users viewing wiki in vBulletin's "Who's Online"

Installation/Upgrade:
Please read the included "readme.txt" file in the "docs (do not upload)" folder.

Options:
Admin Control Panel->vBulletin Options->MMOG Wiki Options

Change Log:
1.0.0.0 - Sep 18, 2008
- Initial Release

1.0.3.0 - Sep 29, 2008
- Bugfix: Incorrect redirects for login/logout

2.0.0.0 - Sep 30, 2008
- Feature: Streamlined installation procedure
- Feature: Wiki path set in ACP
- Bugfix: Forum paths no longer hardcoded

2.1.0 - Oct 4, 2008
- Feature: ACP option to use MediaWiki Short URLs
- Feature: ACP option to set sysop groups
- Feature: ACP option to set bureaucrat groups
- Feature: ACP option to disallow login to certain groups
- Feature: ACP option to change WOL display text

2.2.0 - May 1, 2005
- Bugfix: Users are not logged out when logging out of the forum
- Bugfix: No longer requires modification to class_core.php
- Feature: Mediawiki 1.13.0+ supported (verified on 1.14.0 also)

If you like it, please click "mark as installed" The more people that use this, the more time I will make to try and support/update it.

Been pulling your hair out looking for this as long as I have? Nominate it for Mod of the Month =]

AuthPlugin was inspired by and modified from this existing MediaWiki Extension:

http://www.mediawiki.org/wiki/Extension:QISSingleSignOn

proxx
05-07-2009, 05:20 PM
ok reposting here:

I just installed the latest version of mediawiki (1.14) on my vb 3.8.1

Followed all installation steps.

I get the following error on:
http://www.domain.com/wiki/?do=/wiki


Fatal error: Call to undefined method Language::factory() in /path/to/htdocs/wiki/includes/StubObject.php on line 122

Could someone help fix this pls.

proxx
05-07-2009, 05:22 PM
the problem doesn't seem to be caused by the .htaccess rewrite rules. I just moved .htaccess and the above fatal error still appears.

NoeJeko
05-07-2009, 05:29 PM
Hi Proxx,

I'm not familiar with the environment you're using - you may get better support for someone else if you post the information you sent me in PM - minus the urls and .htaccess rules.

XFSImperial
05-08-2009, 10:52 PM
I was just looking for something like this yesterday. I too visited NuHIT's website and saw it almost abandoned by the admins/developers.

One feature that NuHIT Pro version did offer was to use vB's usergroup permissions when viewing/managing the wiki. Is this something you might look to add in the future?

shaqoneal
05-09-2009, 01:05 AM
this sounds really interesting. You said this is not a bridge? In otherwords your saying that Wiki and vBulletin are using different mySQL databases?!?

PS: very nice site NoeJeko :)

SemperFideles
05-09-2009, 06:28 PM
Installed but when I try to browse to wiki I receive the following error:

Warning: require_once(./includes/functions_dfha.php) [function.require-once]: failed to open stream: No such file or directory in [path]/global.php(400) : eval()'d code on line 369

Fatal error: require_once() [function.require]: Failed opening required './includes/functions_dfha.php' (include_path='/home/puritanb/public_html/wiki:/home/puritanb/public_html/wiki/includes:/home/puritanb/public_html/wiki/languages:.:/usr/lib/php:/usr/local/lib/php') in /home/puritanb/public_html/global.php(400) : eval()'d code on line 369

Flowsion
05-09-2009, 10:17 PM
I get this in my URL when logging in, I'm sure it's a mistake on my part, though.

http://www.flowsion.net/wiki/%3C?=%20$vbulletin-%3Eoptions[%27bburl%27]%20%20?%3E/login.php%3C?=%20$redirlink%20?%3E

SemperFideles
05-10-2009, 09:16 AM
Installed but when I try to browse to wiki I receive the following error:

I don't know why, but when global.php is called on line 254 of AuthPlugin_vBSSO.php, it is looking for function_dfha.php

It keeps returning this error:

Warning: require_once(./includes/functions_dfha.php) [function.require-once]: failed to open stream: No such file or directory in [path]/global.php(400) : eval()'d code on line 369

The only way to get it to stop giving that error is to put a copy of functions_dfha.php into my wiki /includes directory. I'm then able to log into the wiki properly.

BUT

When I try to edit an article or change my preferences nothing seems to be working right.

Is there any way to install the old version on 3.8? I tried downloading the 3.7 version but it has the same instructions and files and I was hoping to try the old version because I don't think this one works yet.

BRotondi
05-10-2009, 07:13 PM
Does login through Wikis Login-Page work on someones german wiki/vbulletin?
I can enter Login/PW, but will be redirected to the forum without beeing logged in... (workaround programmed in php so not an urgent bug... but interesting...)

Bruno

SemperFideles
05-10-2009, 07:36 PM
Well, I know I'm sort of solving this problem as I go along but here is my "solution" to the problem in Post #9.

In AuthPlugin_vBSSO.php, I added a chdir commands before the call to global.php:

define('THIS_SCRIPT', 'wiki');
chdir ('/home/puritanb/public_html');
require_once( CWD . '/global.php');
chdir ('/home/puritanb/public_html/includes');
require_once( CWD . '/includes/functions.php');
chdir ('/home/puritanb/public_html/w/includes');

It eliminates the error that it cannot find the functions_dfha.php file but I still cannot edit any pages or save preferences. I get this error when I attempt to edit pages:

Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service.

I've tried clearing the cache and cookies and multiple browsers but the problem persists. I hope you're able to understand what the problem might be because I'm hoping to get this nice mod working. I'm even willing to contribute to this mod to keep it supported.

NoeJeko
05-10-2009, 09:01 PM
Colonel,

Please try the steps I sent you in PM. Your board has quite a few addons and there's a good chance it's conflicting with one of them if this does not work. I've tested this addon against a clean MW and vB instance as well as with a few addons (vBSEO, vB Advanced, etc) but there's no way I can reasonably check against all existing mods. I'm willing to work with you directly as time permits.

@BRtondi, can you send me a PM message with any log errors you're encountering? I've had issues with MediaWiki on non iso-8859-1 character sets so this could be a flaw with mediawiki. Also, please send me the username you're attempting to log in (no password, please).

@Flowison, after stealing my site's design and me sending a legal request to your host to get it removed, you get no support from me. Good luck on your own.

dvsDave
05-14-2009, 02:29 AM
very interesting! I have the old NuWiki mod on my site and am in need of something new for my 1000+ articles. The one feature I must have to have before migrating to a new system is to have the auto-linking of the wiki entries to words in the forums.

simunaqv
05-15-2009, 09:49 PM
Hi NeoJeko,
I am trying to get this mod to work on my site but it is not working properly. When I try to login to the wiki site, it immediately logs me out of the wiki and out of the forum as well.
Following is the information about my site:

forum url: http://www.urduweb.org/mehfil/
wiki url: htt://wiki.urduweb.org

I will readily provide any further information required by you.
Thanks,

simunaqv
05-16-2009, 09:38 AM
Ok, it seems to work now. I had overlooked the instruction for setting the cookie path to '/'. :erm:
Now I will begin testing this mod on my site. Thanks for this useful mod.

XFSImperial
05-16-2009, 07:18 PM
The bridge seems to be working as I see my forum username on the wiki, but the wiki header and footer is covered in errors. I know the vba is vbadvanced. I'm running vba 3.1.0, are these errors version related?


Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/vba_cmps_include_template.php on line 19

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/vba_cmps_include_template.php on line 42

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/vba_cmps_include_template.php on line 50

Warning: Invalid argument supplied for foreach() in [path]/includes/init.php(298) : eval()'d code on line 15

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/vba_cmps_include_top.php on line 621

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at [path]/includes/class_core.php:3254) in /home/avelegio/public_html/wiki/wiki/includes/GlobalFunctions.php on line 2581

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3254) in /home/avelegio/public_html/wiki/wiki/includes/WebResponse.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3254) in /home/avelegio/public_html/wiki/wiki/includes/WebResponse.php on line 16

Edit: One of our network admins was able to fix the problem. Evidently had to do with difference in the way php4/php5 treat the arrays and the fact that the server for this wiki install is on Litespeed and not Apache.

Mastergumble
05-18-2009, 06:17 PM
I got everything working, the only issue i get but not a big problem is if i log on vb and use the link to mysite/wiki everything wark without problems on mysite.com/wiki/Main_Page

But if i log from the wiki directly i get redirected to mysite.com/wiki/index.php?title/index.php/Main_Page

Still working just cant log frm any article without getting back to the main page...

Any idea if i can simple disable the login from the Wiki page making possible to log only by the vbullet ?

Tkx

GoodOmens
05-20-2009, 02:57 PM
One of my users has a slash in his user name and is receiving a error when going to the wiki (fatal error)

Is there a simple fix or should I just ban user-names with slashes?

Peter Walker
05-28-2009, 06:39 PM
Hi,
I have just installed this hack and think it is a great way of linking vBulletin with Mediawiki. By limiting access to Forum members, I can now forget about unwelcome spam and vandalism on my Wiki.

I tried to install it over two separate servers (Wiki on one web server and forum on another), but could not get that to work. I am moving the wiki domain to the same server as my forum instead.

There is one issue I hope can be solved. On my forum, I insist all members use their real names (e.g. "John Smith") as usernames. As it is a closed forum and non-members cannot see the usernames, this is no problem. However, as soon as my forum members start writing Wiki entries, their username, e.g. real name is displayed on the Wiki.

Could you implement a system where instead of the forum usernames, the Wiki optionally displays a pseudonym instead of the forum username. This could be an optional feature and use either a VB User Profile Field, to store the pseudonym, or alternatively the system automatically generates a pseudonym from the username (or both).

Some people do not want to have their real name displayed next to public Wiki entries and the way the system is setup now, there is no way of preventing this when using your mod.

Regards

Peter

BRotondi
05-28-2009, 06:55 PM
Hi Peter

As you can see, there are still little and bigger problems with this hack and the author has only little time.

My suggestion: Enable Multi-Registering in vB so your users can create a 2nd account and use this one for the wiki.

Bruno
Edit: btw. you can setup your Wiki also as "no anonymous reading"

Peter Walker
05-30-2009, 08:34 AM
I have moved my other wiki domain to the same root server, but still cannot get this to work.

I have installed the wiki as follows:

Domain: www.rifewiki.org (http://www.rifewiki.org)
Directory: /w with virtual directoy /wiki (pretty names)

VB Forum: www.rifeforum.com (http://www.rifeforum.com)
Directory: /forum

I use two seperate MySQL databases

The Wiki works fine when this hack is not used. As soon as I add the hack in Localsettings.php, the wiki stops working (just a white screen, nothing else).

In previous tests, it did work when I used www.rifeforum.com/wiki (http://www.rifeforum.com/wiki), but I would prefer to use the dedicated www.rifewiki.org (http://www.rifewiki.org) domain instead.

The server runs with Suse Linux and Plesk 8.6

Can someone here tell me how to get this working?

Regards

Peter

aciurczak
05-30-2009, 05:28 PM
I was waiting for a working hack like this one before installing MediaWiki, and it's working exactly as I had hoped. Big thanks for putting this together, and for making it so easy to install.

I have one suggestion, when the hack creates the new wiki account based on the vbulletin credentials, is it possible to automatically populate the email address in the wiki account based on the vbulletin account's email address? It seems clunky that users have to re-enter their email address again in the wiki environment. I've disabled email authentication (using $wgEmailAuthentication = false; in localsettings.php) so they at least don't have to go through the email confirmation process a 2nd time.

I'd also suggest that if people only want their vBulletin users to be able to edit the wiki, so set: $wgGroupPermissions['*']['edit'] = false; in localsettings.php.

This hack along with this hack to give the wiki a vbulletin feel (https://vborg.vbsupport.ru/showthread.php?t=193244) have made it pretty straightforward to have a MediaWiki installation fit in very well with a vB installation. My forum is at www.ninjette.org, wiki is at wiki.ninjette.org.

Hall of Famer
06-07-2009, 09:05 AM
I really dig this add-on but I just can't get it to work. I receive an error similar to SemperFideles' so I have to give up at least temporarily.

ccunnin71
06-16-2009, 01:37 PM
I am still working fine on the old 3.7 version. I will keep an eye on your improvements to this plugin. Thank you for picking this up!!

Peter Walker
06-18-2009, 11:19 AM
I have got this working with my two domains: www.rifeforum.com (http://www.rifeforum.com) and www.rifewiki.org (http://www.rifewiki.org)

Basically I had to setup both domains to point to the same place on the server. I have the forum in the /forum and the wiki in the /w directories.

I now tell those users who want to use a pseudonym to create a new account especially for the Wiki. Those accounts go into a special RifeWiki usergroup and have set permissions to only allow to view posts on my forum, yet have full user rights on the wiki.

Forum members visiting the Wiki under www.rifeforum.com/wiki (http://www.rifeforum.com/wiki) can access the wiki with their standard username (e.g. "John Smith"). To use the pseudonym, they need to first login under www.rifewiki.org/forum (http://www.rifewiki.org/forum) first and then switch to the Wiki at www.rifewiki.org/wiki (http://www.rifewiki.org/wiki). it is now possible to switch usernames by simply switching the domain used.

You can read more details on the Main (http://www.rifewiki.org/wiki/Main_Page) and Help (http://www.rifewiki.org/wiki/Help:Contents) pages of my Wiki.

I do have one problem, which should be easy to solve, yet would appreciate any ideas as to how best to implement it.

As I also have vBadvanced (http://www.vbadvanced.com/) CMPS v3.1.0 installed on my forum, people why type in www.rifeforum.com (http://www.rifeforum.com) or www.rifewiki.org (http://www.rifewiki.org) will both land on the CMPS page of my forum.

I need some php code that will recognise when someone has called the rifewiki.org domain and automatically redirect them to www.rifewiki.org/wiki (http://www.rifewiki.org/wiki) while those who used www.rifeforum.com (http://www.rifeforum.com) are left where they are in the CMPS. Calls to www.rifewiki.org/forum (http://www.rifewiki.org/forum) need to be left unchanged.

Is anyone here up to the task and can post the code here?

emperatour
06-18-2009, 06:58 PM
I was using this Mod (as it's explained here (https://vborg.vbsupport.ru/showthread.php?p=1673833#post1673833)) with old versions and lately with vB 3.8.2 and MediaWiki 1.14. But since I upgraded my Wiki to 1.15 it's not working anymore.

Do you think this new version (2.2.0) works with vB 3.8.2 and Wiki 1.15?

Thanks,

Peter Walker
06-19-2009, 02:39 PM
Thanks for the info. I was just thinking about upgrading to the Mediawiki 1.15, but will delay that until someone reports that this system works with it.

I am currently running vBulletin 3.8.3 and MediaWiki 1.14 and that combination does work.

Anyone upgraded to MediaWiki 1.15 with this hack yet?

aciurczak
06-19-2009, 03:23 PM
I just upgraded to 3.8.3 and MW 1.15, this mod continues to work fine with that combination. First do the 3.8.3 upgrade, and that really doesn't affect this in any way.

The MW 1.15 upgrade works fine, though it can be a pain in the ass if you use short URLs and don't have command line access; needed to switch back to long URL's for the upgrade, then switch back to short URLs afterwards. When the 1.15 upgrade is complete, re-upload the few files for this mod into the MW directories and everything is working just as before.

emperatour
06-21-2009, 04:48 AM
Does login through Wikis Login-Page work on someones german wiki/vbulletin?
I can enter Login/PW, but will be redirected to the forum without beeing logged in... (workaround programmed in php so not an urgent bug... but interesting...)

Bruno


@BRtondi, can you send me a PM message with any log errors you're encountering? I've had issues with MediaWiki on non iso-8859-1 character sets so this could be a flaw with mediawiki. Also, please send me the username you're attempting to log in (no password, please).


I believe that I have the same problem,
I can log-in to wiki using Admin's and Moderator's user name. But new users and SuperMod cannot log-in to wiki; After entering the Login/pass in wiki it will redirect to the "forum login page" and afterward it will return to wiki again without being logged in.


vBulletin 3.8.2 Mediawiki 1.15 Persian(Farsi) language

vktechnology
06-22-2009, 02:36 AM
Thank you for make this mode
it work with wiki 1.5 and vb 3.8

it's working good and simple

vktechnology
06-23-2009, 06:51 AM
wiki 1.5 after login and edit some thing on wiki
it didn't allow to edit it has error said something about proxy

mattpist
06-23-2009, 01:17 PM
im getting the same problem as peter, with only a blank page showing up after implementing the hack to localsettings.php. im using mediawiki 1.13.3... is that too old?

also, im using vb 3.8.3

BRotondi
06-25-2009, 10:03 AM
Hi NoeJeko & all Readers

It is nice to prevent some Usergroups of logging in. But if they were logged in, when I changed the Usergroup, this will not take effect, until they logout and try to login again...

Any Idea how to get immediate effect? Perhaps a manual trigger in the wiki, which will logout all Users? (it's not often I need it).

Thanks!
Bruno

emperatour
06-26-2009, 03:09 PM
Does login through Wikis Login-Page work on someones german wiki/vbulletin?
I can enter Login/PW, but will be redirected to the forum without beeing logged in... (workaround programmed in php so not an urgent bug... but interesting...)

Bruno
Did you solve this problem? :-?

Hi NoeJeko & all Readers

It is nice to prevent some Usergroups of logging in. But if they were logged in, when I changed the Usergroup, this will not take effect, until they logout and try to login again...

Any Idea how to get immediate effect? Perhaps a manual trigger in the wiki, which will logout all Users? (it's not often I need it).

Thanks!
Bruno
It's not for preventing Usergroups of logging in, it's preventing of automatically logging in. Means that the user is still able to log in manually.

alanhoskins
06-26-2009, 03:18 PM
I'm getting this error now with the mod. I've dug around and cannot seem to find a way to clear it or fix it. It appears any and every time I want to edit/create a page.

"Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service."

http://4playerpodcast.com/wiki is the wiki

BRotondi
06-26-2009, 03:34 PM
@emperatour:
a) No, still not working in german (I removed the login link and added a "login through forum")
b) Wrong! Since Login through Wiki is disabled when correctly installed...

Greetings
Bruno

JakeS
06-26-2009, 05:33 PM
Thanks :D

Installed! :D Worked perfectly for me after a bit of tweaking (Settings).

emperatour
06-29-2009, 07:10 PM
I guess I have problem because I haven't disabled the magic_quotes_gpc. Adding the folowing line to .htaccess causes "500 Internal Server Error".

php_flag magic_quotes_gpc off

And unfortunately I don't have access to php.ini. Why it happens and is there any way to fix it?

Thank you,

alanhoskins
07-02-2009, 03:39 PM
I'm getting this error now with the mod. I've dug around and cannot seem to find a way to clear it or fix it. It appears any and every time I want to edit/create a page.

"Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service."

http://4playerpodcast.com/wiki is the wiki

Any idea?

mattpist
07-02-2009, 07:03 PM
im getting the same problem as peter, with only a blank page showing up after implementing the hack to localsettings.php. im using mediawiki 1.13.3... is that too old?

also, im using vb 3.8.3

wow, still no answer on this?

ndahiya
07-04-2009, 09:24 PM
Also, if you use memcached - ensure you do not cache sessions. If you do, restart it at least once a week. If you don't, you'll end up with invalid session errors out of MediaWiki.

how do i disable session caching in memcached? not sure if there is a flag, or does it have to be recompiled?

i am currently using the version originally released for 3.7, but with the mods discussed in the thread, so think it is the same as this version.

ndahiya

raisun
07-09-2009, 03:29 AM
I'm beating my head against my desk and am hoping for some help from anyone (Im more a hack than a developer, just FYI)

I've got the mod installed and think it works great! I'm still in testing for my wiki, but here is my problem: I've set wiki path in admincp to be "../info," my vb install is www.mouseinfo.com/forums and my wiki install is www.mouseinfo.com/info; should work. However, when i try to log in from the wiki side vb authenticates just fine, but the redirect URL is: http://www.mouseinfo.com/forums/login.php?url=../info/wiki/index.php/Main_Page

Any thoughts where that is coming from?

Thanks!

Peter Walker
07-09-2009, 06:10 AM
I had a quick look at your website, but without signing up for your forum, it does not look like I can view your wiki.

What I did notice is that you are not using short URLs on your wiki so maybe you should set that up first (is not that difficult to setup).

e.g. http://www.mouseinfo.com/info/Main_Page

I suggest you change your setup to use http://www.mouseinfo.com/wiki/Main_Page until you get that working properly and then experiment with using /info instead.

On my forum, I am using /wiki as my wiki directory with short names (wiki is installed in /w and then redirects to /wiki as per instructions for short URLs).

In admincp, I have set http://www.rifeforum.com/wiki as the Wiki Path with short URLs and defined group 6 for the admin group (default setting). Apart from uploading the code, not much more to set in vb.

The most important settings are in the wiki directory file: LocalSettings.php

Make sure that "define( VB_SYSTEM_PATH," points to the full path on the server (not the URL). and that you have the permissions correct:

$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;
$wgGroupPermissions['user']['edit'] = true;

and also check your $wgScriptPath

In your case, should be set to
$wgScriptPath = "/info";

I hope this helps.

Peter

raisun
07-09-2009, 02:18 PM
Thanks Peter. I did have my localsettings.php file set up as you suggest, I'm wondering actually if the redirect URL might be cached somewhere (i moved my wiki from /info/wiki to /info, and everything was fine except the redirect on the login)

I'll keep experimenting. I was playing with short urls yesterday but had some issues so I'll have to keep playing with that...

NoeJeko
07-09-2009, 05:42 PM
Any idea?

Hi, sorry for the late reply; I've been out of town and swamped with work. You need to either disable magic_quotes_gpc in php.ini or make the edit to .htaccess that's described in the instructions file.

NoeJeko
07-09-2009, 05:48 PM
Also, a reminder to all:

I do my best to come here and answer support requests, but this mod is not supported. This doesn't mean I don't care about your problems, it just means I'm very busy as a full-time web architect, full-time business management student, and full-time startup business owner.

I use this mod for clients when I do contracting work and, if an issue comes up during an implementation, that's what drives my updates here. To date I've had one person donate towards the development of this mod - and I greatly appreciate that person - but it's a testament to how much I don't make by maintaining this.

I say this not to make you feel sorry for me - but I've noticed some people getting quite irritated if they don't get a *timely* response from me on issues (both in thread and via PM). I never promised to answer your questions but I do my best to provide support as time permits. Those I've had the time to personally help with their instances can probably tell you that as long as I have time, I don't mind helping.

Peter Walker
07-09-2009, 06:38 PM
I do have one problem, which should be easy to solve, yet would appreciate any ideas as to how best to implement it.

As I also have vBadvanced (http://www.vbadvanced.com/) CMPS v3.1.0 installed on my forum, people why type in www.rifeforum.com (http://www.rifeforum.com) or www.rifewiki.org (http://www.rifewiki.org) will both land on the CMPS page of my forum.

I need some php code that will recognise when someone has called the rifewiki.org domain and automatically redirect them to www.rifewiki.org/wiki (http://www.rifewiki.org/wiki) while those who used www.rifeforum.com (http://www.rifeforum.com) are left where they are in the CMPS. Calls to www.rifewiki.org/forum (http://www.rifewiki.org/forum) need to be left unchanged.

Is anyone here up to the task and can post the code here?

As there has been no reply to this, obviously nobody has worked out how to do it.

I have been trying a number of things and have finally found an answer. It involves a minor change to the cmps_index.php file, which is normally renamed to index.php.
What this code does is that if someone uses the www.rifewiki.org (http://www.rifewiki.org) domain, the client is automatically redirected to www.rifewiki.org/wiki/ (http://www.rifewiki.org/wiki/) otherwise the cmps page is displayed.

Find:
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT', 'adv_index');
define('VBA_PORTAL', true);
define('VBA_SCRIPT', 'CMPS');

Above this, insert:
if (strpos(" ". $_SERVER["HTTP_HOST"], "rifewiki.org")>0){
print '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.rifewiki.org/wiki/">' ;
}else{

Exchange "rifewiki.org" for the domain to be redirected. This will catch "rifewiki.org", "www.rifewiki.org (http://www.rifewiki.org)", etc.

Find at the end of the file:
?>

Above this, insert:
}

Save the file and upload to your server.

Example:
http://www.rifeforum.com shows the cmps
http://www.rifewiki.org now redirects to http://www.rifewiki.org/wiki/
That's all.

If anyone knows an even better way of doing this, please post it here.

Regards

Peter

Mimirswell
07-11-2009, 01:28 AM
I installed this on a clean installation of 3.8.3 vbulletin and 1.15 Mediawiki and while everything is working, I cannot logout of either vb or wiki. The page generated is:

.../forums/login.php?do=logout&logouthash=1247278750-55702f2f3a4408ddcbf87f501f37ac5cefa22b20

and the error generated is:

Connection Interrupted

The connection to the server was reset while the page was loading.

In addition, attempting to log in on the mediawiki site while correctly logging you in to the forums, upon redirection to the wiki, you are not logged in. Logging into vbulletin functions fine.

Anyone have a suggestion on how to resolve this?

Peter Walker
07-11-2009, 09:37 AM
I had these problems as well. They were caused by corrupted cookies and the best way of solving them is to delete the cookies related to your forum. After that, the problem should be solved.

As regards logging in, I noticed that it is often best to login on the forum and then switch over to the wiki. Logging in on the Wiki page does not always work.

I put together instructions on how to do this on the main page of my own Wiki (http://www.rifewiki.org/wiki/Main_Page#How_to_Login_to_the_Rife_Wiki)which might help you, too.

I hope this helps

NoeJeko
07-11-2009, 05:05 PM
The issue with logging into the wiki first lies in MediaWiki's cache as far as I can tell. I've seen this on a few boards that I've installed this hack -- it's not that you're not logged in (in most cases) it's that mediawiki is showing a cache of an unlogged in page. As soon as you click to another page or perform an action that requires authentication (editing, etc) the wiki usually starts showing your login status.

For the rifeforum.com/rifeforum.org use case, you cannot achieve SSO using this hack across two different domains. It's just how it works - the cookies are not readable across domains. You will need some sort of federated authorization token to achieve this (i.e. SAML tokens or OpenID). You can achieve it with subdomains (i.e. forum.rifeforums.com, wiki.rifeforums.com, etc) but I have not tested this use case and it may prove buggy.

Regarding the vBa CMPS use cases - while I've used this successfully on forums running vBa (see: http://community.ingres.com) I cannot guarantee compatibility with any other installed products. The permutations of hacks is exponential and there's no way I can reasonably test against everything out there =[

Peter Walker brings up a good point. In troubleshooting any web application your first course of action should be to clear your browser's cache and cookies (much like how restarting Windows solves 90% of your problems). If I'm asked for support my first question is always "did you clear your cache and cookies?" Also, try it on different browsers; the issues you're having could be related to a specific browser. IE, FireFox, Safari, Opera, and Chrome should always be used to test since they represent the lion's share of the market.

Mimirswell
07-11-2009, 08:41 PM
Peter Walker brings up a good point. In troubleshooting any web application your first course of action should be to clear your browser's cache and cookies (much like how restarting Windows solves 90% of your problems). If I'm asked for support my first question is always "did you clear your cache and cookies?" Also, try it on different browsers; the issues you're having could be related to a specific browser. IE, FireFox, Safari, Opera, and Chrome should always be used to test since they represent the lion's share of the market.

I should of mentioned it in the first post but I already cleared cache and cookies and even went so far as to try it on my laptop which uses both a separate browser but also a separate OS.

I'm going to reinstall both mediawiki 1.15 and vbulletin 3.8.3 and see if it persists and I'll post here my results.

Peter Walker
07-12-2009, 09:51 AM
For the rifeforum.com/rifeforum.org use case, you cannot achieve SSO using this hack across two different domains. It's just how it works - the cookies are not readable across domains. You will need some sort of federated authorization token to achieve this (i.e. SAML tokens or OpenID). You can achieve it with subdomains (i.e. forum.rifeforums.com, wiki.rifeforums.com, etc) but I have not tested this use case and it may prove buggy.

Regarding the vBa CMPS use cases - while I've used this successfully on forums running vBa (see: http://community.ingres.com) I cannot guarantee compatibility with any other installed products. The permutations of hacks is exponential and there's no way I can reasonably test against everything out there =[

Peter Walker brings up a good point. In troubleshooting any web application your first course of action should be to clear your browser's cache and cookies (much like how restarting Windows solves 90% of your problems). If I'm asked for support my first question is always "did you clear your cache and cookies?" Also, try it on different browsers; the issues you're having could be related to a specific browser. IE, FireFox, Safari, Opera, and Chrome should always be used to test since they represent the lion's share of the market.

Hi NoeJeko
I have got this hack running on both domains. It is just necessary to login again for the second domain (both domains have to point to the same place on the web server). The second login is even useful as I can use my normal forum username when I use the rifeforum.com domain and a different (pseudo) username with the rifewiki.org domain. By simply calling the domain with the respective domain, I can choose which username I wise to use with the Wiki.

I have solved the CMPS implementation. By adding that code to the CMPS index.php, those using the rifewiki.org domain are simply redirected to the correct rifewiki.org/wiki url.

DeanoUK
07-19-2009, 06:02 PM
Can't quite get it work on my GoDaddy setup.

http://www.ukcigarforums.com/ukcfwiki/

If I add a .htaccess file with just 'php_flag magic_quotes_gpc off' then I get the apache error you'll see if you try the link above.

If I remove the .htaccess file and try to edit a page it'll tell me the token is borked and I can't save the page.

Any ideas on what I need to do?

aciurczak
07-19-2009, 07:41 PM
On GoDaddy, don't put it in the htaccess file. Put it in either the php.ini or php5.ini file, depending on whether you are using php v5 or not. If you don't have one of those files in your root directory, create it and put in only that line.

DeanoUK
07-20-2009, 08:00 AM
Thank for the advice - I hadn't even realised the php.ini file was available to use.

I've added 'php_flag magic_quotes_gpc = off' to it, and deleted .htaccess.

Now I still get the error I had before when .htaccess wasn't available:


Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service.

DeanoUK
07-20-2009, 08:04 AM
I also copied php.ini as php5.ini to ensure it picked at least one of them up.

DeanoUK
07-27-2009, 01:33 PM
I've actually moved hosts to A2hosting because of various problem with Godaddy.com

Has anyone got this working on A2 or similar, because I'm still getting the same problem as above...

DeanoUK
07-27-2009, 07:43 PM
Now works for me.

Using .htaccess file instead.

"php_flag magic_quotes_gpc = off" will cause a 500 error
"php_flag magic_quotes_gpc off" (without the equals sign) works!

BRotondi
07-30-2009, 12:01 PM
Hello

I was not able to brak the bug down to a reproducable point, but as much: Sometimes I won't be logged in automatically (MSIE, Firefox, Opera). Then I change "Disallowed Usergroups" to "1,3,4,8,12" (I'm part of none of them) instead of "1,2,3,4,8,12" (I'm Part of 2, but also have 6,10,11) and can log in.

Now I change back to "1,2,3,4,8,12" and still will be able to log in. (Even after Browser-Restart and delete of "private Data, Cache, ...") on all three Browsers!

Same behaviour with a test user, which has 2 and 11 (Both tested: 2 Primary or 11 Primary). Sometimes it works, sometimes not...

...

Bruno

aciurczak
08-10-2009, 07:25 PM
I'm in the process of moving my forum and wiki to a new host, and am having issues with the wiki. I thought I had moved over all MW files successfully, and I also thought I made the necessary changes in the localsettings file, but I get this error when I go to the wiki:

Internal error
Detected bug in an extension! Hook vBSSOAutoAuth failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:

#0 /var/www/html/w/includes/User.php(810): wfRunHooks('UserLoadFromSes...', Array)
#1 /var/www/html/w/includes/User.php(260): User->loadFromSession()
#2 /var/www/html/w/includes/User.php(1870): User->load()
#3 [internal function]: User->getOption('nocache')
#4 /var/www/html/w/includes/StubObject.php(58): call_user_func_array(Array, Array)
#5 /var/www/html/w/includes/StubObject.php(184): StubObject->_call('getOption', Array)
#6 [internal function]: StubUser->__call('getOption', Array)
#7 /var/www/html/w/includes/OutputPage.php(180): StubUser->getOption('nocache')
#8 /var/www/html/w/includes/Article.php(748): OutputPage->checkLastModified('20090701153341')
#9 /var/www/html/w/includes/Wiki.php(450): Article->view()
#10 /var/www/html/w/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#11 /var/www/html/w/index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#12 {main}


Is there any place obvious I should start to look?

aciurczak
08-10-2009, 10:51 PM
Reloaded wiki from scratch, built it from an empty database, and confirmed everything was working fine before added this mod. Added this mod by adding the few lines in the localsettings.php, uploaded the include files, and I keep getting this same error. New host is on Centos 5.3, PHP 5.3.0, MySQL 5.1.137.

Hmm, I'm wondering if it's because the new site doesn't have an actual domain pointing to it yet, and is only being referred to by IP address. (http://xxx.xxx.xxx.xxx/wiki). Perhaps everything is set up OK and when I actually move the domain over things will start working on their own. I can always hope. :)

aciurczak
08-11-2009, 10:13 PM
No such luck. I moved over a domain so the wiki is being reference by an actual domain, and the error remains.

SuperGLS
08-12-2009, 11:56 PM
Hi, sorry for the late reply; I've been out of town and swamped with work. You need to either disable magic_quotes_gpc in php.ini or make the edit to .htaccess that's described in the instructions file.

I'm having the same EDIT TOKEN problem as him, but I do not know how to do what you have suggested. Can anyone help me with that? I created a file called php.ini and php5.ini and typed in:

php_flag magic_quotes_gpc off

And then uploaded it to the WIKI root folder. But do I need to do anything else? There wasn't any other files named php.ini or php5.ini anywhere else on my server.

I think this is the last hurdle for me. Thanks in advance to anyone that can help.

GoodOmens
08-13-2009, 12:40 AM
Is your patch correct in Localsettings.php?

IE define( VB_SYSTEM_PATH, '' );

SuperGLS
08-13-2009, 12:59 AM
Yes, everything works with this mod except for the ability to edit pages (any of the wiki pages).

I've actually since discovered a work around, but I don't know how smart it is. I changed the edit token information in the user.php file from

define( 'EDIT_TOKEN_SUFFIX', '+\\' );

TO

define( 'EDIT_TOKEN_SUFFIX', '+#+' );

I found this work around by looking at someone elses problems with integrating SMF and MW (rather than vB and MW). They ran into some problems with apostrophes ( ' ) turning into \\ but I haven't had the problem thus far.

Still, if I could get this working correctly I'd be happier I think.

For ref, my forum is www.elantraxd.com/forums and my wiki is www.elantraxd.com/wiki

centerius
08-13-2009, 07:44 PM
Is there a way to disable the login screen when someone isn't logged in and simply display an error message on the wiki?

Right now if someone isn't logged in to vbulletin it displays the vbulletin login page. Instead of this, I want an error message brought up on the wiki saying something similar to "Please log in to the forum and refresh this page."

In addition, how can I make sure that only people logged in can see information the wiki (right now it seems the case, but I want to make sure).

This mod seems like the best option for integrating vB/Wikimedia. Thanks.

rexford.kim
08-19-2009, 11:56 PM
When I try to use the MediaWiki/vBulletin Single Sign-On and try to edit the MediaWiki pages I get this error from MediaWiki and I get Apache errors for PHP. If I do not use the Single Sign-On edits to the MediaWiki page go through fine.

Sorry! We could not process your edit due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in.

I CANNOT edit the mediawiki or save preferences with the Single Sign-On installed. I did the /includes/User.php edit but I still cannot EDIT!

Open wiki/includes/User.php FIND:
PHP Code:
define( 'EDIT_TOKEN_SUFFIX', '+\\' );
Replace with:
PHP Code:
define( 'EDIT_TOKEN_SUFFIX', '+#+' );

Posted Solution on MediaWiki that does not work for me.
Assuming you get this error even when you do have a seemingly valid logon session:

Check if /var/lib/php5 is writable and not readable for user and world ( # chmod 733 /var/lib/php5 )
Check to see if your session.save_path value in php.ini is valid and writable to the webserver - PHP configuration.
Check to see if there is enough disk space.

After making changes restart Apache:

/etc/init.d/httpd restart

I get Apache errors for PHP:

[Wed Aug 19 17:47:02 2009] [error] [client 10.15.15.41] PHP Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/html/wiki/LocalSettings.php on line 28, referer: http://www.website.com/wiki/index.php?title=Main_Page&action=submit

[Wed Aug 19 17:47:02 2009] [error] [client 10.15.15.41] PHP Notice: Constant CWD already defined in /var/www/html/forum/global.php on line 16, referer: http://www.website.com/wiki/index.php?title=Main_Page&action=submit

[Wed Aug 19 17:47:02 2009] [error] [client 10.15.15.41] PHP Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/html/wiki/LocalSettings.php on line 28, referer: http://www.website.com/wiki/index.php?title=Main_Page&action=submit

[Wed Aug 19 17:47:02 2009] [error] [client 10.15.15.41] PHP Notice: Constant CWD already defined in /var/www/html/forum/global.php on line 16, referer: http://www.website.com/wiki/index.php?title=Main_Page&action=submit

BRotondi
08-20-2009, 05:27 AM
In addition, how can I make sure that only people logged in can see information the wikiThis has to be set in the LocalSettings.php and has nothing to do with this mod. Have a look at the MediaWiki-Wiki (http://www.mediawiki.org/wiki/Manual:FAQ).

Bruno

rexford.kim
08-24-2009, 06:01 PM
How do you get rid of the PHP errors concerning the CWD error!?!?!?

[Wed Aug 19 17:47:02 2009] [error] [client 10.15.15.41] PHP Notice: Constant CWD already defined in /var/www/html/forum/global.php on line 16, referer: http://www.website.com/wiki/index.ph...&action=submit

insaatforumu
08-29-2009, 10:07 PM
my forum http://forum.yapisal.net
My Wiki http://sozluk.yapisal.net

how can i do my setting?
i couldnt do it

Ninth Dimension
09-07-2009, 07:18 PM
Hi there, I hope someone can help :)

I've installed this mod, but so far have been unable to get it working. I think the problem is that I've also got vB Nexus (https://vborg.vbsupport.ru/showthread.php?t=220820) installed, which is making it fall over because it can't find some required files:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/init.php(298) : eval()'d code on line 613

Warning: require_once(./vbnexus/facebook/facebook.php) [function.require-once]: failed to open stream: No such file or directory in [path]/global.php(1091) : eval()'d code on line 90

Fatal error: require_once() [function.require]: Failed opening required './vbnexus/facebook/facebook.php' (include_path='/home/unknown/public_html/beta/wiki:/home/unknown/public_html/beta/wiki/includes:/home/unknown/public_html/beta/wiki/languages:.:/usr/lib/php:/usr/local/lib/php') in /home/unknown/public_html/beta/forum/global.php(1091) : eval()'d code on line 90

Does anyone have any ideas on how I might be able to get this to work? I did have a look to see if I can find where I would need to update the path to fix this, but no joy.

(Just in case you need this info, I've got the forum installed at /root/forum and the wiki at /root/wiki)

kent_lkc
09-08-2009, 11:29 AM
nice MOD.

any idea how to get mediawiki to display in forum theme ? instead of mediawiki own skins.

jawatkin
09-13-2009, 12:17 PM
Reloaded wiki from scratch, built it from an empty database, and confirmed everything was working fine before added this mod. Added this mod by adding the few lines in the localsettings.php, uploaded the include files, and I keep getting this same error. New host is on Centos 5.3, PHP 5.3.0, MySQL 5.1.137.

Hmm, I'm wondering if it's because the new site doesn't have an actual domain pointing to it yet, and is only being referred to by IP address. (http://xxx.xxx.xxx.xxx/wiki). Perhaps everything is set up OK and when I actually move the domain over things will start working on their own. I can always hope. :)

I can confirm your error as duplicated and I didn't move hosts... I upgraded to PHP 5.3.0, so that's where the issue is coming from. My backtrace was slightly different, but very close:

Internal error

Detected bug in an extension! Hook vBSSOAutoAuth failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:

#0 /home/public_html/w/includes/User.php(810): wfRunHooks('UserLoadFromSes...', Array)
#1 /home/public_html/w/includes/User.php(260): User->loadFromSession()
#2 /home/public_html/w/includes/User.php(1989): User->load()
#3 /home/public_html/w/includes/User.php(2002): User->getGroups()
#4 /home/public_html/w/includes/User.php(1975): User->getEffectiveGroups()
#5 /home/public_html/w/includes/User.php(2125): User->getRights()
#6 [internal function]: User->isAllowed('read')
#7 /home/public_html/w/includes/StubObject.php(58): call_user_func_array(Array, Array)
#8 /home/public_html/w/includes/StubObject.php(184): StubObject->_call('isAllowed', Array)
#9 [internal function]: StubUser->__call('isAllowed', Array)
#10 /home/public_html/w/includes/Title.php(1523): StubUser->isAllowed('read')
#11 /home/public_html/w/includes/Wiki.php(151): Title->userCanRead()
#12 /home/public_html/w/includes/Wiki.php(55): MediaWiki->preliminaryChecks(Object(Title), Object(OutputPage), Object(WebRequest))
#13 /home/public_html/w/index.php(116): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
#14 {main}


NoeJeko: I know it's unsupported, but any help would be appreciated, as I was totally loving this! :)

Found this on a Mediawiki support site from someone who was complaining about a similar issue with other extensions:

This happens when the callback expects an argument to be passed by reference but this argument isn't passed by reference when calling wfRunHooks(). These extensions are being fixed (ConfirmEdit should already be fixed), so try to download the latest for the extensions causing these errors and see if it's fixed. iAlex 08:13, 13 September 2009 (UTC)


If I comment out the AuthPlugin_vBSSO extension, the Wiki will load (but I have no access to edit)...

Fixed!!

Apparently, PHP 5.2.x used to auto-convert value passing to reference passing, but 5.3.x won't and it errors out. Very simple fix.

Line 264 of includes/AuthPlugin_vBSSO.php:
Replace

function vBSSOAutoAuth(&$user) {


with

function vBSSOAutoAuth($user) {

NoeJeko
09-16-2009, 08:29 PM
Good call on that; I upgraded to PHP 5.3 and it broke so much crap that I had to downgrade back to 5.2 so I had no idea it was incompatible. I'll try to get a version up that accounts for this.

I have, however, confirmed that it works on MW 1.15.

aciurczak
09-19-2009, 11:07 PM
That one character fix worked like a charm! Now up and running with vBulletin 3.8.4, mediawiki 1.15.1, and PHP 5.3. Thx folks!

Quantnet
09-20-2009, 02:47 AM
This looks promising. I'll give this a try soon.

AfterWorldForum
09-23-2009, 12:40 PM
Got my VPS yesterday, and installed wiki immediately. However, I keep running into trouble when attempting to install this mod. Particularly, I have isolated the trouble to the second line that is to be added to the PHP file. I can insert the first line and have things working, but as soon as the second line is implemented, the page turns blank (Like referenced in page 21, and reported solved later. I just have no idea how to achieve it at my forum, since the wiki and forum reside on the same server on the same domain. Forum in /forums, wiki in /w).

Could someone explain in coochie coo talk what exactly that line is supposed to do, and how I could go about troubleshooting for possible workarounds or solutions, please?

Thanks.

Peter

Peter Walker
09-23-2009, 01:32 PM
Hi Peter,
could you be more specific and show us examples of the code you feel is causing the problem. My forum / wiki is working perfectly now.

Regards

Peter

jawatkin
09-23-2009, 03:39 PM
Good call on that; I upgraded to PHP 5.3 and it broke so much crap that I had to downgrade back to 5.2 so I had no idea it was incompatible. I'll try to get a version up that accounts for this.

I have, however, confirmed that it works on MW 1.15.

I've reverted to 5.2.10 myself because it broke soooooo many other things I just couldn't handle it..

Quick question: if I go to Special:Statistics, it only says I have 1 Registered User but when I click the Users link, it shows a list of all the members who have been "auto-logged-in". Is there a way to auto-assign them so that they appear in the statistics page?

AfterWorldForum
09-23-2009, 04:03 PM
Hi Peter,
could you be more specific and show us examples of the code you feel is causing the problem. My forum / wiki is working perfectly now.

Regards

Peter

Hi Peter,

Sure. Sorry. I was at work before and did not have access to the files. The statement that ends up throwing me the blank page is:

require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

That page is definitly in place, so I'm not sure how to debug where it stuffs up now.

Thanks in advance.

Update: Been trying different things, including removing the $IP setting. No go. I ensured it wasn't the
define( VB_SYSTEM_PATH, '/var/www/html/forum' );
line (Just a quick check. I replace /var/www/html/forum' with my actual path, and leave it within single quotes, right?) by commenting that out, but whether it is enabled or commented, the site still works. As soon as I uncomment the link to the AuthPlugin file, I just see a white empty page.

The source of the page is like this:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>
e


MediaWiki 1.15.1
PHP 5.1.6 (apache2handler)
MySQL 5.0.77

vBulletin 3.8.4


Peter2

Peter Walker
09-23-2009, 06:19 PM
OK, I will give you my settings and so you can try them.

require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/srv/www/vhosts/rifeforum.com/httpdocs/forum' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );
require_once('extensions/Cite/Cite.php');
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;
$wgGroupPermissions['user']['edit'] = true;
and then at the end of the file:

$wgScriptPath = "/w"; # Path to the actual files. This should already be there
$wgArticlePath = "/wiki/$1"; # Virtual path. This directory MUST be different from the one used in $wgScriptPath
$wgUsePathInfo = true; # Enable use of pretty URLs

$wgWhitelist['sysop']['read'] = $wgBlacklist['*']['read'] = array("Special:Export", "Special:Listusers", "Special:Ipblocklist", "Special:Log", "Special:Allmessages");

$wgAllowCopyUploads = true; # Allow for upload to be copied from an URL. Requires Special:Upload?source=web
$wgFileExtensions = array('png', 'gif', 'jpg', 'jpeg', 'doc', 'svg', 'xls', 'mpp', 'pdf', 'zip');

Note that I have a few extra features installed like cite.php for example.

Try this and report back.

I am using vb 3.8.4, MediaWiki 1.14.0, PHP 5.2.6, MySQL 5.0.45.

I hope this helps

AfterWorldForum
09-23-2009, 06:36 PM
I hope this helps

Peter,

As soon as I add the line mentioned earlier to the Auth-file, my page dissappears. I'm guessing that the problem is me running a newer version.

I've been reading up on old installs, and tried some tricks mentioned in there regarding the same line, but all of that seems to be covered in the new version of the hack.

I'm going to see if combing the release notes for the 1.15 version yields anything, otherwise I might just downgrade to wiki 1.14 (the wiki is blank anyway, so no harm done).

Danke!

Peter

Peter Walker
09-23-2009, 06:48 PM
I was having the blank page issue when I had the wiki on a different domain to the forum. I had to set both my domain names to the same server space before that problem went away. Do you have the correct settings in vb as they play a major role, too.

e.g. the Wiki Path has to point to the "/wiki" directory and not "/w" (I used the full URL)

AfterWorldForum
09-23-2009, 07:06 PM
I was having the blank page issue when I had the wiki on a different domain to the forum. I had to set both my domain names to the same server space before that problem went away. Do you have the correct settings in vb as they play a major role, too.

e.g. the Wiki Path has to point to the "/wiki" directory and not "/w" (I used the full URL)

Aye, I saw your issue about the blank page in your posts before.

My wiki and forum are in seperate folders, but on the same server and domain.

Forum: www.afterworldforum.com/forum
Wiki: www.afterworldforum.com/wiki

I also installed everything in /w, and have the same settings as you in my localsettings.

As soon as I uncomment line to the the alternative SSO auth page, my wiki will just go blank. I'm going to try and see tomorrow if I can isolate the problem to a single functioncall or line of code by using selective commenting.

Not sure how else to troubleshoot, as I just obtained this VPS box, and my linux skills are extremely rusty (as in ten years or so). I've not bitten myself into this, and dangit, I shall either figure it out, or just give up and download 1.14 tomorrow evening.

Thanks a lot for your help so far, Peter. I did just try using /wiki in the hack, but that also did not do anything. I highly appreciate you taking the time, though.

Off to bed now. Maybe tomorrow morning I'll suddenly see the light.

Peter

Peter Walker
09-24-2009, 12:19 AM
Hi Peter,
I had a look at your site and noticed a minor discrepency.

You just told me your forum was located at: "www.afterworldforum.com/forum (http://www.afterworldforum.com/forum)"

Yet in reality, it is located at: www.afterworldforum.com/forum (http://www.afterworldforum.com/forum)s

If you used the term "forum" instead of "forums" anywhere in your settings, then it is bound not to work. Please check this out.

AfterWorldForum
09-24-2009, 04:06 AM
Hi Peter,
I had a look at your site and noticed a minor discrepency.

You just told me your forum was located at: "www.afterworldforum.com/forum (http://www.afterworldforum.com/forum)"

Yet in reality, it is located at: www.afterworldforum.com/forum (http://www.afterworldforum.com/forum)s

If you used the term "forum" instead of "forums" anywhere in your settings, then it is bound not to work. Please check this out.

Hi Peter,

Must have been my mistake when posting. I am pretty certain that I did use /forums everywhere, but will be sure to check that. I should just learn not to post in the late evening hours ;)


Update: Just checked, and it is correctly defined in the file:

require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/var/www/vhosts/afterworldforum.com/httpdocs/forums' );
#require_once( "$IP/includes/AuthPlugin_vBSSO.php" );
$wgGroupPermissions['*']['createaccount'] = false;

Update 2:

Just noticed something weird. In my VPS file manager, I did not see the AuthLogin file. I could see it from my FTP folder, which is where I had been editing it, but for some reason, that obviously failed to get it working properly. I instead uploaded the file through the VPS File Manager (after renaming the other file in FTP), and that seemed to do the trick :D

I R HAPPY CAMPER NOWZ!

Still baffled an uploaded file doe not somehow not show up, but I guess I'll bug my host about that one.

Update 3: D'OH. My FTP client was pointing towards the OLD FTP site. Since I installed wiki before the migration, the environments looked identical, and I just never noticed.

Wiki-SSO is working great now, so the hack works on MediaWiki 1.15 as well.

Vielen dank fur deine hilfe, Peter. Kann ich dir mals ein bier kaufen wann du nach Danmark kommst? :D

Cheers.

Peter

futuredood
09-25-2009, 05:04 AM
does anyone know if this works with jfusion?

murekhalir
09-25-2009, 09:28 PM
this might be a stupid question - but anyone know the link where to get a vb bridge to WP?

jawatkin
10-01-2009, 12:55 PM
this might be a stupid question - but anyone know the link where to get a vb bridge to WP?

It's not a stupid question, but it's definitely not in the right place.

I googled exactly what you asked for (vb bridge to wp) and there are plenty of links:
http://www.google.com/search?client=safari&rls=en&q=vb+bridge+to+wp&ie=UTF-8&oe=UTF-8

OSanchez
10-05-2009, 12:29 AM
I can't find "localsettings.php"
public_html/Wiki/Localsettings.php is missing..I looked in the downloaded files and didnt come with it.

Peter Walker
10-05-2009, 06:32 AM
To quote from my LocalSettings.php


# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# http://www.mediawiki.org/wiki/Manual:Configuration_settings


Once you have installed MediaWiki, you will find that file has been created.

I hope this helps

OSanchez
10-06-2009, 04:58 AM
Oh, I didnt install it yet. My bad. I should do that. XD

bradbeattie
11-02-2009, 05:49 PM
I have this installed with vBulletin 3.8.4p1 and MediaWiki 1.15.1. It works well enough, but there's one tiny hiccup. Something related to Memcache is causing MediaWiki to forget about its extensions. I get an error like "Invalid tag extension name: myextension". Haven't yet found a solution to this, but I'm looking.

bradbeattie
11-02-2009, 06:28 PM
I have this installed with vBulletin 3.8.4p1 and MediaWiki 1.15.1. It works well enough, but there's one tiny hiccup. Something related to Memcache is causing MediaWiki to forget about its extensions. I get an error like "Invalid tag extension name: myextension". Haven't yet found a solution to this, but I'm looking.

Be careful not to have anything within your vBulletin skin that calls back to MediaWiki by requiring LocalSettings.php. Bad things happen.

Dekard
11-10-2009, 06:41 PM
Ok, so my install of MW is a bit borked right now. I'm getting the blank page issue mentioned earlier and it actually started when I was using an earlier script to integrate VB with MW. After removing the previous hack (vbwiki pro) I've installed this hack according to the directions listed here but its still not working. After taking a look at some of the posts in this thread I'd like to get a clean and fresh localsettings.php file to work with since this is a bit over my head. Whats the best way to do that?

Once I've got it working well independatly from VB I'll take another look at installing this hack.

Dekard
11-10-2009, 07:42 PM
Ok, since things in my install were pretty messed up I deleted the localsettings.php file from the root and the /config directory. Then, I used the MW installer to create a new file using the settings I copied from the deleted copy. After that I was able to login using the standard MW systems. Then, following the directionsin the .txt file included with the mod I reinstalled the hack and it works now.

Dekard
11-10-2009, 08:21 PM
So, this was working well for a while but seems to have died after just a few minutes. If I try to rollback a change I get this response from MW.

You do not have permission to do that, for the following reason:
There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking.
Please hit "back" and reload the page you came from, then try again.And if I try to edit the page I get this error.

Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service. Any tips?

Dekard
11-10-2009, 08:28 PM
Adding "php_flag magic_quotes_gpc off" to my .htaccess file corrected the above issues.

azn_romeo_4u
11-10-2009, 08:44 PM
How do you add someone to a wiki usergroup? It doesn't appear to save them for some reason.

Dekard
11-14-2009, 11:10 AM
Has anyone tested this with vb 4.0 beta yet and the latest version of Mediawiki? I'd love to update but its not worthing breaking anything.

Dekard
11-16-2009, 01:19 PM
Needless to say, this mod is great for vb 3.8 but I wouldn't recommend running in a vb 4.0 site at all. When attempting to run this mod on an a site with the 4.0 beta 3 installed the following errors are produced on all pages of the wiki and no further content is rendered. Just the error message.


Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in /home/overcloc/public_html/forums/global.php on line 15

Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in /home/overcloc/public_html/forums/global.php on line 15

Fatal error: require() [function.require]: Failed opening required './includes/class_bootstrap.php' (include_path='/home/overcloc/public_html:/home/overcloc/public_html/includes:/home/overcloc/public_html/languages:.:/usr/lib/php:/usr/local/lib/php') in /home/overcloc/public_html/forums/global.php on line 15

I hope that sometime down the road soon we'll see a 4.0 native mod that will work however, this is an incredible mod. To support the production of a 4.0 mod I'm sending the author a donation right now. Lets all do it and see how soon we can get a 4.0 release. :)

Goomzee
11-18-2009, 10:03 AM
there is no LocalSettings.php file in attachment

Dekard
11-23-2009, 11:43 AM
there is no LocalSettings.php file in attachmentThats true. You should have a LocalSettings.php in the root of your mediawiki installation folder. You want to edit that file.

bosal
11-26-2009, 12:35 PM
Does this mod import old users from mediaWiki ? I have a big wiki with many users and I can't loose them.

Dekard
11-26-2009, 12:44 PM
No, it just replaces the MW login with the VB one. So, you'd have to import all your users to VB or get them to sign up there before you put this on the production site.

bosal
11-26-2009, 12:52 PM
Is there a Impex for such a import ?

Dekard
11-26-2009, 01:01 PM
I don't think there is an impex for that but there are other solutions. Google is your best friend on this one since those type of mods come and go depending on the version supported.

BRotondi
11-26-2009, 01:06 PM
Perhaps it's the easiest way to simply match the UserIDs. How many users are you talking about?

Bruno

RedFoxy
12-01-2009, 02:20 PM
I've troubles with vBulletin 3.8.4 Patch Level 1 and MediaWiki 1.15.1 http://www.softairmania.it/samwiki/index.php/Speciale:Versione

After installation, when I try to edit or insert a new page I give n error about my brouser and and an error abut my browser accent support

Big Kahuna
12-05-2009, 03:21 PM
Love this hack but want to upgrade Vbulletin to 4.

Is this addon compatible to the upgrade.

Been Told
12-18-2009, 02:00 PM
I would be willing to donate for this mod to become vB4 compatible. Any chance of that?

ndahiya
12-26-2009, 08:51 PM
Hi,

I was able to get this to work in vb 4.0.0 (mediawiki 1.14) by editing AuthPlugin_vBSSO.php by adding 3 chdir commands twhere the scripts are called

<<<<<
define('THIS_SCRIPT', 'wiki');
chdir ('/home/sitename/www/forums');
require_once( CWD . '/global.php');
chdir ('/home/sitename/www/forums');
require_once( CWD . '/includes/functions.php');
chdir ('/home/sitename/www/w/includes');


<<<<<
the second chdir is redundant, i think, but just to be safe. :)

so far working, but will see how stable it is.

ndahiya

BRotondi
12-28-2009, 04:59 PM
Great! Thanks! (not tested yet, but nice to hear :) )

Bruno

Dontom
12-30-2009, 10:56 AM
I've troubles with vBulletin 3.8.4 Patch Level 1 and MediaWiki 1.15.1 http://www.softairmania.it/samwiki/index.php/Speciale:Versione

After installation, when I try to edit or insert a new page I give n error about my brouser and and an error abut my browser accent support

Same here, too, also after the latest patch with the changed salt in vb's functions.php I get the same message.

when saving an edit or adding a new page I get the 'token_suffix_mismatch' message:
=> "'''Your edit has been rejected because your client mangled the punctuation characters in the edit token.'''

Any help is appreciated!

dotted1337
12-31-2009, 02:37 AM
Hi,

I was able to get this to work in vb 4.0.0 (mediawiki 1.14) by editing AuthPlugin_vBSSO.php by adding 3 chdir commands twhere the scripts are called

<<<<<
define('THIS_SCRIPT', 'wiki');
chdir ('/home/sitename/www/forums');
require_once( CWD . '/global.php');
chdir ('/home/sitename/www/forums');
require_once( CWD . '/includes/functions.php');
chdir ('/home/sitename/www/w/includes');


<<<<<
the second chdir is redundant, i think, but just to be safe. :)

so far working, but will see how stable it is.

ndahiya
$oldcwd = getcwd();
chdir( VB_SYSTEM_PATH );
require_once( CWD . '/global.php');
require_once( CWD . '/includes/functions.php');
chdir($oldcwd);
this way you dont have anything you need to remember to edit beyond the instructions here, if the paths change for some reason.

BRotondi
01-01-2010, 11:57 AM
Confirmed, GREAT!

Add the red code after the existing black in "wiki\includes\AuthPlugin_vBSSO.php"
# INITIALIZE VBULLETIN SUBSYSTEM
if ( !defined( 'CWD' ) )
define( 'CWD', ( VB_SYSTEM_PATH ) );

$oldcwd = getcwd();
chdir( VB_SYSTEM_PATH );
require_once( CWD . '/global.php');
require_once( CWD . '/includes/functions.php');
chdir($oldcwd);1000 Thanks!
Bruno

ekool
01-04-2010, 01:52 AM
The bridge seems to be working as I see my forum username on the wiki, but the wiki header and footer is covered in errors. I know the vba is vbadvanced. I'm running vba 3.1.0, are these errors version related?




Edit: One of our network admins was able to fix the problem. Evidently had to do with difference in the way php4/php5 treat the arrays and the fact that the server for this wiki install is on Litespeed and not Apache.


I'm having this issue and am unable to fix it, any ideas?


Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /usr[path]/includes/vba_cmps_include_template.php on line 19

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /usr[path]/includes/vba_cmps_include_template.php on line 42

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /usr[path]/includes/vba_cmps_include_template.php on line 50

Warning: Invalid argument supplied for foreach() in /usr[path]/includes/init.php(304) : eval()'d code on line 15



Unable to add cookies, header already sent.
File: /usr/home/nexusone/public_html/forum/includes/class_core.php
Line: 3277

BRotondi
01-04-2010, 05:38 AM
It worked fine with vBa 3.2.1 and vB 3.8.*. I don't think that's the reason for your errors...

nitra1000
01-04-2010, 11:11 PM
posting here so I can find this tommorow (when I'm looking to install on VB4)

Behzad Varedi
01-07-2010, 07:08 AM
Hello,

I have this error in vb4

Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /home/persianppc/domains/wiki.persianppc.com/public_html/LocalSettings.php on line 26

any Idea how can I fix it ?
I'm sure about the path I set in "LocalSettings.php"

Thanks

BRotondi
01-07-2010, 08:05 AM
It seems, you did not set the path correctly

example:
define( VB_SYSTEM_PATH, '/home/path/server/forum' );

Regards, Bruno

Behzad Varedi
01-07-2010, 08:34 AM
It seems, you did not set the path correctly

example:
define( VB_SYSTEM_PATH, '/home/path/server/forum' );Regards, Bruno

Hello,

Thank you for your attention :)

actually I did ! that's why I'm confused about this !

define( VB_SYSTEM_PATH, '/home/persianppc/public_html' );

any idea ?

BRotondi
01-07-2010, 09:24 AM
Sorry ... no. For such cases I installed XAMPP and Netbeans. This is fine to debug a project. You could set a breakpoint on this line and see if it really is beeing executed.

your "Use of undefined constant" says, that this line never has been executet - I think, not the php-hero either :). Perhaps you set the line on a wrong copy of LocalSettings.php?

...

Bruno

Behzad Varedi
01-07-2010, 09:51 AM
Sorry ... no. For such cases I installed XAMPP and Netbeans. This is fine to debug a project. You could set a breakpoint on this line and see if it really is beeing executed.

your "Use of undefined constant" says, that this line never has been executet - I think, not the php-hero either :). Perhaps you set the line on a wrong copy of LocalSettings.php?

...

Bruno

Well, I'm sure that I'm using the right copy cause when I edit it and put something wrong, wiki won't come online again till I change it to what it was.

maybe it's some permission problem ?

BRotondi
01-07-2010, 10:59 AM
I don't know, sorry ... "not the php-hero either" :).

apply
01-08-2010, 05:24 AM
I recently upgraded to vB4 and my wiki started throwing errors caused by this mod. I found a workaround that I would like to share in case others face the same issue. I fixed the problem by changing path of "require('./includes/class_bootstrap.php')" at the beginning of vB4 global.php to the full path of the class_bootstrap.php.

BRotondi
01-08-2010, 05:36 AM
Interesting... Thanks for sharing! Which Versions do you use?

Scan Cape Cod
01-09-2010, 03:11 AM
Thanks VERY much! I fought this for two hours until I came across your post. MUCH appreciated, and confirmed to work!

I recently upgraded to vB4 and my wiki started throwing errors caused by this mod. I found a workaround that I would like to share in case others face the same issue. I fixed the problem by changing path of "require('./includes/class_bootstrap.php')" at the beginning of vB4 global.php to the full path of the class_bootstrap.php.

Edit, I should mention that I'm using Mediawiki 1.15.1.

raisun
01-09-2010, 05:14 AM
curious if anyone has tried this (I dont know enough about mediawiki to know where to edit this):

When a user is login and viewing wiki pages, I'd like the personal_url link for the user page to link to the forum UserCP instead of the user page on the wiki. Seems like it would be easy, I just dont know where to edit that.

BRotondi
01-09-2010, 06:03 AM
Install FireBug > pick the element you want to change > Change it manually until it fits > find the code you have to change :)

Good luck!
Bruno

@Scan Cape Cod (https://vborg.vbsupport.ru/member.php?u=109106): Thanks for your version info! Nice to see, that it works also with 1.15!

raisun
01-09-2010, 05:36 PM
duh! thanks man :)

Scan Cape Cod
01-10-2010, 01:42 AM
Install FireBug > pick the element you want to change > Change it manually until it fits > find the code you have to change :)

Good luck!
Bruno

@Scan Cape Cod (https://vborg.vbsupport.ru/member.php?u=109106): Thanks for your version info! Nice to see, that it works also with 1.15!

Unfortunately my comment was both wrong and premature. I've been in the process of upgrading to vBulletin 4.0 and to the latest MediaWiki, 1.15.1. To get to 4.0 from 3.8.4 I uninstalled all of what were incompatible plug-ins from vBulletin. What I didn't do is remove the code from MediaWiki for this plug in. When I started to get the errors, making the correction as indicated by "apply" solved the errors I was getting when accessing MediaWiki.

I of course had to ultimately "uninstall" MMOG Wiki from MediaWiki by removing the added code. Prior to doing so, trying to edit a wiki page resulted in the "malformed" message mentioned earlier. So, I guess it probably does NOT work with 1.15.1.

My apologies if I misled you or anyone. It was the end of a long day and I wasn't thinking clearly when I made that post.

BRotondi
01-10-2010, 05:26 AM
No problem :)

So I did the upgrade from 1.14 to 1.15 and can confirm myself, that it's working also with 1.15 - without any changes. Or let's say: Login is working as desired through vB, but I did not test the rest.

Have a nice sunday!
Bruno

Quantnet
01-10-2010, 11:32 PM
What about the wiki skin? Are you able to use the same skin as the forum?

chriske
01-10-2010, 11:47 PM
Does the mod work if my forum and wiki are on separate domains?

MGP_Tech
01-13-2010, 05:55 PM
I'm not sure why but I'm getting a 500 Internal Server Error. I've altered my LocalSettings file as many ways as I can think of (thinking that perhaps my path was wrong due to the fact that I have my domain name looking of "myworldofdarkness.com" looking to my url "http://madhatterrgames.com/vampire-larp" for my vbulletin root) but no dice.

My wiki is located at: http://myworldofdarkness.com/wiki
My vbulletin is installed at: http://myworldofdarkness.com/forum.php (I'm using vbadvanced on the index.php)

Both are located on my website at (real urls)
wiki - http://madhatterrgames.com/vampire-larp/wiki
vbulletin - http://madhatterrgames.com/vampire-larp/forum.php

I read that others had a similar issue and it was related to the .htaccess file
I don't have access to the other file mentioned (to be altered instead of .htaccess) so am I out of luck and can't use this hack?

Any help you could provide me with would grant you my eteranl thanks and virtual cookies. :) Mmmm!

Thanks in Advance for your help!

MGP_Tech
01-13-2010, 09:07 PM
Okay,

so when I delete the .htaccess file I created, the wiki shows back up which tells me the error is probably in the .htaccess file...

So, if I don't have access to my php.ini file and the .htaccess addition is shutting down the wiki with a 500 Internal Server Error - are there any other options for me or am I up a creek?

Digital Jedi
01-14-2010, 06:49 AM
What about the wiki skin? Are you able to use the same skin as the forum?
No, you need another mod to achieve that.

ndahiya
01-23-2010, 03:15 PM
see this extension mod: Mediawiki Edits in Postbit & Profile (https://vborg.vbsupport.ru/showthread.php?p=1964456)

ndahiya

dotted1337
01-24-2010, 12:13 AM
I recently upgraded to vB4 and my wiki started throwing errors caused by this mod. I found a workaround that I would like to share in case others face the same issue. I fixed the problem by changing path of "require('./includes/class_bootstrap.php')" at the beginning of vB4 global.php to the full path of the class_bootstrap.php.

https://vborg.vbsupport.ru/showpost.php?p=1943089&postcount=115

Beor
01-24-2010, 02:07 PM
Hello

I have vb4 and use the modifications of post 115, on mediawiki access to enter login and is ok, appears the vb page with vblogin ok, but on the wiki not logged, i go to the forum and logged ok, but returns to wiki and not logged in.

What is the problem?

Thx

Beor
01-24-2010, 02:52 PM
Hello

i resolved this on options vbulletin-----http & cookies-----path to save cookies (i have forum, i changed to / and works fine)

Thx

SuperGLS
01-25-2010, 02:21 AM
Confirmed, GREAT!

Add the red code after the existing black in "wiki\includes\AuthPlugin_vBSSO.php"
# INITIALIZE VBULLETIN SUBSYSTEM
if ( !defined( 'CWD' ) )
define( 'CWD', ( VB_SYSTEM_PATH ) );

$oldcwd = getcwd();
chdir( VB_SYSTEM_PATH );
require_once( CWD . '/global.php');
require_once( CWD . '/includes/functions.php');
chdir($oldcwd);1000 Thanks!
Bruno

Confirmed again. Working great with me on 4.0.0. Thanks guys!

BRotondi
01-25-2010, 11:02 AM
Modifications


For use with Wiki short-URLs you should remove this in product-mmog_wiki.xml (after installation in Plugin "MMOG Wiki: Online Location Hack"): <phpcode><![CDATA[if (strpos($userinfo['location'], ( $vbulletin->options['mmog_wiki_path'] . '/' )) !== false)
so you can use /w which will work with /w/... and /wiki/...

If checking for /w ist not enough, you could also use multiple if (...) {$userinfo['activity'] = 'wiki';}

For German platforms you may change the hardcoded english in product-mmog_wiki.xm: $userinfo['action'] = 'Viewing Wiki';Greetings, Bruno

benjaminlwells
02-01-2010, 10:49 PM
I am about to apply this hack. I had a similar one before with Media wiki and PHPBB. I'm wonder though, do I need to have both VB and Media Wiki using the same database? Currently I have them on separate databases on the same server.

Ben

BRotondi
02-02-2010, 05:44 AM
Different is o.k.

Bruno

benjaminlwells
02-02-2010, 03:05 PM
So, I have installed it. This is trying to get it to work with vb4.01 btw, which seems to have worked for others.

The only thing that had me unsure was VB_SYSTEM_PATH. VB is install right in my rood dir of my domain. I tried a few things, got errors finding class_bootstrap.php so I spoke with my domain host, they suggested I just enter '/' since it's my rood dir. When I do that I get the following error:

Warning: require_once(///global.php) [function.require-once]: failed to open stream: No such file or directory in /hermes/web04/b1777/moo.benjaminlwells/alphanex/includes/AuthPlugin_vBSSO.php on line 254

Fatal error: require_once() [function.require]: Failed opening required '///global.php' (include_path='/hermes/web04/b1777/moo.benjaminlwells/alphanex:/hermes/web04/b1777/moo.benjaminlwells/alphanex/includes:/hermes/web04/b1777/moo.benjaminlwells/alphanex/languages') in /hermes/web04/b1777/moo.benjaminlwells/alphanex/includes/AuthPlugin_vBSSO.php on line 254

Any Thoughts?

BRotondi
02-02-2010, 03:28 PM
"." is the path for "this", perhaps this helps in some way... (try "/." or "./", don't remember it exactly yet)

BRotondi
02-02-2010, 03:30 PM
And ... btw ... now a problem from myself: Wiki does not recognize the login any more... I'm always logged out but don't know, what could have been changed. Even if I reload an old backup it does not help...

Any ideas? Thanks!
Bruno

benjaminlwells
02-02-2010, 04:39 PM
"." is the path for "this", perhaps this helps in some way... (try "/." or "./", don't remember it exactly yet)

Thanks for the suggestion, unfortunately neither worked. :(

BRotondi
02-02-2010, 05:33 PM
So try to hardencode it: Search for the variable and replace it with "nothing" - only an idea...

BRotondi
02-02-2010, 09:28 PM
O.K. I did plenty of tests and am sure now: It does not work with vB 4.0.1! You will remain logged in after the upgrade from 4.0.0 until you press Ctrl-F5 in the wiki while logged out in vB. Then you never can log in again...

Or does it work on the english 4.0.1?

... very sad...

Greetings, Bruno

benjaminlwells
02-02-2010, 10:25 PM
The only place I could find it was in AuthPlugin_vBSSO.php

it was:
# INITIALIZE VBULLETIN SUBSYSTEM
if ( !defined( 'CWD' ) )
define( 'CWD', ( VB_SYSTEM_PATH ) );

I tried replacing VB_SYSTEM_PATH with nothing, with a / and with the domain url. Just got a variation on a syntax error each time

Bruno, you are running on 4.01 also, other than your new issues, you seemed to be able to get it installed properly. Did you follow any other steps that aren't in the readme file?

BRotondi
02-03-2010, 04:53 AM
Hi Benjamin

As much as I understand, it never worked with 4.0.1. It works fine with 4.0.0 and if you do not enter the wiki logged out after upgrading, you will never realize, it does not work any more.

Bruno

Edit: Perhaps vB 4.0 gives Vaultwiki (60$ then 25$/year, Demopage (http://www.vaultwiki.org/demo/Fake-Page)) the right chance ...

benjaminlwells
02-03-2010, 05:13 AM
well, 4.02 comes out in a couple of days maybe it will work then...

BRotondi
02-03-2010, 05:40 AM
I don't think so, but perhaps some one will find a way to fix it also for 4.0.1/2. From .0 to .1 they changed quite a lot. Perhaps a new fix would last longer...

benjaminlwells
02-03-2010, 11:04 AM
I hope someone can come up with a solution, I'd rather not have to shell out $60. Software looks great, but I'm worried about my custom layouts in MediaWiki getting trashed, and I have visions of spending many hours fixing layouts for hundreds of entries!

jawatkin
02-03-2010, 05:38 PM
I hope someone can come up with a solution, I'd rather not have to shell out $60. Software looks great, but I'm worried about my custom layouts in MediaWiki getting trashed, and I have visions of spending many hours fixing layouts for hundreds of entries!

Actually, I paid for Vaultwiki and I am "all-in" on this instead. I'm not ready for 4.0 yet anyways, but I'll need a single-sign-on working because the Vaultwiki really doesn't do anything near what Mediawiki can.

simunaqv
02-04-2010, 03:07 PM
Hi Benjamin

As much as I understand, it never worked with 4.0.1. It works fine with 4.0.0 and if you do not enter the wiki logged out after upgrading, you will never realize, it does not work any more.

Bruno

Edit: Perhaps vB 4.0 gives Vaultwiki (60$ then 25$/year, Demopage (http://www.vaultwiki.org/demo/Fake-Page)) the right chance ...

I don't think so, but perhaps some one will find a way to fix it also for 4.0.1/2. From .0 to .1 they changed quite a lot. Perhaps a new fix would last longer...

Well, at least the single sign on is working on my local installation with the instructions that you provided. I am using vb 4.01 and mediawiki 1.12.0. I am not sure about the later versions of mediawiki.

benjaminlwells
02-04-2010, 03:18 PM
Well, at least the single sign on is working on my local installation with the instructions that you provided. I am using vb 4.01 and mediawiki 1.12.0. I am not sure about the later versions of mediawiki.

did you just use the instructions in the readme file?

Ben

simunaqv
02-04-2010, 03:30 PM
did you just use the instructions in the readme file?

Ben

I already had the SSO working with vb 3.8.1 on my local setup. I created a separated installation vb 4.0 and upgraded it to vb 4.01 and applied the changes to the AuthPlugin_VBSSO.php file as suggested byBRotondi, and it is working, at least on my local setup.

bepe
02-06-2010, 10:15 AM
I've got the whole thing pretty much working now... but had to rewrite almost everything for 4.0.1

... Right now my biggest problem is that the wiki css is somehow in conflict with the vB css
I'm just starting to learn all that php, css suff... but no idea where to continue now :(

https://vborg.vbsupport.ru/showthread.php?t=235147

BRotondi
02-06-2010, 10:38 AM
@bepe: Install Firebug! You can click any element and change CSS and Html realtime. For PHP Xampp is perhaps the best solution.

I'm wondering why this mod works for 4.0.1 on your site... perhaps a Problem with the german version?

bepe
02-06-2010, 10:46 AM
It's not really a mod... it's more like a new version

AuthPlugin_vbMediaWiki.php
<?php
/**
*/
# Copyright (C) 2004 Brion Vibber <brion@pobox.com>
# http://www.mediawiki.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# http://www.gnu.org/copyleft/gpl.html

/**
* Authentication plugin interface. Instantiate a subclass of AuthPlugin
* and set $wgAuth to it to authenticate against some external tool.
*
* The default behavior is not to do anything, and use the local user
* database for all authentication. A subclass can require that all
* accounts authenticate externally, or use it only as a fallback; also
* you can transparently create internal wiki accounts the first time
* someone logs in who can be authenticated externally.
*/

$current_dir = getcwd();
chdir( '../forum' );
require_once( "global.php" );
require_once( "includes/functions.php" );
chdir( $current_dir );

require_once( "$IP/includes/AuthPlugin.php" );

/**
* Users can't change their passwords here
*/
class AuthPlugin_vbMediaWiki extends AuthPlugin {

public function allowPasswordChange() {
return false;
}
}
$wgAuth = new AuthPlugin_vbMediaWiki();

/**
* Set the 'vbmediawikiskin' skin as default and prevent users from changing it
* - we have only one integrated skin right now
*/
$wgDefaultSkin = 'vbwikiskin';
$wgAllowUserSkin = false;

/**
* Disable email and real name
* - Not sure yet how to solve conflicts between vBulletin and MediWiki user data changes
*/
$wgEnableEmail = false;
$wgAllowRealName = false;

/**
* Disable 'pretty' URLs, e.g. index.php/Page_title
* - We need to disable it or rewrite code for vBulletin's "Who's Online"
*/
$wgUsePathInfo = false;

/**
* Set this to false to avoid forcing the first letter of links to capitals.
* - vBulletin user names can be lower case, so we need that
*/
$wgCapitalLinks = false;

/**
* Disabling new user registrations and anonymous edits
* - vBulletin user names can be lower case, so we need that
*/
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;

/**
* Disable manual login and logout functions for all users and remove the ChangePassword page
* - vBulletin will do the login/logout stuff and also the Password should be changes there
*/
function SpecialPage_initListHook( &$aSpecialPages )
{
unset( $aSpecialPages['Userlogout'] );
unset( $aSpecialPages['Userlogin'] );
unset( $aSpecialPages['Resetpass'] );
return true;
}
$wgHooks['SpecialPage_initList'][] = 'SpecialPage_initListHook';

/**
* Remove login and logout buttons for all users
* - vBulletin shows them in the navbar anyway
*/
function PersonalUrlsHook( &$personal_urls, &$title )
{
unset( $personal_urls["login"] );
unset( $personal_urls["logout"] );
unset( $personal_urls['anonlogin'] );
return true;
}
$wgHooks['PersonalUrls'][] = 'PersonalUrlsHook';

/**
* User Group Translation
* - NoLogin: Can't login to wiki... only to vBulletin
* - Sysop: Wiki Administrators
* - Bureaucrat: Could edit user rights... but they will be reseted anyway
* It's more clear if we only allow a group like moderators to Administrate the Wiki
*/
$vwNoLoginGroups = array();
$vwSysopGroups = array(6,7);
$vwBureaucratGroups = array(6);

/**
* Minimum number of posts a user need in to login to the Wiki
* - This is a community portal... only real members of the community should edit the Wiki
*/
$vwMinReputationPosts = 5;
$vwMinReputationPostsNotice = 'wiki_posts';

/**
* Sync user to vBulletin
* - Same user for the Wiki as in vBulletin
*/
function UserLoadFromSessionHook( $user, &$result ) {
global $vbulletin;
global $vwNoLoginGroups, $vwSysopGroups, $vwBureaucratGroups;
global $vwMinReputationPosts, $vwMinReputationPostsNotice;

// check if user is authenticated (by another hook)
if ( $user != null ) {
if ( !$user->isAnon() ) {
// User is not anonymous.
// Check for the existence of a valid vB userid. If we don't have one, log the old user out.
if ( $vbulletin->userinfo['userid'] == 0 ) {
$user->logout();
}

// Check vwNoLoginGroups
// If they're logged in and shouldn't be, log them out!
if ( is_member_of( $vbulletin->userinfo, $vwNoLoginGroups ) ) {
$user->logout();
break;
}

if( $vbulletin->userinfo['posts'] < $vwMinReputationPosts ) {

if( $vwMinReputationPostsNotice != null ) {
$vbulletin->noticecache = array(
$vwMinReputationPostsNotice => array(
'has_x_postcount' => array(0,$vwMinReputationPosts + 1)
)
);
}

$user->logout();
break;
}

return true;
}
$user->logout();
}

if ( $vbulletin->userinfo['userid'] )
{
// Check vwNoLoginGroups
if ( is_member_of( $vbulletin->userinfo, $vwNoLoginGroups ) ) {
return true;
}

if( $vbulletin->userinfo['posts'] < $vwMinReputationPosts ) {

if( $vwMinReputationPostsNotice != null ) {
$vbulletin->noticecache = array(
$vwMinReputationPostsNotice => array(
'has_x_postcount' => array(0,$vwMinReputationPosts + 1)
)
);
}

return true;
}

$username = $vbulletin->userinfo['username'];

if ( $username ) {
$u = User::newFromName( $username );
if (is_null($u)) {
// Invalid username or some other error...
return;
}
if ( $u->getID() == 0 ) {
$u->addToDatabase();
$u->setToken();
}
else $u->loadFromDatabase();

$user = $u;
$user->setOption( 'rememberpassword', 1 );
$user->saveSettings();
$user->setCookies();

// Check vwSysopGroups.
$user->removeGroup( 'sysop' );
if ( is_member_of( $vbulletin->userinfo, $vwSysopGroups ) ) {
$user->addGroup( 'sysop' );
}

// Check vwBureaucratGroups.
$user->removeGroup( 'bureaucrat' );
if ( is_member_of( $vbulletin->userinfo, $vwBureaucratGroups ) ) {
$user->addGroup( 'bureaucrat' );
}
}
}
else $user->logout();

return true;
}
$wgHooks['UserLoadFromSession'][] = 'UserLoadFromSessionHook';


and there are much more changes, like a new wiki skin and other changes for getting the vB WOL working right

bepe
02-06-2010, 11:53 AM
@bepe: Install Firebug! You can click any element and change CSS and Html realtime. For PHP Xampp is perhaps the best solution.

I'm wondering why this mod works for 4.0.1 on your site... perhaps a Problem with the german version?

thank you so much!! Firebug is just perfect for it :) ... did not know that tool yet :$

BRotondi
02-06-2010, 03:04 PM
It's not really a mod... it's more like a new version

AuthPlugin_vbMediaWiki.php

It works! Pasted your above code in my wiki\includes\AuthPlugin_vBSSO.php and WOW! 1001 Thanks!!

Bruno

Digital Jedi
02-16-2010, 02:04 AM
Modifications


For use with Wiki short-URLs you should remove this in product-mmog_wiki.xml (after installation in Plugin "MMOG Wiki: Online Location Hack"): <phpcode><![CDATA[if (strpos($userinfo['location'], ( $vbulletin->options['mmog_wiki_path'] . '/' )) !== false)
so you can use /w which will work with /w/... and /wiki/...

If checking for /w ist not enough, you could also use multiple if (...) {$userinfo['activity'] = 'wiki';}

For German platforms you may change the hardcoded english in product-mmog_wiki.xm: $userinfo['action'] = 'Viewing Wiki';Greetings, Bruno

I tried this, and while it did work for the Wiki, it also rewrote users playing in ibProArcade. The link stayed the same, but it said they were viewing the wiki.

BRotondi
02-21-2010, 06:44 PM
Ngh... and again not working 100% after upgrading to 4.0.2 ...

The "who is online" gives me no wiki-link, and unallowed users have an empty login-window in in the wiki (instead of the IP) ... Now I'm testing vbMediaWiki (https://vborg.vbsupport.ru/showthread.php?t=235342) (Beta AddOn) which is VERY interesting:
Edit-counter like Mediawiki Edits in Postbit & Profile (https://vborg.vbsupport.ru/showthread.php?t=233959)
Tab for the Wiki
Wiki is included in the forum (same Header)Greetings, Bruno

Art Andrews
02-24-2010, 06:21 AM
I saw someone asked earlier if the wiki and vb could be on separate dbs and the answer was "yes." Can they be on separate domains and still have a single login?

luan7749
02-27-2010, 12:01 PM
Could I use bbcode in this addon ?

BRotondi
02-27-2010, 12:49 PM
Where? In the Wiki? In the "Who is online"?

Digital Jedi
02-27-2010, 05:56 PM
Could I use bbcode in this addon ?
In the Wiki? No, this doesn't have anything to do with your vB installation other than bridging their accounts. You need to use Wiki markup in MediaWiki, which is similar, but different.

BRotondi
03-08-2010, 07:55 AM
For vB4 i suggest to disable this AddOn and install this much more powerfull bridge: vbMediaWiki (https://vborg.vbsupport.ru/showthread.php?p=1999581#post1999581). You can use it with your actual Skin or change to the vB-integrated skin vbMediaWiki, which will keep the vB header and footer in the wiki. (Or let your user decide, since every user can choose his skin.)

Goomzee
03-29-2010, 09:17 AM
Thats true. You should have a LocalSettings.php in the root of your mediawiki installation folder. You want to edit that file.

you mean i have to create LocalSettings.php file but where and which coding i put in LocalSettings.php file

i tried myself and it's redirect to me yahoo (http://www.mknexusonline.com/wiki/article/Main_Page)

BRotondi
03-29-2010, 10:14 AM
This is only a bridge for MediaWiki. First install MediaWiki.

If you search a bridge for vB4: vbMediaWiki 4.0.2 RC 3 (https://vborg.vbsupport.ru/showthread.php?p=2010454#post2010454). There you can find perhaps more detailed informations for all this.

Goomzee
03-30-2010, 04:44 AM
This is only a bridge for MediaWiki. First install MediaWiki.

If you search a bridge for vB4: vbMediaWiki 4.0.2 RC 3 (https://vborg.vbsupport.ru/showthread.php?p=2010454#post2010454). There you can find perhaps more detailed informations for all this.

I already installed MediaWiki but i don't understand about LocalSettings.php file cause there is no no file in attachment with the name of LocalSettings.php please help me

BRotondi
03-30-2010, 06:05 AM
How can you have MediaWiki running, if the last install instruction is "Move LocalSettings.php to the root."?!

Can you post a Link to your wiki? Are you really able to post something in your wiki?

Digital Jedi
03-30-2010, 04:44 PM
I already installed MediaWiki but i don't understand about LocalSettings.php file cause there is no no file in attachment with the name of LocalSettings.php please help me
LocalSettings.php came with MediaWiki, not this modification.

Goomzee
03-31-2010, 04:27 AM
How can you have MediaWiki running, if the last install instruction is "Move LocalSettings.php to the root."?!

this is my page url that redirect me yahoo.com

Can you post a Link to your wiki? Are you really able to post something in your wiki?

LocalSettings.php came with MediaWiki, not this modification.

mediawiki! where can i download from mediawiki then

BRotondi
03-31-2010, 04:46 AM
<a href="https://www.mediawiki.org/wiki/Manual:FAQ#Installation_and_configuration" target="_blank">Installation and configuration</a> > First Point

... but why did you tell us, you have mediawiki installed when this obviously isn't true?

Goomzee
03-31-2010, 04:57 AM
sorry editing again but now i installed mediawiki-1.14.0 in my forum also put LocalSettings.php file in public_html/ folder and also added these 2 lines


require_once( "$IP/includes/DefaultSettings.php" );
After it, add these two lines:
define( VB_SYSTEM_PATH, '/var/www/html/forum' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

but problem is still same my site (http://www.mknexusonline.com/wiki/article/Main_Page)redirect to yahoo

Digital Jedi
04-01-2010, 04:07 PM
It's not redirecting to Yahoo, it's going to a Not Found Page. You haven't set the path to your wiki correctly yet, either in in the Local Settings or in the Admin CP.

Goomzee
04-02-2010, 04:25 AM
sorry editing again but now i installed mediawiki-1.14.0 in my forum also put LocalSettings.php file in public_html/ folder and also added these 2 lines


require_once( "$IP/includes/DefaultSettings.php" );
After it, add these two lines:
define( VB_SYSTEM_PATH, '/var/www/html/forum' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

but problem is still same my site (http://www.mknexusonline.com/wiki/article/Main_Page)redirect to yahoo

It's not redirecting to Yahoo, it's going to a Not Found Page. You haven't set the path to your wiki correctly yet, either in in the Local Settings or in the Admin CP.


below path i put in admincp
http://www.mknexusonline.com/wiki/article/Main_Page

and this below path i put in localsetting
define( VB_SYSTEM_PATH, '/home/xxx/public_/forums' );

is above path are not correct?

Digital Jedi
04-02-2010, 04:33 AM
What is this /article subfolder you have the main page in? It's supposed to be /wiki/Main_Page. You probably need to do a little more research on how short URLs are set up. I don't think you can put the wiki contents in another subfolder.

Goomzee
04-02-2010, 04:41 AM
please find the attachment on my admincp

Digital Jedi
04-04-2010, 09:34 PM
please find the attachment on my admincp
The path to your wiki should be the full URL to your wiki installation: http//www.yoursite.com/wiki

Goomzee
04-05-2010, 04:38 AM
The path to your wiki should be the full URL to your wiki installation: http//www.yoursite.com/wiki

i did but still same problem please help me to install this mod
http://www.mknexusonline.com/wiki

BRotondi
04-13-2010, 05:56 AM
Seems not to work any more with vB4.0.3, at least not the German one... Any one tried it?

gamerfu
04-18-2010, 08:06 PM
does wiki need to share the same db as the vB one?

ADD:
I am using ...
WikiMedia 1.15.3 (latest).
All edits are done.
Recieve 500 Error when modified LocalSettings.php.
Using PHP 5.2.11 and MySQL 5.0.87-community-log
Do I have to run 1.14.0?
Do I have to move wiki to my forum folder?

BRotondi
04-18-2010, 09:36 PM
I'm affraid, that at the moment both vBulletin-Mediawiki bridges are not supportet. I tried to make vbMediaWiki (http://projectbay.net/forum/forumdisplay.php?70-vbMediaWiki) (Single Thread at vbulletin.org (https://vborg.vbsupport.ru/showthread.php?t=235342)) as clear as possible. Works only with vB4 but is really a nice solution.

Goomzee
04-20-2010, 04:47 AM
kindly someone please replay my problem

BRotondi
04-20-2010, 08:13 AM
Redirecting to Yahoo is your browser because of your blank sites... because you never installed MediaWiki or .htaccess does something wrong or ...

Put a "Hello World" at /wiki/index.php to resolve this problem.

Goomzee
04-21-2010, 05:06 AM
Redirecting to Yahoo is your browser because of your blank sites... because you never installed MediaWiki or .htaccess does something wrong or ...

Put a "Hello World" at /wiki/index.php to resolve this problem.

dude i already uploaded MediaWiki on server but what about htaccess file what should i write in htaccess files.

BRotondi
04-21-2010, 06:58 AM
dudeNot the right way to get any more support, even I don't know exactly what this word in German is about.

It's not on us to solve your problems. It's on you to get into the stuff and give us the possibility to help you by clearly descripting your problem and testing yourself the hints we give you...

gamerfu
04-21-2010, 08:51 PM
I'm affraid, that at the moment both vBulletin-Mediawiki bridges are not supportet. I tried to make vbMediaWiki (http://projectbay.net/forum/forumdisplay.php?70-vbMediaWiki) (Single Thread at vbulletin.org (https://vborg.vbsupport.ru/showthread.php?t=235342)) as clear as possible. Works only with vB4 but is really a nice solution.
Does wikimedia need to be installed into the vBulletin database? :confused:

AfterWorldForum
04-22-2010, 04:35 PM
Does wikimedia need to be installed into the vBulletin database? :confused:

I have it running in two different databases (using vb 3.8.4).

As for your error 500, try and go over the lines you added or changed yourself in the config file. Make sure all your lines end with a semi-colon ( ; ), and use valid php syntax.

Coleccromos
04-23-2010, 01:04 PM
Can you help me with this step please.
After installing three times the wikimedia whenever I edit the LocalSettings.php and add the two lines that calls the configuration file gives me the error bags are:
Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 26

Warning: require_once(/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/includes/AuthPlugin_vBSSO.php) [function.require-once (http://www.cromosdefutbol.com/mediawiki/index.php/function.require-once)]: failed to open stream: No such file or directory in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 27

Fatal error: require_once() [function.require (http://www.cromosdefutbol.com/mediawiki/index.php/function.require)]: Failed opening required '/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/includes/AuthPlugin_vBSSO.php' (include_path='/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki:/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/includes:/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/languages:.:') in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 27

How is this possible if he says it very clear that we must add these two lines

gamerfu
04-26-2010, 02:13 PM
I have it running in two different databases (using vb 3.8.4).

As for your error 500, try and go over the lines you added or changed yourself in the config file. Make sure all your lines end with a semi-colon ( ; ), and use valid php syntax.Ah! Thank you!

I upgraded MediaWiki to:
1.16.0beta2

and now the modification works perfectly with:
vBulletin 3.8.5

I had trouble with:
1.15.3
for some reason.

gamerfu
04-27-2010, 06:34 AM
I recieve this error when trying to login directly to wiki:

Not Found
The requested URL /wiki/Main_Page was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at palpadpark.com Port 80

AfterWorldForum
04-27-2010, 01:46 PM
Can you help me with this step please.
After installing three times the wikimedia whenever I edit the LocalSettings.php and add the two lines that calls the configuration file gives me the error bags are:
Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 26

Warning: require_once(/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/includes/AuthPlugin_vBSSO.php) [function.require-once (http://www.cromosdefutbol.com/mediawiki/index.php/function.require-once)]: failed to open stream: No such file or directory in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 27

Fatal error: require_once() [function.require (http://www.cromosdefutbol.com/mediawiki/index.php/function.require)]: Failed opening required '/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/includes/AuthPlugin_vBSSO.php' (include_path='/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki:/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/includes:/var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/languages:.:') in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 27

How is this possible if he says it very clear that we must add these two lines

It seems as if you nowhere defined the VB_SYSTEM_PATH variable, and therefore receive the error. Let me show you parts of my LocalSettings.php. My forum is on www.entropiaplanets.com/forums. My wiki is accessible through www.entropiaplanets.com/wiki, but is actually physically located in www.entropiaplanets.com/w. (Note that I also have use a VPS, and the path on the server is similar to yours (/var/www/vhosts/entropiaplanets.com/httpdocs/w).

My LocalSettings.php has the following lines:


if( defined( 'MW_INSTALL_PATH' ) ) {
$IP = MW_INSTALL_PATH;
} else {
$IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/var/www/vhosts/entropiaplanets.com/httpdocs/forums' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );


If you do not have the red line, add it, and change from entropiaplents.com to cromosdefutbol.com.

I have to admit that I really cannot guess as to the error regarding the includes of the AuthPlugin line, but see if my setup gives you something to work with. Feel free to post the results here.

Coleccromos
04-27-2010, 02:46 PM
It seems as if you nowhere defined the VB_SYSTEM_PATH variable, and therefore receive the error. Let me show you parts of my LocalSettings.php. My forum is on www.entropiaplanets.com/forums (http://www.entropiaplanets.com/forums). My wiki is accessible through www.entropiaplanets.com/wiki (http://www.entropiaplanets.com/wiki), but is actually physically located in www.entropiaplanets.com/w (http://www.entropiaplanets.com/w). (Note that I also have use a VPS, and the path on the server is similar to yours (/var/www/vhosts/entropiaplanets.com/httpdocs/w).

My LocalSettings.php has the following lines:


if( defined( 'MW_INSTALL_PATH' ) ) {
$IP = MW_INSTALL_PATH;
} else {
$IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/var/www/vhosts/entropiaplanets.com/httpdocs/forums' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );
If you do not have the red line, add it, and change from entropiaplents.com to cromosdefutbol.com.

I have to admit that I really cannot guess as to the error regarding the includes of the AuthPlugin line, but see if my setup gives you something to work with. Feel free to post the results here.

Thanks for your help.

At the moment I have a different error above:

Parse error: syntax error, unexpected T_IF in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 30

We need to call the directory wiki? I have my directory called mediawiki

Coleccromos
04-28-2010, 11:20 AM
Got it work with my forum but when I access mediawiki out the following error lines

http://www.cromosdefutbol.com/mediawiki/index.php/P%C3%A1gina_Principal

Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 26
Constant CWD already defined in /var/www/vhosts/cromosdefutbol.com/httpdocs/cromo/global.php on line 16

AfterWorldForum
04-29-2010, 05:37 AM
Got it work with my forum but when I access mediawiki out the following error lines

http://www.cromosdefutbol.com/mediawiki/index.php/P%C3%A1gina_Principal

Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/vhosts/cromosdefutbol.com/httpdocs/mediawiki/LocalSettings.php on line 26
Constant CWD already defined in /var/www/vhosts/cromosdefutbol.com/httpdocs/cromo/global.php on line 16

Maybe it's easier if you post the contents of your localsettings.php file here. Just substitute the security information (servername, account, password, database, etc) with asterisks (i.e. *******).

That way we could see what the lines referred to are.

Is it possible that somewhere in the file (below the red line you recently added or changed) have a reference to VB_SYSTEM_PATH but surrounded with single quotes (')?

As for the CWD error, earlier in this thread someone posted a similar issue, but I did not sede any replies to it, or solutions offered for it. I never saw the error myself, so I cannot really help you figure out exactly what causes this.

I'm starting to think the two errors might actually be related, with the first one somehow preventing the proper vB files to be loaded, which causes the second problem. In addition to the localsettings, could you please also copy/paste the contents of WIKI_PATH/includes/AuthPlugin_vBSSO.php ? That is where all the vB stuff is called. Did you happen to make any changes to that file? (I think I use an older version of the file, so maybe some of the changes made in the last release changed the behaviour).

Coleccromos
05-05-2010, 11:41 AM
Thanks for your time AfterWorldForum

This is the LocalSettings
<?php

# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# http://www.mediawiki.org/wiki/Manual:Configuration_settings

# If you customize your file layout, set $IP to the directory that contains
# the other MediaWiki files. It will be used as a base to locate files.
if( defined( 'MW_INSTALL_PATH' ) ) {
$IP = MW_INSTALL_PATH;
} else {
$IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/var/www/vhosts/cromosdefutbol.com/httpdocs/cromo' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );
# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
die( "This script must be run from the command line\n" );
}
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename = "Cromopedia";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/mediawiki";
$wgScriptExtension = ".php";

## UPO means: this is also a user preference option

$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "*****";
$wgPasswordSender = "******";

$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "*****";
$wgDBuser = "****";
$wgDBpassword = "****";

# MySQL specific settings
$wgDBprefix = "";

# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = true;

## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = false;
# $wgUseImageMagick = true;
# $wgImageMagickConvertCommand = "/usr/bin/convert";

## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
# $wgShellLocale = "en_US.UTF-8";

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
# $wgHashedUploadDirectory = false;

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX = false;

$wgLocalInterwiki = strtolower( $wgSitename );

$wgLanguageCode = "es";

$wgSecretKey = "*******";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
$wgDefaultSkin = 'monobook';

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# $wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# $wgRightsCode = ""; # Not yet used

$wgDiff3 = "";

# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );


Edited to eliminate the code AuthPlugin_vBSSO Archive
Showed a modification in the response 164 and solved the problem of cwd

gamerfu
05-06-2010, 09:55 AM
might be shojin (sp?) causing CWD error?

AfterWorldForum
05-11-2010, 04:52 PM
Thanks for your time AfterWorldForum

This is the LocalSettings
...
Edited to eliminate the code AuthPlugin_vBSSO Archive
Showed a modification in the response 164 and solved the problem of cwd

Strangely enough, I seem to have the same errors on my end.

Could you please elaborate exactly what you did to remove the CWD error?

Coleccromos
05-13-2010, 11:22 AM
Strangely enough, I seem to have the same errors on my end.

Could you please elaborate exactly what you did to remove the CWD error?

What I did was copy the contents that are in the 164 response
https://vborg.vbsupport.ru/showpost.php?p=1975958&postcount=164


Copy and paste the contents of response in the AuthPlugin_vBSSO

AfterWorldForum
05-14-2010, 01:00 PM
What I did was copy the contents that are in the 164 response
https://vborg.vbsupport.ru/showpost.php?p=1975958&postcount=164


Copy and paste the contents of response in the AuthPlugin_vBSSO


Thanks for your reply. If I read correctly, the contents of that were meant for vB4, though, right?

Coleccromos
05-15-2010, 02:35 PM
Yes, it seems.

I tried this if it worked and it was.


By looking for evidence and I find that when you install mediawiki gives me the following error

Warning: is_dir() [function.is-dir (http://www.cromosdefutbol.com/wiki/config/function.is-dir)]: open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts/cromosdefutbol.com/httpdocs:/tmp) in /var/www/vhosts/cromosdefutbol.com/httpdocs/wiki/config/index.php on line 441
Warning: Your session.save_path value (/var/lib/php/session) appears to be invalid or is not writable. PHP needs to be able to save data to this location for correct session operation.

Dontom
05-15-2010, 04:29 PM
Same here, too, also after the latest patch with the changed salt in vb's functions.php I get the same message.

when saving an edit or adding a new page I get the 'token_suffix_mismatch' message:
=> "'''Your edit has been rejected because your client mangled the punctuation characters in the edit token.'''

Any help is appreciated!

ok, finally solved it - in php.ini magic_quotes_gpc was On - set it to off, now it works again...

iamacyborg
05-16-2010, 12:13 PM
I updated my version of Mediawiki and it's since stopped running. I can create a Mediawiki account fine, the redirect to forum login just isn't working.

/edit
And it's now working after reinstalling the product. That was odd.

Coleccromos
05-16-2010, 03:59 PM
I updated my version of Mediawiki and it's since stopped running. I can create a Mediawiki account fine, the redirect to forum login just isn't working.

/edit
And it's now working after reinstalling the product. That was odd.


Beautiful and very nice design.

Could you comment on how to apply the design of the forum to the wiki?

iamacyborg
05-16-2010, 04:37 PM
Thank you, though I can't really take the credit for it.
It's mostly a modification I found here (link (https://vborg.vbsupport.ru/showthread.php?t=193244)), though I had to make some changes to the template for it to be fixed width, rather than fluid. Also, it doesn't validate, so it'll need some work if you care about that kind of thing.
Very handy though if you want a nice looking conversion.

AfterWorldForum
05-17-2010, 10:48 AM
Just as a FYI, the CWD errors can be solved by editing the vB global.php.

Replace:


define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));


with


if (!defined('CWD'))
{
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
}


Still lost on how to solve the VB_SYSTEM_PATH one, though.

Coleccromos
05-18-2010, 04:32 PM
Just as a FYI, the CWD errors can be solved by editing the vB global.php.

Replace:


define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
with


if (!defined('CWD'))
{
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
}
Still lost on how to solve the VB_SYSTEM_PATH one, though.

Wonderful!

Thank you very much for the solution.

In another problem such as I, it is difficult to understand!

Continue to investigate

aciurczak
05-24-2010, 02:24 AM
I updated my version of Mediawiki and it's since stopped running. I can create a Mediawiki account fine, the redirect to forum login just isn't working.

/edit
And it's now working after reinstalling the product. That was odd.

I'm still having the same issue. Was working fine with 1.15.1, updated to 1.15.3, and now the login on the MW side doesn't work, always says login failure. If the user is logged in already via the forum, that login does carry over successfully to the wiki side and everything works fine. vB 3.8.5, MW 1.15.3, PHP 5.3.2, mysql 5.1.47.

iamacyborg
05-24-2010, 03:20 PM
Have you tried uninstalling the product on the vBulletin side and then reinstalling it?

aciurczak
05-24-2010, 05:00 PM
I reinstalled it with overwrite enabled, and that didn't change the behavior. I hadn't tried uninstalling it and then reinstalling it; I will give it a shot tonight.

mazazangy
05-25-2010, 11:42 AM
thanks

Rean
06-17-2010, 01:06 PM
based on readme.txt file:
everything is okay until.. i wrote "php_flag magic_quotes_gpc off" at .htaccess file.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@unitedindonesia.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Digital Jedi
06-18-2010, 03:03 AM
based on readme.txt file:
everything is okay until.. i wrote "php_flag magic_quotes_gpc off" at .htaccess file.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@unitedindonesia.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Do you have a backup of the old .htaccess file, because something didn't get edited right when you saved after editing?

Burgy
07-13-2010, 11:38 AM
vBulletin 3.8.1 Patch Level 1
MediaWiki 1.12.4
MMOG Wiki (Version 2.1.0) Single Sign On from vBulletin

ERROR:
Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/vhosts/kunstbewegung.info/httpdocs/wikide7/LocalSettings.php on line 19

LocalSettings.php Line 18-20:
require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/var/www/vhosts/kunstbewegung.info/httpdocs/cde' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

Since I looked around hard and canĀ“t find anybody with the same error, please help.
I did already aply the fix to global.php:

if (!defined('CWD'))
{
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
}

Thank you for helpf
Sincerely yours
Burgy

grey_goose
07-23-2010, 05:49 AM
ok, finally solved it - in php.ini magic_quotes_gpc was On - set it to off, now it works again...

Thanks!!!

JesterP
07-30-2010, 10:14 PM
Hi there,

404 Not Found

--------------------------------------------------------------------------------

nginx


I'm getting an error where the redirect back to the wiki fails after log in from the wiki. I am getting redirected to "/wiki/Main_Page" when it needs to be "/wiki/index.php?title=Main_Page".

I have short URLs in the ACP for this mod set to "NO".

Any help would be appreciated!!!

Jester

*edit

I've configured NGinx to rewrite properly, set the option to use short urls to yes. Short urls working fine, now upon logging in it completely omits /wiki from the url and just plops me back on the site. It as if it's ignoring the "/wiki" option in the ACP. Still need help.

*Edit2

Woke up today and it's working fine..... I have no idea why. Thanks.

Dunhamzzz
08-18-2010, 04:21 PM
vBulletin 3.8.1 Patch Level 1
MediaWiki 1.12.4
MMOG Wiki (Version 2.1.0) Single Sign On from vBulletin

ERROR:
Notice: Use of undefined constant VB_SYSTEM_PATH - assumed 'VB_SYSTEM_PATH' in /var/www/vhosts/kunstbewegung.info/httpdocs/wikide7/LocalSettings.php on line 19

LocalSettings.php Line 18-20:
require_once( "$IP/includes/DefaultSettings.php" );
define( VB_SYSTEM_PATH, '/var/www/vhosts/kunstbewegung.info/httpdocs/cde' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

Since I looked around hard and can?t find anybody with the same error, please help.
I did already aply the fix to global.php:

if (!defined('CWD'))
{
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
}

Thank you for helpf
Sincerely yours
Burgy

Try putting VB_SYSTEM_PATH in the define() function in quotes, eg define('VB_SYSTEM_PATH', '/path/to/what');

I am having some problems myself, using the latest MediaWiki 1.16 and vb 3.8.6 PL1. The error is:
Warning: Parameter 1 to vBSSOAutoAuth() expected to be a reference, value given in /sites/umpc-mydellmini/www/http/w/includes/Hooks.php on line 133
MediaWiki internal error.

Dunhamzzz
08-20-2010, 10:52 AM
Ok I have got this mod working successfully for vBulletin 3.8.6 and MediaWiki 1.17 with PHP 5.3. In fact, the vB version shouldn't really matter at all.

Ok first of all wrap the CMD constant in an if statement, as outline in post #215 (https://vborg.vbsupport.ru/showpost.php?p=2039331&postcount=215).

Second of all open up the AuthPlugin_vBSSO.php file in the includes directory of Mediawiki and search for the line:
function vBSSOAutoAuth(&$user) {
Simply delete the "&" from this line and the plugin will work fine with PHP 5.3 and above

c0mm
09-01-2010, 01:43 PM
I want to disallow registered user logins or rather page editing. I guess I just change the permissions for regular users in mediawiki.

grey_goose
10-19-2010, 11:55 AM
when i use this mod, my users can't change mediawiki skins; if i disable it, they can. is this by design? am i missing something?

sub_ubi
11-08-2010, 07:49 PM
Users can not login through the Wiki side. Any ideas what I'm doing wrong?

Digital Jedi
01-04-2011, 04:00 AM
anyone could tell me how to save user preference in wiki please?
What do you mean by User Preferences?

Digital Jedi
01-04-2011, 07:00 AM
Ah, I see. I don't have any trouble saving mine. Is everything else saving as expected, like entires and articles?

Big Kahuna
01-15-2011, 12:00 PM
I have been using this add on with VB3.8 for some time, and my concern with losing access to my Wiki has kept me from upgrading to VB4. It appears that this addon is no longer supported and usable for VB4

Mark Hewitt
01-20-2011, 09:24 AM
Anyone got this working with vBulletin 4.x?

I have vBulletin 4.1.1 and MediaWiki 1.16.0

augrunt
01-24-2011, 10:40 AM
Works fine on vB 4.1.1 and MediaWiki 1.16.0 -- EXCEPT I keep seeing a lot of "Unknown Location" but it has the path okay.

augrunt
01-24-2011, 10:52 AM
Scratch that, the path is not okay.

e.g.
forums.site.com
wiki.site.com

If user is browsing wiki.site.com/index.php?title=Special:WhatLinksHere
They see

Unknown Location
/index.php?title=Special:WhatLinksHere

and it links to the relative URL... so the link goes to forums.site.com/index.php?title=...

Not good at all... anyone got a fix for this? the hooks aren't working because MediaWiki isn't sending back the full path.

dutchbb
01-24-2011, 08:24 PM
I just upgraded to the latest PHP, I get this on the Wiki:

Detected bug in an extension! Hook vBSSOAutoAuth failed to return a value; should return true to continue hook processing or false to abort.
Backtrace:

#0 /home/tijl/domains/mydomain.com/public_html/wiki/includes/User.php(748): wfRunHooks('UserLoadFromSes...', Array)
#1 /home/tijl/domains/mydomain.com/public_html/wiki/includes/User.php(221): User->loadFromSession()
#2 /home/tijl/domains/mydomain.com/public_html/wiki/includes/User.php(1637): User->load()
#3 /home/tijl/domains/mydomain.com/public_html/wiki/includes/User.php(1895): User->getOption('skin')
#4 [internal function]: User->getSkin()
#5 /home/tijl/domains/mydomain.com/public_html/wiki/includes/StubObject.php(58): call_user_func_array(Array, Array)
#6 /home/tijl/domains/mydomain.com/public_html/wiki/includes/StubObject.php(184): StubObject->_call('getSkin', Array)
#7 /home/tijl/domains/mydomain.com/public_html/wiki/includes/Article.php(682): StubUser->__call('getSkin', Array)
#8 /home/tijl/domains/mydomain.com/public_html/wiki/includes/Article.php(682): StubUser->getSkin()
#9 /home/tijl/domains/mydomain.com/public_html/wiki/includes/Wiki.php(437): Article->view()
#10 /home/tijl/domains/mydomain.com/public_html/wiki/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#11 /home/tijl/domains/mydomain.com/public_html/wiki/index.php(93): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#12 {main}

Anyone willing to help out?

Edit: solution found https://vborg.vbsupport.ru/showpost.php?p=1884076&postcount=73

seovb_m4carbine
02-02-2011, 12:08 AM
For everyone running into 404 not found errors on a mediawiki login.
I'm not sure if my scripts were configured correctly or not to begin with (took over a project), so this problem may only exist for me...but anyhow.

I was able to fix this by modifying the /includes/templates/userlogin.php file. This file controls the action attribute of the login form, and it currently points to vB's login.php file, which takes an optional url GET variable, telling the script where to redirect the user after login.

You just need to modify the userlogin.php template file to create the correct value for the return url.

I did this by changing:


$base_mw_url = $vbulletin->options['mmog_wiki_path'] . ( $vbulletin->options['mmog_wiki_short_url'] ? '/' : '/index.php/' );


To:
$base_mw_url = $vbulletin->options['mmog_wiki_path'] . ( $vbulletin->options['mmog_wiki_short_url'] ? '/' : '/index.php?title=' );

And:
$redirlink = '?url=' . $base_mw_url . $returnNS;

To:
$redirlink = '?url=' .$vbulletin->options['bburl']. $base_mw_url . $returnNS;

Gryphon
02-16-2011, 12:18 AM
any idea to save user preferences please?
Digital Jedi are you using mw 1.16

Trying to figure this out myself, http://wiki.planetside-universe.com/ps/Special:Version

Disabling the extension, preferences save just fine.

Edit: I have worked around the issue. I am unsure what consequences it may have, but so far everything appears to be working as intended.

I changed
else
{
$u->clearInstanceCache( 'id' );
$u->load();
}

to
else
{
//$u->clearInstanceCache( 'id' );
$u->load();
}

jerseyda6
06-11-2011, 05:31 AM
has this ever been solved?

Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text.

is this the result of not turning off magic quotes?

grey_goose
06-11-2011, 02:21 PM
Edit: I have worked around the issue. I am unsure what consequences it may have, but so far everything appears to be working as intended.

You are awesome, thank you so much!

jezza101
06-26-2011, 06:11 PM
Anyone had a go at upgrading to mediawiki 1.17? Currently on vb 4 and MW 1.16 here.

edit:
Well I tried it, it kinda worked. Got an error on disabledcache(), did a quick fix. Would like to hear from anyone who got this and found a "proper" fix.

Smitty
01-02-2012, 09:48 PM
Any news on this mod? Just curious. I have an old mod from NuHit (vbWiki Pro BFO-1_3 RC5) and an old version of Mediawiki (1.11) that I installed back in 2007. I recently migrated to a new server and the script broke. I'm looking at alternatives. I paid a fellow here to upgrade the old NuHit mod and what ever else necessary and essentially he failed. Well, things digressed quickly after the agreement, he started complaining about the number of files he would have to update and such. The original agreement was 12 to 15 hours to update the old NuHIT mod and upgrade the mediawiki version if necessary.

On his test bed server eventually he did take this mod and upgraded from mediawiki 1.11 to 1.14 which appears to be functioning correctly on his test bed server. Not a big deal, but he also had to hard code the forum header and footer into a couple of mediawiki files since this mod doesn't pull in the headers and footers from vB templates like the old NuHit mod did.

I forget the reasoning, but he said only mediawiki 1.14 would work with this and that mediawiki 1.11 would not work on the new server. Yet, I see from reading posts in this thread some folks are using mediawiki 1.16.

The mod still works on my old server at 74.86.229.138/wiki/index.php/Main_Page - NOTE: The mod he did only has the left sidebar. He was having problems making a right sidebar, but that wasn't a big deal because I only needed the left sidebar so that isn't an issue. Bottom line is I'm sure I can find a "skinner" if necessary to address the "look".

OLD SERVER:
centos-release-5-5.el5.centos
Web Server - Apache v2.2.3
PHP - 5.1.6
MySQL Version - 5.0.77-log
perl, v5.8.8 built for i386-linux-thread-multi
vBulletin 3.8.4
vbWikiPro (version 1.3 RC5)

NEW SERVER:
centos-release-6-1.el6.centos.6.x86_64
Web Server - Apache v2.2.15
PHP - 5.3.3
MySQL Version - 5.1.52
perl, v5.10.1 (*) built for x86_64-linux-thread-multi
vBulletin 3.8.7 (upgraded after the migration and after I found the NuHIT mod didn't work)
MediaWiki: 1.11.0

If anyone has any ideas or thoughts on this I would appreciate them.

canyoncomposite
01-05-2012, 02:45 AM
I'm having a issue that I can hopefully get help on.

My forum is located at www.compositescentral.com, the wiki is located at www.wiki.compositescentral.com


When I try logging in on the wiki, I get redirected to vBulletins login confirmation page, then redirected to the wiki. However I am still not logged in on the wiki. What could be the cause of this issue?

canyoncomposite
01-06-2012, 03:13 AM
Ok some progress.

I can get this working perfectly with 1.14. Just for the hell of it I tried with wikimedia 1.18 but it had some problems.

When I run the wiki in a different directory than my forum, everything works fine except the user is never logged in since the cookie doesn't take.

When I put the wiki in the same directory as my forum, I get a 500 error.

Peter Walker
02-04-2013, 10:57 PM
Hi,
I am using this hack with vb 3.8.7 and have run into problems after upgrading to a new server.

My forum and wiki:
http://www.rifeforum.com/forum
http://www.rifeforum.com/wiki (short url).

I am using Mediawiki 1.14.0 with version 2.20 of this hack. Before I upgraded to a new server, this worked perfectly.

I also tried Mediawiki 1.15.0, but the problem was not solved.

The wiki and forum work by themselves perfectly. However as soon as I try to link the two with the following entries in LocalSettings.php, the wiki crashes:

define( VB_SYSTEM_PATH, '/var/www/vhosts/rifeforum.com/httpdocs/forum' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

I then get:

Server error
The website encountered an error while retrieving http://www.rifeforum.com/wiki/Main_Page. It may be down for maintenance or configured incorrectly.


I have carefully checked that I have followed every installation step.

Have also implemented this:

Line 264 of includes/AuthPlugin_vBSSO.php:

Replace
function vBSSOAutoAuth(&$user) {
with
function vBSSOAutoAuth($user) {


What am I doing wrong?

I really need to get this fixed and no matter what I try, I always get the server error as soon as I add those lines.

This all worked perfectly on the old server, but now it is broken. VB and MW versions are the same as they were on the old server.

Peter

Peter Walker
02-06-2013, 02:09 PM
I have just tried this hack with a new installation of Mediawiki 1.16.5 and an empty wiki and still it will not connect to vBulletin without the error message:

Server error

The website encountered an error while retrieving http://www.rifewiki.org/wiki/Main_Page. It may be down for maintenance or configured incorrectly.

So all attempts with MediaWiki 14-16.5 have failed. This is really annoying and hope someone here can help me get this running properly. It worked fine on the old server so I suspect there is a problem with a newer version of PHP.

PHP: 5.3.10-1ubuntu3.5
PHP Max Post Size: 32.00 MB
PHP Maximum Upload Size: 32.00 MB
PHP Memory Limit: 128.00 MB
MySQL Version: 5.5.28-0ubuntu0.12.04.2
MySQL Packet Size: 128.00 MB

I have been trying everything I could find for over a week now and still cannot get past this problem. The forum is running perfectly, no problems there. The Wiki runs fine until I try to link both with this hack and then it crashes. It all worked perfectly on the previous server for years, now this.

Regards

Peter

azn_romeo_4u
02-09-2013, 10:31 PM
Does anyone have older versions of mmediawiki they can let me download. I can't get below 1.18

Peter Walker
02-10-2013, 12:01 AM
Does anyone have older versions of mmediawiki they can let me download. I can't get below 1.18

Sure, which version do you need?

For example, version 1.15 and 1.16 can be downloaded here:

http://dumps.wikimedia.org/mediawiki/1.15/
http://dumps.wikimedia.org/mediawiki/1.16/

azn_romeo_4u
02-17-2013, 08:34 AM
Ty. That's what I been looking for.

Now I ran into a problem


Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service

pcam
02-19-2013, 12:36 PM
Strict Standards: Declaration of vBSSO::modifyUITemplate() should be compatible with AuthPlugin::modifyUITemplate(&$template, &$type) in/usr/home/user/website.com/public/wiki/includes/AuthPlugin_vBSSO.php on line 35

Strict Standards: Declaration of vBSSO::initUser() should be compatible with AuthPlugin::initUser(&$user, $autocreate = false) in/usr/home/user/website.com/public/wiki/includes/AuthPlugin_vBSSO.php on line 35

Anybody know how to fix this?

I got the first error to disappear (although don't know if its correct) by editing line 73 of AuthPlugin_vBSSO.php

function modifyUITemplate( &$template, &$type ) {
# Override this!
$template->set( 'usedomain', false );

}

Line 237

function initUser( &$user, $autocreate=false ) {


Leaving me to this error:

Notice: Constant CWD already defined in /usr/home/user/website.com/public/global.php on line 17

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 55

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 107

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 111

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 119

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 130

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 134

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 142

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 211

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/init.php on line 389

Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/user/website.com/public/includes/class_core.php on line 2552
Parser::disableCache can only be called when actually parsing something

By adding error_reporting(E_ALL & ~E_NOTICE & ~8192); to the top of vb's global.php I got the deprecated warnings to disappear leaving me back at the original problem of Parser

Reference Links:

http://svn.wikimedia.org/doc/classAuthPlugin.html

https://vborg.vbsupport.ru/showthread.php?t=285695