WordPress.org

Ready to get started?Download WordPress

Forums

Visual MediaWiki integration (9 posts)

  1. HittingSmoke
    Member
    Posted 4 years ago #

    Basically, I want MediaWiki inside a WordPress page.

    If you've ever used the WP-United WordPress/phpBB integration mod you'll know what I mean. I'd like MediaWiki to integrate visually in the same way you can integrate phpBB into WordPress using WP-United.

    User auth integration isn't an issue because I've already got MediaWiki and WordPress using the phpBB user database for login. I just need the visual aspect of mediawiki showing up under my WordPress header and nav bar.

    I've seen this mod posted at http://github.com/auzigog/mediawiki2wordpress but it has zero instructions. I've tried putting all the files into a folder in /wp-content/plugins but it doesn't show up in the WordPress plugins CP. Looking through the code I can see how to put my MediaWiki info into it but I have no idea how it works with integrating it into WordPress.

    Anyone have any insight into this? Right now I have an iframe running but it's terrible. No way to dynamically resize the page height to fit the wiki page showing in the iframe.

  2. WiZeR
    Member
    Posted 4 years ago #

    Did you get any answers to this? I'm hunting for exactly the same thing!

  3. HittingSmoke
    Member
    Posted 4 years ago #

    Did you get any answers to this? I'm hunting for exactly the same thing!

    I'm closer. I tried a PHP include in a WordPress template which threw up some variable conflicts. After thinking it through a little more, a page include would screw up MediaWiki's URL and link structure I think.

    What I'm working on now is having a MediaWIki theme call the WordPress header and footer wrapping all of the wiki in WordPress without toying with variables or link structure.

    I'll post the results when and if I get it working.

  4. HittingSmoke
    Member
    Posted 3 years ago #

    Did you get any answers to this? I'm hunting for exactly the same thing!

    Just in case you or anyone else is following this and curious, I got it done and it was amazingly easy.

    Add
    require_once(dirname(__FILE__) . '/../wp-load.php');
    to LocalSettings.php in Mediawiki. Make sure to change /../wp-load.php the the path to your WordPress install relative to Mediawiki's root directory

    Then, in your Mediawiki theme file, place somewhere near the top:
    get_header( $name );

    It needs some pretty intensive CSS hacks to get everything to line up, but this will add the WordPress header to every Mediawiki page.

  5. maxslug
    Member
    Posted 3 years ago #

    Thanks HittingSmoke, this is great!

    Note that I had to change $name to $this->name() for WP 3.x. Otherwise it was serving me the wordpress home page inside the wiki.

    I'm using this in conjunction w/ WP-United. This integrates PHP forums inside of a WP install. I had to add another 'require_once' line :

    require_once(dirname(__FILE__) . '/../forum/wp-united/functions-general.php');

    I also had to hack one of the wp-united files that sets $phpEx. I just hardcoded it to .php for my system. And I had to add a symlink to wp-united inside the wiki directory

    ln -s ../forum/wp-united .

    Once I have all the kinks worked out, I'll post the integration of the three.

    Others, note that you can also add this in your wiki template :

    <?php get_footer( $this->name ); ?>

    To round-out the integration.

    Cheers,
    -m

  6. ganiman
    Member
    Posted 3 years ago #

    Including wp-load.php in LocalSettings.php causes an error with Mediawiki 1.16 and WordPress 3.0.5:

    PHP Fatal error: Call to undefined method user::newfromsession() in /var/www/htdocs/wiki/includes/StubObject.php on line 190

  7. HittingSmoke
    Member
    Posted 3 years ago #

    Including wp-load.php in LocalSettings.php causes an error with Mediawiki 1.16 and WordPress 3.0.5:

    PHP Fatal error: Call to undefined method user::newfromsession() in /var/www/htdocs/wiki/includes/StubObject.php on line 190

    This is because of phpBB/Wodpress integration. If you have Mediawiki AND WordPress using phpBB for auth, the user class loaded by the WordPress session with conflict with Mediawiki's.

    If you disable WordPress/phpBB integration it will fix the issue. I'm trying to find a way to make it work with WP/phpBB login integration but so for no luck.

  8. HittingSmoke
    Member
    Posted 3 years ago #

    I replaced Mediawiki with Wikka Wiki and all is good again.

    Just place:

    require_once(dirname(__FILE__) . '/../wp-load.php');

    inside wikka.config.php and place:

    get_header( $name );

    inside /template/default/header.php

  9. Amanda
    Member
    Posted 3 years ago #

    So is it possible to integrate MediaWiki with WordPress without using phpBB or WP-United?

    Do any of you who got this working feel up to posting a link so we can see how it came out.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.