talatorre (@talatorre)

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

  • talatorre
    Member

    @talatorre

    I am trying to integrate MediaWiki user authorization but after hours of searching I can’t find the code for AuthPress.php.

    http://spectaclar.org is no longer online. Can someone post the code here or link to a working site? If I can find the code I would love to resurrect this project; that is unless someone has a better way of creating a single sign on setup for WP, bbPress, and MediaWiki.

    One other note, unlike wp_list_pages() you need to call this function with echo:

    <?php echo bb_list_pages();?>

    or modify the last few lines of the function from:

    // Return the string to the caller

    return $output;

    to:

    // Return the string to the caller

    echo $output;

    return;

    then you can call the function similar to wp_list_pages()

    <?php bb_list_pages();?>

    aprendedor

    This is how I understand the code:

    function pages_table() {

    global $bb; //calls global variable

    // Compute the name of the table we need to query

    $table = $bb->wp_table_prefix; //this calls the wp prefix from the wordpress integration settings, ex: wp_

    if ($bb->wordpress_mu_primary_blog_id != “”) //checks for a WPMU id in the WP integration settings

    $table .= $bb->wordpress_mu_primary_blog_id.”_”; //appends the id, ex: wp_1

    $table .= “posts”; //appends “posts”, ex: wp_posts or wp_1posts

    return $table;

    }

    To answer your questions the code works no matter which type of WP flavor you are using

Viewing 3 replies - 1 through 3 (of 3 total)