我正在我的网站上工作,当前有一个自定义编码的网页,并且还运行phpbb。但是,我似乎无法将phpbb集成到主页中。我想获取信息(成员,帖子等的数量)以及新闻部分(论坛上的最新帖子/更新)。我对此进行了大量研究,但找不到解决方案。是否有人看到或知道如何进行这样的集成?谢谢,乔希。
最佳答案
只需连接到您的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的数据。搜索所需信息的存储位置,然后选择它。就这样!
关于php - PHPBB主页集成?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18268667/