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)

GoodOmens 11-19-2008 02:48 PM

Ok a new bug popped up recently:

Users can no longer edit ANYTHING. I get the following error:

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.
If I remove the plugin everything works fine.

No changes have been made by me so I'm really scratching my head on this one.

Only thing I can think of is changes in latest vbulletin.

NoeJeko 11-19-2008 02:54 PM

it sounds like you didn't make the required changes to class_core.php or the changes were overwritten by a vB upgrade. Remember if you upgrade your forum you must reapply the changes to class_core.php.

Posted from my Blackberry, please excuse spelling.

GoodOmens 11-19-2008 02:58 PM

Quote:

Originally Posted by NoeJeko (Post 1668701)
it sounds like you didn't make the required changes to class_core.php or the changes were overwritten by a vB upgrade. Remember if you upgrade your forum you must reapply the changes to class_core.php.

Posted from my Blackberry, please excuse spelling.

That is exactly what it was. I forgot a manual edit of the vbulletin files was necessary. Thanks for the quick reply - everything is working perfectly again!

Consider this a user error :o

NoeJeko 11-20-2008 12:16 AM

Hopefully they'll work something into vBulletin so that I don't have to do this in the future. I posted in the "hook requests" forum on vb.com but it isn't really a hook I'm after... more like an option to disable the input cleaner for certain scripts.

seoranter 11-21-2008 12:30 PM

Quote:

Originally Posted by shikareez (Post 1640896)
From MW 1.13+ the "AutoAuthenticate" Hook is renamed to "UserLoadFromSession". So just follow all the instruction and at all, just edit the hook name to "UserLoadFromSession" at near the end of AuthPlugin_vBSSO.php.

Thanks a million for posting this! Can we have this updated / included in the latest version of the plugin, too, please? Perhaps switching between userloadfromsession and autoauthenticate based on mw version at install / runtime?

In the meantime, I'll mark as installed and satisfied :)

leitel 11-21-2008 04:36 PM

I have it running now. This is an awesome hack. I did notice though that in vB when looking at a user and where there are I get: Current Activity: Unknown Location /index.php/Erythropoietin_(EPO) .
My wiki is on a sub.domain although URLs to domain.com/wiki will resolve to the sub domain.
I have tried various "Wiki Path" in the vB options.
So basically, the Who's On doesn't see the path of the wiki and the link DOES point to the correct wiki page however, it is without the base wiki domain.

NoeJeko 11-21-2008 05:52 PM

Quote:

Originally Posted by seoranter (Post 1669998)
Thanks a million for posting this! Can we have this updated / included in the latest version of the plugin, too, please? Perhaps switching between userloadfromsession and autoauthenticate based on mw version at install / runtime?

In the meantime, I'll mark as installed and satisfied :)

Yeah, it'll be implemented but I need to upgrade my own wiki to 1.13 before I can reasonably support it on that platform. I've been swamped with other projects - that's why I've just dropped by to provide quick support when I can but it will get done by the end of the year.

Quote:

Originally Posted by leitel (Post 1670154)
I have it running now. This is an awesome hack. I did notice though that in vB when looking at a user and where there are I get: Current Activity: Unknown Location /index.php/Erythropoietin_(EPO) .
My wiki is on a sub.domain although URLs to domain.com/wiki will resolve to the sub domain.
I have tried various "Wiki Path" in the vB options.
So basically, the Who's On doesn't see the path of the wiki and the link DOES point to the correct wiki page however, it is without the base wiki domain.

That's odd - I may have an idea on how to get around this but as it isn't security-related I'll queue it with the above request. Keep in mind, your users cannot see the "Unknown Location" - just staff (we had a few mods on our board that didn't know that).

Thanks to everyone for your support and using this mod.

NoeJeko 11-21-2008 06:13 PM

Double post ftw.

I just realized what's causing this and /facepalm for not realizing it beforehand.

You can add this line to the .htaccess file in your wiki directory and then the change to class_core.php is not necessary:

php_flag magic_quotes_gpc off

If you don't have a .htaccess file in your wiki directory, just create it. This applies to servers running Apache only. Alternatively, you can disable magic_quotes_gpc in php.ini.

This feature is depreciated as of PHP 6.0.0 anyway, so it makes sense to start coding with the mentality that your input no longer has this shield. I'll update the installation instructions when I make the next major update; it doesn't make sense to advertise an update for this minor change. Future versions will not require the code change.

BRotondi 11-23-2008 02:56 PM

