PHPBB主页整合?

时间:2013-08-16 08:05:39

标签: php mysql phpbb

我正在我的网站上工作,目前有一个自定义编码网页,还有运行它的phpbb。但我似乎无法将phpbb集成到主页中。我想要的信息(成员数量,帖子等)以及新闻部分(论坛上的最新帖子/更新)。我对此做了大量研究,但找不到解决方案。有谁看过或知道如何进行这样的集成?谢谢你,Josh。

1 个答案:

答案 0 :(得分:1)

只需连接到您的phpBB数据库并选择您想知道的内容

例如,我在某些论坛中选择了特殊成员(团队成员)的最新帖子列表。结果如下所示:http://www.omega-day.com/?op=news&lang=0

为此我只写了三个观点。

CREATE VIEW `teamuserfarben` AS select `u`.`username` AS `username`,`u`.`user_id` AS `user_id`,`g`.`group_colour` AS `group_colour` from ((`PREFIX_` `u` join `PREFIX_user_group` `ug` on((`u`.`user_id` = `ug`.`user_id`))) join `PREFIX_groups` `g` on((`ug`.`group_id` = `g`.`group_id`))) where (`g`.`group_id` in (<GROUP IDS>)) group by `u`.`username`;

CREATE VIEW `teammeldungen` AS select `u`.`username` AS `username`,`u`.`user_id` AS `user_id`,`t`.`forum_id` AS `forum_id`,`f`.`forum_name` AS `forum_name`,`t`.`topic_title` AS `topic_title`,`t`.`topic_id` AS `topic_id`,`p`.`post_id` AS `post_id`,`p`.`post_time` AS `post_time` from (((`PREFIX_` `u` join `PREFIX_posts` `p` on((`p`.`poster_id` = `u`.`user_id`))) join `PREFIX_topics` `t` on((`t`.`topic_id` = `p`.`topic_id`))) join `PREFIX_forums` `f` on((`f`.`forum_id` = `t`.`forum_id`))) where (`t`.`forum_id` in (<FORUM IDS TO WATCH>));

CREATE VIEW `teamallposts` AS select `tm`.`username` AS `username`,`tm`.`user_id` AS `user_id`,`tc`.`group_colour` AS `group_colour`,`tm`.`forum_id` AS `forum_id`,`tm`.`forum_name` AS `forum_name`,`tm`.`topic_title` AS `topic_title`,`tm`.`topic_id` AS `topic_id`,`tm`.`post_id` AS `post_id`,`tm`.`post_time` AS `post_time` from (`teammeldungen` `tm` left join `teamuserfarben` `tc` on((`tm`.`user_id` = `tc`.`user_id`))) order by `tm`.`post_id` desc;

所以你可以像你想的那样使用phpBB的数据。搜索存储所需信息的位置并选择它。这就是全部!