Search Results for '"wordpress'
-
Search Results
-
Topic: Punbb -> BBPress
I took Bruno Torres’ converter script as a foundation, and re-wrote it to work with the Punbb database architecture. Also, added in a tiny bit of string clean up, since Punbb allows foreign characters in the username field, and BBPress does not.
Here’s the code to look at:
http://utopian.net/code/punbb-importer.phps
And in a handy .zip for download:
http://utopian.net/code/punbb-importer.zip
A few important notes, since this is NOT at all pretty –
1) It uses a lot of memory, so make sure PHP has access to at least 16mb in php.ini. If I had more than 20 minutes to devote to this, I’d look into that and try to improve it, but hey.
2) If you’re importing a lot of data, you may need to split up the resultant sql file into smaller files less than 2mb in size. Add this to the list of things I would automate if I needed to use this script more than once.
3) I am using BBPress integrated with WPMU and included lines for importing into the WordPress user tables. After I noted and fixed the problem converting Punbb’s lax, apostrophe-laden usernames to nice and sanitary WP-friendly ones, the script ran like a charm. Seriously, if I’d known it would be this easy I would have done this six months ago.
4) The forum-parent to forum relationship imported correctly into the database, but displayed a little funny, so I manually re-ordered the forum items in the database and massaged the template a little bit to recognize forum parents a little bit differently, more PunBB style.
5) A clean WPMU and BBPress install is ideal, but I already had ten existing WP users, half of whom had a user account in the PunBB data I was merging. For such a small data set, it was very easy to manually correct this by deleting the PunBB users and making sure that the imported topics and posts for those users pointed to their current id.
Hopefully this will be a good start for those of us looking to move existing PunBB forums to BBPress & WordPress. Good luck, and let me know if you use it!
Topic: Attchment Uploader
Hey guys,
wordpress already has an attchment uploader, doesn’t it? is there a chance to build a plug-in for bbpress using that code?
grz,
jaithn
Topic: Plugin: Admin Post Anything
Been meaning to do this for awhile, didn’t realise how easy it was. This makes bbPress behave more like WordPress in that admin (keymasters/administrators) can post any content regardless of tag restrictions for the rest of members. This includes images, javascript, objects like flash video player, etc.
<?php
/*
Plugin Name: Admin Post Anything
Plugin URI:
Description: allows keymaster/administrators to post any content regardless of tag restrictions
Author: _ck_
Author URI: http://CKon.wordpress.com
Version: 0.02
*/
function bb_admin_post_anything($text) {
if (bb_current_user_can('administrate') ) {
remove_filter( 'pre_post', 'encode_bad' );
remove_filter( 'pre_post', 'bb_encode_bad' );
remove_filter('pre_post', 'bb_filter_kses', 50);
$text=addslashes($text);
$text=bb_autop($text);
}
return $text;
}
add_filter('pre_post', 'bb_admin_post_anything',9);
?>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' );Just wanted to share that I’d had some success with integrating some simpler wordpress plugins into bbpress by creating some functions to mimic get_settings() and update_options()
Since bbpress fortunately uses differently named functions for the same actions, I was able to make them point to the wordpress table instead of bbpress and fetch the proper options that the plugins were calling for.
Not sure how useful this would be to anyone else and it’s not for novices since other little tweaks are usually necessary and admin menus are definitely not supported, but it’s nice to have the integration ability.
ps. maybe we need a separate integration sub-forum
I followed the detailed steps in the documentation for installation and also those for integrating with wordpress. After changing the config-sample to config.php and uploading the contents of the unzipped bb folder to a subdirectory (‘forums”) in the main word press directory I attempted to load the install.php script. I use IE7 and I tried both opening the file using the option on the File menu and also calling the file through the http protocol. In both cases all I get is a blank page. I don’t get any error messages, not even from my server. Thus, I have no clue what to look for or where to look to solve the problem. I’d appreciate some help in the detective work. Thanks.
Mike R.