Search Results for 'bbpress'
-
Search Results
-
Topic: Adding Theme Pages
I have bbPress 0.9.0.4 up and running and have heavily modified a theme to change the front page, and forum pages. Here is my hierarchy:
Front Page – displays only the top level forums (Parent), but also display sub forums descriptions (Group), then the sub forums of each group (Child) are listed and linked. Looks really cool and is exactly what we need for a project I am working on. I have modified the forum.php to check what type of forum it is (Parent, Group, Child) and load the correct file.
Now, I would like to have a “Hot Topics” page where any item set as “sticky to the top” will list just like they would normally list on the standard home page. Is there a way to set bbpress to load a non-standard file, so like /bbpress/hot-topics.php, which is actually the original forum.php
Hope that hasn’t confused anyone. I have looked around at all the bbPress code to find a hook, action or filter for this, but can’t seem to find it. Thanks.
Topic: No table prefix?
Im installing bbpress, the newest alpha, and integrating it with wordpress 2.7
After installation (goes smoothly) i go to the main page, and it says
You must specify a table prefix in your bb-config.php file.
When i go into my config file, i see the prefix defined as bb_….
What am i doing wrong?
Thanks!
I have recently migrated my entire phpBB over to bbPress and now want to move the bbPress users into wordpress mu so I can use wordpress integration the problem was that there is no easy way to migrate and check the users aren’t doubling up…
I wrote a simple php script to do just that and it allowed me to list out the users where manual attention is required, it can be run just from the command line like this…. ‘php -f file.php’ and will move the users over perfectly (at least for me)…
Note there has been no testing of this code it worked for me and may cause you issues, back up your database first!
Comments on the code appreciated for future improvement.
‘<?php
echo “n”;
echo “+
+n”;echo “| bbPress to WordPress User Migration |n”;
echo “+
+n”;echo “| Created by: |n”;
echo “| Tom Lynch |n”;
echo “+
+n”;echo “n”;
echo “Messages:n”;
echo “n”;
echo “Username Messagen”;
echo ”
n”;function printSpaces($username) {
$spaces = 25 – strlen($username);
echo $username;
for ($i = 0; $i < $spaces+1; $i++) {
echo ” “;
}
}
// Enter your database host, username and password here…
mysql_connect(‘localhost’, ‘username’, ‘password’);
// Enter your database name here (both tables must be in same database – sorry)
mysql_select_db(‘database’);
$migrated = 0;
$errors = 0;
$query = mysql_query(“SELECT user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_status, display_name FROM bb_users WHERE user_pass LIKE ‘$P$B%’;”);
while ($data = mysql_fetch_assoc($query)) {
$query2 = mysql_query(“SELECT user_login, user_email FROM wp_users WHERE user_login = ‘”.$data.”‘ || user_email = ‘”.$data.”‘;”);
if (mysql_num_rows($query2) > 0) {
$data2 = mysql_fetch_assoc($query2);
if ($data == $data2 && $data == $data2) {
// Suppressing already migrated users error
//echo printSpaces($data) . ” has already been migrated by the looks of it!n”;
} else if ($data == $data2) {
echo printSpaces($data) . ” could not be migrated, that user name is already taken! (“.$data.”)n”;
$errors++;
} else if ($data == $data2) {
echo printSpaces($data) . ” could not be migrated, that email address is already taken! (“.$data.”)n”;
$errors++;
}
} else {
mysql_query(“INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_status, display_name) VALUES (‘” . $data . “‘, ‘” . $data . “‘, ‘” . $data . “‘, ‘” . $data . “‘, ‘” . $data . “‘, ‘” . $data . “‘, ‘” . $data . “‘, ‘” . $data . “‘);”);
// Suppressing user migrated message
//echo $data . ” was migratedn”;
$migrated++;
}
}
$alreadyDone = ((mysql_num_rows($query) – $errors) – $migrated);
echo “n”;
echo “Stats:n”;
echo “n”;
echo “Users Migrated: ” . $migrated . “n”;
echo “Already Migrated: ” . $alreadyDone . “n”;
echo “Not Migrated: ” . $errors . “n”;
echo “=======================================n”;
echo “Total: ” . mysql_num_rows($query) . “n”;
echo “n”;
?>’