Search Results for 'code'
-
AuthorSearch Results
-
November 8, 2007 at 5:37 pm #61363
In reply to: How to get the id from the second row? (Mysql)
fel64
Member$data = $bbdb->query('stuff');
$what_you_want = $data[1]->column_name;If I recall correctly.
$data[1]should be the second item (0-based arrays), which is an object. Access its property by the name of the column the ID is stored in. bbdb is based on ezSQL. Look for some documentation. It’s actually pretty well documented for wpdb; did you not find anything there?November 8, 2007 at 5:34 pm #61356In reply to: A way to ping-o-matic when a new post comes in?
fel64
MemberWrite a plugin to do it. There’s some actions you can hook into. Writing bb plugins is like writing wp plugins: https://codex.wordpress.org/Writing_a_Plugin
However the actions are different. Look for the actions on http://bbpulp.org/wiki/API/actions .
November 8, 2007 at 3:46 pm #61362In reply to: How to get the id from the second row? (Mysql)
Null
MemberI am at work so can’t show the query

The results are always different, but I need the id from the sec row no matter what the outcome is…
So sometimes it’s:
Row 1 – id 23 – tekst
Row 2 – id 12 – tekst
Row 3 – id 44 – tekst
etc
Or sometimes it’s:
Row 1 – id 7863 – tekst
Row 2 – id 56557 – tekst
Row 3 – id 665 – tekst
etc
dreamstruck
MemberHi fel64…
Wow, thanks for the quick reply! I use the Get Custom Field Values plugin in WordPress and this allows me to pull in custom fields that I’ve set up in my posts. I typically use this if a post is going to have some information that needs to be laid out in a format thats a little different than my regular post format. I’m not sure how these custom field values could be pulled into bbpress. Here’s the link to the Custom Field Values plugin if that helps:
Thanks for looking…
fel64
MemberYo Dreamstruck. When you say that you also have bbPress Post 0.41 installed, I hope you realise that bbsync (intentionally) kills its functioning? If it didn’t, you would get duplicate topics.
I recommend pressing that Migrate button in the bbsync admin, as it will mean that bbsync will work on all topics previously synced with bbPress Post. It would, however, also stop bbPress Post working with that old data, so if you’re (understandably; I am
) hesitant about bbsync you probably wouldn’t want to do that.Cheers muchly, if you hadn’t pointed that out I would have had that error for all time – I entirely forgot to test if the topic was synced before replacing comments. I’ll upload .91 in a few minutes.
There is unfortunately no way to bulk sync old topics (unless they were done using bbPress Post), as topics can only be posted at the current time (while still using the API) (so you could sync them, but it would flood the forum with out-of-date stuff). But maybe that can be made to work; not in the immediate future, but it’s something that I would also like for my setup so I’ll give it a shot at least.
Custom fields don’t show up right now, but I could come some functionality to do it for sures. What specifically would you want to happen?
dreamstruck
MemberI really like this plugin, but I am getting an error on all of my older WP posts. I’m using bbSync 0.9 and bbPress Post .041 with WP 2.2.3.
What’s happening is that all of my old WP posts have this error showing up right above the comment section:
Warning: Invalid argument supplied for foreach() in /home/public_html/test/wp-content/plugins/
bbsync.php on line 465All new posts that I make to WP are posting fine to bbPress and this error message doesn’t show up for these new posts. I have about 500 old posts that existed in WP before I installed bbSync or bbPress Post and the error message is showing up on all of these old posts. Is there a way for me to bulk add all of these old post to my bbPress forum? It seems that this error is showing up because these old posts don’t exist in bbPress.
Thanks…
November 7, 2007 at 12:49 am #61334In reply to: Theming Issue!
mikeygyse
MemberFixed it, it’s an issue with incorrect/missing code in the SuperBold Front-Page.php file
November 6, 2007 at 5:20 pm #61332In reply to: Theming Issue!
fel64
MemberCan you provide some links and/or code please?
fel64
MemberA modicum of tinkering later, and now all that nonsense with felbbreplies is gone; bbsync hooks into some more filters to achieve the same thing, so ordinary wp comment.php template code shows all posts (including bb’s) now. Should also display trackbacks (although out of order). This is 0.9.
November 5, 2007 at 4:59 pm #61307In reply to: user profile link – bb vs wp
fel64
Memberwp uses a static, non-user specific link. You can therefore go to your profile in admin and use the URL of that as the link for everybody.
bb has a function you can call:
user_profile_link(), just like that as far as I can tell.Just change the theme appropriately for both bb and wp.
November 4, 2007 at 9:24 pm #60519In reply to: after integration -> some problems!
Jaithn
Memberi call it like this:
if ( !defined('BBDB_NAME') )
require_once(ABSPATH.'forum/bb-load.php');the problem started after the integration of wordpress and bbpress…so i don’t know what the problem ist.
mdawaffe do you have a idea how i can fix this?
i have one more problem…i can’t add links to my posts…when i post a link in the entry it shows only
<a>test</a>…any idea?jaithn
i’m running now bbpress.83 and wpmu 1.3…
November 4, 2007 at 7:43 am #61303In reply to: Forum-wide RSS Feed not working
livibetter
MemberOkay. I finally got it. I think this is a bug of bbPress.
line 29-55 in
rss.phpensures there is a post found at least, if not thendie().Normally, we see no entries in a feed if there is no posts matched. But bbPress choose to die. You can replace each line of
die();with a dummy statement like1; // die();However, this is no enough. The third statement from bottom:
bb_send_304( $posts[0]->post_time );Replace it with
if ($posts)
bb_send_304( $posts[0]->post_time );Since bbPress can’t find any posts, therefore it has no way to decide that should it send a 304.
Can anyone confirm this is a bug about choosing to die?
November 4, 2007 at 5:32 am #59140In reply to: Installing bbPress
EricBobrow
MemberI installed wordpress without problem for two different blogs, but cannot get bbpress to install. I’ve spent a few hours trying out things this past week with no success. The patch by mdawaffe fixes my error messages related to mysql_get_server_info, however I still get some other strange messages:
Warning: Cannot modify header information – headers already sent by (output started at /homepages/10/d171407036/htdocs/bcg/mastertemplate/blog/bbpress/bb-includes/db-mysqli.php:473) in /homepages/10/d171407036/htdocs/bcg/mastertemplate/blog/bbpress/bb-admin/install.php on line 10
Warning: Cannot modify header information – headers already sent by (output started at /homepages/10/d171407036/htdocs/bcg/mastertemplate/blog/bbpress/bb-includes/db-mysqli.php:473) in /homepages/10/d171407036/htdocs/bcg/mastertemplate/blog/bbpress/bb-includes/functions.php on line 1898
Can anyone help me with this? I just set up a WordPress blog for a new product we’re distributing, and would like a forum in conjunction with it, so bbPress would be perfect.
If I can’t set up bbPress right now because the code is buggy, does anyone have suggestions for other forum software? I would even be ok with temporarily using a different forum setup, then porting it over to bbPress later (if that’s straightforward???).
Thanks in advance for any help or advice. I’m a knowledgeable computer consultant, but pretty inexperienced in blogs/forums. I can follow the conversation about patching the php files, and did so using standard web authoring tools. However, I’m not interested in becoming an expert on code versions or using diff tools. I just want a forum software that works well with my new blog for the benefit of our clients, with a minimum of fuss.
November 3, 2007 at 12:58 am #59139In reply to: Installing bbPress
chrishajer
ParticipantNormally, bbPress is not this bad. A couple bugs were introduced which create problems on some systems. My install from a year ago was no where near this hard, but I checked out the new code and if I installed it I would have had this same trouble.
I think the line 80 being referenced is line 80 of /bb-includes/db-mysqli.php
https://trac.bbpress.org/browser/trunk/bb-includes/db-mysqli.php#L80
I think there are 3 possible workarounds:
1. You can try overwriting /bb-includes/db-mysqli.php with /bb-includes/db.php
2. You can manually modify line 80 of /bb-includes/db-mysqli.php
3. You can apply the 745c.diff patch attached to trac ticket 745
4. Wait for mdawaffe to fix it permanently.
I guess a 5th option is to move on to other forum software. I hope you don’t do that. bbPress is nice when it works (which is 99.9% of the time.)
November 2, 2007 at 7:48 pm #60950In reply to: Hiding Subforums on The Homepage
livibetter
Member<?php global $forum; if ($forum->forum_parent == 0) forum_description(); ?>Quick explanation of the code: When
$forum‘sforum_parentis0, that means$forumis a top-level forum; if not, it is a sub-forum of another forum whoseforum_idequals$forum‘sforum_parent.November 2, 2007 at 12:27 pm #60556In reply to: sub-sub forums
warmechoco
MemberHi! thanks alot for the help,
only 1 problem.. my pages don’t have that kind of structure..
forum.php
<?php bb_get_header(); ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> » <?php forum_name(); ?></h3>
<?php if ( $topics || $stickies ) : ?>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<a href="<?php forum_rss_link(); ?>"><?php _e('RSS feed for this forum'); ?></a>
<div class="nav">
<?php forum_pages(); ?>
</div>
<?php endif; ?>
<?php post_form(); ?>
<?php bb_get_footer(); ?>front-page.php
<?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<h2>
<?php _e('Forums'); ?>
</h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php foreach ( $forums as $forum ) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php forum_link(); ?>">
<?php forum_name(); ?>
</a> — <small>
<?php forum_description(); ?>
</small></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if ( bb_is_user_logged_in() ) : ?>
<?php endif; else : // $forums ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>">
<?php bb_option('name'); ?>
</a></h3>
<?php post_form(); endif; ?>
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<?php endif; ?>
</div>
<?php bb_get_footer(); ?><?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<h2>
<?php _e('Forums'); ?>
</h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php foreach ( $forums as $forum ) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php forum_link(); ?>">
<?php forum_name(); ?>
</a> — <small>
<?php forum_description(); ?>
</small></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if ( bb_is_user_logged_in() ) : ?>
<?php endif; else : // $forums ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>">
<?php bb_option('name'); ?>
</a></h3>
<?php post_form(); endif; ?>
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<?php endif; ?>
</div>
<?php bb_get_footer(); ?><?php bb_get_header(); ?>
<?php if ( $forums ) : ?>
<div id="discussions">
<h2>
<?php _e('Forums'); ?>
</h2>
<table id="forumlist">
<tr>
<th><?php _e('Main Theme'); ?></th>
<th><?php _e('Topics'); ?></th>
<th><?php _e('Posts'); ?></th>
</tr>
<?php foreach ( $forums as $forum ) : ?>
<tr<?php alt_class('forum'); ?>>
<td><a href="<?php forum_link(); ?>">
<?php forum_name(); ?>
</a> — <small>
<?php forum_description(); ?>
</small></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if ( bb_is_user_logged_in() ) : ?>
<?php endif; else : // $forums ?>
<h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>">
<?php bb_option('name'); ?>
</a></h3>
<?php post_form(); endif; ?>
<?php if ( $topics || $super_stickies ) : ?>
<h2><?php _e('Latest Discussions'); ?></h2>
<table id="latest">
<tr>
<th><?php _e('Topic'); ?> — <?php new_topic(); ?></th>
<th><?php _e('Posts'); ?></th>
<th><?php _e('Last Poster'); ?></th>
<th><?php _e('Freshness'); ?></th>
</tr>
<?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php _e('Sticky:'); ?> <big><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></big></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; ?>
</table>
<?php endif; ?>
</div>
<?php bb_get_footer(); ?>November 2, 2007 at 1:53 am #54733In reply to: Is there a Post Preview Plugin?
thomasklaiber
MemberMaybe someone could port the “Live Comment Preview” plugin from wordpress to bbpress.
Too bad I don’t have the time at the moment
November 1, 2007 at 4:29 pm #61293In reply to: “Access denied for user” during install?
ericakadisco
MemberHey Chris,
I had created a second bbpress database called bbpress2 to see if that was the problem, which it wasn’t. The error message is an older one. The one I’m getting now is in reference to bbpress, not bbpress2 like above. But everything else is the same:
bbPress database error: [Access denied for user 'disco'@'localhost' to database 'approachanxiety_com_bbpress']
SHOW TABLES;
bbPress database error: [Access denied for user 'disco'@'localhost' to database 'approachanxiety_com_bbpress']
CREATE TABLE bb_forums ( forum_id int(10) NOT NULL auto_increment, forum_name varchar(150) NOT NULL default '', forum_slug varchar(255) NOT NULL default '', forum_desc text NOT NULL, forum_parent int(10) NOT NULL default '0', forum_order int(10) NOT NULL default '0', topics bigint(20) NOT NULL default '0', posts bigint(20) NOT NULL default '0', PRIMARY KEY (forum_id) ) DEFAULT CHARACTER SET utf8
bbPress database error: [Access denied for user 'disco'@'localhost' to database 'approachanxiety_com_bbpress']
CREATE TABLE bb_postsQuestion: can I use the same database as my WordPress database?
I may call my hosting provider to see if there is something wrong with the way mysql databases are set up. Perhaps I can connect but can’t create tables?
Thanks for all your work on this!
Eric
November 1, 2007 at 11:31 am #60555In reply to: sub-sub forums
livibetter
MemberCheck this screenshot
If this what you need, then open your
front-page.phpandforum.php. Find<?php while ( bb_forum() ) : ?>
<tr<?php bb_forum_class(); ?>>
<td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description(); ?></small><?php bb_forum_pad( '</div>' ); ?></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endwhile; ?>Replace this (7 lines) with
<?php while ( bb_forum() ) :
global $bb_forums_loop;
$_loop =& $bb_forums_loop;
if($_loop->walker->depth == 3) : ?>
<tr<?php bb_forum_class(); ?>>
<td colspan="3"><?php bb_forum_pad( '<div class="nest">' ); ?>Subsubforums:
<?php while ($_loop->walker->depth > 2) : ?>
<a href="<?php forum_link(); ?>"><?php forum_name(); ?></a>
<?php
bb_forum();
if ($_loop !== null && $_loop->walker->depth > 2)
echo ', ';
endwhile;
?>
</td>
</tr>
<?php endif; ?>
<?php if ($_loop !== null) : ?>
<tr<?php bb_forum_class(); ?>>
<td><?php bb_forum_pad( '<div class="nest">' ); ?><a href="<?php forum_link(); ?>"><?php forum_name(); ?></a><small><?php forum_description();?></small><?php bb_forum_pad( '</div>' ); ?></td>
<td class="num"><?php forum_topics(); ?></td>
<td class="num"><?php forum_posts(); ?></td>
</tr>
<?php endif; endwhile; ?>Note that this code prints out all descendants of a subforum together, not only in subsubforum level. If you need only subsubforums, then please use the code from http://www.livibetter.com/it/topic/example-3-level-forums-list?replies=1
November 1, 2007 at 10:24 am #60948In reply to: Hiding Subforums on The Homepage
livibetter
MemberThis is quick solution but not perfect. Find
<?php while ( bb_forum() ) : ?>infront-page.phpand replace it with<?php while ( bb_forum() ) : global $forum; if ($forum->forum_parent != 0) continue;?>It only hides the subforums, so visitors have to click on a top level forum to see if there is any subforum within the top level forum.
November 1, 2007 at 8:10 am #61252In reply to: Sticky on “Latest Discussions”
livibetter
MemberThere are two
ifblocks infront-page.php, one for$super_stickies, another for$topics. Remove first one(about 8 lines) and replace second with<?php
$stickyIdx = 0; $topicIdx = 0;
while ($stickyIdx < count($super_stickies) && $topicIdx < count($topics)) {
if ($super_stickies[$stickyIdx]->topic_time > $topics[$topicIdx]->topic_time)
array_splice($topics, $topicIdx, 0, array($super_stickies[$stickyIdx++]));
$topicIdx++;
}
if ($stickyIdx < count($super_stickies))
array_splice($topics, count($topics), 0, array_slice($super_stickies, $stickyIdx));
if ( $topics ) : foreach ( $topics as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><a href="<?php topic_link(); ?>"><?php topic_title(); ?></a></td>
<td class="num"><?php topic_posts(); ?></td>
<td class="num"><?php topic_last_poster(); ?></td>
<td class="num"><small><?php topic_time(); ?></small></td>
</tr>
<?php endforeach; endif; // $topics ?>Actually, the replacement is equivalent to inserting 8 lines of code.
November 1, 2007 at 6:25 am #54731In reply to: Is there a Post Preview Plugin?
rolanddeschain
MemberBump
A live ajax one would be amazingly brilliant, and would no doubt make it into the next official release, thus bring the developer of it untold fortunes.Well, I know I’d appreciate it.
November 1, 2007 at 4:23 am #61291In reply to: “Access denied for user” during install?
ericakadisco
MemberThanks for the response.
Okay, I tried to patch all the files with the changes in that ticket and I seem to get the same error.
Here is my config.php:
<?php
// ** MySQL settings ** //
define('BBDB_NAME', 'approachanxiety_com_bbpress'); // The name of the database
define('BBDB_USER', 'disco'); // Your MySQL username
define('BBDB_PASSWORD', 'xxxx'); // ...and password
define('BBDB_HOST', 'localhost'); // 99% chance you won't need to change these last few
define('BBDB_CHARSET', 'utf8'); // If you are *upgrading*, and your old config.php does
define('BBDB_COLLATE', ''); // not have these two contstants in them, DO NOT define them
// If you are installing for the first time, leave them here
// Change the prefix if you want to have multiple forums in a single database.
$bb_table_prefix = 'bb_'; // Only letters, numbers and underscores please!
// The full URL of your bbPress install
$bb->uri = 'http://approachanxiety.com/bbpress/';
// What are you going to call me?
$bb->name = 'New bbPress Site';
// This must be set before you run the install script.
$bb->admin_email = 'ericmonse@yahoo.com';
// Set to true if you want pretty permalinks, set to 'slugs' if you want to use slug based pretty permalinks.
$bb->mod_rewrite = false;
// The number of topics that show on each page.
$bb->page_topics = 30;
// A user can edit a post for this many minutes after submitting.
$bb->edit_lock = 60;
// Your timezone offset. Example: -7 for Pacific Daylight Time.
$bb->gmt_offset = 0;
// Change this to localize bbPress. A corresponding MO file for the
// chosen language must be installed to bb-includes/languages.
// For example, install de.mo to bb-includes/languages and set BBLANG to 'de'
// to enable German language support.
define('BBLANG', '');
// Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage
// of Akismet's powerful spam blocking, you'll need one. You can get an Akismet key at
// http://wordpress.com/api-keys/
$bb->akismet_key = ''; // Example: '0123456789ab'
// The rest is only useful if you are integrating bbPress with WordPress.
// If you're not, just leave it as it is.
$bb->wp_table_prefix = ''; // WordPress table prefix. Example: 'wp_';
$bb->wp_home = ''; // WordPress - Options->General: Blog address (URL) // Example: 'http://example.com'
$bb->wp_siteurl = ''; // WordPress - Options->General: WordPress address (URL) // Example: 'http://example.com'
/* Stop editing */
if ( !defined('BBPATH') )
define('BBPATH', dirname(__FILE__) . '/' );
require_once( BBPATH . 'bb-settings.php' );
?>When I run the testdb.php I get
Connection Results
Connection: Successful!
Database Selection: Successful!
Enter Your MySQL Information
MySQL Hostname localhost
MySQL Username disco
MySQL Password xxxx
MySQL Database approachanxiety_com_bbpress
Here is the text php file that connects to the database and works:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>MySQL Test Script</title>
<style>
body { font-family: Verdana; font-size: 10pt; }
td { font-size: 10pt; }
th { font-size: 8pt; }
</style>
</head>
<body>
<?php
if ( isset ( $_POST['submit'] ) ) {
?>
<table border="1" summary="" cellpadding="2" cellspacing="0" style="border-collapse: collapse;">
<tr>
<th bgcolor="#F2F2F2" colspan="2"><center><b>Connection Results</b></center></td>
</tr>
<?
if (!$link = @mysql_connect($_POST['mysql_hostname'], $_POST['mysql_username'], $_POST['mysql_password'])) {
?>
<tr>
<td>Connection:</td>
<td bgcolor="red"><font color="white"><?php echo mysql_error(); ?></font></td>
</tr>
<?
} else {
?>
<tr>
<td>Connection:</td>
<td bgcolor="green"><font color="white">Successful!</font></td>
</tr>
<?
}
if (!$dblink = @mysql_select_db($_POST['mysql_database'], $link)) {
?>
<tr>
<td>Database Selection:</td>
<td bgcolor="red"><font color="white"><?php echo mysql_error(); ?></font></td>
</tr>
<?
} else {
?>
<tr>
<td>Database Selection:</td>
<td bgcolor="green"><font color="white">Successful!</font></td>
</tr>
<?
}
@mysql_close($link);
?>
</table>
<?
}
?>
<form method="post">
<table border="1" summary="" cellpadding="2" cellspacing="0" style="border-collapse: collapse;">
<tr>
<th bgcolor="#F2F2F2" colspan="2"><center><b>Enter Your MySQL Information</b></center></td>
</tr>
<tr>
<td>MySQL Hostname</td>
<td><input type="text" name="mysql_hostname" size="40" value="<?php echo $_POST['mysql_hostname']; ?>"></td>
</tr>
<tr>
<td>MySQL Username</td>
<td><input type="text" name="mysql_username" size="40" value="<?php echo $_POST['mysql_username']; ?>"></td>
</tr>
<tr>
<td>MySQL Password</td>
<td><input type="text" name="mysql_password" size="40" value="<?php echo $_POST['mysql_password']; ?>"></td>
</tr>
<tr>
<td>MySQL Database</td>
<td><input type="text" name="mysql_database" size="40" value="<?php echo $_POST['mysql_database']; ?>"></td>
</tr>
<tr>
<td colspan="2"><center><input type="submit" name="submit" value="Submit"> <input type="reset" name="reset" value="Reset"></center></td>
</tr>
</table>
</form>
</body>
</html>October 31, 2007 at 6:26 pm #2557Topic: “Access denied for user” during install?
in forum Installationericakadisco
MemberI am installing bbPress to integrate with an existing WordPress. After the second step of install I get this error:
Second Step
Now we’re going to create the database tables and fill them with some
default data.
bbPress database error: [Access denied for user 'disco'@'localhost' to
database 'approachanxiety_com_bbpress2']
SHOW TABLES;
bbPress database error: [Access denied for user 'disco'@'localhost' to
database 'approachanxiety_com_bbpress2']
CREATE TABLE bb_forums....It seems to be similar to this post,
http://bbpress.org/forums/topic/step-two-database-error?replies=4
And this one,
http://bbpress.org/forums/topic/db-access-problem-in-the-first-installation-step?replies=19
I tried to resolve it by replacing db-mysqli.php with db.php in the bb-includes folder and that didn’t work.
The username and password are correct. They are the same as for my original wordpress blog. And the database is correct as well. When I change it to something else I can’t even get to the second step.
Any help would be greatly appreciated!!!
October 31, 2007 at 2:29 pm #61251In reply to: on plugin activation, create table in db
Null
MemberWithout the
[ ]I presume. Thx going to try that! -
AuthorSearch Results