2010-10-08, 08:41 PM
I have changed my fansite's CMS to Wordpress, and my forum on my fansite to MyBB 1.6 instead of SMF. I tried the tactic available in this topic, and Im getting this error message:
Here is the code I used
Header
Footer(Where the Recent Posts are)
Quote:Fatal error: Cannot redeclare get_attachment_icon() (previously declared in /home/userinfo/html/wp/wp-includes/deprecated.php:1966) in /home/userinfo/public_html/forum/inc/functions.php on line 2919
Here is the code I used
Header
<?php
chdir("/home/userinfo/public_html/forum/"); // path to MyBB
define("IN_MYBB", 1);
require("./global.php");
?>
Footer(Where the Recent Posts are)
<div id="forum-posts"><h1>Latest Forum Posts</h1>
<?php
$query = mysql_query("
SELECT t.*, u.username
FROM mybb_threads t
LEFT JOIN mybb_users u ON (u.uid=t.uid)
WHERE 1=1 AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, 6" // Change the last digit to how many recent post you want to be shown
);
$list = '';
while($fetch = mysql_fetch_array($query))
{
$list .= "<strong><a href=\"forums/showthread.php?tid={$fetch['tid']}\">".htmlspecialchars_uni($fetch['subject'])."</a></strong><br />";
$poster = "<a href=\"forums/member.php?action=profile&uid=".$fetch['uid']."\">{$fetch['username']}</a>";
$list .= "Created by: {$poster}<br />";
$list .= "<i>" .$fetch['replies']. " Replies</i>";
$list .= "<i> , " .$fetch['views']. " Views</i><br />";
$list .= " (<i>Last post by: " .$fetch['lastposter']. "</i>)<br /><hr width=\"50\"><br />";
}
//output
echo $list;
?>