Search Results for 'code'
-
Search Results
-
Hello Guys,
I think I have found a bug. But at first some Info from the System:
WP version 4.8.2
PHP version 7.0.22-0ubuntu0.16.04.1
bbPress version 2.5.14-6684I want the hide the Tag-Input for all “normal” Users. So only the Keymaster and the mods can assign tags. I found, that I can hook into the capatiblities with
bbp_get_caps_for_roleand set the settings tofalse:`
add_filter(‘bbp_get_caps_for_role’, function ($caps, $role) {
// only the admin can delete and manage topic tags
if (!in_array($role, [‘bbp_keymaster’])) {
$caps[‘manage_topic_tags’] = false;
$caps[‘delete_topic_tags’] = false;
}// only mods and admin can edit or assign tags
if (!in_array($role, [‘bbp_keymaster’, ‘bbp_moderator’])) {
$caps[‘edit_topic_tags’] = false;
$caps[‘assign_topic_tags’] = false;
}return $caps;
}, 10, 2);
But the problem is, that in
template\defaults\bbpress\form-reply.phpwe check with:<?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>current_user_cancallsWP_User->has_capand there is$capabilities['assign_topic_tags'] = true.—–
Workaround:
`
add_filter(‘user_has_cap’, function($caps, $metaCaps, $args) {
$forumCaps = bbp_get_caps_for_role($args[0]);return array_merge($caps, $forumCaps);
}, 10, 4);
`I created a custom page for the forum “home page”. bbPress has clickable breadcrumbs and “Forum” will load the default bbPress forum home, as such I added the following to my .htaccess to redirect the user to my custom page:
RewriteEngine On RewriteRule /forums$ /the-forumThis redirects the user:
from: http://ok.thissiteworks.com/forums/ (bbPress forum home)
to: http://ok.thissiteworks.com/the-forum/ (custom forum home)That works – but only for logged in users. When a user is not logged in the redirect does not work.
- Can someone advise why this would not work for not logged in users?
- Is there perhaps a better way to redirect the users to the custom page?
Hi everybody, first post here! 😉
I hope somebody can help me, since I’m having problems with the translation of a new bbPress installation… It’s kind of strange actually, because it seems to translate only part of the strings, but if I check my .mo & .po files they’re fully translated, just how it should be.
I’ve been using WordPress for years but it’s the first time I used bbPress as well, so I followed these instructions religiously.
(I actually only had to change the directory in which I put the .mo & .po files to wp-content/languages/plugins, since putting them in wp-content/languages/bbpress/ – I had to create this folder to try – like written in the documentation won’t work. After that I tried to put them in every other “logic” place that came to mind with no success)Here are a couple of screenshot to let me show my “half translated/half not” situation:
EDIT: img’s won’t work so here are the links
https://imgur.com/2PkKazk
https://imgur.com/GHeexfTThank you very much for any input!
WordPress 4.8.2
bbPress 2.5.14
URL: http://www.guitarpub.it/forum/Dear team,
I want to hide attachments and external Url’s for guest users, how can we do it, is there any plugin that can do it , or please send me code to achieve it.
Thanks in Advance.
Regards,
WaqasTopic: Forum Freshness
On my forum, the timestamp on the posts are 7 hours in the past.
When a new post is made, it starts at “7 hours ago” rather than “just now,” “1 minute ago,” etc.The general time is set correctly in the WP > Dashboard > settings and all other timestamps displayed across the site are accurate (messages, notifications, etc). Only notifications relating to bbPress are off by 7 hours.
This same issue can be found in an old thread post (Link below):
However, the solution in that post is outdated, since the code layout in has changed, and “line 178 in /wp-content/plugins/bbpress/bbp-includes/bbp-common-functions.php” no longer exists for manual alteration.
Can you please tell me which file I can edit in bbPress to manually subtract 7 hours from the freshness output timestamp of all future forum posts?
Thank you.