Sorry for asking the same, but I cannot find the solution in the thread: Does this Hack work with vBulletin 3.7.4 and MediaWiki 1.13?

Login via Wiki does not work... (Redirecting to vB, but nothing happens. I restored the original Userlogin.php to be able to login...)

Thanks for a short info.
Bruno

NoeJeko 11-23-2008 03:03 PM

vB 3.7.4 just came out recently; I haven't had time to test this plugin against it.

BRotondi 11-23-2008 05:10 PM

Thanks for the Info. So it should work with 3.7.3 and 1.13?

NoeJeko 11-24-2008 01:13 AM

vB 3.6.9-3.7.3 / MW 1.12. There are steps in this thread to get it to work with 1.13 but I haven't integrated them into the package yet.

I do intend to make this compatible with vB 3.8 when it is released.

Also, I've added PayPal information so the "Support Developer" links are now active. It's not a requirement for use (else it wouldn't be called a donation, heh) but if users like this mod a small donation would be greatly appreciated =]

GoodOmens 11-24-2008 03:12 AM

Quote:

Originally Posted by NoeJeko (Post 1670202)
Double post ftw.

I just realized what's causing this and /facepalm for not realizing it beforehand.

You can add this line to the .htaccess file in your wiki directory and then the change to class_core.php is not necessary:

php_flag magic_quotes_gpc off

Just confirmation this works fine (after an update to 3.7.4 P1) on Apache 2 and PHP 5.

BRotondi 11-24-2008 03:17 AM

I tried the AuthPlugin_vBSSO.php for MediaWiki 1.13 here... but it does not work 100%:
- login/logout through Wiki does not work
- logout through Forum does not work
- but login through Forum works

Anyone got it to work with 1.13 and 3.7.4?

Bruno

NoeJeko 11-24-2008 03:23 AM

I'll try to get a working version for 1.13/3.7.4 out by the end of this week. I have a few days off from my job but I have a major project coming up with my startup.

BRotondi 11-24-2008 03:28 AM

Tried also only to change AutoAuthenticate to UserLoadFromSession (#115)... same effect...
Thanks for your efforts!

It does not really hurry for me... but I'm curious about bringing it to work :)
Bruno

BRotondi 11-24-2008 03:45 AM

And a little hint: Use vars in LocalSettings.php for "Forgot password" and "Please use your forum information for login. Login across the forum and wiki is the same"

since other languages need to update this
German: "Passwort verloren", "Bitte verwenden Sie für die Anmeldung die selben Login-Daten wie fürs Forum." (not perfect, perhaps someone can improve this...)

Bruno

Big Kahuna 11-26-2008 02:40 AM

Quote:

Originally Posted by carrlos (Post 1646834)
Thanks a million shikareez!! That did the trick!!

From this point on I solemnly swear to read all posts on all pages before installing any add-on!! I actually had 1.12 installed then upgraded before installing this!!! :D

Edit:
Is the link in Who's Online suppose to go to a download of the opensearch_desc.php file?????

http://www.androidmodding.com/photog...2_download.gif

http://www.androidmodding.com/wiki



Yeah I'm bummed too. I spent a whole freaking day trying to figure out what I was doing wrong with retracing my steps over and over and over again. I've got VB3.7.4.patch 1 and MW 1.12.1 and after 9 hours don't have it working.

I really wish the original post would actually say that it won't work with MW1.13.1 in red bold. Sure could save a lot of people from wasting a whole day.

www.moparstyle.com/forums
www.moparstyle.com/wiki

Big Kahuna 11-26-2008 02:44 AM

I someone ever figures this out -- please email me at dave@oldhippie.com so I can get back on this.

NoeJeko 11-26-2008 02:52 AM

I'll update this thread when I get it working.

Digital Jedi 11-26-2008 11:18 AM

Quote:

Originally Posted by Big Kahuna (Post 1673112)
Yeah I'm bummed too. I spent a whole freaking day trying to figure out what I was doing wrong with retracing my steps over and over and over again. I've got VB3.7.4.patch 1 and MW 1.12.1 and after 9 hours don't have it working.

I really wish the original post would actually say that it won't work with MW1.13.1 in red bold. Sure could save a lot of people from wasting a whole day.

www.moparstyle.com/forums
www.moparstyle.com/wiki

There's a fix posted within the thread to get it working with 1.13.1 and it's posted two pages back.

BRotondi 11-26-2008 11:22 AM

I tried it, but it's not working 100% (see above)...
Bruno

1.13.2 / 3.7.4 SP1

Jaxel 11-26-2008 11:37 AM

I use VB 3.7.4.PL1 and MW 1.13.2 and everything is working fine...
(Follow this to get it working: https://vborg.vbsupport.ru/showpost....6&postcount=98)

Also... you DONT need to edit class_core.php...
I found a different way as I really dont like editing VB core files...

In wiki/includes/User.php find:
PHP Code:

define'EDIT_TOKEN_SUFFIX''+\\' ); 

Replace with:
PHP Code:

define'EDIT_TOKEN_SUFFIX''+#+' ); 

Thats it. http://www.8wayrun.com/wiki/Special:Version

Digital Jedi 11-26-2008 11:40 AM

Quote:

Originally Posted by BRotondi (Post 1673278)
I tried it, but it's not working 100% (see above)...
Bruno

1.13.2 / 3.7.4 SP1

Try downloading the file he fixed himself from two pages back. He uploaded a file where me made the edits himself and it works perfectly for me.

Picolet 11-26-2008 01:39 PM

http://semantic-mediawiki.org/wiki/Semantic_MediaWiki

Semantic MediaWiki (SMW) is a free extension of MediaWiki ? the wiki-system powering Wikipedia ? that helps to search, organise, tag, browse, evaluate, and share the wiki's content. While traditional wikis contain only texts which computers can neither understand nor evaluate, SMW adds semantic annotations that bring the power of the Semantic Web to the wiki. http://semantic-mediawiki.org/wiki/Semantic_MediaWiki

BRotondi 11-26-2008 01:43 PM

I tried this already (last poste on Page 9)...

Bruno

Jaxel 11-26-2008 02:30 PM

What is all that extra stuff that Veridiac did to AuthPlugin_vbSSO.php? All I did is rename AutoAuthenticate to UserLoadFromSession and everything works fine. Why was all that extra stuff necessary?

BRotondi 11-26-2008 03:02 PM

What Versions do you use?

obsidian 11-27-2008 05:39 AM

I just got everything running with Vb 3.72 and MW 1.13.
Steps I followed:
- Install media Wiki
- Edit the Localsettings file with

define( VB_SYSTEM_PATH, '/var/www/html/forum' );
require_once( "$IP/includes/AuthPlugin_vBSSO.php" );
$wgGroupPermissions['*']['createaccount'] = false;

- Set the VB path in the localsettings file and then uploaded it.
- Edited the AuthPlugin_vBSSO.php file from:
$wgHooks[AutoAuthenticate ][] = 'vBSSOAutoAuth';
to
$wgHooks['UserLoadFromSession'][] = 'vBSSOAutoAuth';
- uploaded the files in the upload directory

- edited User.php as stated in Post #143

After that I just went to the Wiki page and refreshed and it showed me logged in. I did not make any of the class_core.php edits.

Great Hack... just takes a bit of patience to work through it due to all the new versions.

BRotondi 11-27-2008 05:50 AM

the class_core hacks are not necessary for login, only for "user count/where is the user" inside vB. For such a thing you need to edit the core...
Thanks for the information, I will try it again!

Bruno

BRotondi 11-27-2008 05:59 AM

I did all you said but still have the same problem... Are you sure it works 100%? Please check the following:
1. login from vB -> check at wiki
2. logout from wiki -> go back and see if inside wiki really logged out
3. login from Wiki -> check at vB and wiki

If it works for you I'm really curious what vB changed from 3.72 to 3.74 ...

Bruno

Big Kahuna 11-27-2008 02:25 PM

OK -- I'm really really confused as to where to go from here as this thread has jumped all over and I can't figure out the good information from the bad information.

What I've done so far is to follow the instruction in the upload:
Code:

STEP 1: Upload the contents of the "upload" directory into your wiki root directory.  Edit
    LocalSettings.php find this line:

        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" );

    VB_SYSTEM_PATH should be the full filesystem path to your vBulletin installation.  If
    you don't know the full path, change to your forum home directpry and type pwd in a shell.
    It will print the current directory.  Ensure you do not add a trailing slash to VB_SYSTEM_PATH!

    You no longer have to edit anything in AuthPlugin_vBSSO.php or Userlogin.php

    If you have anything in LocalSettings for $wgGroupPermissions['*']['createaccount'], change
    all instances of 'createaccount' to false.  If you don't have anything in your
    LocalSettings.php for 'createaccount', add this line after the two you just added:

        $wgGroupPermissions['*']['createaccount'] = false;

    This is important so that new users create a forum account instead of a wiki account.  If
    they create a wiki account by mistake, they will not be able to log in.
   
STEP 2: Edit class_core.php (found in <forumhome>/includes).  Why?  vBulletin will mangle a security
    token needed by MediaWiki.  If you do not make this change, your users will not be able to
    edit your wiki.  It's really simple and it's worked across vB 3.6.9, 3.7.1, and 3.7.3.

    In class_core.php, search for this block of code:

                // reverse the effects of magic quotes if necessary
                if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc())
                {
                        $this->stripslashes_deep($_REQUEST); // needed for some reason (at least on php5 - not tested on php4)
                        $this->stripslashes_deep($_GET);
                        $this->stripslashes_deep($_POST);
                        $this->stripslashes_deep($_COOKIE);

                        if (is_array($_FILES))
                        {
                                foreach ($_FILES AS $key => $val)
                                {
                                        $_FILES["$key"]['tmp_name'] = str_replace('\\', '\\\\', $val['tmp_name']);
                                }
                                $this->stripslashes_deep($_FILES);
                        }
                }


    Replace it with this:

                // reverse the effects of magic quotes if necessary
                if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc())
                {
                        if ( THIS_SCRIPT != 'wiki' ) {
                                // MMOG Wiki hack
                                $this->stripslashes_deep($_REQUEST); // needed for some reason (at least on php5 - not tested on php4)
                                $this->stripslashes_deep($_GET);
                                $this->stripslashes_deep($_POST);
                                $this->stripslashes_deep($_COOKIE);

                                if (is_array($_FILES))
                                {
                                        foreach ($_FILES AS $key => $val)
                                        {
                                                $_FILES["$key"]['tmp_name'] = str_replace('\\', '\\\\', $val['tmp_name']);
                                        }
                                        $this->stripslashes_deep($_FILES);
                                }
                        }
                }

