Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 1,651 through 1,675 (of 32,438 total)
  • Author
    Search Results
  • #220319
    Back to Front
    Participant

    Checking in because I want this too… there was a plugin called ‘bbpress sort topic replies’, that no longer works, but I’m going to try to grab the code from that

    #220313
    Back to Front
    Participant

    Thanks again for taking a look is the code that appends the checkboxes to the bbpress topic forms… I guess $_POST is a global variable that bbpress topic form is also using?

    Sorry this is obviously a bit beyond me. And obviously beyond a free solution! But yes if you or others in bbpress do paid work like thiset me know and I’ll be in touch!

    // Add custom taxonomies to topic form
    
    add_action ( 'bbp_theme_after_topic_form_content', 'bbp_extra_fields');
    
    function bbp_extra_fields() {
    
    $value = get_post_meta( bbp_get_topic_id(), 'issue', true);
    	echo '<div id="custom-meta">';
    	echo'<fieldset>
            <legend>Issues</legend>';
    	$issues = get_terms('issue', array('hide_empty' => 0));
    	foreach ($issues as $issue) {
    	echo '<span><input type="checkbox" class="issue" for="issue" value="'.$issue->slug.'"></input><label>'.$issue->name.'</label></span>';
    	};
    	echo '</fieldset>';
    
    $value = get_post_meta( bbp_get_topic_id(), 'region', true);
    global $region;
    $region = get_terms('region', array('hide_empty' => 0));
    echo'<fieldset>
            <legend>Region</legend>';
    $regions = get_terms('region', array('hide_empty' => 0));
    foreach ($regions as $region) {
    echo '<span><input type="checkbox" class="issue" for="issue"value="'.$region->slug.'"><label>'.$region->name.'</label></span>';
    };
    echo '</fieldset></div>';
    };
    #220310
    Robin W
    Moderator

    ok, beyond free help, but my code takes an array from $_POST – which presumably is what your form is creating?

    maybe post your form code? and I’ll take one last look

    Nestin Vas
    Participant

    Thank you for the plugin.

    It worked well. There is a provision to allow only the moderator to reply. However, there doesn’t seem to be a provision to allow the topic creator to reply to his own topic.

    If I set it to ‘create/edit/view OWN topics’, the user is unable to view other topics.

    Is there a fix to this?

    I found this topic – https://bbpress.org/forums/topic/how-to-make-only-post-author-and-moderators-can-reply/

    It seems to address the problem, but the file is unavailable. And I’m not sure how to use the code in the last reply.

    #220302
    nosashandy
    Participant

    Hello,

    I’ve question, I already read around the bbPress roles and capabilities

    But, I still not sure do the user with Participant roles, can set the Topic Status to Closed when Create New Topic in the forum.

    Thanks.

    samibz
    Participant

    I installed bbpress and it is activated – when I go into users there is a forum users option for every other wordpress user other than me the administrator.I did not get a welcome page. I have no option to edit my role under my users – I can do this for all the other users on my site.

    I use X-theme which is supposed to support this plugin. I have a feeling this has to do with the fact that I am not listed at the keymaster, but there seems to be no way to do this.

    I am not good at coding or knowing where to put code, so if it involves any please be very specific – where it needs to go, what to type in etc…

    Thanking everyone in advance

    #220284
    ViNOJ
    Participant

    I have just found that it works perfectly if I disable Ultimate Member Plugin.
    I don’t even require above code and all the user profile pics seems to be working properly.

    #220281
    Robin W
    Moderator

    so it works except widgets and shortcode? (and which shortcode?)

    #220279
    Nestin Vas
    Participant

    Hi,

    Is this file still available?

    Can you please tell me where I’m supposed to add the code?

    #220260
    Robin W
    Moderator

    so if you are allowing registration, how are users registering – what widget or shortcode or method are you using ?

    Robin W
    Moderator

    I think your theme is adding another one in the bbpress templates

    so in 2.6.x they are added in

    \bbpress 2.6.6\templates\default\bbpress\form-reply.php
    \bbpress 2.6.6\templates\default\bbpress\form-topic.php

    so your have 2 choices

    a. the better one
    Look in each of the files you listed as being bbpress in your themes template and look for a line which says something like

    bbp_get_template_part( 'form', 'user-login' );

    and edit out this line

    b. If you can’t find it there, then

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-reply.php

    transfer this to your pc and edit

    remove the line which says

    <?php bbp_get_template_part( ‘form’, ‘user-login’ ); ?>

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

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

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-reply.php
    bbPress will now use this template instead of the original

    Repeat this for form-topic.php

    haddlyapis
    Participant

    could i just add a function in the functions.php file with something like:
    if user_is_logged_in –> don’t show loginbar

    #220240
    Robin W
    Moderator

    Still waiting to see if people using the Forums are having any issues using them.

    not sure what this means 🙂

    I would like to change the font color against the maroon top bars, from black to yellow, or grey, but I am not finding the right tab to do so.

    probably theme related, but link to an example on your site please.

    Why are there tabs for setting up logins/logim failures, if logging in is accomplished at the WordPress level?

    bbpress has some widgets and shortcodes that let users enter username and password. these details are passed to wordpress security to go through login.

    #220218
    Robin W
    Moderator

    ‘Private’ is a wordpress/bbpress conflict – and it is annoying !!

    either

    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

    add_filter('private_title_format', 'ntwb_remove_private_title');
    function ntwb_remove_private_title($title) {
    	return '%s';
    }

    or use

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Forum Display

    #220217
    Robin W
    Moderator

    some code from one of my plugins (bbp-style-pack) that plays with this area might help

    add_action ('bbp_new_topic_post_extras' , 'bsp_topic_tags_process' ) ;
    	add_action ('bbp_edit_topic_post_extras' , 'bsp_topic_tags_process' ) ;
    	add_action( 'bbp_new_reply_post_extras', 'bsp_reply_tags_process' );
    	add_action( 'bbp_edit_reply_post_extras', 'bsp_reply_tags_process' );
    
    //handle topic tags
    
    function bsp_topic_tags_process ($topic_id) {
    	if ( bbp_allow_topic_tags() && ! empty( $_POST['bbp_topic_tags'] ) ) {
    		
    		$terms = $_POST['bbp_topic_tags'] ;
    		
    		// Add topic tag ID as main key
    		$terms = array( bbp_get_topic_tag_tax_id() => $terms );
    		
    		$topic_data = array(
    		'ID'           => $topic_id,
    		'tax_input'    => $terms,
    		) ;
    		$topic_id = wp_update_post( $topic_data );
    		
    		
    	}
    }
    
    function bsp_reply_tags_process ($reply_id) {
    	if ( bbp_allow_topic_tags() && ! empty( $_POST['bbp_topic_tags'] ) ) {
    		$topic_id = bbp_get_reply_topic_id ($reply_id) ;
    		
    		$terms = $_POST['bbp_topic_tags'] ;
    		
    		// Add topic tag ID as main key
    		$terms = array( bbp_get_topic_tag_tax_id() => $terms );
    		
    		$topic_data = array(
    		'ID'           => $topic_id,
    		'tax_input'    => $terms,
    		) ;
    		$topic_id = wp_update_post( $topic_data );
    	}
    }
    #220212
    Back to Front
    Participant

    Hi! I’m trying to allow users to assign their topics to custom taxonomies from the front end bbpress topic form. I thought it would be cool to be allow users to sort topics in multiple ways, and not just the anarchy that comes with unhierarchical ‘tags’.

    With a lot of searching on forums, I’ve managed to register the taxonomies, display them, include topics in the archives, and added inputs to the form to allow uses to select the relevant ones.

    But I’m totally stuck with saving the value from the checkboxes. You can tick the box, but nothing is saved. I’m guessing I need to use wp_set_object_terms()? and hook into bbp_new_topic() to save the terms? But I have no idea how to save the value from the checkboxes in there.

    Any ideas, tips, scorn, alternative suggestions are welcome. Do i need to learn more js and use AJAX to accomplish this? Or is this achievable with php and am I even close?

    // Add custom taxonomies to topic form
    
    add_action ( 'bbp_theme_after_topic_form_content', 'bbp_extra_fields');
    
    function bbp_extra_fields() {
    
    $value = get_post_meta( bbp_get_topic_id(), 'issue', true);
    	echo '<div id="custom-meta">';
    	echo'<fieldset>
            <legend>Issues</legend>';
    	$issues = get_terms('issue', array('hide_empty' => 0));
    	foreach ($issues as $issue) {
    	echo '<span><input type="checkbox" class="issue" for="issue" value="'.$issue->slug.'"></input><label>'.$issue->name.'</label></span>';
    	};
    	echo '</fieldset>';
    
    $value = get_post_meta( bbp_get_topic_id(), 'region', true);
    global $region;
    $region = get_terms('region', array('hide_empty' => 0));
    echo'<fieldset>
            <legend>Region</legend>';
    $regions = get_terms('region', array('hide_empty' => 0));
    foreach ($regions as $region) {
    echo '<span><input type="checkbox" class="issue" for="issue"value="'.$region->slug.'"><label>'.$region->name.'</label></span>';
    };
    echo '</fieldset></div>';
    };
    
    // Save the terms from the form
    add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 );
    add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 );
    
    function bbp_save_extra_fields($topic_id) {
    
      $post_id = get_the_ID();
      $category_id = $region->id;
      $taxonomy = 'region';
      wp_set_object_terms( $post_id, intval( $category_id ), $taxonomy );
    };
    
    #220209
    Back to Front
    Participant

    I was having a bunch of trouble with this too, 8 years later!

    I tried
    bbp_topic_excerpt('200')
    and
    wp_trim_words( bbp_topic_excerpt(), 200, '...' );
    But they wouldn’t actually change the excerpt length.

    Anyway I found this other function in bbpress files, that does the job.
    bbp_get_topic_excerpt($topic_id = 0, $length=200)

    #220207
    Steve Keller
    Participant

    Hey Robin,

    I tried to standardize the 79ers Forum page, per the Codex doc you referred me to, and it seems it helped. I followed all the settings instructions, and since the only people we want accessing the Forum page are registered users, I made each forum private. A couple of questions arose at that point. If I don’t hide the title of the page, why does the “Private:” appear twice before the page title? And second, how should the Forum Restriction be set, or where would I find info on what the settings, blocked, unblocked and hidden, actually do?

    Thanks,
    Steve

    #220201
    Robin W
    Moderator

    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

    add_filter ('bbp_reply_admin_links', 'rew_remove_reply') ;
    add_filter ('bbp_topic_admin_links', 'rew_remove_reply') ;
    
    function rew_remove_reply ($links) {
    	unset ($links['reply']) ;
    return $links ;	
    }
    #220187
    owebonada
    Participant

    Hello!

    I did everything that was indicated to me and the code did not work.

    #220180
    Robin W
    Moderator

    not sure, but try this (untested)

    add_filter ('bbp_get_user_edit_profile_url' , 'rew_remove_edit' ) ;
    
    function rew_remove_edit () {
    return ;
    }

    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

    #220177
    ViNOJ
    Participant

    Hey this doesn’t seems to work for me.
    Currently I am using following plugins.
    * bbPress
    * BuddyPress
    * Ultimate Member

    For all bbPress widgets and shortcode I am unable to force BuddyPress user profile pic.
    Can anyone please guide me what am I missing?

    #220175
    Robin W
    Moderator

    At a guess you might want to start by looking at

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

    and particularly items 3 & 5

    r083r7
    Participant

    I would like to edit the wording of some of the bbPress prompts and messages. As I understand this can be done using a language file as described here.
    https://codex.bbpress.org/getting-started/bbpress-in-your-language/

    I’m a little confused though since I am not actually changing from English to another language. Since I’m not changing languages what does the process look like? I went here to download the English version but there’s English (Canadian, UK, Australian, or South African versions) Which further ads to the confusion as to which language file I should download and edit 🙁

    Any idea on how to go about editing the bbPress prompts and messages in the same language I am using?

    https://translate.wordpress.org/projects/wp-plugins/bbpress/

    #220158
    owebonada
    Participant

    Hello. I would like to remove the Edit Profile option from the user menu. I am already using a plugin for editing user fields. I already removed it by CSS:

    .bbp-user-edit-link {
    display: none!important;
    }

    But for security, I need to completely remove this option.

    Is there a code for this?

    Thanks for your time.

Viewing 25 results - 1,651 through 1,675 (of 32,438 total)
Skip to toolbar