Resource icon

[SchmitzIT] XenForo MediaWiki Bridge 2.0

No permission to download
Hi.

It's seamless, so there's nothing to really show. It basically just means that if you sign in to the forum, you won't have to sign in again when you go to the wiki.
 
On our site, it does work with 1.20. We had to disable some custom code to get that working (as that somehow interfered with the bridge), but we haven't had any complaints since.

Hi,
it doesn't work with MW 1.20.0 an XF 1.2.4 with the actual download. Is there a fix/tipp to get this running on these versions ?
There is only a not available site / commented out for the moment...
 
@SchmitzIT
After installing the add-on and going through all the optional steps etc. I get an error when attempting to load the main page of my wiki:

Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
  • Please contact the website owners to inform them of this problem.
 
@SchmitzIT
After installing the add-on and going through all the optional steps etc. I get an error when attempting to load the main page of my wiki:

Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
  • Please contact the website owners to inform them of this problem.

What happens if you disable the add-on and comment the line in LocalSettings?
 
The wiki will show up the way it normally does without the bridge.

Do you get any more info from the eror if you switch on debug mode in XF, and error_reporting in MediaWiki?

To turn on mediawiki error reporting, add the following at the bottom of the LocalSettings:

Code:
error_reporting( -1 );
ini_set( 'display_errors', 1 );
 
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
Have you tried putting $wgDisableOutputCompression = true; in LocalSettings.php like this post recommended? That ended up working for me when I had XenForo 1.1. Now I'm running XenForo 1.2.4, MediaWiki 1.19.9, and PHP 5.2.17, and the bridge still works fine.

Also make sure zlib.output_compression is enabled in your PHP settings like in this post.

Hi,
it doesn't work with MW 1.20.0 an XF 1.2.4 with the actual download. Is there a fix/tipp to get this running on these versions ?
There is only a not available site / commented out for the moment...

Did you try editing MediaWiki/Dependencies/Public.php according to this post?
 
Hi.

My MediaWiki is currently set to where no one but bureaucrats can create accounts (it's a small community). Would this bridge still work properly? If so, is there a way to disable registration on MediaWiki and only have it on XenForo?
 
The bridge will replace Mediawiki registration with XenForo registration. So anyone who can create an account in XenForo will then also be allowed in the wiki.
 
Have you tried putting $wgDisableOutputCompression = true; in LocalSettings.php like this post recommended? That ended up working for me when I had XenForo 1.1. Now I'm running XenForo 1.2.4, MediaWiki 1.19.9, and PHP 5.2.17, and the bridge still works fine.

Also make sure zlib.output_compression is enabled in your PHP settings like in this post.



Did you try editing MediaWiki/Dependencies/Public.php according to this post?

Yes i used the infos in the posts. Now the wiki is visible, but the Bridge doesn't work...
 
An exception occurred: Declaration of MediaWiki_Dependencies_Public::route() should be compatible with that of XenForo_Dependencies_Abstract::route() in /usr/www/www.mysite.ru/www/community/library/MediaWiki/Dependencies/Public.php on line 2

  1. XenForo_Application::handlePhpError() in /usr/www/www.mysite.ru/www/community/library/MediaWiki/Dependencies/Public.php at line 2
  2. include() in /usr/www/www.mysite.ru/www/community/library/XenForo/Autoloader.php at line 119
  3. XenForo_Autoloader->autoload()
  4. spl_autoload_call()
  5. class_exists() in /usr/www/www.mysite.ru/www/wiki/extensions/XenForo/setup.php at line 93
  6. MWXF_Setup::init()
  7. call_user_func() in /usr/www/www.mysite.ru/www/wiki/includes/Setup.php at line 592
  8. require_once() in /usr/www/www.mysite.ru/www/wiki/includes/WebStart.php at line 153
  9. require() in /usr/www/www.mysite.ru/www/wiki/index.php at line 46
 
I can't seem to get this working...

I'm using Xenforo 1.2 and Wikimedia 1.22.

I'm able to see the wiki but it doesn't bridge my members.

The only thing I can think of is that I'm setting the MEDIAWIKI_PATH_TO_XENFORO wrong.

So if I ssh into my server my xenforo installment can be found at /home/neochi/www and my wikimedia is at /home/neochi/www/wiki_media.

I've tried setting MEDIAWIKI_PATH_TO_XENFORO to:

../ (relative path)
/home/neochi/www (absolute path)

Both with no success.

Weird thing is, it seemed to work for a minute when I set it to "./". I was able to edit the wiki with a xenforo's member account, but then like 2 minutes later I tried again and it stopped working...

Please help.
 
Last edited:
I've noticed when I have MEDIAWIKI_PATH_TO_XENFORO set to:

../ (relative path)
/home/neochi/www (absolute path)

the Login link in mediawiki disappears though, so I'm assuming this means it's actually correct? Problem is it's still not bridged. If I login as a member and then go to the wiki, I'm not allowed to edit it.
 
Here's my LocalSettings.php

PHP:
<?php
# This file was automatically generated by the MediaWiki 1.20.4
# 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

require("$IP/extensions/XenForo/require-me.php");

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
    exit;
}