STEP 3: Import the product product-mmog_wiki.xml via your Admin CP.  This is the hack that shows the users in
    "Who's Online" instead of "Unknown Location" and also configures your login/wiki paths.

    Go to your vBulletin Options and look for MMOG Wiki Options.  Change "Wiki Path" to the URL path of your wiki.
    If your wiki is on a different subdomain, you need to put the full URL of your wiki path minus the trailing
    slash.  Otherwise, just a relative directory is fine.


So what do I need to do to get this to work?


1. replace modified class_core.php back with the original unmodified version?

2. Edited the AuthPlugin_vBSSO.php file from:
$wgHooks[AutoAuthenticate ][] = 'vBSSOAutoAuth';
to
$wgHooks['UserLoadFromSession'][] = 'vBSSOAutoAuth';

3. edited User.php as stated in Post #143 (which mediawiki or vbulletin?)

4. Do I make any changes in my LocalSettings.php -- beyond what I did in the instructions?


Am I missing anything on what I need to do to take this from where doing everything in the readme.txt to getting this to work?

BRotondi 11-27-2008 02:35 PM

Which Versions do you use?

Big Kahuna 11-27-2008 03:15 PM

Vb 3.74.1
Mw 1.13.2

BRotondi 11-27-2008 03:53 PM

does not work.... I have the same Versions...

