我正在我的网站上工作,目前有一个自定义编码的网页,还有运行它的 phpbb。但是,我似乎无法将 phpbb 集成到主页中。我想要信息(成员数量、帖子等)以及新闻部分(论坛上的最新帖子/更新)。我已经对此进行了大量研究,但找不到解决方案。有人见过或知道如何进行这样的集成吗?非常感谢,乔希。
问问题
266 次
1 回答
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 的数据。搜索您需要的信息的存储位置并选择它。就这样!
于 2013-08-16T08:16:32.663 回答