Search Results for 'code'
-
AuthorSearch Results
-
June 29, 2009 at 2:27 pm #15119
Topic: “Forum Could Not Be Created”
in forum Installationsmfadmin
MemberHi everyone…I read some posts about this problem, but wanted to find out if a different or new solution had come about. I’ve read about an issue with PHP version 5 and needing to add code to the .htaccess file. I’ve also read about adding “dummy” lines to the database file. I wondered if there are any other solutions that might be easier to understand for someone with no coding skills. I am trying to integrate WP and BBPress. My site is brand new so I can reinstall everything if I have to. I saw the really great screencast that someone did, too. That was really helpful except that it didn’t work.
The error I get says “Forum could not be created”.
June 29, 2009 at 1:46 pm #75156In reply to: navigation bar in BuddyPress in BBPress
allenweiss
Memberthanks..just did that and get
Fatal error: Call to undefined function wp_head() in /home/alumnide/public_html/forum/bb-templates/kakumei/header.php on line 33
am I still missing some code?
June 29, 2009 at 1:22 pm #75154In reply to: navigation bar in BuddyPress in BBPress
allenweiss
MemberOk..thanks…well, this is what I did, but it doesn’t work. I followed the advice given in the link above:
1. Created a function called functions.php inside my template folder (bb-templates/kakumei/functions.php) and put in it the code:
function recreate_bb_admin_bar() {
echo ‘<div id=”wp-admin-bar”><ul class=”main-nav”>’;
bp_adminbar_logo();
bp_adminbar_login_menu();
bp_adminbar_account_menu();
bp_adminbar_blogs_menu();
bp_adminbar_notifications_menu();
bp_adminbar_authors_menu();
bp_adminbar_random_menu();
echo ‘</div>’;
}
add_action( ‘wp_footer’, ‘recreate_bb_admin_bar’, 8 );
add_action( ‘admin_footer’, ‘recreate_bb_admin_bar’ );
add_action( ‘wp_head’, ‘bp_core_admin_bar_css’, 1 );
2. Added to my bb-config.php file, this line
require_once(‘../wp-blog-header.php’);
Am I still missing something? Thanks
June 29, 2009 at 1:01 pm #75166In reply to: Problems in Step 1 installer
andywilliams244
MemberOk, now when I’ve added all the settings it’s giving me this error message on another screen.
Warning: fopen(
Hosting4030532htmlForums/bb-config.php) [function.fopen]: failed to open stream: Permission denied in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1036Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fwrite(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1043Warning: fclose(): supplied argument is not a valid stream resource in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1050Warning: chmod() [function.chmod]: No such file or directory in
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php on line 1052Warning: Cannot modify header information – headers already sent by (output started at
Hosting4030532htmlForumsbb-adminincludesclass.bb-install.php:1043) in
Hosting4030532htmlForumsbb-includesfunctions.bb-core.php on line 1095
June 29, 2009 at 12:40 pm #15123Topic: Problems in Step 1 installer
in forum Installationandywilliams244
MemberI’ve been inputting my
Database name
Database user
Database password
exactly how they appear in “wp-config” (copy & pasted) but it keeps telling me
“There was a problem connecting to the database you specified.
Please check the settings, then try again.”
I’m guessing it has something to do with the advanced settings, which I have not changed. I’m with GoDaddy but it said in 99% of all cases you should leave it the same.
Any help guys?
June 29, 2009 at 8:52 am #75147In reply to: Authentication check on non-WP page
Ashish Kumar (Ashfame)
ParticipantWhy not load the bbPress environment and then call function to check is user is logged in? I have done the same in WP, so I think it might be possible in bbPress very easily too.
For WP
// load the WP environment so that I can call on the WP functions to make sure that user is logged in before accessing members area
require( dirname(__FILE__) . '/wp-load.php' );
if (!is_user_logged_in()) // You can't access the members area without login. Now can you?
{
auth_redirect();
}For bbPress, it should be like
require('./bb-load.php');
// find the name of the function you will needJune 29, 2009 at 6:02 am #75040In reply to: Installation throws errors
yeknomedoc
Member*push*
June 28, 2009 at 11:59 pm #75141In reply to: Would this be the right thing for me?
andywilliams244
MemberThanks guys. I must say this forum is very friendly. I will definately give this a go. If I have any problems I won’t hesitate to come back
June 28, 2009 at 11:13 pm #75152In reply to: navigation bar in BuddyPress in BBPress
allenweiss
MemberHmm..it looks like they say to use the functions.php file (for the theme) to add the code, but I don’t see such a functions file…am I missing something obvious?
June 28, 2009 at 9:53 pm #75143In reply to: How can I disable HTML in posts?
chrishajer
ParticipantThe allowable HTML tags are in an array called
bb_allowed_tags. I think you could create a plugin that just empties that array.https://bbpress.org/forums/topic/hooks-038-filters-docu#post-6740
I’ve only seen people requesting the opposite, allowing additional HTML markup, so I’m not sure exactly how to do this.
June 28, 2009 at 9:05 pm #75146In reply to: Authentication check on non-WP page
michael3185
MemberI use this to stop people accessing the profile page unless logged-in;
<?php if ( !bb_is_user_logged_in() ) {
show_error_page('log-in to access profiles');
exit;
} ?>Something along those line should work with a link to somewhere else, assuming they’re in a bbPress page to begin with.
June 28, 2009 at 8:21 pm #15116Topic: How can I disable HTML in posts?
in forum TroubleshootingBurakhan
MemberHi everyone,
I want to disable HTML codes in posts. I am using “BBcode Lite for bbPress” and I dont need html codes to edit my post. When my member want to add a HTML code that is useful to forums the code works and havent seen properly. How can I disable?
June 28, 2009 at 7:59 pm #73609In reply to: bbPress Integration plugin for WPMU
Detective
MemberNow I get an odd behavior:
– if the user logs in inside WP, he appears logged in in both WP and BB, but he can’t post in BB. If he has admin rights, he can’t see bb-admin.
– if the user logs in inside BB, everything works ok in both WP and BB.
So I redirected all logins to BB.
In mu-plugins I added the following:
function rk_login_redirect() {
if (strpos($_SERVER['REQUEST_URI'], 'wp-login.php') !== false && $_GET['action'] != 'logout' ) {
$url = 'http://foros.ryuuko.cl/bb-login.php';
$redirect = urlencode(wp_get_referer());
$url = add_query_arg('redirect_to', $redirect, $url);
wp_redirect($url);
}
}
add_action('init', 'rk_login_redirect');In a plugin in my-plugins I added:
add_filter('wp_redirect', 'rk_redirect_location');
function rk_redirect_location($location, $status = 302) {
$arr = array();
$ref = wp_get_referer();
$url_array = parse_url($ref);
parse_str($url_array['query'], $arr);
if (isset($arr['redirect_to']) && !empty($arr['redirect_to'])) {
$url = urldecode($arr['redirect_to']);
$url_array = parse_url($url);
if (strpos($url_array['host'], 'ryuuko.cl') !== false)
$location = $url;
}
return $location;
}June 28, 2009 at 6:52 pm #75140In reply to: Would this be the right thing for me?
johnhiler
MemberYes, you can integrate your user databases and then cookie integrate.

Two questions:
* Do you want to combine your two user account systems? If so, how will you handle it when two accounts have the same name in each system?
* What version of WordPress are you using?
June 28, 2009 at 4:58 pm #75137In reply to: support forum plugin error
bobbyh
MemberI think maybe it’s a bug? The code at line 657 is:
return sprintf('<img src="$1%ssupport-forum-$2%s.png" alt="[$3%s]" title="[$3%s]" style="vertical-align:top; margin-right:0.3em; width:14px; height:14px; border-width:0;" />$4%s', $this->iconURI, 'sticky', __('sticky', 'support-forum'),$label);Instead of
$ 1 %(added spaces so it’d render on bbpress) shouldn’t it be%1$? c.f. http://us3.php.net/manual/en/function.sprintf.phpLikewise, replace all the other integers, e.g. it should be %2$.
Oddly, this function was changed in 3.0.2.
You can reverse the $ and % signs here and in the other function at line 680.
June 28, 2009 at 4:08 pm #74728In reply to: Just one more… release candidate 1.0-RC-3
the_Wish
MemberThis, however, is still true. Has anyone else encountered this trouble?
Trying to determine if it’s a plugin in need of update, or if it’s an error on my part, or an actual issue in RC3.
Ok, so I’ve just revisited the additional code issue for my forum and it is indeed the “Allow Images” Plugin that triggers this behaviour. Not only does it scramble your IMG codes, but all other codes as well. It didn’t do this up to RC1 though.
It’s working now for me and I used the chance to also upgrade my custom theme to Kakumei RC3 Standards which, yes, involved the deactivation of the external Page Links plugin.
Works good now.
June 28, 2009 at 3:24 pm #73775In reply to: How to list tags on forum.php
bobbyh
Membertopic_tags() will invoke the topic-tags.php file in your template (or if that file doesn’t exist in your template, in the default template).
At the bottom of the code in that template, there is a tag_form(); invocation. To not have the form appear, you could try invoking the rest of the code on that page (without that tag_form invocation).
The “delete tag” link will appear as long as you are logged in as an admin. It won’t appear to most users when you’re not logged in. So you shouldn’t worry about that appearing.
June 28, 2009 at 1:07 pm #75132Rhys Wynne
ParticipantThat was it!
Thanks
June 28, 2009 at 9:20 am #15112Topic: I can’t work out what’s wrong? Producing a fatal error.
in forum PluginsRhys Wynne
ParticipantHi all!
I’m upgrading a plugin to use the administration menus, rather than editing within the plugin itself. I have used admin functions before (such as add_action), but for the life of me I can’t figure out why I’m having problems adding it this time around.
Basically, on activation of the following plugin I get a “this plugin has caused a fatal error” (but it is activated), and on deactivation I get “Warning: Cannot modify header information – headers already sent by (output started at /home/britain/public_html/forum/bb-plugins/top-posters-code.php:32) in /home/britain/public_html/forum/bb-includes/pluggable.php on line 232”.
Here is the code
<?php
/*
Plugin Name: Show Top Posters (backup)
Plugin URI: http://www.gospelrhys.co.uk/bbpress-plugin-show-top-posters
Description: Readers with the most postes are displayed on your bbpress forum, with their names (linked to their website if they provided one). Based on the <a href="http://www.pfadvice.com/wordpress-plugins/show-top-commentators/" target="_blank">Show Top Commenters</a> plugin for WordPress by <a href="http://www.savingadvice.com" target="_blank">Nate Sanden</a>
Version: 1.2
Author: Rhys Wynne
Author URI: http://www.gospelrhys.co.uk
*/
add_action('bb_admin-header.php', 'show_top_posters_admin_page_default');
add_action('bb_admin_menu_generator', 'show_top_posters_add_admin_page');
function show_top_posters_add_admin_page() {
bb_admin_add_submenu(__('Show Top Posters'), 'use_keys', 'show_top_posters_admin_page');
}
function show_top_posters_admin_page_default() {
echo "test";
}
function show_top_posters_admin_page() {
echo "test";
}
function show_top_poster_text() {
echo "test";
}
?>Any suggestions?
June 28, 2009 at 5:18 am #75128In reply to: How to print all user profiles
Sam Bauers
ParticipantYou aren’t inside a function so there’s no need to globalise
$bbdb.This will get you every user (including all meta) into the array
$users:$user_ids = $bbdb->get_col( "SELECT ID FROM $bbdb->users WHERE user_status = 0 ORDER BY id;", 0 );
$users = bb_get_user( $user_ids );
print_r( $users );June 28, 2009 at 2:49 am #75127In reply to: How to print all user profiles
chrishajer
ParticipantHopefully this is only a typo here, not in your actual code:
global $bddb;Should be $bbdb.
June 28, 2009 at 2:44 am #75118In reply to: Topic slugs & numeric IDs
chrishajer
ParticipantI am guessing you need to change your
RewriteBasefrom
RewriteBase /to
RewriteBase /forum/where forum is the name of your subfolder.
June 28, 2009 at 2:37 am #15111Topic: How to print all user profiles
in forum Troubleshootingiang
MemberI want to display a list of all the users on my blog (wbs80.com) and their profile information.
I have been looking at the bbpress code and trying several tests…but unfortunately without success.
My approach is to get the list of profile keys, get the list of users and for each user display the username and profile information. The code segment that I have is:
<?php
require_once (‘../../bb-load.php’);
global $bddb;
$profile_keys = get_profile_info_keys();
//print_r($profile_keys);
$userinfo = $bbdb->get_results(“SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY ‘ID'”);
//print_r($userinfo);
foreach ($userinfo as $key) {
$metainfo = $bbdb->get_results(“SELECT * FROM $bbdb->usermeta WHERE user_id = $key->ID”);
// ???
}
?>
I don’t know how to use the “profile_keys” value(s) to access the “metainfo” data structure and extract the data.
Any help would be greatly appreciated!
June 28, 2009 at 1:11 am #75113In reply to: Logging Out Error?
johnhiler
MemberThis plugin should do something similar, and hopefully won’t give you any errors.
June 27, 2009 at 8:25 pm #75088In reply to: Best way to prevent SPAM registration?
Detective
MemberThe .htaccess code redirects all POST requests to register.php to another url if the request doesn’t have a referer from my own forum.
The code is originally from here: http://wpmututorials.com/how-to/spam-blogs-and-buddypress/
-
AuthorSearch Results