Forum Replies Created
-
In reply to: filter topic on date base
yes it should be as bbpress just uses wp_query once args has been parsed.
see
https://codex.wordpress.org/Class_Reference/WP_Query dates are quite a way down
untested but something like
$week = date( 'W' ); $year = date( 'Y' ); bbp_has_topics( array( 'year' => $year, '&w' => $week ) );
would do last 5 days
In reply to: Search input redirects to homepage with no resultsok, on the specific forum search, it is probably plugin or theme related
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
but since you say you don’t really want that, you could disable the forum search
and to add forum searches to the main search use
function filter_search($query) { if ($query->is_search) { $query->set('post_type', array('post', 'pages', 'forum', 'topic', reply')); }; return $query; }; add_filter('pre_get_posts', 'filter_search');
This is untested code, I copied it from another forum, but should work, come back if it does or doesn’t to help future readers of this thread!
In reply to: BBpress forum stats plugin layoutThanks, Rob
In reply to: BBpress forum stats plugin layoutI’d say the issue was more with the widget not taking up the column space it could – rthe widget below is much wider. This is fixed usually with css rather than widget code.
Sorry but an training today or I’d take a look, perhaps rob will
you could do, but since you’re into code, I’d just amend line 1157 on bbpress/includes/common/widgets.php, and make a note to change it again on upgrades
Not the recommended way, but practical !
In reply to: 2.5.3 Easy change bbpress title font and colorIf you want to match an existing theme or website color, install ‘colorcop’
It lets you see what colour any part of your screen is
In reply to: Forum links on dashboard disappearedHey great – glad you’re fixed, and thanks for posting your solution, it means that I can advise this for future !
great, do come back when you’ve succeeded !
yes, you would be looking in the usermeta table 9noramlly called wp_usermeta at meta-key wp__bbp_subscriptions
this is comma deliminated, so if I was user ID 3, and was subscribed to topics 10, 12 and 15, and forums 1, 3 and 6, I would see
user_id 3
meta_key wp__bbp_subscriptions
meta_value 1,3,6,10,12,15So to add category 246, you would just add this to the end, or create if not there
Someone cleverer than me out to be able to give you a sql string or two that would do this which you could run on phpmyadmin.
Logically you’d create two statements, the first would say
for all the user_id’s if wp_bbp_subscriptions exists, then make the meta_value equal to the meta_value concatenated with ‘,246’
Then second one
for all user_id’s if wp_bbp_subscriptions does not exist, make meta_key wp_bbp_subscriptions equal to 246.I’m not good enough at sql to code this without lots of checking – anyone good at this stuff?
In reply to: EDIT TOPIC in BBPRESSI don’t know either of the two plugins, but essentially I don’t let anyone have access to the backend of my site – it jars with the front end.
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
contains a list of the capabilities, and most restriction plugins should list these, and you hopefully should be able to find or see edit_topics as a capability that you can restrict.
It may well be that one plugin is conflicting with the other as they both sound like they are trying to do the same job.
In reply to: Forum links on dashboard disappearedIt could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
In reply to: Not permissions for this pageCould be a number of things.
1. check that you are not present on multiple screens in the same browser, sometimes leaving yourself logged in on one screen whilst logged out on others can do funny things.
then it could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
yes wordpress will overwrite your current site.
Most host providers allow you to create subdomains, so if you have
your can create
test.mysite.com
I’d suggest you create a test site, and install wordpress on there, keeping your existing site as is.
Then you can create wordpress pages, and copy/paste text and upload pictures to the test site to make it look like (or better than!) your current site.
When you are happy, you can then wipe your live site, install worpress (your host provider should help you to do this if you don’t know how).
You can then export and import the pages and posts from your test site to your live site very easily using the built in exporter/importer.
pic
In reply to: How to display X last topics from a specific forum ?In fact took a look today and done !
You now have a template of ‘short’ which just does the titles and topics, no search or other stuff.
see the web for full details on how to do this, but for example
[bbp-display-topic-index show=’5′ forum=’29’ template=’short’ ]
In reply to: How to display X last topics from a specific forum ?Which file is used to built this ? I hope this is not the same as [bbp-single-forum id=$forum_id] because I need them both.
No both use functions not files, so they are separate.
Also a pagination is there now. How could I remove it ?
That should be quite doable, I’ll take a look in the next few days !
just updated this to do a particular forum as well !
In reply to: New Users Auto Subscribe to One ForumI doubt that would be possible.
This script reverses the logic
so normally the database would have a list of forums you have manually subscribed to.
This changes it to have a list of forums you have manually unsubscribed to, thus you are subscribed by default.
So the code would not work to just have one forum.
In reply to: Default template confusion?if you want to get rid of the breadcrumb use
what else do you want to achieve?
In reply to: disable front end editinghmm, can you post a link or some screenshots?
In reply to: disable front end editingNot sure why you only want editing in the backend. Indeed I’m not sure why you want anyone to have access to the backend at all, apart from admins !
However presuming that you actually just want no-one to change their profiles
You will need to modify
wp-content/plugins/bbpress/templates/default/bbpress/user-details.phpmake a copy of this file, and put in in a directory called bbpress within your theme, so you end up with
wp-content/%your-theme-name%/bbpress/user-details.phpThe take out lines 63-69
<li class="<?php if ( bbp_is_single_user_edit() ) :?>current<?php endif; ?>"> <span class="bbp-user-edit-link"> <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"><?php _e( 'Edit', 'bbpress' ); ?></a> </span> </li> <?php endif; ?>
This will stop any front end editing
this is interesting…
Your link
only shows that the coder has changed the lines
‘You must be logged in to reply to this topic’
in
form-reply.phpform-reply.php is called by
content.single.topic.php
on line 44.
Now you could change line 44, BUT and here’s the issue, we are talking php, which is a pre-processor, so by the time it creates the page, you can’t have a conditional and it has processed, so a ‘click to do reply form’ from this .php is not simple.
There’s loads on the net about this eg
http://stackoverflow.com/questions/20738329/how-to-call-a-php-function-on-the-click-of-a-button
google something like php click link to do function
All of it talks about using ajax – soemting that is entirely alien to me, and I can’t find an example to use, they all lose me in jargon I don’t know.
It’s definitely do-able, but I don’t know how !!
In reply to: How to display X last topics from a specific forum ?I’ve just recut my topics shortcode to allow you to do just that
In reply to: Hide author/adminI think the first fix works. Would you recommend just leaving it, or changing it up.
if you mean robkk’s suggestion, then if it works leave it.
Otherwise come back if I have not understood
In reply to: Hide author/adminIn reply to: Include sub-forum topics in parent forum loopI’m afraid I don’t have time at the moment to do lots of coding for others