public
04-20-2009, 10:42 AM
Hello,
1. I have one webdomain, for example: www.mydomain.com, when I installed php-fusion v.7.
2. I have one sub domain web, for example: forum.mydomain.com, when I installed Invision Power Board forum v.2.3.6.
I want php-fusion panel to read and display last five active topic from Invision Power Board forum. And the Invision Power Board forum has own MySQL database. So, I have two MySQL database: PHP-Fusion and Invision Power Board.
In php-fusion, at the option of creating a new panel, is displayed:
openside("name");
echo "content";
closeside();
I replaced "content" of the php code posted above, with the following php code should read the MySQL database called IPB Forum: forumel_phpb1. Therefore, result:
openside("name");
echo "
global $forumel, $phpb1, $forum;
$result = $db->sql_query("SELECT forum_id, topic_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_time DESC LIMIT 5");
$content = "<br>";
while ($row = $db->sql_fetchrow($result)) {
$forum_id = intval($row['forum_id']);
$topic_id = intval($row['topic_id']);
$topic_title = $row['topic_title'];
$row2 = $db->sql_fetchrow($db->sql_query("SELECT auth_view, auth_read FROM ".$prefix."_bbforums WHERE forum_id='$forum_id'"));
$auth_view = intval($row2['auth_view']);
$auth_read = intval($row2['auth_read']);
if (($auth_view < 2) OR ($auth_read < 2)) {
$content .= "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\"> <a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id\">$topic_title</a><br>";
}
}
$content .= "<br><center><a href=\"modules.php?name=Forums\"><b>$sitename Forums</b></a><br><br></center>";
";
closeside();
The php code above don't works and I don't know why??? So, I want to tell me what was wrong or what you should add in the php code above to read the MySQL database Invision Power Board? I want php-fusion to be displayed only five titles last active forum topics.
Little help please.
1. I have one webdomain, for example: www.mydomain.com, when I installed php-fusion v.7.
2. I have one sub domain web, for example: forum.mydomain.com, when I installed Invision Power Board forum v.2.3.6.
I want php-fusion panel to read and display last five active topic from Invision Power Board forum. And the Invision Power Board forum has own MySQL database. So, I have two MySQL database: PHP-Fusion and Invision Power Board.
In php-fusion, at the option of creating a new panel, is displayed:
openside("name");
echo "content";
closeside();
I replaced "content" of the php code posted above, with the following php code should read the MySQL database called IPB Forum: forumel_phpb1. Therefore, result:
openside("name");
echo "
global $forumel, $phpb1, $forum;
$result = $db->sql_query("SELECT forum_id, topic_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_time DESC LIMIT 5");
$content = "<br>";
while ($row = $db->sql_fetchrow($result)) {
$forum_id = intval($row['forum_id']);
$topic_id = intval($row['topic_id']);
$topic_title = $row['topic_title'];
$row2 = $db->sql_fetchrow($db->sql_query("SELECT auth_view, auth_read FROM ".$prefix."_bbforums WHERE forum_id='$forum_id'"));
$auth_view = intval($row2['auth_view']);
$auth_read = intval($row2['auth_read']);
if (($auth_view < 2) OR ($auth_read < 2)) {
$content .= "<img src=\"images/arrow.gif\" border=\"0\" alt=\"\" title=\"\" width=\"9\" height=\"9\"> <a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id\">$topic_title</a><br>";
}
}
$content .= "<br><center><a href=\"modules.php?name=Forums\"><b>$sitename Forums</b></a><br><br></center>";
";
closeside();
The php code above don't works and I don't know why??? So, I want to tell me what was wrong or what you should add in the php code above to read the MySQL database Invision Power Board? I want php-fusion to be displayed only five titles last active forum topics.
Little help please.