Search Results for 'code'
-
AuthorSearch Results
-
August 11, 2019 at 6:52 am #202240
In reply to: Automatically register users?
Robin W
Moderatorbasically you will need a link from teachable to fire up code in wordpress to create the user.
I can only suggest you contact the ‘teachable’ authors to see if they have a hook you can use, or google for linsk eg
August 8, 2019 at 1:26 pm #202171maksanse
ParticipantHello John,
Thank you for your answer !
Here is a small video to show you my issue : https://www.dropbox.com/s/wcfqnysi7esby74/bbpress-shortcode-pages.mp4?dl=0I think the issue comes from my LearnDash plugin because the pages where I include the shortcodes are handled by LearnDash.
Here is for example an anonymized url where the shortcode doesn’t work as expected:
https://QQQ.com/formations/QQQ/modules/module-4-sketchnoting/chapitres/chapitre-1-QQQ/The “page/2/” added to the url when cliking to the link (https://QQQ.com/formations/QQQ/modules/module-4-sketchnoting/chapitres/chapitre-1-QQQ/page/2/) doesn’t go to the wanted page, it create an error 404.
The best that could happen here would be to be able to link the pagination buttons to the dedicated forum page, but I don’t know if it is possible…
Best regards and thank you for your help!
August 8, 2019 at 5:52 am #202158In reply to: change forum sidebar
amandainjames
ParticipantI think you want to add a custom widget in your theme. You can add custom widget adding this code in functions.php
function wpblog_widget() { register_sidebar(array( 'name' => __('Primary Sidebar', 'wpb'), 'id' => 'primary_sidebar', // unique-sidebar-id 'description' => '', 'class' => '', 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); } add_action('widgets_init', 'wpblog_widget');Reference: WordPress Custom Widgets
August 8, 2019 at 2:38 am #202153In reply to: How to create a template for custom taxonomy ?
amandainjames
ParticipantI will suggest you to go through a WordPress custom taxonomy tutorial. Here are three steps to create a custom taxonomies in WordPress. To create a custom taxonomy you have to add this code in functions.php
add_action( 'init', 'create_cw_hierarchical_taxonomy', 0 ); //create a custom taxonomy name function create_cw_hierarchical_taxonomy() { $labels = array( 'name' => _x( 'Topics', 'taxonomy general name' ), 'singular_name' => _x( 'Topic', 'taxonomy singular name' ), 'search_items' => __( 'Search Topics' ), 'all_items' => __( 'All Topics' ), 'parent_item' => __( 'Parent Topic' ), 'parent_item_colon' => __( 'Parent Topic:' ), 'edit_item' => __( 'Edit Topic' ), 'update_item' => __( 'Update Topic' ), 'add_new_item' => __( 'Add New Topic' ), 'new_item_name' => __( 'New Topic Name' ), 'menu_name' => __( 'Topics' ), ); // taxonomy register register_taxonomy('topics',array('post'), array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'topic' ), )); }August 7, 2019 at 2:21 pm #202145Topic: Problems with topics/text graying out
in forum Installationfantomx90
ParticipantHello,
I am using the bbPress forums currently, and whenever we create a topic it is this grayed out color… We did find a custom CSS code to use, and it DOES work for Closed topics, but all others it still stays grayed out. What can we do to fix this?
Also, whenever someone is typing a reply it still displays in this awful gray color. How would I change the default color of the text being used in our forum?
(For reference, here is the code we used for black Closed topics:)
#bbpress-forums .status-closed,
#bbpress-forums .status-closed a {
color: #000 !important;
}(And yes, we did try just switching closed with open in the coding lol.)
Thank you.
August 7, 2019 at 12:51 pm #202140In reply to: Loosing Traffic Due to Glitches
John James Jacoby
KeymasterYou won’t get much advice about other forum software in these forums, as these forums are for bbPress (not against it.)
The support in these forums is all volunteer based. No one gets paid to be around to help. Everyone is passionate, but no one is obligated. We have great moderators that keep things clean, but your experience is not uncommon – it helps to be your own site admin.
I see you’ve created 6 topics here, 1 of them was asking for some code help, and 2 of them (including this one) are general gripes with (not) getting things working how you’d like them to without anything really to say back?
bbPress is intentionally simple forum software. It’s opinionated but flexible, so you get a pretty basic experience out of the box, but it requires a bit of determination to customize it to do exactly what you want it to.
You’re right that most hosting providers are generally disinterested in helping with websites themselves; they’re in the business of making sure websites work, so they’re not spending much time deep into how plugins and themes look or feel or work with one another. They’ll probably redirect you back here for most bbPress questions.
If you’re the only person running your community, and you’re unable to keep things working on your own, I can understand why you feel the way you do. I can tell you that bbPress.org runs an unmodified version of bbPress that has required very little ongoing maintenance. All we’ve done here is create a WordPress theme to make things feel a little bit more like a forum than a blog. Together with WordPress.org we do have 11 million user accounts and a high volume of concurrent users across multiple different forums.
It sounds like your forums might be more active than ours here, but it’s hard to know exactly what glitches and problems you’re having, and most things aren’t as easy as coding a snippet for you and having you drop it in someplace.
I’m sorry that your experience with bbPress hasn’t been pleasant. I’m not sure what more to say, other than if you keep with it and keep learning, it is a very capable and fun piece of software that helps hundreds of thousands of communities run really smoothly. Hopefully that continues to include yours!
August 7, 2019 at 12:20 pm #202134In reply to: Turn off @mentions
John James Jacoby
KeymasterTry unhooking them:
remove_filter( 'bbp_make_clickable', 'bbp_make_mentions_clickable', 8 );August 7, 2019 at 12:18 pm #202133In reply to: Link structure not working
John James Jacoby
KeymasterThe breadcrumbs are automatically generated based on the page or archive hierarchy.
Try: Admin > Settings > Forums
Forum Root:
community/fora
Forum Prefix:UncheckedThen for all of the Single Slugs, prefix them with
community/.You could also try creating a WordPress Page hierarchy that has “community” as the first slug and “fora” as the second child page, then use a bbPress shortcode in the content of that page.
August 7, 2019 at 12:10 pm #202132John James Jacoby
KeymasterbbPress.org uses shortcodes on a few archive pages, but in a way where the pagination links already naturally match the permalink & slug structure.
Can you reply and include an anonymized version of the pagination structure that you’re seeing?
August 6, 2019 at 1:45 pm #202115maksanse
ParticipantDoes anyone use shortcode here and has the same issue ?
August 6, 2019 at 1:40 pm #202114In reply to: Can’t give users custom roles.
The Stash House
ParticipantPS : it’s the same when I’m trying with your “tutor” code
August 6, 2019 at 1:37 pm #202113In reply to: Can’t give users custom roles.
The Stash House
ParticipantHi Robin,
I have the same issue as 9march using this code in my functions.php :
/** * BBPress : add new role with custom capabilities * https://codex.bbpress.org/custom-capabilities/ */ //code to add "client" role function add_new_roles( $bbp_roles ) { /* Add a role called tutor */ $bbp_roles['bbp_client'] = array( 'name' => 'Client', 'capabilities' => custom_capabilities( 'bbp_client' ) ); return $bbp_roles; } add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 ); function add_role_caps_filter( $caps, $role ) { /* Only filter for roles we are interested in! */ if( $role == 'bbp_client' ) $caps = custom_capabilities( $role ); return $caps; } add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 ); function custom_capabilities( $role ) { switch ( $role ) { /* Capabilities for 'client' role */ case 'bbp_client': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => false, 'throttle' => false, 'view_trash' => false, // Forum caps 'publish_forums' => false, 'edit_forums' => false, 'edit_others_forums' => false, 'delete_forums' => false, 'delete_others_forums' => false, 'read_private_forums' => true, 'read_hidden_forums' => false, // Topic caps 'publish_topics' => false, 'edit_topics' => false, 'edit_others_topics' => false, 'delete_topics' => false, 'delete_others_topics' => false, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => false, 'delete_others_replies' => false, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => false, 'edit_topic_tags' => false, 'delete_topic_tags' => false, 'assign_topic_tags' => true, ); break; default : return $role; } }always ending with “-No roles for this forums-” like the new role for the newly registered user was not saved.
Regards,
David
August 6, 2019 at 9:50 am #202107In reply to: custom register page & related question
Robin W
Moderatorbbpress just uses WordPress registration, so anything that does WordPress registration will work fine, including many free custom add-on plugins
you can also use the bbpress registration shortcode on a page
August 3, 2019 at 2:09 pm #202061In reply to: Get topic creation date
hydrogriff
ParticipantCan you elaborate on this? Do you mean
bbp_reply_post_date()can also be used for topics?August 3, 2019 at 2:05 pm #202060Topic: BBPress humanized time off by 1 year
in forum Troubleshootinghydrogriff
ParticipantFor the lead topic, I am using this to show a human readable date. Although the date for the
<time>tag is displayed correctly, the actual text part of the date (where it is humanized) is off by 1 year.This is the whole link code –
<a href="<?php bbp_topic_permalink(); ?>" class="bbp-topic-permalink"><span class="bbp-topic-post-date"><time datetime="<?php bbp_topic_post_date();?>" title = "<?php echo bbp_topic_post_date();?>"><?php bbp_topic_post_date(0, true); ?></time></span></a>The
<?php bbp_topic_post_date(0, true); ?>part is off by 1 year but only for a few posts. The reply dates suffer the same fate. They are also off by 1 year – again for only a few posts.I have tried it with plugins deactivated + twenty seventeen theme. Still the same. I have also tried doing all the forum repair tool items. Nothing changed.
August 2, 2019 at 11:11 am #202040In reply to: Is BBPress Still Current for 2019 & Beyond?
Robin W
ModeratorAs the ‘about’ page says ‘We’re keeping things as small and light as possible while still allowing for great add-on features through WordPress’s extensive plugin system.’
so bbpress will be maintained, but their will not be lots of features added – many are provided by others eg
Private groups This Plugin creates unlimited private forum groups
bbp style pack Lets you style bbpress, and add display features
bbp topic count Adds any combination of topics, replies and totals under the authors avatar in topics and replies
bbp profile information Adds up to 4 fields to the bbp user profile and displays any combination of these under the authors avatar in topics and replies
bbp user ranking Lets you add ranking and badges to topics and replies and profiles
bbP Toolkit Swiss knife tweaking and hacking Toolkit for bbPress. Set global options and style your forums.
bbpress sort topics/replies Sort topic replies in ascending or descending order for each bbPress Topic. You can choose to save setting for each topic, for the whole Forum or set globally for every Topic
bbPress Genesis Extend Provides basic compatibility with bbPress and the Genesis Framework with a few extra goodies
bbPress – Moderation Tools Add the ability to moderate and approve new topics and replies in bbPress
bbP Signature This plugin adds user signature support to bbPress
bbPress2 BBCode This plugin adds support for popular bbcode forum code to posts, comments, pages, bbpress forums and buddypress activity and group forums.
GD bbPress Attachments Implements attachments upload to the topics and replies in bbPress plugin through media library and adds additional forum based controls.
bbPress Go To First Unread Post Allows registered bbPress users to quickly jump to the first unread post in a topic
bbPress Topics for Posts Replace the comments on your WordPress blog posts with topics from an integrated bbPress install
Inline Image Upload for BBPress Upload inline images to BBPress forum topics and replies.
bbpress Simple Advert Units Insert advert units (such as adsense or Amazon widgets) into your bbpress forum.
bbPress – Private Replies A simple plugin to allow your bbPress users to mark their replies as private.
bbPress Messages bbPress Messages – User Private Messages with notifications, widgets and media with no BuddyPress needed.
bbP Move Topics Move topics from one forum to another, convert post/comments into topic/replies in the same site.
bbp user online status A WordPress plugin to show user online/offline statuses in bbpress topics and replies
bbp-valoration Adds thumbsup, visits and replies count to topics on bbpress, display results on a widget.
BBP Auto-Close Topics BBP Auto-Close Topics will automatically close bbPress topics after an admin-specified time period.
bbResolutions bbResolutions, will let you set topic resolutions (Resolved, Not resolved and Not a question).
Inline Image Upload for BBPress Upload inline images to BBPress forum topics and replies
bbPress Advanced Statistics Achieve phpBB / vBulletin-esque statistics for your bbPress Forum
bbPress Custom Email Notifications Modify subscription emails sent to users
Canned Replies Let’s moderators and keymasters create standard replies and use these in responses
BBP Improvements for yoast This is a very simple but very helpful tool to help yoast wordpress seo support bbpress better.
bbPress GDPR bbPress GDPR plugin extends new Data Export & Data Erasure feature bundled with WordPress 4.9.6 Release.
AsynCRONous bbPress Subscriptions Amends how bbpress sends emailsThis may or may not suit what you require
August 1, 2019 at 11:13 am #202016In reply to: New site admin, no keymaster role
Robin W
Moderatorok, just re-read your post, and that may not fix it – I suspect there is some code somewhere that is blocking setting of keymasters.
August 1, 2019 at 3:42 am #202002In reply to: How to add pictures to forum headings
Pascal Casier
ModeratorHi,
You could take the code from https://bbpress.org/forums/topic/add-a-featured-image-to-a-forum/ and enter it into your functions.php
I should check, but I might have added that already to the plugin bbp-toolkit (if you prefer just installing a plugin).July 30, 2019 at 5:28 pm #201959In reply to: Single reply redirect to topic
Angelo Rocha
ParticipantSorry!
In your “functions.php” add this line:add_action( 'wpss_before_head', 'wpss_single_reply_redirect' );=)
July 30, 2019 at 1:31 pm #201955In reply to: My forum doesn’t look like a forum
Robin W
Moderatoryou theme seems to be hiding much of this in css eg
.gp-theme .gp-forum-home .bbp-forum-topic-count, .gp-theme .gp-forum-home .bbp-forum-freshness { display: none; }suggest you contact theme author or switch themes
July 30, 2019 at 8:54 am #201950In reply to: Single reply redirect to topic
Angelo Rocha
ParticipantMy solution:
In your “head.php” before <html> tag:
do_action('wpss_before_head');In your function.php:
function wpss_single_reply_redirect() { global $wp; $get_request = explode( '/', $wp->request ); $reply_id = end( $get_request ); if ( in_array( 'reply', $get_request ) ): if ( in_array( 'edit', $get_request ) ): return; endif; wp_redirect( bbp_get_reply_url( $reply_id ), 301 ); exit; endif; }July 30, 2019 at 7:02 am #201942In reply to: bbp private group isse?
schossie
ParticipantHi @robin-w,
I dont know if it was too complicated what I wrote above. I would really appreciate some help.To make it short I found out that every time I delete topics on bulk in the back end, I cannot post in the front end anymore in the forums that are set to private and have a private group in them.
The same happens if I use the repair tools in the back end.When I then try to post something, instead of seeing my post I see a page called
page cannot be found. In the forum index I see that a post has been posted, but neither the author nor anybody else can access it. It also disappears from the activity widget.Only if I go to the forum page in which the topic was posted and set the forum attributes from either open to closed and back to open or from private to public and then back to private, I can see my post again(and the post of others) and it also shows again in the activity widget.
Please let me know what I can do with this also what you mean by create a set of repeatable steps to create the issue.
I cannot manually delete post by post from the frontend when the forum is fully running.
Thank you!
July 27, 2019 at 6:03 pm #201897Topic: Help creating Button Link for users Profile Page
in forum Installationboy1der52
ParticipantI’ve created a Button for “Your Profile” so that users can access their Profile Page. I can’t figure out how to add a hyperlink or a shortcode for the button. Any & All help appreciated.
boywonder
July 24, 2019 at 1:05 pm #201826In reply to: Remove Participant Role Capabilities
danielleoverman
ParticipantSolved, found this code snipped from a previous post https://bbpress.org/forums/topic/prevent-users-from-creating-topics-2/ which removed the topic form for everyone but admins and moderators.
add_filter( 'bbp_current_user_can_access_create_topic_form' , 'rew_only_mods' , 10 , 1) ;
function rew_only_mods ($retval) {
// Users need to earn access
$retval = false;
//check if admin
if ( bbp_is_user_keymaster() ) {
$retval = true;
}
//check if moderator
$role = bbp_get_user_role( get_current_user_id());
if ($role == 'bbp_moderator') {
$retval = true;
}
// Allow access to be filtered
return (bool) apply_filters( 'rew_current_user_can_access_create_topic_form', (bool) $retval );
}
July 24, 2019 at 11:14 am #201820In reply to: Can’t see link on message
Robin W
Moderatoradd this to the custom css part of your theme settings
#bbpress-forums div.bbp-reply-content a { color: #12526f !important; } #bbpress-forums div.bbp-topic-content a { color: #12526f !important; }Close and re-open your browser
Please come back and confirm that this works
-
AuthorSearch Results