Creators plugin All in One SEO Pack bug fixed. Have to wait on updates or:
In wp-content/plugins/all_in_one_seo_pack/admin/display/meta_import.php, change line 38 from
}else{
to
}elseif(!class_exists('bbPress')){
Great. My standard answer is always the same:
Check out the codex: https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#1-change-how-the-forum-list-displays
Or
Use a plugin like ‘bbP Toolkit’ or ‘bbp style pack’
Pascal.
If need be, I can make an account for you, so you can see what the issue is (as my forums are private).
Adding the following to functions.php in my theme-folder, did nothing:
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"), false, '1.11.3');
wp_enqueue_script('jquery');
}
I also restarted Apache, also to no avail.
Anonymous UserInactive
Hello,
I have made this a little simple, where any visitor can have an overlay division hiding the topic content and everything when there are caught words in the currently viewing topic..
You can add this code to your theme’s functions file:
Remember: edit $list = 'test,bad topic,'; line to insert your watched words separated by commas without a space after the commas.
add_action('wp', function() {
/**
* Add the watched words or sentences separated by commas.
* Remember not to add a space before the words
* Example : 'evil dog,naughty cat,pig'
*/
$list = 'test,bad topic,';
// set up a global variable for our case
$GLOBALS['my_filtered_words'] = explode(',', $list);
});
add_action('bbp_theme_after_reply_content', function() {
if( ! get_the_ID() )
return;
$topic = get_post( get_the_ID() );
if( ! $topic || 'topic' !== $topic->post_type )
return;
global $my_filtered_words;
$words = preg_split( "/\s+/", $topic->post_content );
foreach( $words as $i => $word )
$words[$i] = strtolower($word);
$occurance = 0;
foreach( $my_filtered_words as $string ) {
$string = strtolower( $string );
$occurance += in_array( $string, $words ) ? 1 : 0;
}
if( ! ( $occurance > 0 ) )
return; // nothing caught
$cookie = isset( $_COOKIE['se_conf_warned_topics'] ) ? explode(',', $_COOKIE['se_conf_warned_topics']) : array();
if( in_array($topic->ID, $cookie) )
return; // confirmed before.
?>
<style type="text/css">
.se-conf-wt {position: fixed; top: 0; left: 0; background: rgba(0, 0, 0, 0.78); width: 100%; height: 100%; z-index: 999;}
.se-conf-wt p {color: #fff; position: relative; top: 50%; display: table;margin: 0 auto;}
.se-conf-wt a {color:#fff;}
</style>
<div class="se-conf-wt t-<?php echo $topic->ID; ?>">
<p>This topic contains offensive content. <a href="javascript:;">Continue?</a></p>
</div>
<script type="text/javascript">
window.onload = function() {
var a = document.querySelector('.se-conf-wt.t-<?php echo $topic->ID; ?> a'),
b = document.body;
a.onclick = function() {
var expires = new Date(),
cval = '<?php echo isset($_COOKIE['se_conf_warned_topics']) ? $_COOKIE['se_conf_warned_topics'] : ''; ?>';
expires.setMonth(expires.getMonth() + 6); // 6 months expiracy date
cval += '<?php echo $topic->ID; ?>,';
document.cookie = "se_conf_warned_topics=" + cval + "; expires=" + expires;
// cookie set, now let's hide the warning
this.parentNode.parentNode.remove();
b.style.overflowY = '';
return false;
}
b.style.overflowY = 'hidden';
}
</script>
<?php
});
Tested on my local installation and it works fine.
Let me know how it goes.
Samuel
Anonymous UserInactive
Hello, here are the steps for you:
1. Create a ‘new topic’ page at example.com/new-topic/ and add [bbp-topic-form] shortcode as content.
2. Add this code to your child theme’s functions file:
add_filter('the_content', function($content) {
global $post;
if( 'post' == $post->post_type && is_user_logged_in() ) {
$content .= '<p><a href="' . home_url('new-topic/?se_pid=' . $post->ID) . '">Generate a topic</a></p>';
}
return $content;
});
add_action('init', function() {
$content = null;
if( isset( $_GET['se_pid'] ) ) {
$pid = (int) $_GET['se_pid'];
$content = get_post( $pid );
}
$GLOBALS['se_post'] = $content;
});
add_filter('bbp_get_form_topic_title', function( $title ) {
global $se_post;
if( $se_post ) {
return $se_post->post_title;
}
return $title;
});
add_filter('bbp_get_form_topic_content', function( $body ) {
global $se_post;
if( $se_post ) {
return $se_post->post_content;
}
return $body;
});
Test it out, go to your posts and scroll down to the bottom, click the “generate ..” link and see if it worked.
I am here for any further customization or if you encounter issues with implementing this.
Regars,
Samuel
Hi there
Thanks for the reply.
For the one or two lines of code that needs to be removed from the bbpress plugin files it doesn’t seem right to go to all the effort of a child theme.
I can always remove the code each time the plugins updated.
Would you happen to know where it is and which line I need to remove.
Thanks
Hi,
I suppose with ‘core’ you mean the bbPress plugin code ? NO, NEVER ! You don’t want to loose your changes at the next bbPress update, right ?
I think @robkk answer was the most appropriate one for this topic: Just work on the template, copy it to your (child)theme and modify as he indicated.
See probably step 5 and 6 from https://codex.bbpress.org/themes/theme-compatibility/step-by-step-guide-to-creating-a-custom-bbpress-theme/ an also https://codex.bbpress.org/functions-files-and-child-themes-explained/
Pascal.
Something seems very strange to me, all your links on your site have a // in front of them.
So the login form has <form method=”post” action=”//http://www.barabajen.se/wp-login.php” class=”bbp-login-form”>
Please try to fix that first (no idea where it comes from, but for sure it’s not bbPress.
Pascal.
When i try to log in to BBpress on my site either by the bbpress-widget or with the[bbp-login] shortcode all I get is a blankscreen and nothing more happens. Everthing just stops with a blank screen on …/wp-login.php.
I looked around and couldnt really find an answer to my problem.
My site: http://www.barabajen.se, And there is a shortcode in the bottom or the right widget-area
Thanks in advance.
Thank you all for your feedback. After some thorough investigation, I managed to finally configure my caching so that it actually works (never checked that… my mistake – I entered the wrong path in .htaccess). Also, I hard-coded some tweak in my theme, something which was only recently brought to my attention.
And this morning, one of our users finally had site load times of <1s on our forums. I can happily leave them on our main site – even if P3 reported bbpress & Associates as major sources of site load time: That it still is very little with good caching and static CSS/JS files in place (which I did not have before, they were computed on site load, thanks to my theme).
Best
Manuel
OK, now I see !
How about [bbp-lost-pass] ?
Check out https://codex.bbpress.org/features/shortcodes/
Pascal.
Yes, I understood, so you should find your answer in one of the 3 links I provided.
Most probably this ?
Dashboard>forums>all forums and edit each forum
put the banner in the description
then download my plugin
https://wordpress.org/plugins/bbp-style-pack/
and tick item 6 Add Forum Description on the forum display tab
But read the rest too.
Pascal.
Hi Pascal,
I’ve used [bbp-login], [bbp-register] and [bbp-lost-pass] to create fronted profile pages so am wondering if there’s a [bbp-change-pass] shortcode or something? Or if not, are there alternatives?
Cheers
Hi,
I am trying to use [bbp-topic-form] in a page, but the page displays a blank page. The shortcode [bbp-forum-form] works fine but not the topic form.
Please can someone tell me why the page is not displaying the topic form?
solved with the following custom CSS
#bbpress-forums div.reply { height: auto; width: inherit !Important; }
Hi there,
Is there a shortcode, plugin or script that will allow me to create a custom change password page?
I have created custom reg, login and lost password pages but can’t find any documentation on the change password page.
Thanks
I fully understand the need for the SMTP plugin, I think we should all use it !
But I meant that if your standard FROM is changed, it probably means that there is another plugin somewhere manipulating it.
I had similar issues in the beginning and that why I switched to the other SMTP plugin mentioned above, but with this code, it should work too.
Pascal.
Hi,
That seems like a CSS issue, but I would need a link to the site to be able to provide you the correct code.
Pascal.
THat code should work ! I used it about 2 years ago for a quick fix.
But if you need this code, it means there is somewhere a plugin that is doing strange things !
So I’ve got
<?php do_action( 'bbp_theme_before_topic_title' ); ?>
<span class="bbp-topic-started-in"><?php printf( __('%2$s', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>
"><?php bbp_topic_title(); ?>
And if the forum id equals 8397, I want to assign a different class to it… <?php if ( bbp_get_topic_forum_id() == 8397 )
But I’m a bit stuck here. Any suggestions?
So I figured out how to do it, now I’m trying to color-code every forum.
Hello,
I found some working code, could you please just check it to make sure it is 100% valid and I am not missing anything?
/*BBPress email fix*/
add_filter( 'wp_mail_from_name', 'email_sent_from_name' );
function email_sent_from_name( $name )
{
return 'SITE NAME';
}
add_filter( 'wp_mail_from', 'email_sent_from' );
function email_sent_from( $email )
{
return 'email@example.com';
}
Yes, I did replace the values with required ones such as the address and send from name.
Thanks.
Hello!
I’m looking to output the forum title inside- and before every topic title. So it would read like:
[Forum 1] Topic title
[Forum 2] Topic title
I want to use the shortcode [bbp-topic-index], but then need to visually separate the topics somehow.
My _very_ basic knowledge of php says to add bbp_forum_title() somewhere around bbp_before_topic_tile(), but I’m not sure how to piece that together into functioning code. Anyone got any ideas or pointers?
P.S. Please don’t laugh if I sound like an idiot, I’m learning very slowly 🙂
Hi,
Something is strange in your theme … Also when I look from it from a smaller screen, everything gets on top of other things.
A quick and dirty patch ?
#bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author {
width: 25%;
}
But you need more to fix your whole environment.
Pascal.
Hi,
I am trying to use [bbp-topic-form] in a page, but the page does not display the form. The shortcode [bbp-forum-form] works properly but not the topic form.
Please can someone tell me why the page is not displaying the topic form?