Support » Plugins » WikitoWordpress Plugin

  • Hi,

    I tried to Install Wikitowordpress Plugin as Described here

    The Code got Installed as a Mediawiki Extension. However when I tried to install the the same Code as WordPress Extension, It shows a Fatal Error.

    Here the Code:

    Plugin Name: WikiToWordPress extension
    Plugin URI:
    Description: Scans new articles created in a wiki and adds them to a Word Press 'Collective blog'
    Version: 0.1
    Author: Jean-Francois Gariépy
    Author URI:
    //Those were the extensions credits that show up on the WordPress plugin panel.
     * Protect against register_globals vulnerabilities.
     * This line must be present before any global variable is referenced.
    if (!defined('MEDIAWIKI')) die();
    //Extension credits that show up on Special:Version
    $wgExtensionCredits['other'][] = array(
            'name' => 'WikiToWordPress',
            'version' => '0.1',
            'author' => 'Jean-Francois Gariépy',
            'url' => '',
            'description' => 'Scans new articles created in a wiki and adds them to a WordPress blog.',
    $WordpressConfig = '/home/noolaham/public_html/wordpress/wp-config.php';
    $wgHooks['ArticleSaveComplete'][] = 'postAWikiNews';
    function postAWikiNews(&$article, &$user, &$text, &$summary, &$minoredit, &$watchthis, &$sectionanchor, &$flags, $revision) {
    $SearchString = 'Category:News';
    $PassFlag = '7';
    if (strpos($text, $SearchString)) {
    if (strpos($flags, $PassFlag)) {
    // create post object
    class wm_mypost {
        var $post_title;
        var $post_content;
        var $post_status;
        var $post_author;    /* author user id (optional) */
        var $post_name;      /* slug (optional) */
        var $post_type;      /* 'page' or 'post' (optional, defaults to 'post') */
        var $comment_status; /* open or closed for commenting (optional) */
    $wm_mypost = new wm_mypost();
    $wm_mypost->post_title = $article->mTitle;
    $wm_mypost->post_content = $text;
    $wm_mypost->post_status = 'publish';
    $wm_mypost->post_author = 1;
    $wp_rewrite->feeds = 'no';
    // Optional; uncomment as needed
    // $wm_mypost->post_type = 'page';
    // $wm_mypost->comment_status = 'closed';
    return true;
    return true;
  • The topic ‘WikitoWordpress Plugin’ is closed to new replies.