Search Results for 'code'
-
Search Results
-
I know this is a question geared more towards the WordPress.org forums, but because it also could be a bbPress integration question, I figured I’d post it here.
Case:
1.) When you are within the Blog area of the site, that the Blog tab always displays a “current” class.
2.) When you are within the bbPress/Forum area of the site, the “Forums” tab also always shows “current.”
To my understanding, the WordPress page function isn’t powerful enough to understand the parent/sub relationship. Curious if anyone knows of a way within WordPress to make this act in a similar fashion apart from hard-coding it. I don’t believe the WordPress.org site is hard-coded that way, but of course I could be wrong.
I’m a not-quite-noob on WP/WPmu, and a total noob here on bbPress. I’m attempting my first integrated install, from scratch. WPmu latest (2.7 trunk as of a couple weeks ago) and bb 1.0 alpha 6. I thought I’d share a new-user experience… knowing that this kind of stuff is hard to remember later.
I’m wanting integration of users and logins, and went through the install with that in mind.
Anomalies, strangeness and bugs found:
1) It asks for both the site URL and blog URL. WPmu doesn’t have both items, so that’s confusing. Should mention that the same value can be copied in.
2) It doesn’t suggest the URL needs “http://” attached until after you save settings and get an error.
3) [suggestion] why not ask for the location of the WP/WPmu install, and pull the keys etc from wp-config.php??? That would save a ton of typing and confusion.
4) Once I got everything entered, it let me login ok… HOWEVER:
5) It quickly LOST all my settings and the database appeared broken. Here’s how:
* I clicked on “Admin” to go to the admin panel
* Went to Settings->WordPress Integration
* Set up role mappings and saved
* Either at that point, or with one more click (Save in User Integration), I was suddenly locked out and getting mysql connect errors in the header.
* Examining the page I was on showed the “advanced database settings” had defaulted to different info: apparently it used my admin login (user admin) rather than the WP db user/pass I had provided.
* It was impossible to reset this info on that page due to the DB connect error. [suggestion: maintain ‘admin’ login/pw in a bb_* table for emergency admin use of the WP connection breaks!]
* Confusingly, the DB info in bb-config.php is correct and I could not find the (wrong) wp DB info in any text file. Presumably it is stored in the bb-* database?!
My workaround, which is now in use: hand code the settings (
$bb->user_bbdb_useretc) intobb-config.php. That works.Bottom line: either the integrated installation process, or perhaps the settings->Integration page, is busted.
Hope that helps!
[PS: I’m the author of the wptuner performance analysis/debugging plugin for WP/WPmu. Would a BB version be helpful?]
BadBehavior is one of my favorite plugins for web-apps, EVER. You can insert it on pretty much any php driven site, even SMF and IPB, so I went one extra step and slapped the ‘standard’ bbpress plugin header to make it a plugin.
I do not support BadBehavior, so if these directions don’t work, I can’t really offer much help, and for that, I apologize. That said, it’s really straight forward, and using this and Akismet, I’ve had very few spammers on my blog/forum since I co-mingled them in November.
1) Download Bad Behavior (current version 2.0.26)
2) Put the file
bad-behavior-generic.phpand the subfolderbad-behaviorinto your my-plugins folder so it looks like this:my-pluginsbad-behaviorbad-behavior-generic.php
my-pluginsbad-behaviorbad-behavior(many files)3) In
bad-behavior-generic.phpchange this:<?php
/*
Bad Behavior - detects and blocks unwanted Web accesses
Copyright (C) 2005-2006 Michael Hamptonto this:
<?php
/*
Plugin Name: Bad Behavior
Version: 2.0.26
Description: Deny automated spambots access to your PHP-based Web site.
Plugin URI: http://www.bad-behavior.ioerror.us/
Author: Michael Hampton
Author URI: http://www.homelandstupidity.us/
License: GPL
Bad Behavior - detects and blocks unwanted Web accesses
Copyright (C) 2005-2006 Michael Hampton4) Activate bad-behavior as a plugin in the bbPress admin side.
Now, this DOES NOT give you the tracking like it does in WP. I tried to find a way to make all that work, but it kept telling me things existed. It’s probably because I’m sharing DBs, but that’s okay by me. I’ve been using it this way with the 1.0-alpha string of installs without issue.
I hope this helps someone else out
I wanted all info on the admin page which lists all users, so I have edited admin-functions.php.
I thought someone may be looking to do the same , so here you are. Nothing to difficult.
Just change the function bb_user_role to something like the following:
function bb_user_row( $user_id, $role = '', $email = false ) {$user = bb_get_user( $user_id );
$r = "t<tr id='user-$user->ID'" . get_alt_class("user-$role") . ">n";
$r .= "tt<td>$user->ID</td>n";
$r .= "tt<td>ID ) . "'>" . get_user_name( $user->ID ) . "</td>n";
if ( $email ) {
$a = bb_get_user_email( $user->ID );
$r .= "tt<td>$a</td>n";
$a = $user->user_url;
$r .= "tt<td>$a</td>n";
$a = $user->from;
$r .= "tt<td>$a</td>n";
$a = $user->occ;
$r .= "tt<td>$a</td>n";
$a = $user->interest;
$r .= "tt<td>$a</td>n";
...
And change function display to have somthing like this:
$r .= "<thead>n";$r .= "t<tr>n";
$r .= "tt<th style='width:10%;'>" . __('ID') . "</th>n";
if ( $show_email ) {
$r .= "tt<th style='width:10%;'>" . __('Username') . "</th>n";
$r .= "tt<th style='width:20%;'>" . __('Email') . "</th>n";
$r .= "tt<th style='width:20%;'>" . __('Url') . "</th>n";
$r .= "tt<th style='width:10%;'>" . __('From') . "</th>n";
$r .= "tt<th style='width:10%;'>" . __('Occ') . "</th>n";
$r .= "tt<th style='width:10%;'>" . __('Interest') . "</th>n";
} else {
$r .= "tt<th style='width:60%;'>" . __('Username') . "</th>n";
}
$r .= "tt<th style='width:15%;'>" . __('Registered Since') . "</th>n";
$r .= "tt<th style='width:5%;'>" . __('Actions') . "</th>n";
$r .= "t</tr>n";
$r .= "</thead>nn";
i was merrilly adding tags to a topic and then hit a weird error.
DB Error in BB_Taxonomy::set_object_terms: Duplicate entry '3609-10' for key 1
INSERT INTO bb_term_relationships (<code>object_id</code>,<code>term_taxonomy_id</code>,<code>user_id</code>) VALUES ('3609','10','1')
Warning: Cannot modify header information - headers already sent by (output started at /home/xx/public_html/messageboard/bb-includes/backpress/class.bpdb.php:293) in /home/xx/public_html/messageboard/bb-includes/functions.bb-pluggable.php on line 214i also cannot delete any tags…
what’s wrong?
Topic: Use HTML code in post
Hi
As said in the title, can I use HTML code in the posts I made in bbpress? I don’t want to show the code itself, I want to use code to insert, for example, tables and that sort of thing.
Thanks in advance

hello. i just want to check something… before i go and do it and mess everything up.
askimet has caughts loads of spam comments on my forum, which is great, but they are still in the database. i would like to remove them completely.
i reckon that this is the correct entry, but does anyone know for sure?
delete from bb_posts where post_status = '2';