|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
news system /w phpbb
i have an existing news system which i would like to integrate with phpbb. whenever i post a new news item i would like it to auto-create a forum thread in a news section with the news content on it as well.
any help would be appreciated.
__________________
![]() ![]() "Only Linux users see the end of crashes." - Pl4t0 |
|
#2
|
|||
|
|||
|
shouldn't be that difficult.. study the database.. all you need to add is an extra insert
I'll try to look into the layout of the phpBB database, I'll post back here edit: err, I'm having problems downloading phpBB from sourceforge
__________________
Best Regards, Håvard Lindset Last edited by Lindset : November 10th, 2002 at 10:19 AM. |
|
#3
|
|||
|
|||
|
been looking through source... can't find the INSERT query they use for adding a new thread. i tried to use Find but only found Inserts for polls...
|
|
#4
|
|||
|
|||
|
all right, I could now download it (must have been some problems over at sourceforge earlier)... these are the two tables you're looking for:
Code:
# -------------------------------------------------------- # # Table structure for table 'phpbb_posts' # CREATE TABLE phpbb_posts ( post_id mediumint(8) UNSIGNED NOT NULL auto_increment, topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL, poster_id mediumint(8) DEFAULT '0' NOT NULL, post_time int(11) DEFAULT '0' NOT NULL, poster_ip char(8) NOT NULL, post_username varchar(25), enable_bbcode tinyint(1) DEFAULT '1' NOT NULL, enable_html tinyint(1) DEFAULT '0' NOT NULL, enable_smilies tinyint(1) DEFAULT '1' NOT NULL, enable_sig tinyint(1) DEFAULT '1' NOT NULL, post_edit_time int(11), post_edit_count smallint(5) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (post_id), KEY forum_id (forum_id), KEY topic_id (topic_id), KEY poster_id (poster_id), KEY post_time (post_time) ); # -------------------------------------------------------- # # Table structure for table 'phpbb_posts_text' # CREATE TABLE phpbb_posts_text ( post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, bbcode_uid char(10) NOT NULL, post_subject char(60), post_text text, PRIMARY KEY (post_id) ); I haven't got that much experience with phpBB, but all you have to do now is to make the forum you want to have the posts in, and find out what forum id and topic id it has.. the post_id will be assigned automatically (auto_increment), and to insert the actual text, you can use "SELECT LAST_INSERT_ID()" to fetch the post_id err, hope that helps you |
|
#5
|
|||
|
|||
|
doesn't phpbb have the ability to export a forum post to a flat text file? If so,...Just setup an announcements forum,...lock it down so only you can post in it,....then include that exported text file in your news page
![]() |
|
#6
|
|||
|
|||
|
how is the phpbb_posts linked with the phpbb_posts_texts?
|
|
#7
|
|||
|
|||
|
Quote:
the post_id in phpbb_posts_text should be the id of the entry in phpbb_posts.. try and see if this works PHP Code:
just replace the topic_id, forum_id, poster_id and post_username with the correct value... |
|
#8
|
|||
|
|||
|
Hi. I repeatedly be familiar with this forum. This is the head culture unequivocal to ask a query. How numberless in this forum are references progressive behind, knavish users? Can I depute all the communication that there is?
|
|
#9
|
|||
|
|||
|
Hi. I on numerous occasions scan this forum. This is the oldest period unequivocal to ask a topic. How multifarious in this forum are references progressive behind, artful users? Can I depute all the facts that there is?
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > news system /w phpbb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|