News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF MediaWiki integration released

Started by SleePy, December 05, 2011, 11:40:48 PM

Previous topic - Next topic

Kindred

SMF_Auth.php was already installed? ??? ???

From where?   that is not a part of either the MW or the SMF downloads... so, from where did you download the bridge?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

studentforums

The bridge was installed in 2009, and worked ok before the upgrade.
I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

emanuele

Quote from: studentforums on November 04, 2013, 07:01:14 AM
The file SMF_Auth.php was alread installed. I have not edited it.
But from where did you download it?
Did you by chance recently upgraded from SMF 1.1 and you were using the auth for SMF 1.1?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Kindred

because the bridge for SMF 1.1.x will NOT work with SMF 2.0 (because the database table and column names changed)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

studentforums

I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

Arantor

Right, so now you're on 2.0, the old bridge won't work because the database changed, and we have no idea what the old bridge looked like or did anyway - you should probably forget trying to make that old bridge work.
Holder of controversial views, all of which my own.


emanuele

You can just download the one from github as explained in the first message of this topic and use it. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

studentforums

Actually I did download the bridge from github and have been trying to make it work on and off all day
I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

Kindred

well, you didn't download the new bridge if you are getting an error regarding "'memberName"

if you did download the new bridge, why didn't you mention that earlier in the thread?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

emanuele

Quote from: studentforums on November 04, 2013, 02:56:53 PM
Actually I did download the bridge from github and have been trying to make it work on and off all day
And the one above is the error you are getting with the bridge from github? ???
I hope not. ;D


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

studentforums

Using the file from github I get the error message

Hacking attempt on smf
I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

studentforums

Wey-Hey it works now.
Every time I fix something I have a beer.
I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

studentforums

I have been poking around trying to get the user settings right.
Logging into SMF does not log me into the wiki.
In addition setting the memebr groups in Localsettings.php produces a blank page.
I am trying to use these settings.

# Members in these SMF groups will not be allowed to sign into wiki.
# This is useful for denying access to wiki and a easy anti-spam
# method. The group ID, which can be found in the url (;group=XXX)
# when viewing the group from the administrator control panel.
$wgSMFDenyGroupID = array(4);

# Grant members of this SMF group(s) access to the wiki
# NOTE: The wgSMFDenyGroupID group supersedes this.
#wgSMFGroupID = array(1, 2, 5, 6, 7, 8, 9, 11, 13, 15, 14, 25, 16, 18, 19, 23, 20, 12);

# Grant members of this SMF group(s) wiki sysop privileges
# NOTE: These members must be able to login to the wiki
#$wgSMFAdminGroupID = array(1);

I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

studentforums

I fixed it. In SMF_Auth.php I replaced

$smf_member_id = $user->getOption('smf_member_id');

with

$smf_member_id =  $user_settings['id_member'];

All seems to work now.
I only help those that help themselves. I suppose I am a bit like GOD that way.
If you realise anything useful, say something useful and help someone else.

Student forum for GCSE, IGCSE, IB, O & A Level and University Students

SilverKnight

I can't get the bridge to work with the latest version of mediawiki and smf (2.0.9). It's fully installed, hooked up to a subdomain wiki.domain.com and forums is forums.domain.com (same domain)

When on the wiki i click login, takes me to smf login, logs in fine however mediawiki does not reflect this login (It stays on the forum.)

My plugins:

1.   Split Forum Mod   1.10   [ Uninstall ]
2.   RSS Feed Poster   4.1   [ Uninstall ]
3.   Menu Editor Lite   1.0.5   [ Uninstall ]
4.   @mention members   1.1.2   [ Uninstall ]
5.   Default Avatar   2.3   [ Uninstall ]
6.   Spoiler Tag   0.7.2a   [ Uninstall ]
7.   Gamer IDs   1.4   [ Uninstall ]
8.   Ultimate Profile   0.9.1   [ Uninstall ]
9.   Download bbcode 2.0   2.0   [ Uninstall ]
10.   PartyMembers   1.0   [ Uninstall ]
11.   URL Popup   1.0.2   [ Uninstall ]
12.   VigLink   1.3   [ Uninstall ]
13.   Battle   1.14   [ Uninstall ]
14.   Member Color Link   3.1   [ Uninstall ]
15.   SimplePortal   2.3.5   [ Uninstall ]
16.   Tidy Child Boards   1.4.1   [ Uninstall ]
17.   Member Awards   3.0   [ Uninstall ]
18.   Relative Dates   1.3   [ Uninstall ]
19.   AJAX Recent Topics   1.1   [ Uninstall ]
20.   Tabbed smileys   0.3.99e   [ Uninstall ]
21.   BBC User Info   2.0   [ Uninstall ]
22.   Tagging System   3.0   [ Uninstall ]
23.   Stop Spammer   2.3.9   [ Uninstall ]
24.   reCAPTCHA for SMF   0.9.8a   [ Uninstall ]
25.   Board Icons   1.0   [ Uninstall ]
26.   SMF Social Groups   2.4.5   [ Uninstall ]
27.   Avatar On Board RC2   2.1   [ Uninstall ]
28.   SMF 2.0.8 Update   1.0   [ Uninstall ]
29.   SMF 2.0.7 Update   1.0   [ Uninstall ]
30.   SMF 1.1.19 / 2.0.6 Update   1.0   [ Uninstall ]

