Hmm, the adding and removing of slashes may be messing with things. I’ll have to test it some more. I know it works for any regular html tags.
This is so simple I bet I am duplicating what someone else has already done. I am not sure why this isn’t in bbPress by default and it doesn’t even begin to address what I would consider basic moderation tools but it’s a start.
Install and check under “content” submenu. Why the posts menu =deleted posts in bbpress’s default I have no clue.
<?php
/*
Plugin Name: bbPress Recent Posts
Plugin URI: http://bbpress.org/plugins/
Description: shows most recent posts with (extremely limited) moderation options
Author: _ck_
Author URI: http://CKon.wordpress.com
Version: 0.01
*/
function recent_posts_admin_page() {
if ( !bb_current_user_can('browse_deleted') ) {die(__("Now how'd you get here? And what did you think you'd being doing?"));}
global $bbdb, $bb_posts, $bb_post, $page;
$bb_posts=get_latest_posts(0,$page);
$total = bb_count_last_query();
?>
<h2>Recent Posts</h2>
<ol id="the-list">
<? bb_admin_list_posts(); ?>
</ol>
<?php echo get_page_number_links( $page, $total );
}
function recent_posts_admin_menu() {
global $bb_submenu;
$bb_submenu['content.php'][] = array(__('Recent Posts'), 'use_keys', 'recent_posts_admin_page');
}
add_action( 'bb_admin_menu_generator', 'recent_posts_admin_menu' );
tested working – at least for my setup:
function rebuild_topics() {
global $bbdb;
// currently only rebuilds last post pointers, last poster name, last poster id, last topic post date
// todo: rebuild entire topics table
// warnings: hard coded for WP user table - backup your DB before using
// run the built-in post/topic recount first
echo "t<br>n";
if ( $topics = (array) $bbdb->get_results("SELECT topic_id,post_id,poster_id,post_time FROM <code>bb_posts</code> a WHERE post_position=(SELECT MAX(post_position) FROM <code>bb_posts</code> WHERE topic_id=a.topic_id) AND post_status = '0' GROUP BY topic_id ") ) :
echo "tt" . __('Calculating last posters for each topic...') . "n";
foreach ($topics as $t) {
echo $t->topic_id."... ";
$user_login=$bbdb->get_var("SELECT user_login FROM wp_users WHERE ID='$t->poster_id'");
$bbdb->query("UPDATE $bbdb->topics SET topic_time='$t->post_time',topic_last_poster= '$t->poster_id', topic_last_poster_name='$user_login', topic_last_post_id='$t->post_id' WHERE topic_id = '$t->topic_id'");
}
endif;
echo "<br> tt" . __('Done calculating last posters.');
}
I think that IE7 does not recognise the <br clear="all">
as it should – kakumei was designed pre-IE7, I think? Try playing around with the HTML; can’t test it myself unfortunately since the problem is in IE. Maybe <br style="clear: both;"/>
will work?
regarding my post above: this error only occurs with firefox. With bloglines there is no problem …
/o
With regard to collegemates’ error above:
XML Parsing Error: xml declaration not at start of external entity
Location: http://mysite/rss.php?profile=1
Line Number 2, Column 1:<?xml version=”1.0″?><!– generator=”bbPress” –>
I’ve been getting the same error when trying to subscribe to favorites or forums. Topics works great, thou. Is there anyone out there with any clue to this problem?
Testing it out here:
http://www.grindhouse.com/forums/topic/31
Will come in handy for the site as it grows. Thanks!
Just an untested guess on my part but what you want is something like this?
<a href="/forum/profile.php?id=<? echo $user_ID; ?>">your profile</a>
Very interesting solution to display latest post from wordpress, i’ll try it!
Not even a hint if it’s useful to certain kinds of forums?
Does it deal with geo-location?
Is it especially helpful for large/active forums?
Yay! I figured out how to hack it to make it happen.
To leave the core files alone, I did it through a plugin.
The balancetags in bbpress takes less parameters than from WP.
function force_balance_tags($text) { return balanceTags($text, true);}
add_filter('pre_post', 'force_balance_tags');
Tested working.
Another nice addition in there would be to add nofollow to any post links.
add_filter('pre_post', 'bb_rel_nofollow');
Actually I may be wrong about this.
I dug through the default filters and I see this:
add_filter(‘pre_post’, ‘balanceTags’);
Does balancetags == auto-close tags?
Looking at the function it would seem to be so.
Perhaps I have a plugin conflict or does this behaviour exist on even on a default install?
added: I just tested here and yup, it doesn’t auto-close
The download will be the latest one with the fix.
Trent
MMember
Found the problem, it is indeed a plugin issue (Allow Images), but deactivating the plugin had no effect for some reason and I only saw it when I worked on my test forum and did a fresh install of the plugin. The plugin still works to display images, you just can’t display code.
Will pop over and give the plugin author a heads up.
Hello,
After installing the software successfully, all database tables were created ok but when I clicked on the link to login it repeatedly told me the forum software wasn’t installed. On checking I noticed two bizarre things:
1. Although the placeholder topic had been created and other tables populated, the forum table had no entries, it was empty, i.e. it had not created the first forum detailed in the installation to match the topic that was there. Creating a temporary entry with the id of the successfully created made the forum work, but then…
2. When I logged in as the user I created during the installation there was no admin option so I check the user meta table and it was down as ‘member’ and not ‘key master’.
I am using the latest bbPress (downloaded this morning), running php 5.2.3 and mysql 5.0.41. Both are near enough out of the box installations and working fully (the only change to mysql was to set password in legacy mode).
Please help as I can’t do anything!
btw, one other minor question completely unrelated. Why when I look at people’s code listed in forums or hyperlinks, is it chopping off the entry at the end of the line and not wrapping? I’m using firefox, haven’t checked against IE.
I have bbpress(0.8.2) integration with wordpress(2.2.1).
I did not have any forum management before I add a forum to my previous wordpress website. Number of users are increasing daily. So as I did not have any experience with management of a forum, I have some problems.
In the beginning I installed to standard version of bbpress. After one month of forum experience, I want to add moderation plugin. Because my users are not experienced forum users. I have a range from middle school students to company owners or retired workers.
Some of the users sends strange messages, which I dont want to see on my forum.
Some of them do not allow forum rules. And some of them dont know how to use a forum. Namely when they have a new question, they write “I know it is not related to the subject …”.
I think what I need it to make the all messages for new users, moderated. Or all messages are moderated. I dont know why but the moderation plugin do not work with latest version of bbpress. So I have to uninstall the plugin and make messages un-moderated.
I will also try “move it” plugin, for unrelated messages to subject of message.
But what is the best management style for such a community. I think bbpress.org do not need moderation of messages, because at least its community know how to use a forum.
Is it better, not to waste my time to manage the forum. Namely no moderation to messages or just live what ever people writes to the forum. As I said before this is my first forum, and I also dont want people to use msn-type language usage. Am I fascist
?
I’m in – pravinp(at)gmail(dot)com
liam at burkie.org would like to test this out too
2ganges
It is translation is a .po file. See in archive (latest.zip).
But there are some modifications.
I would be intrested in helping Beta Test plugins.
Email my username at yahoo dot com
Cheers Trent.
I can certainly see why you’d want to keep this under wraps. If it fell into the wrong hands … ?!?!?! I like it.
I am confused fel64! Email me and I can forward it to you. trent dot adams TA gmail TOD com
Trent
Could you send it to fel64 who isn’t at hotmail.com? Seem to be having trouble with my email. Thank you!