Forums

[resolved] Simple Machines Forum SSI feed into WP Page (3 posts)

  1. smsu
    Member
    Posted 1 year ago #

    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

  2. smsu
    Member
    Posted 1 year ago #

    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');
    }
  3. rainfrog
    Member
    Posted 9 months ago #

    Thank you for posting this! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.