Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin: Latest Replies


LMD
Participant

@louisedade

I’m not that surpised it didn’t work. Here is a different fix, editing the ‘bbPress Post’ plugin itself. I’m using line numbers to reference the code. I’ve based the line numbers on an UNEDITED version of the ‘bbpress_post.php’ file. So, if you open up a fresh version of the file that hasn’t been touched (i.e. do not use the version you previously added my ‘fix’ to – you no longer need that fix).

Try these code changes:

Line # 457 – replace with:

bbpress_bb_new_post($topic_id, $content, $forum, $author, $now, $title);

Line #533 – replace with:

$wpdb->query("UPDATE ". $bb_table_prefix ."posts SET post_text='$content', post_title='$title' WHERE post_id=$bbpost_id LIMIT 1;");

Line #540 – replace with:

$otherdb->query("UPDATE ". $bb_table_prefix ."posts SET post_text='$content', post_title='$title' WHERE post_id=$bbpost_id LIMIT 1;");

Line #585 – replace with:

function bbpress_bb_new_post( $topic_id, $content, $forum, $author, $now, $title ) { // making new post in bbPress

Line #587 – replace with:

$wpdb->query("INSERT INTO ". $bb_table_prefix ."posts VALUES ('', $forum, $topic_id, $author, '$content', '$now', '127.0.0.1', 0, 1, $title);");

Line #591 – replace with:

$otherdb->query("INSERT INTO ". $bb_table_prefix ."posts VALUES ('', $forum, $topic_id, $author, '$content', '$now', '127.0.0.1', 0, 1, $title);");

Note: this is assumes two things:

1. That in the bbPress ‘posts’ table the ‘post_title’ field was added as the last field.

2. That you do not have any other plugins that have added fields to the bbPress database.

Let me know how you get on this time.

Skip to toolbar