Illori

have you just installed the bridge and it is now not working? if it is a new install have you enabled subdomain independent cookies? it is also more helpful if you pick one place or another to discuss your issue, having it here and github may end up confusing people.

SilverKnight

Quote from: Illori on October 14, 2014, 06:57:20 PM
have you just installed the bridge and it is now not working? if it is a new install have you enabled subdomain independent cookies? it is also more helpful if you pick one place or another to discuss your issue, having it here and github may end up confusing people.

Sorry, Thank you for your reply, I was not sure if to pick github or the forum as it's been a year here.

This is a old forum running smf 2.0.8. I have indeed installed the bridge as per the installation information in the github and reviewed the faq questions.

Auth_SMF.php is in extensions folder of wiki, LocalSettings.php is in the root folder of the wiki.

This is my localsettings.php file:

Quote<?php
# This file was automatically generated by the MediaWiki 1.23.5
# 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:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings

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

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

$wgSitename = "HyperGaming Network Wiki";
$wgMetaNamespace = "HyperGaming_Network_Wiki";

# Custom

$wgGroupPermissions['*']['edit'] = false; // MediaWiki Setting

## 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:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgScriptExtension = ".php";

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

## 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 = "$wgStylePath/common/images/wiki.png";

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

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

$wgEmergencyContact = "[email protected]";
$wgPasswordSender = "[email protected]";

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

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

# MySQL specific settings
$wgDBprefix = "wiki_";

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

# 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 = false;
#$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 = "b1ba4ca883b700636bff414badc026f99306360b07335dccfedd0e707b39fcdf";

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

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

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



# End of automatically generated settings.
# Add more configuration options below.

# If you experience the issue where you appear to be logged in
# eventhough you are logged out then disable the page cache.
#$wgEnableParserCache = false;
#$wgCachePages = false;

# SMF Authentication
# To get started you only need to configure wgSMFPath.
# The rest of the settings are optional for advanced features.

# Relative path to the forum directory from the wiki
# Do not put a trailing /
# Example: /public_html/forum and /public_html/wiki -> ../forum
$wgSMFPath = "../forums";

# Set to the version of SMF you are using.
#$wgSMFVersion = "1.1";
$wgSMFVersion = "2.0";

# Use SMF's login system to automatically log you in/out of the wiki
# This works best if you are using SMF database sessions (default).
# Make sure "Use database driven sessions" is checked in the
# SMF Admin -> Server Settings -> Feature Configuration section
# NOTE: Make sure to configure the $wgCookieDomain below
$wgSMFLogin = true;
$wgCookieDomain = 'forums.hypergamer.net';

# Members in these SMF groups will not be allowed to sign into wiki.
# This is useful for denying access to wiki and a easy anti-spam
# method.  The group ID, which can be found in the url (;group=XXX)
# when viewing the group from the administrator control panel.
#$wgSMFDenyGroupID = array(4);

# Grant members of this SMF group(s) access to the wiki
# NOTE: The wgSMFDenyGroupID group supersedes this.
$wgSMFGroupID = array(1,2,3,4,50,54,0);

# Grant members of this SMF group(s) wiki sysop privileges
# NOTE: These members must be able to login to the wiki
$wgSMFGroupID = array(1, 2, 5, 6, 7, 8, 9, 11, 13, 15, 14, 25, 16, 18, 19, 23, 20, 12);

# SMF to wiki group translation.  This allows us to assign wiki groups
# to those in certain SMF groups.
#$wgSMFSpecialGroups = array(
#  // SMF Group ID => Wiki group name,
#   5 => 'autoconfirmed'
#);

$wgFavicon = "../forums/favicon.ico";

# THIS MUST BE ADDED.  This prevents direct access to the Auth file.
define('SMF_IN_WIKI', true);

# Load up the extension
require_once "$IP/extensions/Auth_SMF.php";
$wgAuth = new Auth_SMF();




QuoteEnable local storage of cookies
(SSI won't work well with this on.) 

This is off

QuoteUse subdomain independent cookies
(turn off local cookies first!)

This is on.

www.forums.hypergamer.net - This is the forum
www.wiki.hypergamer.net - This is the wiki installation

SleePy

Cookie domain should just be .hypergamer.net
If you use developer tools on your browser you can see the cookie that SMF is setting.  The bridge needs access to and needs to find the cookie in order to get your SMF session going again.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

SilverKnight

Quote from: SleePy on October 15, 2014, 10:24:52 PM
Cookie domain should just be .hypergamer.net
If you use developer tools on your browser you can see the cookie that SMF is setting.  The bridge needs access to and needs to find the cookie in order to get your SMF session going again.

Thank you for your reply, i have changed it as you suggested and now i get:

An Error Has Occurred!
You were unable to login. Please check your cookie settings.

The wiki is using .hypergamer.net as the domain and the forums shows the cookie under forums.hypergamer.net

It seems two cookies appear for both domain with the same name, what am i doing wrong?

GreenSage

Ok I have the mediawiki up and working and it's allowing login/logout with SMF_Auth.

May I ask how I can implement my sites theme into the Wiki like you have? Any best tips?

Thanks.

The wiki is at http://www.thedragon13.com/wiki but it's just the normal default installation at the moment.

Advertisement: