Support » Fixing WordPress » Simple Machines Forum SSI feed into WP Page

  • Resolved smsu

    (@smsu)


    I am currently developing a WP Theme for my client and I need to be able to show the latest topics from the Simple Machines Forum on the home page (within a Tabber tab page).

    The SMF instructions for showing information on an external PHP page say to insert the following code on line 1 before the <html> tag.
    <?php require("/ool/smf/SSI.php"); ?>

    Then insert this code in the relevant part of the page:
    <?php ssi_recentTopics(); flush(); ?>

    I do that and keep getting the following error message:

    Fatal error: Cannot redeclare is_admin() (previously declared in /ool/wp-includes/query.php:40) in /ool/smf/Sources/Security.php on line 821

    Is there any reason why WP would not like displaying SMF data

    Thanks in advance. btw I’m not a PHP guru so if you can answer in laymans terms where possible, I’d really appreciate that.

    The site is here: http://oldshutup.co.uk/ool/

    SMSU

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter smsu

    (@smsu)

    I found out what th eproblem was over on the SMF forum, if anyone is interested do the following in /Sources/Security.php in your SMF installation:

    The problem is, function is_admin() exists in both WP and SMF. It was added for compatibility reasons and has been completely removed in 2.0. So you can safely remove it from SMF.

    Find and remove:

    // Grudge chickens out and puts this in for combatibility. This will be ripped out on day one for SMF 1.2 though 😉

    function is_admin()
    {
    isAllowedTo('admin_forum');
    }

    Thank you for posting this! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Simple Machines Forum SSI feed into WP Page’ is closed to new replies.