Forum Replies Created
-
In reply to: Forum theme not working…
So basically on the forum, when someone clicks edit my profile at the top of the page, it goes to the backend. Even though, it would be preferable to go to the front end.
I would not let users see the toolbar, this is really just for admins.
You need to disable the toolbar – add this to your functions file
add_filter('show_admin_bar', '__return_false');
then put the profile into your menu
No problem
In reply to: How to display X last topics from a specific forum ?great – pleased its doing the trick !
sorry if I wasn’t so busy, I’d have a crack at it 🙂
In reply to: filter topic on date baseYou explain me in detail with code?
Can you explain what you are trying to do and where on your site eg put a shortcode on the front page, add a widget that does this etc.
you’d do better to just steal the replies widget I wrote for private groups
download
https://wordpress.org/plugins/bbp-private-groups/
and then open up and edit
includes/pg_forum_widgets.php
line 464 onwards has the replies widget, I’m pretty sure that lines 539 to 542
//PRIVATE GROUPS Get an array of IDs which the current user has permissions to view $allowed_posts = private_groups_get_permitted_post_ids(new WP_Query($query_data)); // The default forum query with allowed forum ids array added $query_data['post__in'] = $allowed_posts;
is all that’s added to the orginal code, so remove those lines.
and line 574 contains the size
you can just fork all that to the end of the file into your functions file
I’d suggest that you
1. create a test site (which everyone should have in nay case !)
and
2. Google sql tutorial video, and work out how to code my statements
3. go into phpmyadmin on your test site and play until you get it right
4. Come back and post the resultant code to help others
sorry, but almost all of the stuff I have learn’t has been by spending time googling to find some examples, and then hours getting it to work 🙂
In reply to: EDIT TOPIC in BBPRESSgreat – glad you’re fixed !
In reply to: filter topic on date baseyes 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.