You can add this into the footer of your website and then give it a class along the lines of .forum-disclaimer
Then inside your stylesheet do something like:
.forum-disclaimer { display:none; }
.bbpress .forum-disclaimer { display:block; }
Good luck!
Hi Lynqoid, nice pic by the way : )
I have added into the custom.css and doesnt seem to work. Any missing code I have missed out ?
Green horn in php. Thanks
.bbpress #primary .sidebar { display:none; }
.bbpress #content-page { width: 98%; }
Add this to your stylesheet.
.bbpress #primary .sidebar { display:none; }
.bbpress #content-page { width: 98%; }
Good luck!
The wpdb prepare uses a placeholder like %s and then replaces it with the first variable in the arguments after the query itself.
For example:
$user_login = $wpdb->get_var( $wpdb->prepare(
"SELECT u.user_login FROM $wpdb->users u JOIN $wpdb->usermeta um ON um.user_id = u.ID
WHERE u.ID = %s
AND um.meta_key = 'last_activity'
AND DATE_ADD( um.meta_value, INTERVAL %s MINUTE ) >= UTC_TIMESTAMP()
",
$user_id, $time
) );
Good luck!
I’m getting an error all of a sudden to my code
function is_member_online($user_id, $time=5){
global $wp, $wpdb;
$user_login = $wpdb->get_var( $wpdb->prepare( "
SELECT u.user_login FROM $wpdb->users u JOIN $wpdb->usermeta um ON um.user_id = u.ID
WHERE u.ID = $user_id
AND um.meta_key = 'last_activity'
AND DATE_ADD( um.meta_value, INTERVAL $time MINUTE ) >= UTC_TIMESTAMP()
"
));
if(isset($user_login) && $user_login !=""){
return true;
}
else {return false;}
}
This checks if bbpress members are online. This is the error that is being resulted
Warning: Missing argument 2 for wpdb::prepare(), called in /hermes/bosweb/web172/b1721/ipg.dnbrawlercom/lsheroes/wp-content/themes/SaveLSHoooo/custom-functions.php on line 15 and defined in /hermes/bosweb/web172/b1721/ipg.dnbrawlercom/lsheroes/wp-includes/wp-db.php on line 992
It has been happening working until recently.
My forums show up on the page if I add the shortcode [bbp-forum-index] but then none of my topics show up! There is a number under topics but when I click on the number I end up at a blank page.I’m just starting the forum and tried several test topics but they go to a blank page. I’m using Creativo as a theme, and wonder if there is something I should modify somewhere. Any ideas?
Thanks!
Help!
I can’t get the ‘lost password’ function to work because I don’t understand what I am supposed to put in the ‘Lost Password URI:’.
I’ve read several things such as that I should create a ‘Lost password’ page but I don’t know what content I need to add to this page.
Or that I use a shortcode [bbp-lost-pass]. However I don’t know what you do with a short code and everything I’ve tried has failed.
Can you help?
I still have the problem on my site, and am not using WishList Member.
I tried a clean install with all plugins I am using, and maybe the order of installing was different, but on the clean install I had no problem, until I did a database restore. Something in the db messes it up. I can’t see where in the code the showing of the first post (or any) is checked against some condition.
Did the past updates of bbpress and other plugins too (not the latest wordpress though) and the behavior is still the same.
Hi
Novice here.
Where exactly do I put the code above?
Your help appreciated.
Dear Stephen.
That did the trick – i disabled WP United and topics has the right authors but other problems occur:
* I can’t log out anymore – you can push the button logout but nothing happens. When you refresh – Login Screen appear. strange! – I use Buddpress & BBpress. Tempate Default Buddypress template. Before forum conversion did was still operating well.
* When you make a reply to a topic – all the BBcodes buttons are gone.
Hi,
I know that this must not be posted here but the author of this plugin has no response anymore and I believe this plugin must be integrated to bbpress itself since it’s very important to avoid spams and to moderate posts that are not related to the forum.
Please see this link: http://pastebin.com/EMmZK1Zt
for my code.
Now, my problem is I cannot make it work. I have checked the structure of wp mail and I know I’m in the right path. It’s just why it’s still not working.
I hope someone here can help me as I’ve been struggling on this for months now.
Thanks and have a great day ahead.
Best regards,
Mariz
How do I link a user’s forum profile from their name in their comment. So far I’ve got this code in functions.php but it doesn’t seem to work:
function force_comment_author_url($comment)
{
// does the comment have a valid author URL?
$no_url = !$comment->comment_author_url || $comment->comment_author_url == ‘http://’;
if ($comment->user_id && $no_url) {
// comment was written by a registered user but with no author URL
$comment->comment_author_url = ‘http://www.examplesite.co.uk/forums/users/=’ . $comment->username;
}
return $comment;
}
add_filter(‘get_comment’, ‘force_comment_author_url’);
Please can somebody tell me where I’m going wrong?
Hi, is it at all possible to display an individual part of my forum on a different page?
i want to be able to do exactly what buddypress does when they display bbpress categories as forums for their groups, and so i can have that category of the forum show up as an element in a custom made page.
i tired with shortcodes but that only seemed to give the headings, i want the threads and comments from the forum to be usable from different pages in my site, exactly how buddypress allows users to access the forums in their groups.
Any help would be amazing as i’ve been stuck on this for 2 weeks now and my project deadline is almost upon me.
If you want to create pages specifically to do things, then you can use shortcodes, the list of them is here
https://codex.bbpress.org/shortcodes/
so if you created a page and form instance put in the shortcode
[bbp-login]
you would have a page with a login.
Above the shortcode you could put some rules, or tell people how to register etc.
The file that displays this is loop-single-forum
wp-content/plugins/bbpress/default/bbpress/loop-single-forum.php
You can save a version to your theme – see
Step by step guide to setting up a bbPress forum – part 3
item 3 for how to do this
If you amend the current line 31
from
<?php bbp_list_forums(); ?>
to
<?php bbp_list_forums(array (
'show_topic_count' => false,
'show_reply_count' => false,
'separator' => '',
)); ?>
It will stop it displaying the numbers in brackets after each topic.
To display these against the items will need some code at line 42 – beyond my immediate knowledge as to what you’d put there to get it to match the list
`
Hello,
In the forum setting, it says:”Partner with a WordPress Page and use Shortcodes for more flexibility.”
How can I do that?
Thanks,
I have observed precisely the same problem on my Android Motorola Droid HD Maxx. In my case I defined a page containing the [bbp-forum-index] shortcode for the Forums top level. If I go to that page in either of the latest versions of IE or Firefox, I get a nice page showing the Forum categories. Using my Android phone, I get a page containing the single word ‘Forums’. As the OP noted, if I go directly to a Forum category or topic all is well.
My WordPress version is 3.8, bbPress version is 2.5.2. I am using a copied and modified version of the TwentyFourteen theme.
How do I link a user’s forum profile from their name in their comment. So far I’ve got this code in functions.php but it doesn’t seem to work:
function force_comment_author_url($comment)
{
// does the comment have a valid author URL?
$no_url = !$comment->comment_author_url || $comment->comment_author_url == ‘http://’;
if ($comment->user_id && $no_url) {
// comment was written by a registered user but with no author URL
$comment->comment_author_url = ‘http://www.examplesite.co.uk/forums/users/=’ . $comment->username;
}
return $comment;
}
add_filter(‘get_comment’, ‘force_comment_author_url’);
Please can somebody tell me where I’m going wrong?
Hello, thanks for your attention.
I’m currently using some code in my functions.php to show my sub-forums on a separate line, which is better than having them clustered together.
They also show the amount of new topics and replies within parenthesis, example;
Other
General (2, 5)
Real Life (8, 5)
Humour (7, 9)
Where “Other” is a forum and the others is sub-forums, and you can see the amount of topics and replies within the (x, topics, y replies).
What I need/want is to move the (x, topics, y replies) to the same place it shows, but only on the same line as the sub-forum, as the parent-forum.
Image example: http://imgur.com/ssonCD2
Is there any code I could put in my functions.php which would support this, or a plugin I could look at? This shouldn’t be hard to do, but yet my Google Search Adventure has reached it’s end (for now, at least).
Thanks for every bit of help.
Done!
I can also report that switching the databases to a ramdisk is quite easy and has sped things up quite a bit. Though my earlier report was a little optimistic — it was going to take a couple of weeks. With the ramdisk, though, it really does seem to be headed for a few days work.
Overnight, it got to 30,000 of 500k rows, but then it started showing hyphens instead of “Converting replies” in the reporting windows, Like so:
------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
----------------------------------------------
Converting replies (26750 - 26999)
Converting replies (26500 - 26749)
Converting replies (26250 - 26499)
Converting replies (26000 - 26249)
Converting replies (25750 - 25999)
The hyphens are added a a rate of one per delay time, by the looks of it, at the top.
A peek at the database has it at _bpp_converter_step 10 still, and _bpp_converter_start at 27000
Has the conversion croaked or is this part of the process? Should I manually increment _bpp_converter_start a little and restart the convertion? (I had to do that a couple of times as it was converting topic titles)
You could disable bbPress subscriptions if you want to stay with ‘Subscribe2’
https://codex.bbpress.org/forum-settings/#forum-features
Subscriptions Allow users to subscribe to forums and topics
You’ll want to add a CSS rule to your themes CSS
.bbp-topics ul.super-sticky,
.bbp-topics ul.sticky {
background-color: #ffffe0 !important;
}
Changing #ffffe0 for the HEX color of your choice.
I also do not know what changes you have made so until you update both WordPress & bbPress you are basically out of luck.
This is the reason why you should never change the core files in WordPress or bbPress.
I would suggest you create yourself a test install of WordPress locally, add your theme and plugins and compare the changes and start to implement the changes you need in an upgrade friendly way such as child themes and custom additions to functions.php etc.
The problem I see is the table name: bb_forums
It should be running these queries on the old bb_tagged table.
These queries are part of a relatively ancient upgrade routine, dating back to database version 220 in bb_upgrade_220(). Are you able to see what your bbPress database version was before this upgrade started?
Hello.
If you have a look into the templates form-user-register.php and form-user-login.php you could see they are almost the same beside do_action placement.
<?php do_action( 'register_form' ); ?>
<div class="bbp-submit-wrapper">
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" name="user-submit" class="button submit user-submit"><?php _e( 'Register', 'bbpress' ); ?></button>
<?php bbp_user_register_fields(); ?>
</div>
<div class="bbp-submit-wrapper">
<?php do_action( 'login_form' ); ?>
<button type="submit" tabindex="<?php bbp_tab_index(); ?>" name="user-submit" class="button submit user-submit"><?php _e( 'Log In', 'bbpress' ); ?></button>
<?php bbp_user_login_fields(); ?>
</div>
Is it possible to move <?php do_action( 'login_form' ); ?> out of the bbp-submit-wrapper in the next releases? This will greatly help to have the same markup for these templates using the wordpress hooks system.
BR, Vladimir Ivanov