Make a Donation • Download Latest Version
function reunhtmlentities($post)
{
// replace numeric entities
$post = preg_replace('~([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $post);
$post = preg_replace('~([0-9]+);~e', 'chr("\\1")', $post);
// replace literal entities
$trans_tbl = get_html_translation_table(HTML_ENTITIES);
$trans_tbl = array_flip($trans_tbl);
return strtr($post, $trans_tbl);
}
# CONFIGURATION SECTION
# SQL Database information concerns the database IPB is stored in
// SQL Database Host Address
$dbhost = 'localhost';
// SQL Database Name
$dbname = 'wivenspl_ioforum';
// SQL Database Username
$dbusername = 'wivenspl_ionews';
// SQL Database Password
$dbpassword = 'feathermerchant';
// URL path to folder containing index.php of your forum (NO ENDING SLASH!)
$forumpath = 'http://www.interstateoutlaws.com/forum';
// Forum ID to export posts from (look for the XX in index.php?showforum=XX part of the forums URL)
$forumid = '5';
// Number or posts to export
$posts = '9';
// Number or old posts to export
$oldposts = '9';
# Recommended IPB 2.0 Only
// Name of emoticon directory
$emoticons = 'default';
// Name of Image directory
$img_dir = '1';
# Code to export posts. Edit only template areas inbetween the Echo tags
mysql_connect ($dbhost, $dbusername, $dbpassword);
mysql_select_db ($dbname);
$topics = mysql_query ("select* from ibf_topics where forum_id=".$forumid." order by start_date desc");
$numberPosts = mysql_query ("select* from ibf_forums where id=".$forumid."");
$maxposts = mysql_fetch_array($numberPosts);
if ($maxposts['topics']<$posts) {$posts=$maxposts['topics'];}
for ($i=0; $i <$posts; $i++)
{
$topicrow = mysql_fetch_array($topics);
$titleid = $topicrow["tid"];
$topictitle = ($topicrow["title"]);
$postq = mysql_query ("SELECT * FROM `ibf_posts` where topic_id = ".$titleid." order by post_date");
$postfetch = mysql_fetch_array($postq);
$post = $postfetch["post"];
$pid = $postfetch["pid"];
$authorid = $postfetch["author_id"];
$unixdate = $topicrow["start_date"];
$date = date("d.m.y",$unixdate);
$author = $topicrow["starter_name"];
$post = str_replace('<#EMO_DIR#>', $emoticons, $post);
$post = str_replace('<#IMG_DIR#>', $img_dir, $post);
$post = reunhtmlentities($post);
# Variable Explaination
# '.$topictitle.' = Title of post
# '.$post.' = The post text
# '.$author.' = The author of the post
# '.$authorid.' = User ID of author (for profile link)
# '.$date.' = Date written
# '.$titleid.' = Topic ID number
if ($i>2){
echo ('
'.$date.' » '.$topictitle.' » '.$author.'
|
');
}else{
echo ('
'.$date.' » '.$topictitle.' » '.$author.' '.$post.'
|
');}
}
?>