Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,626 through 1,650 (of 32,466 total)
  • Author
    Search Results
  • #221000
    jason4locations
    Participant

    I got back in, but I had to use what is called safe mode, which means that I am still trying to get that code to work.

    #220999
    Back to Front
    Participant

    Hi sorry its been a while! Been busy with other projects.


    @robin-w
    @webmasterfreya this is what I’ve done to reverse the reply order on certain topics. And now I’ve come back to it after a month, I can’t reproduce the issue of it breaking the pagination. It seems to work as expected, without adding another function to mess with the pagination.

    Install

    bbPress – Sort topic replies

    Remove the parts that sort the forum’s topic order, as they are causing errors, and they aren’t desired for this purpose (sorting the reply order)

    // Adds meta box to the side bar of the Forums edit pages
    add_action( 'add_meta_boxes', 'bbPress_meta_box_add' );
    function bbPress_meta_box_add(){
    	add_meta_box( 'bbPress_meta_box_sort_desc', 'Sort Replies', 'bbPress_forum_meta_box', 'forum', 'side', 'high' );
    }
    

    and

    	// Save sort settings for forum
    		if( $_POST['str-bbpress-sort-replies'] == "desc" ){
    			update_post_meta($post_id, '_bbp_sort_desc', 'desc');
    		}elseif( $_POST['str-bbpress-sort-replies'] == "asc" ){
    			update_post_meta($post_id, '_bbp_sort_desc', 'asc');
    		}else{
    			update_post_meta($post_id, '_bbp_sort_desc', 'dft');
    		}
    

    and

    	// Save show lead settings for the forum
    		if( $_POST['str-bbpress-sort-replies-show-lead-topic-forum'] == "yes" ){
    			update_post_meta($post_id, '_bbp_topic_sort_show_lead_topic_forum', 'yes');
    		}elseif( $_POST['str-bbpress-sort-replies-show-lead-topic-forum'] == "no" ){
    			update_post_meta($post_id, '_bbp_topic_sort_show_lead_topic_forum', 'no');
    		}else{
    			update_post_meta($post_id, '_bbp_topic_sort_show_lead_topic_forum', 'dft');
    		}
    

    I can send the whole file if thats more useful.

    Sorry I hope i’m not missing something that we noticed before? Actually my site is using threaded replies. So unfortunately it’s not using pagination, its unfortunate it can’t have both. But I turned it off to test this and it it worked.

    Regarding the buddypress activity stream…
    Here is an example of a member page with buddypress activity stream.
    https://houseonfire.backtofrontdesign.co/members/forum_2tbmmm/
    I think it also works as expected showing forum replies in the reverse chronological order.

    #220997
    jason4locations
    Participant

    I’m going to try the Code Snippets plugin. Please let me know if I am on the right track.

    Back to Front
    Participant

    Heres a get started guide!

    Customizing

    or tldr; copy the files from
    plugins/bbpress
    to
    your-child-theme/bbpress
    and edit them there!

    #220984

    In reply to: contact Form

    shahdoost.ali
    Participant

    I think the code belong to ‘Contact Form 7’ plugin. You should install the plugin and then design the contact form again and then replace this code (or only the ID part) with the code for your new contact form

    #220975
    jason4locations
    Participant

    I’m new at this, so this might not be a good question. Can I use

    Dashboard: Appearance > Customize > Additional CSS

    to make “No Topics” go away? If not, is there an “easy” way to do it, that just involves pasting code somewhere?

    I was able to make my site look nice using < li >, except for the fact that “No Topics” showed up scattered all over the page. I used < li > in one category or forum, and it effected all the others, which was good. So, now I’m trying to make “No Topics” go away.

    My site is at dancing4locations.org. If you go to my site now, it doesn’t look as good as it did before, when I was using parents (with < li >). I’m using version 5.5.5 of WordPress, and version 2.6.6 of bbPress.

    I’m sorry that my last post was marked as spam. It think it had to do with the fact that I didn’t put spaces between <, li, and >, and I kept on trying to edit it.

    Thank you.

    pandex
    Participant

    I want to make changes to the forum without using plugins, I want to mess with the code, but I don’t know where I get it and where to start

    Robin W
    Moderator

    ok, cab I just ask what you mean by ‘ I created a loop-topic-list with a layout that is quite different to the other forums. ‘

    Is this code, and if so what files have you amended or what have you done so far to achieve this?
    If not code, can you explain further

    #220950
    Robin W
    Moderator

    Step by step guide to setting up a bbPress forum – Part 1

    item 6 describes what you want to know, but in essence just set the forums to ‘private’

    If you need a more complicated setup, then use

    Private groups

    For users, if you are setting up manually, then you just need to create them in wordpress (bbpress just uses wordpress users and login), just make sure you’ve turned off auto registration in

    dashboard>settings>general>membership is unticked

    and that in

    dashboard>settings>forums>Roles is ticked and users assigned the participant role

    #220946
    Robin W
    Moderator

    you would create a page and use a shortcode block to add thw following shortcode

    [bbp-topic-form] – which displays the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.

    then on you home page, insert a ‘button’ block which links to this page

    #220903

    In reply to: Can’t post replies

    Robin W
    Moderator

    bbPress User Roles and Capabilities

    relevant ones are:

    publish_topics
    edit_topics
    publish_replies
    edit_replies

    #220882
    salar2
    Participant

    Hi,
    Is this right?

    #bbpress-forums div.bbp-forum-author img.avatar, #bbpress-forums div.bbp-topic-author img.avatar, #bbpress-forums div.bbp-reply-author img.avatar {
      float: right !important;
      }
    #220878
    Robin W
    Moderator

    well you could learn php, some javascript and a little css, work through the security issues of letting users post via email (not sure how you do that), create a receiving handler, and then after many hundreds of hours release the code for free and then support it whilst people bitch about how stupid your plugin is….

    biznisoka
    Participant

    Hi,

    Have two bbpress forums on a webpage, a public one, for “usual” registered users, and private one, for “special” registered users.
    Used bbp private groups plug-in to create both groups.
    Would like to hide private forum menu item from the general registered users (not redirect to some custome page on something).
    Asked the question on plugin’s support page, but got no answer.
    Is there any code snippet or something I could use to hide the menu item which opens private forum? Now i get 404 error.

    #220866
    Robin W
    Moderator

    This should do it

    add_filter( 'bbp_current_author_ip', '__return_false' ) ;

    if it doesn’t then

    add_filter( 'bbp_current_author_ip', 'rew_remove_ip' );
    
    function rew_remove_ip () {
    $retval = 0 ;
    return $retval ;
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    #220858
    dredarsenic
    Participant

    Hi there, my issue is similar to this, but maybe you can enlighten me.

    I’m using bbPress for the forum on my site.

    On the front end, users should be able to submit a topic on a forum, when they try, they get a “A name is required for this term.” error, I have already reset the forum, but still has the same thing.
    Also the despite that message, the topic will appear in the WP admin dashboard under Topics, but will never show in the forum on the front end, I would like the topic created by users on the front end to appear immediately in the front end as well, any idea of code I can add to the functions.php of the theme or anything I can do ?

    #220775
    Chuckie
    Participant

    Thanks for your code. It has been so long now when I asked this that i am reluctant to start fiddling with my setup.

    I prefer to continue to wait until such a time and bbPress is updated rather than add bits of code to my functions file.

    At the moment what I have works for me due to the bsp settings that were added some time back.

    Thank you for the code though.

    #220772

    Hi All, I posted this on the trac ticket too, in case others are interested:

    I’ve taken a slightly different approach to Robin, for me I only have logged in users on my forums, and I want to show the pending reply with a warning so the user knows it’s pending but exists. The below will show pending replies to the author who wrote them and a warning to the author that the reply is pending, as well as adding a warning specific to moderators so they clearly know to moderate it.

    Hope it helps someone!

    /**
     * Modifies the SQL query for reply loops so that reply authors can view their own replies that are still pending
     * @param $where string
     * @param $wp_query WP_Query
     * @return string
     */
    function bbp_allow_members_pending_view( $where, $wp_query ){
    	global $wpdb;
    	$type = $wp_query->query_vars['post_type'];
    	if( $type == bbp_get_reply_post_type() && !current_user_can('moderate') && is_user_logged_in() ){
    		// check reply here
    		$user_id = get_current_user_id();
    		$find = "{$wpdb->prefix}posts.post_author = $user_id AND {$wpdb->prefix}posts.post_status = 'private'";
    		$replace = $find . $wpdb->prepare(" OR {$wpdb->prefix}posts.post_author = %d AND {$wpdb->prefix}posts.post_status = %s", $user_id, bbp_get_pending_status_id());
    		$where = str_replace( $find, $replace, $where );
    	}
    	return $where;
    }
    add_action('posts_where', 'bbp_allow_members_pending_view', 10, 2);
    
    /**
     * Shows a warning above pending replies, different warning for mods and the author.
     */
    function my_bbp_allow_members_pending_view_warning(){
    	if( bbp_get_reply_status() == bbp_get_pending_status_id() ){
    		if( current_user_can('moderate') ){
    			$warning = 'This reply is pending moderation, approve so others can see it or trash it!';
    		}elseif( bbp_get_reply_author_id() == get_current_user_id() ){
    			$warning = 'This reply is pending moderation, others will see it once a moderator approves it.';
    		}
    		if( !empty($warning) ){
    			echo '<div class="bbp-template-notice notice"><ul><li>'.$warning.'</li></ul></div>';
    		}
    	}
    }
    add_action( 'bbp_theme_before_reply_content', 'my_bbp_allow_members_pending_view_warning');
    #220770
    Leoart
    Participant

    It’s because avatar image has position: absolute. You have to override or modify this rule. There are a few ways how to handle it depending on where you want to show avatar. You need to play with CSS a bit.

    #220755
    kwk
    Participant

    I’m new to coding and do not know much about these things. I would like the avatar or gravatar to show on the right corner of my header.
    First of all, do I need to put this code <<get_avatar( wp_get_current_user(), 32 );>> in my header.php file?
    And do I need to write some CSS code to style it?

    #220707
    Robin W
    Moderator

    This appears to be a paid theme, so i have no access to it.

    I suggest you try

    Step by step guide to setting up a bbPress forum – Part 1

    item 8

    #220706
    Robin W
    Moderator

    I can’t say for sure as I’ve not used that plugin.

    But bbpress and worpdress have lots of capabilities to put code where you wish, so

    1. exactly where do you want it to go?
    2. Do you know how to do a button linking to the page?

    #220673
    Robin W
    Moderator

    depends on what you mean by ‘solution’ 🙂

    get_avatar( wp_get_current_user(), 32 );

    #220665
    Robin W
    Moderator

    This still works as far as I know

    bbPress Notifications

    it it is not perfect, the code wold get you most of the way to what you want

    #220655
    Robin W
    Moderator

    There are tens of thousands of themes, and tens of thousands of plugins. It would be impossible to test every combination. I can’t say that bbpress has been tested with Avada !!

    As long as both theme and plugin adhere to basic standards, then it is likely that they will work together.

    The plugin is a subset of code from within buddypress, so if you have buddypress you don’t need the plugin.

Viewing 25 results - 1,626 through 1,650 (of 32,466 total)
Skip to toolbar