BRotondi 11-27-2008 05:36 PM

With this versions it is possible to login via vB in Wiki AND vB, but as written above you cannot logout both or login through Wiki.

NoeJeko will try to solve the problem. We need some patience... :)

Bruno

NoeJeko 12-01-2008 04:07 PM

I am working the issue. Right now I can only claim compatibility with vB 3.6.9-3.7.3 and MW <= 1.12.

BRotondi 12-01-2008 04:23 PM

1001 Thanks! ... hope you dont lose to much time with this...

rlfs 12-05-2008 09:06 PM

Check the MediaWiki 1.13.2 RELEASE-NOTES file.

* AutoAuthenticate hook renamed to UserLoadFromSession

I had to change that hook in includes/AuthPlugin_vBBSSO.php below:

//$wgHooks['AutoAuthenticate'][] = 'vBSSOAutoAuth';
$wgHooks['UserLoadFromSession'][] = 'vBSSOAutoAuth';

Otherwise Single-Signon did not work with MediaWiki 1.13.2.

FYI for y'all.
Rick

BRotondi 12-06-2008 04:01 AM

Thanks for your feedback. This is written above, but you still will not be able to
1. logout from wiki -> go back and see if inside wiki really logged out
2. login through Wiki -> check at vB and wiki

Or does it work on your side?

Bruno


All times are GMT. The time now is 12:47 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.01488 seconds
  • Memory Usage 1,861KB
  • 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
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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