Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,426 through 5,450 (of 32,518 total)
  • Author
    Search Results
  • #182411

    In reply to: bbp-messages

    Anonymous User
    Inactive

    Hello everyone,

    Sorry but I just came to discover this thread, I am the author of bbp-messages and there’s now a major update made and it now supports Multisite, the problem that Stewart was reporting.

    Also Stewart, the link wordpress/members1/http:/localhost/wordpress/members1/ pretty much seems messed up, so it’s hard to tell whether it is bbP issue or configuration. I think you did not configure your testing environment quite well and also the bbPress link looks filtered by BuddyPress. Next time I’d suggest you edit your hosts file (c:\System32\drivers\etc\hosts with admin permissions using notepad) and add a new entry 127.0.0.1 bbpress.dev now bbpress.dev will act like a normal domain and you wouldn’t run into issues while testing or migrating (all you can do is replace .dev with .tld in the db SQL file). Also add the virtual host for Apache http://stackoverflow.com/a/25203499/3910932

    Thank you Arutam and Robin you’re very helpful. I just wanted to point that this thread continues in wp-org plugin support forums https://wordpress.org/support/topic/messages-upgrade/

    Best,
    Samuel

    #182410
    sally
    Participant

    Hi Robin,

    Thanks for checking the code. Can you help me to get the open issues fixed with the origin code ?

    Best Regards
    Sally

    #182408
    Robin W
    Moderator

    though re-reading the thread this morning, I think I have not fixed anything, juts done it another way.

    and that doesn’t work either – forget the code above

    #182391
    Robin W
    Moderator

    ok, I’ve taken pity and kicked this round for an hour – I expect to be on your Christmas list !!!

    This seems to work, although please do some testing for all roles, and check it out.

    /*Customize the BBPress roles to allow Participants to trash topics*/
    add_filter( 'bbp_get_caps_for_role', 'ST_add_role_caps_filter', 10, 2 );
    
    function ST_add_role_caps_filter( $caps, $role ){
        // Only filter for roles we are interested in!
        if( $role == bbp_get_participant_role() ) {
    			
    			$caps = array(
    
    				// Primary caps
    				'spectate'              => true,
    				'participate'           => true,
    
    				// Forum caps
    				'read_private_forums'   => true,
    
    				// Topic caps
    				'publish_topics'        => true,
    				'edit_topics'           => true,
    				'delete_topics'         => true,
    				
    
    				// Reply caps
    				'publish_replies'       => true,
    				'edit_replies'          => true,
    				'delete_replies'        => true,
    
    				// Topic tag caps
    				'assign_topic_tags'     => true,
    			);
    
    	}
    	
        return $caps;
    }
    /*then only allow participants to trash their own topics*/
    
    add_filter( 'bbp_map_reply_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 );
    add_filter( 'bbp_map_topic_meta_caps', 'ST_tweak_trash_meta_caps', 11, 4 );
    
    function ST_tweak_trash_meta_caps( $caps, $cap, $user_id, $args ){
    
    	// apply only to delete_reply and delete_topic
    	if ( $cap == "delete_reply" || $cap == "delete_topic" ){
    		// Get the post
    		$_post = get_post( $args[0] );
    		if ( !empty( $_post ) ) {
    
    			// Get caps for post type object
    			$post_type = get_post_type_object( $_post->post_type );
    			//$caps      = array();
    
    			// Add 'do_not_allow' cap if user is spam or deleted
    			if ( bbp_is_user_inactive( $user_id ) ) {
    				$caps[] = 'do_not_allow';
    
    			// Moderators can always edit forum content
    			} elseif ( user_can( $user_id, 'moderate' ) ) {
    				$caps[] = 'moderate';
    
    			// User is author so allow edit if not in admin
                } elseif ( user_can( $user_id, 'participate' ) && ( (int) $user_id === (int) $_post->post_author ) ) {
                    $caps      = array();
    				//$caps[] = $post_type->cap->delete_posts;
    
    			// Unknown so do not allow
    			} else {
    				$caps[] = 'do_not_allow';
    			}
    		}
    	}	
    	// return the capabilities
    	return $caps;
    	}
    #182378
    AiratTop
    Participant

    I can open https://airat.biz/forums/ after delete [] in /plugins/bbpress/includes/forums/functions.php on lines 1800, 1818, 1832

    Old: $post_stati[]
    New: $post_stati

    And line 1854:
    Old: $meta_query[]
    New: $meta_query

    Can you check it out?

    I think this issue with php7 support

    Now i have a warning:
    [Thu Mar 02 20:46:15.572617 2017] [php7:warn] [pid 23849] [client ip] PHP Warning: array_unique() expects parameter 1 to be array, null given in /site_path/wp-content/plugins/bbpress/includes/forums/functions.php on line 1836

    #182377
    AiratTop
    Participant

    I have the same problem.

    I can’t open page https://airat.biz/forums/ and https://airat.biz/wp-admin/edit.php?post_type=forum
    Error 500

    I saved Permalinks, reinstalled plugin, but pages still don’t working.

    bbPress tools also don’t help
    /wp-admin/tools.php?page=bbp-repair

    Error log:

    [Thu Mar 02 20:33:57.235075 2017] [php7:error] [pid 16265] [client ip] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /site_path/wp-content/plugins/bbpress/includes/forums/functions.php:1800\nStack trace:\n#0 /site_path/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query))\n#1 /site_path/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)\n#2 /site_path/wp-includes/plugin.php(515): WP_Hook->do_action(Array)\n#3 /site_path/wp-includes/class-wp-query.php(1681): do_action_ref_array('pre_get_posts', Array)\n#4 /site_path/wp-includes/class-wp-query.php(3238): WP_Query->get_posts()\n#5 /site_path/wp-includes/class-wp.php(617): WP_Query->query(Array)\n#6 /site_path/wp-includes/class-wp.php(735): WP->query_posts()\n#7 /site_path/wp-includes/functions.php(955): WP->main('')\n#8 /home/a in /site_path/wp-content/plugins/bbpress/includes/forums/functions.php on line 1800

    bbPress 2.5.12
    BuddyPress 2.8.1
    WordPress 4.7.2
    PHP 7.1.2-3+deb.sury.org~xenial+1

    #182374

    In reply to: Change query

    Robin W
    Moderator

    I am not sure I understand what it is you are asking

    wp-query is a wordpress function

    https://codex.wordpress.org/Class_Reference/WP_Query

    #182372

    Topic: Change query

    in forum Troubleshooting
    yito
    Participant

    In loop-replies.php, I want to change WP_Query.
    But ‘bbp_repliesisbbpress()->reply_query->have_posts();` ,so I don’t know how to change some of WP_Query.

    Please someone teach me how to.

    Wordpress version 4.7.2
    bbPress version 2.5.12

    #182355

    In reply to: User Role

    Robin W
    Moderator

    try this – it should work but is untested

    Please come back and let us know if it does or doesn’t

    add_filter ('kal_get_user_role_map()' , 'bbp_get_user_role_map()' ) ;
    
    function kal_get_user_role_map() {
    
    	// Get the default role once here
    	$default_role = bbp_get_default_role();
    
    	return (array) apply_filters( 'kal_get_user_role_map', array (
    		'administrator' => bbp_get_keymaster_role(),
    		'editor'        => $default_role,
    		'author'        => bbp_get_spectator_role(),
    		'contributor'   => $default_role,
    		'subscriber'    => $default_role
    	) );
    }

    This goes in your function file

    #182341
    russ8523
    Participant

    I simply want to edit the wording in the (Pale Blue), fields in the ‘Edit Profile’ section. an example: to change “Your password should be at least ten characters long. Use upper and lower case letters, numbers, and symbols to make it even stronger.” to “eight characters long”. Also the (Pale Blue), name field is empty, just a ‘period’. Where is the code/file located? I’ve searched high and low!?

    WP 4.7.2 bbpres 2.5.12 newsite.hampsteadbowmen.com

    Any help will be very much appreciated.

    #182320

    Topic: sidebar

    junglejim620
    Participant

    Hi bbPress,

    From the edit page, I used this shortcode [bbp-forum-index].

    Then set full template with no sidebars and from the bottom sidebar I chosen NONE. The page still showing the sidebar?

    The main question is, is there anyway making NOT to show the sidebar on the page?

    Please advise help, thanks

    #182307

    Hi Dominik,

    It’s great that you’re digging around the code to figure out what functions to use! Can you describe a bit about what you’d like to accomplish? Once we know the end result, we can help you work towards it, step by step.

    #182306

    In reply to: User Role

    Use the bbp_get_user_role_map filter, to map WordPress roles to bbPress roles.

    #182296
    hughb1
    Participant

    Ignore this, I found my answer here. Thanks!

    Layout and functionality – Examples you can use

    #182253
    BenM
    Participant

    Hi,

    I use Private status to protect some forums and I would like to have a login page instead of 404 on private posts because it’s very inconvenient for people who have subscribed to a topic and click on the link to read new replies, to see a 404 if they are not logged in. (bbPress Private groups doesn’t work for this too.)

    I tried a lot of things, but I was never able to catch status of topic’s forum with a single function.

    bbp_is_forum_private doesn’t work here (there’s no ID).
    get_queried_object() is empty.

    I can have topic slug ($wp_query->query['topic']) but strangely, get_page_by_path doesn’t work.

    Finaly, I have to make a SQL request to find ID and post_parent (so, forum) from slug, then use bbp_is_forum_private (to post_parent because it doesn’t work witk ID and ancestor)! It’s a little bit… heavy.

    Do you have a best method?

    #182206
    mattdevelop
    Participant

    Same error here, this happens because of this code

    $post_stati = $posts_query->get( 'post_status' );
    
    		// Default to public status
    		if ( empty( $post_stati ) ) {
    			$post_stati[] = bbp_get_public_status_id();
    

    in \includes\forums\functions.php on line 1800

    #182199
    mapofemergence
    Participant

    Hi there,
    while waiting for the github by @casiepa to be updated, I managed to take some time to (partially) clean what I had written so far.
    I published it on a repo, just in case anybody were interested in taking a look and opening a discussion about desirable ways to approach the problem and to structure the code.

    Here it is:
    https://github.com/mapofemergence/BB-REST

    cheers,
    s t e

    #182189
    UgoDimma
    Participant

    Hey guys,

    I have set up my bbpress forum, create a page for it with the name forum, in the description box, I added some description, and featured image for the page. I also added some forums to get started with, but when I share my forum page on social networks, which is https://mydomain.org/forums/ it does not display any featured image, not even the one I added at the page. And again, the description it displayed is that of a forum I created.

    Please, how do I force the page to display the featured image and the description I added to it when shared on social networks.

    #182188
    Kalusha
    Participant

    Hello,

    I need one extra Field where I can put “New Message” with this function:
    <a href="<?php echo fep_query_url('newmessage', array('to' => USER ) ); ?>">Send Message</a>
    CAn anybody help me how and where I must out it in, please.

    Thank you

    #182166
    mikeboltonca
    Participant

    It’s nice to see some activity in this thread.

    Having to choose between dynamic reply forms (our reply.js) and a modern input method (TinyMCE) in 2017 just doesn’t seem right.

    I’ve tried to research potential solutions, but the code is a bit over my head.

    It’s known that the TinyMCE editor doesn’t like being moved around the DOM. Has anyone tried removing it, then re-adding it?
    A couple people in this thread said that worked for them.

    #182116
    Kalusha
    Participant

    Hello from Germany πŸ™‚

    I have an WordPress Role called “Autor”. This Role are on my Site “Premium User” and “Abonnents” are Standard User. Capabilyties for the bbpress are the same. Now I want to under the names in the Forum who is a Premium User and who is a standard User.

    The bbPress Role for both is “participants” so the differents are only in the WordPress Role.

    With this Code I can change the name, but only for participants…
    ##Name Γ€ndern Participant in User Standard User
    function my_custom_roles( $role, $user_id ) {
    if( $role == ‘Participants’ )
    return ‘Standard User’;

    return $role;

    Hope anybody understand πŸ™‚ me and can help me

    regards

    atonyk
    Participant

    I have the same problem. Double quotes are converted into &quot; and saved in the DB in this way.

    If, for example, I create a post using the WordPress admin panel,
    its columns ‘post_content’ and ‘post_title’ in the table ‘wp_posts’ are saved like this:
    "Post title" and "Post content"

    If I create a topic on a BBPress topic page, its data saved in the DB like this:
    &quot;Topic title&quot; and "Topic content"

    So the issue mentioned by @jakubmarian is not resolved yet πŸ™

    How can we please resolve it?

    #182111
    phil49
    Participant

    Hi Robin !

    LOL !

    I talk too much, but as I want to give as many detail as possible…

    Your code is working for the pages of the site.

    Your code is NOT working for ALL the forum pages of the site

    Your code is applied for all the pages, that’s it takes almost 100% of the page, but site pages are not concerned by my problem.

    Your code doesn’t make any difference when applied to the forum pages.

    I was just adding in my previous post that I have the same problem for my second issue with the background gradient that is not applied either, unless the code is not correct, but I don’t think so !

    Thinking about all this yesterday, I’ve got the feeling that in fact, what is desperately keeping void corresponds to the place that should be occupied by the sidebar, even though I told you that I have no sidebar on all the site pages as well as the forum pages.
    But there’s a section dedicated to its management in this new theme and version of WordPress 4.7.2 !
    I removed all the widgets initially present in this sidebar but maybe the code keeps holding the place !?

    It’s as if this part of the code keeps applying in the end, prevailing on the child theme css code !

    Hope this is clear now ! πŸ˜‰

    Regards,

    Philippe

    #182098
    maximemoisan
    Participant

    Alright, when I block links with: remove_filter( ‘bbp_get_reply_content’, ‘bbp_make_clickable’, 4 );remove_filter( ‘bbp_get_topic_content’, ‘bbp_make_clickable’, 4 );

    it seems to work BUT admins can’t post links either even with the code you have sent me.

    Secondly, the links doesn’t work wich is good BUT site that doesn’t provide a “www” can still be clickable so when someone type:” https://bbpress.org ” this link is clickable and both admins and user can do that, and if you type: “www.google.ca” then both admins and user can do that and it WONT be clickable.

    I would like the admins to be able to send link, AND be able to block non www links too.

    Thanks you.

    #182093
    phil49
    Participant

    Yes,

    If your remember, I have a page dedicated to Members and protected by a password (with or without it doesn’t make any difference either, of course), and the 3 following pages on the which I simply pasted the relevant short codes:
    – “Forum” which is the default bbpress root page, I simply added a shortcode for the connection widget thanks to a plugin otherwise I couldn’t have done it on this specific page (but my VM doesn’t have it and again it makes no difference)
    – “Registration”
    – “Reset password”

    Regards,

    Philippe

Viewing 25 results - 5,426 through 5,450 (of 32,518 total)
Skip to toolbar