vb.org Archive

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

NoeJeko 09-17-2008 10:00 PM

MediaWiki/vBulletin Single Sign-On
 
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.7.x. For vB 3.8.x, please use the MediaWiki/vBulletin Single Sign-On 3.8 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

nroe 09-18-2008 06:25 AM

wow, thanks man

Milchi 09-18-2008 06:53 AM

Great one!

NoeJeko 09-18-2008 06:56 AM

I'm hoping that I didn't miss anything when I tried to "package" it for redistribution. If I did, just post a note here and I'll get to it ASAP.

Also, that "demo" site is a live, production site so if you must test the SSO - please do so on your user page or user talk page - not the wiki articles. Thanks!

Webnower 09-18-2008 07:58 AM

This looks great! /install

TimberFloorAu 09-18-2008 08:20 AM

This isnt something that we would use, but can appreciate the amount of work put in, well done ^5

Ozzy

edermix 09-18-2008 12:35 PM

Very good boy ..

I will test it here.

A doubt: I need to have the MediaWiki?

Thanks

NoeJeko 09-18-2008 12:47 PM

Yeah.... you definitely need MediaWiki to use this hack.

Jaxel 09-19-2008 07:03 AM

What advantage does this have over this?
https://vborg.vbsupport.ru/showthread.php?t=136242

As well, I already have that other mod, would I be able to transfer over to this mod easily, if I find out that it is better?

NoeJeko 09-19-2008 01:07 PM

Supposedly, vBWikiStandard is a complete integration package; mine is not. vBWS hasn't been developed/supported for over a year by the original author and I didn't feel it made sense to use that product on my production servers; thus the reason mine was created.

In all honesty, if yours works and you can still upgrade your vB without worrying about breaking it, I'd use that. I'm not a fan of fixing things that aren't broken. I read pages and pages of problems out of that mod here and on NuHIT's forums and decided it wasn't for me.

valendono 09-19-2008 02:32 PM

I tried on my forum and its failed to login, because not compatible with vbseo or sumtin else?

Quote:

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron|wiki/)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images|wiki )/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]
still cannot login, I mean login success but not on wiki, its on forum.

Notes: I already follow readme.txt - sumtin I miss ?

NoeJeko 09-19-2008 02:58 PM

Please post a url to your forum and wiki. Also, what versions of vB and MW are you using? I don't think its vBSEO as I use this on 2 forums with vBSEO.

Posted from my Blackberry, please excuse spelling.

Elenna 09-25-2008 12:54 PM

This works wonderfully, thank you very much!

/me clicks install and nominates for MOM.

NoeJeko 09-25-2008 05:08 PM

Thanks!

To those posting support requests, I cannot help you if I don't have links to your forum and wiki. Also, if you see me not online for a few weeks don't worry - I get real time notifications of replies to this thread via Blackberry so I'll drop in as I see posts. The project will remain active as I use this product on my own site.

daFish 09-26-2008 10:13 AM

This looks like a very promising addon. However, do you support the login from an wiki which resides on the same server but under a different domain?

E.g.:

Board: www.domainboard.com/board
Wiki: www.domainwiki.com

Brian30fl 09-26-2008 10:58 AM

quick question how did u get ur wiki to mach ur forums layout?

NoeJeko 09-26-2008 09:18 PM

Quote:

Originally Posted by daFish (Post 1630787)
This looks like a very promising addon. However, do you support the login from an wiki which resides on the same server but under a different domain?

E.g.:

Board: www.domainboard.com/board
Wiki: www.domainwiki.com

I do not. Cookies cannot be shared across domains - just subdomains. If you want to achieve single sign-on across different domains you'll need a SAML token or some other federated authentication method - and that is outside the scope of this plugin.

Quote:

Originally Posted by Brian30fl (Post 1630803)
quick question how did u get ur wiki to mach ur forums layout?

I modified the MonoBook Wiki skin manually - the plugin is for single sign-on and user integration only.

For all - I've put in a request for a new hook and/or Admin CP option. This will eliminate the need to modify class_core.php if accepted and I'll try to make the integration process easier in the future.

