vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Integration with vBulletin - MediaWiki/vBulletin Single Sign-On (https://vborg.vbsupport.ru/showthread.php?t=213102)

NoeJeko 05-06-2009 10:00 PM

MediaWiki/vBulletin Single Sign-On
 
1 Attachment(s)
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

Demo of plugin in action: MyMMOGames - Multiplayer Gaming and Media Community

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:

Quote:

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.

Code:

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

Quote:

Originally Posted by SemperFideles (Post 1807599)
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:

Quote:

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:

Quote:

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:

Quote:

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?


Quote:

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
Directory: /w with virtual directoy /wiki (pretty names)

VB Forum: 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, but I would prefer to use the dedicated 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 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 and 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 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 first and then switch to the Wiki at 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 and Help 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 CMPS v3.1.0 installed on my forum, people why type in www.rifeforum.com or 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 while those who used www.rifeforum.com are left where they are in the CMPS. Calls to 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) 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

Quote:

Originally Posted by BRotondi (Post 1808214)
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

Quote:

Originally Posted by NoeJeko (Post 1808260)
@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

1 Attachment(s)
Quote:

Originally Posted by BRotondi (Post 1808214)
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? :-?

Quote:

Originally Posted by BRotondi (Post 1836982)
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 Code:

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

Quote:

Originally Posted by alanhoskins (Post 1837889)
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

Quote:

Originally Posted by mattpist (Post 1835589)
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?


All times are GMT. The time now is 08:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01525 seconds
  • Memory Usage 1,890KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete