Search Results for 'code'
-
AuthorSearch Results
-
October 10, 2017 at 1:12 pm #187578
In reply to: Get tags when editing exist topic
froust
ParticipantFound solution 😉
I just added
<?php bbp_form_topic_tags(); ?>to the input vvalue, so now it look’s like thisL:<input type="text" value="<?php bbp_form_topic_tags(); ?>" />Regards
October 10, 2017 at 1:05 pm #187577Topic: Get tags when editing exist topic
in forum Requests & Feedbackfroust
ParticipantHi
When I editing some topic I don’t see tags in the input which I entered, can we call them via some PHP code?
Also screenshot: http://prntscr.com/gvpn8kBest Regards, and also I want to say that I like minimalism of this plugin 🙂
Regards
October 10, 2017 at 2:44 am #187566In reply to: Links not showing – white?
mithrandir
ParticipantI don’t want to change the colour using code as none of our participants would be able to do that
The changes made in the CSS, are global and participants will not have to add any CSS code. Once the changes are applied they are visible to everyone across the website.
October 10, 2017 at 2:36 am #187565In reply to: Links not showing – white?
mithrandir
ParticipantNot sure why its not working, seems to work on my end.
I believe the cause of the issue is the wordpress theme your website is using.
The best solution would be to contact the authors of the theme WPZOOM, and im sure they can find a quick solution.If not, you could try adding the CSS once more, the following should work:
#bbpress-forums div.bbp-topic-content p a, #bbpress-forums div.bbp-reply-content p a{ background: none; color: black !important; position:relative !important; display:inline-block !important; visibility: visible !important; }In truth it is difficult to address any styling issues without being able to see the website, if you can not get in touch with the authors of the theme I could try my best to find a solution.
October 9, 2017 at 6:26 pm #187563In reply to: Links not showing – white?
janallsopp
ParticipantThanks @mithrandir786 there are no plugins to alter the appearance of bbPress. And the CSS didn’t work. What else can I try? I don’t want to change the colour using code as none of our participants would be able to do that. Unless there is a visual editor?
Thanks,
JanOctober 9, 2017 at 1:56 am #187552In reply to: Links not showing – white?
mithrandir
ParticipantAppears to be a css issue, are you using any plugins to modify the appearance of bbPress ?
The following css should fix this
.bbp-body .hentry p a{ color:#3f3f3f !important; }you could change the color for the link to one of your preference by modifying the color property.
If you are using wordpress version 4.7 and above, To add the css, in the WordPress dashboard navigate to:
Appearance>customize>Additional csscopy and paste the code and save changes.
October 8, 2017 at 7:37 pm #187547In reply to: Add .HTML in the URL structure
MakarkinPRO
ParticipantFound another plugin
<?php /* Plugin Name: .html in url Plugin URI: http://www.witsolution.in/ Description: Adds .html to pages. Author: witsolution Version: 1.0 Author URI: http://www.witsolution.in/ */ add_action('init', 'witsolution_page_permalink', -1); register_activation_hook(__FILE__, 'witsolution_active'); register_deactivation_hook(__FILE__, 'witsolution_deactive'); function witsolution_page_permalink() { global $wp_rewrite; if ( !strpos($wp_rewrite->get_page_permastruct(), '.html')){ $wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html'; } } add_filter('user_trailingslashit', 'witsolution_page_slash',66,2); function witsolution_page_slash($string, $type){ global $wp_rewrite; if ($wp_rewrite->using_permalinks() && $wp_rewrite->use_trailing_slashes==true && $type == 'page'){ return untrailingslashit($string); }else{ return $string; } } function witsolution_active() { global $wp_rewrite; if ( !strpos($wp_rewrite->get_page_permastruct(), '.html')){ $wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html'; } $wp_rewrite->flush_rules(); } function witsolution_deactive() { global $wp_rewrite; $wp_rewrite->page_structure = str_replace(".html","",$wp_rewrite->page_structure); $wp_rewrite->flush_rules(); } ?>for posts and pages its working fine. How to make it work for topic and forums for BbPRESS?
October 8, 2017 at 10:00 am #187538In reply to: Registered Users anonymous posting ability
mithrandir
ParticipantThankyou very much for replying,
I am currently working on a solution, That was my initial observation aswell, regarding hard coded values. Users will be able to opt-in or opt-out by submitting a checkbox input field. I was hoping I could post back soon, once I had accomplished a (not so embarrassing) solution.
Thanking you again for your help, and for all your exceptionally amazing work with bbPress.
October 8, 2017 at 7:45 am #187537In reply to: Device Display Compatibility
mithrandir
ParticipantYes that would be the best solution, depending on their support for theme customization. I have extracted(just for testing purposes) the CSS from there live demo site for ‘discoverypro’, and can confirm it is the cause of the bbPress styling issues.
Users names from under their profile pictures trail off the right side of the screens
fix:
.bbp-body .bbp-topic-meta .bbp-author-name{ display:block; }when reading posts and replies within topics, all the users profile pics squash themselves all together at the top left hand-side of the screen.
*I cannot recreate this issue as it is specific to your website, however if you could provide a link to your forums/website it would be possible to fix the issue.
October 6, 2017 at 4:44 pm #187496In reply to: Registered Users anonymous posting ability
John James Jacoby
KeymasterThis won’t be super easy, unfortunately. Users would need to opt-in or opt-out of being anonymous (either in their profiles, or in their individual posts) and then there are a bunch of places the user account would need to be overloaded with some anonymous’esque object with hardcoded values.
So, 3 things are necessary:
* Profile integration
* Topic/Reply integration
* Per-post User overrideIt’s possible, but will take a few development hours to achieve.
October 6, 2017 at 12:46 pm #187489robbinwwok
ParticipantWP version: 4.8.2
bbPress version: 2.5.14
Website: courses.wisdomwayofknowing.orgEven working with an experienced developer, we are at a dead-end with trying to get working a function essential to our online courses (without ditching all of the plug-ins and having a platform built from the ground-up), that has to do with group registration of group leaders without the leaders having to pay for all of the seats for their students; those teachers (or admin) being able to set them up on the back-end as a group leader and then be able to assign anyone to them as a group leader; and the group leader/admin having the ability to set up private forums for each group leaders when they need a private forum. And, finally, that this same group leader will be able to have several ongoing but separate groups of students who will be taking the course with him/her.
I’ve also sent this query as a support ticket to WisdmLabs (the group registration plug-in we purchased that, at this point, doesn’t have the features we need), and LearnDash as the course platform.
What we need from this query: any possible solutions or help pinpointing where we need to look next. Any help/ideas you can provide will be GREATly appreciated. And time is important as we’ve already had queries for group registrations with the ability to host private forum discussions and we can’t help them until this issue is solved.
Here’s a list of functions/features we need and the issues we’ve encountered.
• Group leaders to be able to register singly (we want to offer the course to leaders at no cost or low cost), and then when their students register, to be able to assign the students to them as a group leader.
• Group leader to have the ability to create and moderate private discussion forums with their students. (They would have access to the general course forums that are visible to anyone who has registered for the course, but the leader, at his/her discretion, could create a private forum area for only those registered students whom they “allow” in.)
• Students to be able to register for a course as a single user (we can offer these users, who have indicated who their group leader is, a coupon code provided to the group leader to share with the students who will be taking the course with them). Currently, there is no way on the back-end to assign students who register singly to a particular group leader. And, there is no way currently for that group leader to set up private forums for their students.The way the current group registration plug-in works we have installed (by WisdmLabs), the group leader has to purchase all of the “seats” both for themselves and for any student they want to register. Yet, NONE of the teachers who are currently interested in our first course are in a position to purchase on behalf of their students.
How can we allow teachers/group leaders to:
• register as any other single user would (or have a portal for this because someone has created a plug-in!)
• have us set up (or the group leader set up) that leader as a course group leader on the back-end
assign students who have registered using a distinctive coupon to a group leader
• allow group leaders (or admins) to create a private course forum for any group that they are leading?What are we missing? Many thanks for any insight you can provide!
Robbin Whittington
robbin@wisdomwayofknowing.orgOctober 6, 2017 at 8:19 am #187482In reply to: How to edit the first post ?
pmbordeaux
ParticipantMany thank’s
The solution was to put the permalinks into “name of the article”
Now I have to change the shortcode [bbp-topic-index]
October 5, 2017 at 1:55 pm #187469In reply to: 500 – Internal server error
mithrandir
ParticipantThe problem is most likely not specific to bbPress and is with your server settings or htacess. WordPress may not be able to generate or modify the .htaccess file for your website due to file permissions issues. It might help to delete the htaccess file, grant correct permissions and refresh permalinks which will generate a new htaccess file. Try to enable php error log in htaccess as well.
# enable PHP error logging php_flag log_errors on php_value error_log /path/to/htdocs/PHP_errors.logCreate a blank PHP_errors.log file in the directory specified in your .htaccess file and set its permissions to 777. Now refresh the page that’s giving the 500 error and check if that log file now contains an error(s).
October 5, 2017 at 12:13 pm #187466In reply to: How to embed a page on the top of the forum page?
mithrandir
ParticipantTo find the location of the template files navigate to:
‘wp-content/plugins/bbpress/templates/default/bppress/’You will find all the template parts in this folder. It is recommended to not modify the files directly, instead create a folder named bbPress in the ‘generatepress’ theme root folder. ie. ‘wp-content/themes/generatepress/bbpress/’ copy any files you wish to modify into this folder. This way updates to bbPress wont overwrite any files you have modified and your changes wont be lost.
Test this by copying the content-archive-forum.php to the newly created bbpress folder and begin to modify the file.
a simple php echo command will confirm it is working by printing a message at the top of the content-forum-archive template.
<?php echo "Hello world!"; ?>The Example provided in the previous reply can be pasted on top, or wherever you would like to display the topics. Some formatting is required, by adding appropriate div classes and styling with css as necessary. Would be happy to help with any of the html, php or wordpress functions if there is any difficulty.
*my apologies if this a duplicate reply, previous reply did not get submitted properly,spam protection may have blocked it, since it included links to screenshots on imgur.
October 5, 2017 at 5:18 am #187451In reply to: How to create Topic Info bbpress
mithrandir
ParticipantThe following functions would be useful:
//to get the topic author name
bbp_get_topic_author_display_name()//to get the forum title
bbp_get_topic_forum_title()Example:
<?php echo 'Started by: ' . bbp_get_topic_author_display_name(); ?> <?php echo 'in: ' . bbp_get_topic_forum_title(); ?>You would need to modify the respective template file, depending on where you would like to display the “topic info”
If you could provide more information on what you are trying to achieve, would be happy to help out.
October 4, 2017 at 2:16 pm #187437In reply to: How to embed a page on the top of the forum page?
mithrandir
ParticipantIt is definitely possible, to do so you will have to modify the template ‘content-archive-forum.php’
you could use a custom loop to loop through the topics you would like to display based on the user role.Example:
<div class="Featued"> <?php //get current users user role $role = bbp_get_user_display_role(get_current_user_id()); //if role is keymaster,moderator or participant display topics if ($role == "Keymaster" || $role == "Moderator" || $role == "Participant") { ?> <!--begin loop--> <?php $args = array('post_type' => 'topic', 'posts_per_page' => 10); $the_query = new WP_Query($args); if ($the_query->have_posts()) : ?> <!--the loop--> <?php while ($the_query->have_posts()) : $the_query->the_post(); ?> <div> <a class=”bbp-topic-permalink” href="<?php bbp_topic_permalink(); ?>"title=”<?php bbp_topic_title(); ?>”><?php bbp_topic_title(); ?></a> </div> <?php endwhile; ?> <!-- end of the loop--> <?php wp_reset_postdata(); ?> <?php else: ?> <p><?php __e('Sorry, no posts matched your criteria.'); ?> </p> <?php endif; ?> <?php } elseif ($role == "Guest" || $role == "Blocked") { //do nothing } ?> </div>It is not very complicated depending on your level of expertise, but will require some knowledge of php and wordpress. If you could provide more information regarding what you are trying to achieve or any areas you are facing difficulty with, I can try my best to help out.
October 4, 2017 at 11:15 am #187429In reply to: How to loop all topics in one view?
mithrandir
ParticipantThe code below loops through specified number of topics in the forum. eg ‘posts_per_page’ => 100 .
Please the read the link included below.if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => 'false', 'meta_key' => '_bbp_last_active_time', 'orderby' => 'meta_value', 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 100 ) ) ) bbp_get_template_part( 'bbpress/loop', 'topics' );Link to topic:
https://bbpress.org/forums/topic/display-list-of-topics-under-specific-forum/October 4, 2017 at 11:05 am #187428Topic: disable assign Topic Tags for non Mods/Keymasters
in forum Troubleshootingsysix
ParticipantHello 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);
`October 4, 2017 at 6:54 am #187420In reply to: Remove sidebar?
mithrandir
ParticipantThe theme you are using is most likely overriding the bbpress default template, any template files you modify in the plugin folder are most likely being bypassed by theme or child theme. It would help to visit the bbpress codex which explains the template hierarchy in detail.
Getting Started in Modifying the Main bbPress Template
Step-by-Step Guide to Creating a Custom bbPress Theme
I could try my best to help out if you could provide more information regarding which theme you are using, folder structure, child theme etc.
October 4, 2017 at 6:34 am #187419In reply to: remove Titel on forum main page
mithrandir
ParticipantYou would have to use a conditional statement comparing against, if it is the forum archive. Depending on your theme and how bbPress has been implemented, the location of the title may vary. I am by no means an expert, but I can try my best to help out if you could provide more information.
<h1 class="entry-title main-title"> <?php // Display title on all pages except forum archive if (!bbp_is_forum_archive()) { the_title(); } ?> </h1>October 2, 2017 at 5:21 pm #187376In reply to: Small ticks all over
ricklndn
ParticipantThats really cool how you figured that out and made some code that works.. thank you very much sir it worked.
October 2, 2017 at 5:02 pm #187375In reply to: Small ticks all over
Robin W
Moderatorok you have css that does
.inner-page-content article.article-content ul li::before { content: "\f046"; font-family: FontAwesome; color: #b6d91a; position: absolute; left: 0; }so if your theme has a custom css area, suggest you add the following
.inner-page-content article.article-content ul li::before { content: none !important; }October 2, 2017 at 10:18 am #187352In reply to: Confused – Am I missing something?
paladinbrewer
ParticipantWell that makes me sad 🙁 I guess I have no choice but to use the shortcode to manually build the forums on a page? Will that change how it loads as far as efficiency goes?
That or pay someone to create a normal template for me for my theme 🙁
October 2, 2017 at 5:19 am #187348In reply to: Forum Freshness
melodies
ParticipantI know that changes made directly inside the bbPress plugin will be overridden during the next update, but I’m just wondering if in the meantime there is a line of code I could change within the plugin as a temporary fix?
…Similar to the way the person who was experiencing the same problem in the link provided above did, stating: “In my case (Pacific Time) I needed to subtract 7 hours which translated to 25200 seconds” and made the temporary fix directly inside his install of the plugin.
October 2, 2017 at 3:05 am #187347In reply to: Confused – Am I missing something?
Robin W
ModeratorAs far as I can see your theme author has rewritten some (maybe all) of the theme templates, renaming all the bbpress css codes, to harmonise in with the theme, which effectively neuters my plugin.
It would take considerable effort to change all that to make the two work.
I think that is as far as I can help.
-
AuthorSearch Results