Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 3,601 through 3,625 (of 32,481 total)
  • Author
    Search Results
  • #202115
    maksanse
    Participant

    Does anyone use shortcode here and has the same issue ?

    #202114
    The Stash House
    Participant

    PS : it’s the same when I’m trying with your “tutor” code

    #202113
    The Stash House
    Participant

    Hi 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

    #202107
    Robin W
    Moderator

    bbpress 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

    Shortcodes

    #202061
    hydrogriff
    Participant

    Can you elaborate on this? Do you mean bbp_reply_post_date() can also be used for topics?

    #202060
    hydrogriff
    Participant

    For 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.

    #202040
    Robin W
    Moderator

    As 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 emails

    This may or may not suit what you require

    #202016
    Robin W
    Moderator

    ok, just re-read your post, and that may not fix it – I suspect there is some code somewhere that is blocking setting of keymasters.

    #202002
    Pascal Casier
    Moderator

    Hi,
    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).

    #201959
    Angelo Rocha
    Participant

    Sorry!
    In your “functions.php” add this line:

    add_action( 'wpss_before_head', 'wpss_single_reply_redirect' );

    =)

    #201955
    Robin W
    Moderator

    you 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

    #201950
    Angelo Rocha
    Participant

    My 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;
    }
    #201942
    schossie
    Participant

    Hi @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!

    #201897
    boy1der52
    Participant

    I’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

    #201826
    danielleoverman
    Participant

    Solved, 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 );
    }

    #201820
    Robin W
    Moderator

    add 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

    #201819
    danielleoverman
    Participant

    I’d like to remove the capability for participants to create and edit topics. They should keep their reply capabilities.

    I’m using this code (along with attempting to use a couple different solutions which did not work), but I haven’t found anything that works. Can someone point me in the right direction? No plugins, i’m just looking for working code.


    add_filter( 'bbp_get_caps_for_role', 'ST_add_role_caps_filter', 10, 2 );

    function ST_add_role_caps_filter( $caps, $role ){
    if( $role == bbp_get_participant_role() ) {
    $caps ['publish_topics']= false ;
    }
    return $caps;
    }

    #201783
    Gomle
    Participant

    I know this is old. And you may never receive this message. But just in case…

    I read your post over at stack, and I saw it was closed for a stupid reason back then.
    The thing is – I am trying to do exactly what you are talking about.

    Everything looks almost good with the code you pasted on stackexchange, but of course the forum which contains subforums doesn’t work as it should..

    If you got this to work, and you still have the code. Can I please ask if you can post it here?
    I believe the only thing I need is the code for loop-forums.php.

    Thanks.

    Gomle
    Participant

    I can confirm this. If you read this and hope to find an answer – this will most likely cheer you up 🙂

    I had just imported 175.000 posts.
    And was at the stage on reparing afterwards: Recalculate the position of each reply

    I changed the server setting to allow 512MB of processes. And time out to 800 seconds.
    I still received MANY server errors during the repair.
    I got no information at all from the script what was going on, and if it kept on going when I just reloaded the page, and pressed “REPAIR”-button everytime I got an error.

    After about 10 tries, it finally got through with a success message.
    Just to be sure, I ran the repair one more time, and it worked for about 30-40 seconds, and I got the same success message.

    All other repairs went smoothly.

    Good luck 🙂

    austex
    Participant

    That they now are mainly doing other things is sad for us, but they have a perfect right to do as they wish, and should feel under no obligation to spend time supporting the code.

    Agree that they have the right to do as they wish, but they should at least publicly announce whether they are going to end bbPress development, or if it’s going to continue to languish for years at a time.

    I understand @johnjamesjacoby is a very busy guy, but we are constantly told to be wary of plugins that are old.

    More importantly, a lot of us have moved on to other software, rather than continue to beta-test bbPress 2.6 (which has been in some form of RC for over 3 years, and the latest RC came out in December of last year).

    I have a big project that I’m putting together for somebody (they want WordPress), and some kind of lightweight/small forums are planned for, and it’s frustrating that I’m having to look elsewhere for forum software, or rigging some kind of fancy comment system (trying to avoid Disqus and Facebook for obvious reasons).

    It’s odd, because bbPress could be a selling point for WordPress in their competition with other platforms. It’s also odd, because they have some very competent people working for them, but then they allow bbPress to kind of just drift along.

    #201725
    Robin W
    Moderator

    sorry, I only do live code, so don’t know what rc7 does

    #201709
    Robin W
    Moderator

    untested, and probably from a purist view not the most elegant solution, but this should work

    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 );
    }
    

    Also allows keymasters, but I presume you want that.

    Put this in your child theme’s function file – or use

    Code Snippets

    #201703
    DL
    Participant

    So I just setup a whole new test site, installed buddypress and bbpress

    added the dizkusZK converter to the converters list

    Ran it against a copy of the database that contains a dizkus forum.

    got error:

    WordPress database error: [Specified key was too long; max key length is 1000 bytes]
    CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default '0', meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key(191), meta_value(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
    
    No data to cleanStarting Conversion
    #201681
    Robin W
    Moderator

    suspect that modern events calander has had an update.

    I agree that ‘adding extra server code without need’ is a good policy, but unless you get modern events calendar to understand the issue and then fix, then the answer is that you need the fix 🙂

    I suspect they will simply say it is a bbpress issue, which in a way it is

    #201675
    asmedej
    Participant

    Robin, thanks for answer, and thanks for the fix, but adding extra server code without need is not always a good thing to do.

    Although, I think I found the problem plugin, and it seems that it is a Modern Events Calendar, so when i disabled it, everything was OK, BUT I don’t understand why all of a sudden there is conflict with bbpress, as I stated before everything was working fine.

    Maybe I should contact Mec calendar …

Viewing 25 results - 3,601 through 3,625 (of 32,481 total)
Skip to toolbar