## Uncomment this to disable output compression
$wgDisableOutputCompression = true;

$wgSitename      = "App Invasion Wiki";
$wgMetaNamespace = "Site_title";

## 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
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/wiki_media";
$wgScriptExtension = ".php";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;

## The protocol and server name to use in fully-qualified URLs
$wgServer           = "http://appinvasion.com";

## The relative URL path to the skins directory
$wgStylePath        = "$wgScriptPath/skins";

## The relative URL path to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo             = "http://www.appinvasion.com/wiki_media/images/logo.png";

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

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

$wgEmergencyContact = "apache@appinvasion.com";
$wgPasswordSender   = "apache@appinvasion.com";

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

# MySQL specific settings
$wgDBprefix         = "mwiki_";

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

# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;

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

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

# InstantCommons allows wiki to use images from http://commons.wikimedia.org
$wgUseInstantCommons  = false;

## 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.utf8";

## 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;

## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";

$wgSecretKey = "4c9aebbbe8dc6a7b8e9d8bfaa7d2afb545fe76b7eff28a5afedbb8a7d2fc914f";

# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "989398cdcaf00fe7";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook', 'vector':
$wgDefaultSkin = "vector";
$wgSkipSkins = array( 'chick', 'cologneblue', 'modern', 'myskin', 'nostalgia', 'simple', 'standard', '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.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl  = "";
$wgRightsText = "";
$wgRightsIcon = "";

# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";

# Query string length limit for ResourceLoader. You should only set this if
# your web server has a query string length limit (then set it to that limit),
# or if you have suhosin.get.max_value_length set in php.ini (then set it to
# that value)
$wgResourceLoaderMaxQueryLength = -1;



# End of automatically generated settings.
# Add more configuration options below.
require_once "$IP/extensions/WikiEditor/WikiEditor.php";
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;


# Enable subpages in the main namespace
$wgNamespacesWithSubpages[NS_MAIN] = true;
# Enable subpages in the template namespace
$wgNamespacesWithSubpages[NS_TEMPLATE] = true;

/* Change the main page url used in things like the logo to an absolute url */
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL';
function lfChangeMainPageURL( $sk, &$tpl ) {
    $tpl->data['nav_urls']['mainpage']['href'] = "http://www.appinvasion.com/";
    return true;
}

# UserMerge addon
require_once ( dirname( __FILE__ ) . "/extensions/UserMerge/UserMerge.php" );
// By default nobody can use this function, enable for bureaucrat?
$wgGroupPermissions['bureaucrat']['usermerge'] = true;
// optional: default is array( 'sysop' )
$wgUserMergeProtectedGroups = array( 'groupname' );


/* creates a new group called editor that is given edit/create page permissions
$wgGroupPermissions['contributor']['edit'] = true;
$wgGroupPermissions['contributor']['createpage'] = true; */

/* don't allow guests to edit/create pages  */
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;

# Disable for users, too: by default 'user' is allowed to edit/create, even if '*' is not.
$wgGroupPermissions['user']['edit']           = true;
$wgGroupPermissions['user']['createpage']     = true;

# $wgSpamRegex = "/http:/";

$wgGroupPermissions['*']['createaccount'] = false;
 
Last edited:
I have tried other accounts. They don't work.

My site is accessible, aswell as the wiki. But the bridge doesn't work.

Btw, is the "login" link suppose to disappear from the wiki?
 
I have tried other accounts. They don't work.

My site is accessible, aswell as the wiki. But the bridge doesn't work.

Btw, is the "login" link suppose to disappear from the wiki?
Yes, the login link should disappear. Can I have your site address?
 
Made the changes in Public.php earlier in this thread, but now I'm getting this error with XF 1.3

Code:
ErrorException: Fatal Error: Cannot redeclare class MediaWiki_Dependencies_Public -library/MediaWiki/Dependencies/Public.php:2
Generated By: Unknown Account, 2 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(29) "http://talkbass.com/tbxfwiki/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Top Bottom