leonnix 09-27-2008 03:32 PM

I'm so interested in this hack ! but I have a problem, for some reasons I have to set /mysite.com to be able to send and receive email from from users. Is there a way to make this hack work in my situation !

NoeJeko 09-27-2008 03:51 PM

Could you be more specific?

leonnix 09-27-2008 05:57 PM

Sorry! I was talking about the cookie path but I set my cookie path to back "/" , everything works fine now !

I haven't installed this mod yet but I'd like to have my site look similar to yours after installing.

I wanna make my wiki match my forum layout, but I don't know how. Could you help me on this matter ?

Below is my site and wiki:

Site: http://www.rowiki.net
Wiki: http://www.rowiki.net/wiki

NoeJeko 09-27-2008 06:02 PM

To do it as I did, you have to modify an existing wiki skin or create your own. It's a fair amount of work since MediaWiki uses absolute positioning and that's outside the scope of this plugin. Sorry, but I just don't have time for requests such as this.

leonnix 09-27-2008 06:04 PM

I can try to do it on my own ! I just need your tips on this; cause I don't know where to begin !

NoeJeko 09-29-2008 06:54 PM

Sorry but I really don't know what to tell you - you can just do what I did and modify one of the existing MediaWiki skins. I used MonoBook.

It's possible, but unlikely, that this could develop into a full integration (skin/users/etc) one day but I'm really not inclined to do that as it works as I have it. Hopefully the vB team will take my request into consideration so I can just package this as one product and one wiki plugin.

BRotondi 09-29-2008 07:14 PM

Thanks for this Addon! It is really, what I searched for ... and I also almost bought vbWiki Pro.

I also changed the following, which perhaps also helps other users:
a) Before each Forum description I add a Link "wiki" which referrs to the wiki page oft this forum
  • ACP -> Foren -> before each description <a href="../wiki/index.php?search=TITLE&go=Seite">Wiki</a>&nbsp;&nbsp;
b) Added a wiki-Button http://SinnImLeben.net/tmp/wiki.gif in the Editor with a customized BB-Tag (save to images/editor/wiki.gif)
  • ACP -> BB-Codes
    • BB-Code [wiki=Thema]Beschreibung[/wiki]
    • HTML-Code <a href="../wiki/index.php?search={option}&go=Seite">{param}</a>
    • Image: wiki.gif
This is my part to say thanks :D

Are there other interesting MediaWiki-Integration-Hacks?

Thanks!
Bruno

BRotondi 09-29-2008 07:53 PM

In your Readme some things are unclear:
STEP 3
Edit LocalSettings.php.
-> Do you mean the one on the wiki-root?

Add this line after DefaultSettings
-> do you mean after require_once( "includes/DefaultSettings.php" );?

Now, change/add this setting:
$wgGroupPermissions['*']['createaccount'] = false;
-> do you mean after require_once( "$IP/includes/AuthPlugin_vBSSO.php" );
STEP 4
Edit class_core.php
-> do you mean [vB]/includes/class_core.php

STEP 5
Import the product
-> do you mean ACP -> Addons&Plugins -> Addons -> Upload from your Computer

Edit the plugin "MMOG Wiki: Online Location Hack"
-> This I do not understand at all...

I'm new in Hacks, but perhaps not the only one, so perhaps also others are unsure on what to do...
But anyway 1001 Thanks for the Hack!!

Bruno

BRotondi 09-29-2008 08:07 PM

I skipped the red step above and tested what I've done yet:
- vBulletin still works
- wiki first not, but the problem was obvious:

_________________________________
Warning
: require_once(/sinnimleben.net/forum/global.php) [function.require-once]: failed to open stream: No such file or directory in /home/.lukey/br_noreply/sinnimleben.net/wiki/includes/AuthPlugin_vBSSO.php on line 257

