Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: im1 on June 09, 2008, 05:01:28 PM

Title: SSI.php doesnt work with wordpress?
Post by: im1 on June 09, 2008, 05:01:28 PM
I put the php require into my header.php in my wordpress template but this is the error I get when trying to load the site..
Quote
Fatal error: Cannot redeclare is_admin() (previously declared in /home2/myusername/public_html/musicblog/wp-includes/query.php:40) in /home2/myusername/public_html/musicblog/forum/Sources/Security.php on line 824

I think its conflicting with the wordpress php or something, can anyone help me solve this?
Title: Re: SSI.php doesnt work with wordpress?
Post by: vbgamer45 on June 09, 2008, 10:55:55 PM
I would try include main SSI.php in the main index.php file of wordpress and see if that helps.
Title: Re: SSI.php doesnt work with wordpress?
Post by: Oldiesmann on June 10, 2008, 12:07:23 AM
The is_admin() function in SMF was included for compatibility reasons and has been completely removed in 2.0, so you can safely remove it from Security.php as well.
Title: Re: SSI.php doesnt work with wordpress?
Post by: im1 on June 10, 2008, 06:08:37 AM
Quote from: Oldiesmann on June 10, 2008, 12:07:23 AM
The is_admin() function in SMF was included for compatibility reasons and has been completely removed in 2.0, so you can safely remove it from Security.php as well.
Could you tell me exactly what to remove? I dont want to f*ck anything up
Title: Re: SSI.php doesnt work with wordpress?
Post by: [SiNaN] on June 10, 2008, 07:30:58 AM
../Sources/Security.php

Find and Delete:

// 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');
}