In the header on my wordpress theme I do
<?php include_once(ABSPATH."forum/bb-load.php"); ?>
and it works on the front-page without any errors and I can call the bb functions etc. But on the other wordpress-pages I have it gives an error. And stops all html output where I include the file, the error is:
Fatal error: Call to a member function suppress_errors() on a non-object in /fakepath/public_html/forum/bb-includes/functions.bb-core.php on line 77
Anything I can do to fix this?
I have dropped my bb_ tables, removed bb_capabilities from _usermeta and deleted bb-config.php. I then reinstalled bbpress with integration settings. At the end of install I received the error Forum could not be created! I followed this advice: https://bbpress.org/forums/topic/forum-could-not-be-created and added a row to the forum table. When I try to login now I still receive the error “multiple user_login matches”
Anyone? Help? Please
!!!
I have dropped my bb_ tables, removed bb_capabilities from _usermeta and deleted bb-config.php. I then reinstalled bbpress with integration settings. At the end of install I received the error Forum could not be created! I followed this advice: https://bbpress.org/forums/topic/forum-could-not-be-created and added a row to the forum table. When I try to login now I still receive the error “multiple user_login matches”
Anyone? Help? Please
!!!
Speaking of security, anyone using bb-attachments should please update to 0.2.8
(you’ll only need to update bb-attachments-init.php)
Speaking of security, anyone using bb-attachments should please update to 0.2.8
(you’ll only need to update bb-attachments-init.php)
The issue with using the plugin at this stage in a live environment is that at some point a reset might be needed. This would involve deleting all posts.
The plan has always been to create some way to migrate from the standalone bbPress to the plugin – but it is likely to be one of the last things coded.
In your function declare $bb_current_user as global and print_r it to see what all you can have 
function blah() {
global $bb_current_user;
print_r( $bb_current_user );
}
In your function declare $bb_current_user as global and print_r it to see what all you can have 
function blah() {
global $bb_current_user;
print_r( $bb_current_user );
}
Edit, this seems to only apply when I use override posting restrictions from the admin-can-post-anything plugin.
Edit, this seems to only apply when I use override posting restrictions from the admin-can-post-anything plugin.
It works perfectly for me, though you can try with some debugging, for example try
echo $counter;
inside the foreach loop to see if you have any loop at all. Check the source code if you have anything there.
It works perfectly for me, though you can try with some debugging, for example try
echo $counter;
inside the foreach loop to see if you have any loop at all. Check the source code if you have anything there.
I’ve figured out that there were some PHP configuration issues with my XAMPP installation, so the error messages are gone now. Sad thing is, your code doesn’t output anything at all.
I’ve figured out that there were some PHP configuration issues with my XAMPP installation, so the error messages are gone now. Sad thing is, your code doesn’t output anything at all.
If your wordpress and bbpress share the same database you can simply edit sidebar.php
On the top of the file add:
<?php require_once(ABSPATH."/forum/bb-load.php"); ?>
This will give you access to the bbpress functions. (Edit to the path of your bbpress installation)
Then where you are going to output your latest posts add this:
<?php
global $wpdb;
$query = "SELECT * FROM bbp_topics WHERE topic_status='0' ORDER BY topic_time DESC LIMIT 6";
$topics = $wpdb->get_results($query);
$counter = 0;
?>
This will find the latest posts, I do it this way so it won’t show the same topic several times if many posts have been made in the same topic. Also edit bbp_ to your bbpress db prefix.
Finally to output simply add something similar to this:
<div id="latest-posts" class="border">
<h2>Latest forum posts</h2>
<?php foreach($topics as $topic) : ?>
<div class="<?php echo $counter % 2 ? "gray" : "white"; ?>"><a href="<?php topic_last_post_link($topic->topic_id); ?>"><?php topic_title($post->topic_id); ?></a></div>
<?php $counter++; ?>
<?php endforeach; ?>
</div>
Edit to your preference on html and css.
If your wordpress and bbpress share the same database you can simply edit sidebar.php
On the top of the file add:
<?php require_once(ABSPATH."/forum/bb-load.php"); ?>
This will give you access to the bbpress functions. (Edit to the path of your bbpress installation)
Then where you are going to output your latest posts add this:
<?php
global $wpdb;
$query = "SELECT * FROM bbp_topics WHERE topic_status='0' ORDER BY topic_time DESC LIMIT 6";
$topics = $wpdb->get_results($query);
$counter = 0;
?>
This will find the latest posts, I do it this way so it won’t show the same topic several times if many posts have been made in the same topic. Also edit bbp_ to your bbpress db prefix.
Finally to output simply add something similar to this:
<div id="latest-posts" class="border">
<h2>Latest forum posts</h2>
<?php foreach($topics as $topic) : ?>
<div class="<?php echo $counter % 2 ? "gray" : "white"; ?>"><a href="<?php topic_last_post_link($topic->topic_id); ?>"><?php topic_title($post->topic_id); ?></a></div>
<?php $counter++; ?>
<?php endforeach; ?>
</div>
Edit to your preference on html and css.
I made it work in a way using this:
<?php
/*
Plugin Name: BBTexCode
Description: [tex][/tex] to image
Plugin URI:
Author: Sondre Kjøniksen
Version: 1.00
*/
function bb_tex_replace( $text ) {
$text = preg_replace('/[tex](.*?)[/tex]/ie', "'<img src="/cgi-bin/mathtex.cgi?'.rawurlencode('$1').'" align="middle" />'", $text);
return $text;
}
add_filter('post_text', 'bb_tex_replace');
?>
Though I still have a problem, it seems bbpress strips backslashes when adding the post to the DB. Is it possible to do so bbpress skips stripping backslashes from [tex][/tex] tags? At the moment it works if I write double backslashes like: [tex]\LaTeX \frac12[/tex] But it is kind of annyoing having to type double every time.
I made it work in a way using this:
<?php
/*
Plugin Name: BBTexCode
Description: [tex][/tex] to image
Plugin URI:
Author: Sondre Kjøniksen
Version: 1.00
*/
function bb_tex_replace( $text ) {
$text = preg_replace('/[tex](.*?)[/tex]/ie', "'<img src="/cgi-bin/mathtex.cgi?'.rawurlencode('$1').'" align="middle" />'", $text);
return $text;
}
add_filter('post_text', 'bb_tex_replace');
?>
Though I still have a problem, it seems bbpress strips backslashes when adding the post to the DB. Is it possible to do so bbpress skips stripping backslashes from [tex][/tex] tags? At the moment it works if I write double backslashes like: [tex]\LaTeX \frac12[/tex] But it is kind of annyoing having to type double every time.
There is something wrong with your site, it says fatal error so the plugin is kinda unreachable.
There is something wrong with your site, it says fatal error so the plugin is kinda unreachable.
I have installed BBcode lite, and I want to add my own custom bbcode tag, I tried making my own plugin to allow [tex][/tex], though I can still not fully understand the preg_replace() function. Would be greatly appriciated with some help.
What I am trying to achieve is:
[tex]some code here[/tex]…
The code in between the tags get’s converted to <img class=”latex-image” src=”/path/image.cgi?#code goes here with urlencoding#” alt=”” />
If it’s not too complicated to make the standard plugin to put code tags from the bbcode tags into additional pre tags when outputted, that would be great too.
[code] tags into additional pre tags when outputted, that would be great too.