Fatal error: require_once() [function.require]: Failed opening required '/sinnimleben.net/forum/global.php' (include_path='/home/.lukey/br_noreply/sinnimleben.net/wiki:/home/.lukey/br_noreply/sinnimleben.net/wiki/includes:/home/.lukey/br_noreply/sinnimleben.net/wiki/languages:.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.lukey/br_noreply/sinnimleben.net/wiki/includes/AuthPlugin_vBSSO.php on line 257
_________________________________

I realized that the FTP-Path seems not to be the same like the server path. So I changed in STEP 1
define( VB_SYSTEM_PATH, '/sinnimleben.net/forum' );
to
define( VB_SYSTEM_PATH, '/home/.lukey/br_noreply/sinnimleben.net/forum' );

Now Wiki works :), have to test the Hack itself :)

But this is also unclear: Now my users will have to register only in wiki or only in VB?

Thanks!
Bruno


BRotondi 09-29-2008 08:26 PM

(Sorry for all these messages, but with 45 downloads and 15 installs perhaps it's written really a little complicated...)

Now I cannot logoff in wiki any more, after pressing "log off" (or "sign out", here I have only german...) I got this error:
The requested URL /login.php was not found on this server.

I installed wiki to /home/.lukey/br_noreply/sinnimleben.net/wiki
and vB to /home/.lukey/br_noreply/sinnimleben.net/forum

The Link under "logout" points to http://www.sinnimleben.net/login.php?do=logout&...
which of course is false... must try to find out where I have to fix that...

Thanks for any help!
Bruno

NoeJeko 09-29-2008 08:34 PM

Wow.. that's a lot of questions and many of which I thought were ... rather obvious but I'll do my best to answer them.

Quote:

Originally Posted by BRotondi (Post 1633351)
In your Readme some things are unclear:
STEP 3
Edit LocalSettings.php.
-> Do you mean the one on the wiki-root?

There should only be one LocalSettings.php and yes it is located on the wiki root.

Quote:

Originally Posted by BRotondi (Post 1633351)
Add this line after DefaultSettings
-> do you mean after require_once( "includes/DefaultSettings.php" );?



Yes, there should be only one reference to DefaultSettings in that file and that's it.

Quote:

Originally Posted by BRotondi (Post 1633351)
Now, change/add this setting:
$wgGroupPermissions['*']['createaccount'] = false;

Quote:

Originally Posted by BRotondi (Post 1633351)
-> do you mean after require_once( "$IP/includes/AuthPlugin_vBSSO.php" );

Wherever in LocalSettings that the other account permissions are set. Look for the other similar lines and add it there. I can't give you an exact line number because your LocalSettings will be different than mine.

Quote:

Originally Posted by BRotondi (Post 1633351)
STEP 4
Edit class_core.php
-> do you mean [vB]/includes/class_core.php

There should be only one class_core.php and yes, this is where it is located.

Quote:

Originally Posted by BRotondi (Post 1633351)
STEP 5
Import the product
-> do you mean ACP -> Addons&Plugins -> Addons -> Upload from your Computer

Yes.

Quote:

Originally Posted by BRotondi (Post 1633351)
Edit the plugin "MMOG Wiki: Online Location Hack"
-> This I do not understand at all...

I'm new in Hacks, but perhaps not the only one, so perhaps also others are unsure on what to do...
But anyway 1001 Thanks for the Hack!!

Bruno

ACP->Edit Plugins->MMOG Wiki: Online Location Hack

Quote:

Originally Posted by BRotondi (Post 1633380)
(Sorry for all these messages, but with 45 downloads and 15 installs perhaps it's written really a little complicated...)

Yes, that's why I said it was cumbersome. I explained why it was complicated in the first post.


Quote:

Originally Posted by BRotondi (Post 1633380)
Now I cannot logoff in wiki any more, after pressing "log off" (or "sign out", here I have only german...) I got this error:
The requested URL /login.php was not found on this server.

I installed wiki to /home/.lukey/br_noreply/sinnimleben.net/wiki
and vB to /home/.lukey/br_noreply/sinnimleben.net/forum

Thanks for any help!
Bruno

[S]You didn't properly follow step 2 of the instructions if you're getting this error.[/S]

My mistake - this will be caused if you didn't properly set $vbsso_forumpath in AuthPlugin_vBSSO.php.

BRotondi 09-29-2008 08:58 PM

I still need your help:
Quote:

Originally Posted by NoeJeko (Post 1633387)
Wherever in LocalSettings that the other account permissions are set. Look for the other similar lines and add it there.

Sorry, I do not understand, what you mean... There is no line with Permissions or account (see Attachement)


Quote:

Originally Posted by NoeJeko (Post 1633387)
this will be caused if you didn't properly set $vbsso_forumpath in AuthPlugin_vBSSO.php.

AuthPlugin_vBSSO.php seems correct:
define( VB_SYSTEM_PATH, '/home/.lukey/br_noreply/sinnimleben.net/forum' );
$vbsso_forumpath = '/forum';

and also Userlogin.php, which already was set up correct:
$vbsso_forumpath = '/forum';
$vbsso_wikipath = '/wiki';

Quote:

Originally Posted by NoeJeko (Post 1633387)
ACP->Edit Plugins->MMOG Wiki: Online Location Hack

I changed nothing since /wiki/ ist correct...

Thanks for further helps!
Bruno

NoeJeko 09-29-2008 09:09 PM

You can skip that step; however users will show up in your "Who's Online" list as "Unknown Location" for moderators and "Viewing Index" for users.

Also, there was an error in the original AuthPlugin_vBSSO.php - a global variable was not declared as global. I have updated the plugin as necessary; please download the latest copy of it and make the required changes. Only AuthPlugin_vBSSO.php and the MMOG Wiki plugins were changed; there is no need to update Userlogin.php. I visited your forum and was able to register an account - then go to the wiki and edit my User:talk page without creating a new wiki account so it's working. This should give you the logout link functionality.

Thanks for helping me find this bug!

BRotondi 09-29-2008 09:12 PM

I got a msg that you registered in vB - Thanks! - and this step seems to work...

NoeJeko 09-29-2008 09:19 PM

Ok.. actually there is a need to update Userlogin.php - the same issue was affecting that file and your login form wasn't working from the wiki either.

Please download the (yet latest) version. Sorry about this; I added those variables after it was working on my site and I decided to redistribute it and forgot to declare them global. I shouldn't code on no sleep, heh.

After you've updated to the latest versions of the files can you let me know so I can test it out? Hopefully this clears the last of your remaining issues.

BRotondi 09-29-2008 09:21 PM

(Ups have not seen your last post)

BRotondi 09-29-2008 09:25 PM

... uploaded, but still this stupid bug...

why does he link to http://www.sinnimleben.net/login.php instead of http://www.sinnimleben.net/forum/login.php?

Bruno
If you want to have a look at the Files...

NoeJeko 09-29-2008 09:27 PM

I just checked that - did you set $vbsso_wikipath in Userlogin.php? It looks like this variable isn't set. Everything else seems to work well.

BRotondi 09-29-2008 09:30 PM

yes, I did... in the post above you see all my changes.

Please check also the $wgGroupPermissions['*']['createaccount'] = false;

I do not understand this point...

BRotondi 09-29-2008 09:31 PM

and btw: THANKS!!!!

NoeJeko 09-29-2008 09:34 PM

Quote:

Originally Posted by BRotondi (Post 1633441)
yes, I did... in the post above you see all my changes.

Please check also the $wgGroupPermissions['*']['createaccount'] = false;

I do not understand this point...

You have that properly set in LocalSettings.php. I also recommend you delete that attachment from your post now as it has login information for your MySQL database and could be used against you ;D

This is set to keep users from creating a wiki account through the wiki. It makes them create a forum account instead - which is the only way to log into the wiki after you have this hack installed.

BRotondi 09-29-2008 09:40 PM

... an idea why wiki logout still points to http://www.sinnimleben.net/login.php instead of http://www.sinnimleben.net/forum/login.php?

NoeJeko 09-29-2008 09:42 PM

Because it's cached. If you're on FireFox or Internet Explorer, press <Ctrl+F5> on the wiki page and it will force a refresh of the page from the server. Alternatively, you can clear your cache and it will display properly. I just checked it on your site and it's working.


All times are GMT. The time now is 02:04 PM.

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.01761 seconds
  • Memory Usage 1,853KB
  • 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
  • (16)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