Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,476 through 6,500 (of 32,519 total)
  • Author
    Search Results
  • #174406

    In reply to: forum cover art….

    ixixy
    Participant

    @robkk, thank you very much for your response. you are totally awesome :0

    I looked at the link, and it seems like it is for bloggers to put custom background on different posts. It’s a cool idea, but not what I had in mind.

    So, in bbpress, when you set up a forum, there is a place that allows you to upload a featured image.

    I want to use this feature…..and upload a landscape image to use as a cover image on top of the forum….

    To paint a clearer picture, imagine buddypress’s cover image that is on a user’s profile…. I want a cover image on each forum….and the image would be the pic uploaded to the ‘featured image’ option as the forum is set up.

    I know that this probably a really pretty simple thing to do….insert the featured image photo on the forum index….i just am not sure which templates would need to be edited or the code involved…and that’s why I’m turning the idea to you brilliant folks who are smarter than me for the solution 🙂 😉 😀

    nateonawalk
    Participant

    Hello bbPress community,

    I’ve forked @siparker ‘s plugin and have worked with a dev to develop an edited version

    the new version:

    – only includes post IDs at the end of topics
    – moves the topic IDs to the end of the URL for URL prettiness
    – makes it so that every page only has one path (important to prevent negative SEO duplicate content vulnerabilities)
    – works with breadcrumbs and edit post links too

    I’m doing a final debugging right now, but I’ll publish the code on GitHub once it’s polished and then will share a ZIP here.


    @netweb
    , would love to help work toward getting this implemented in core functionality 🙂

    #174400
    arathra
    Participant
    	/**
    	 * Filter whether to trigger an error for _doing_it_wrong() calls.
    	 *
    	 * @since 3.1.0
    	 *
    	 * @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true.
    	 */
    	if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
    		if ( function_exists( '__' ) ) {
    			$version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
    			/* translators: %s: Codex URL */
    			$message .= ' ' . sprintf( __( 'Please see <a href="%s">Debugging in WordPress</a> for more information.' ),
    				__( 'https://codex.wordpress.org/Debugging_in_WordPress' )
    			);
    			trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
    		} else {
    			$version = is_null( $version ) ? '' : sprintf( '(This message was added in version %s.)', $version );
    			$message .= sprintf( ' Please see <a href="%s">Debugging in WordPress</a> for more information.',
    				'https://codex.wordpress.org/Debugging_in_WordPress'
    			);
    			trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) );
    		}
    	}

    Is the function, line 3901 is : trigger_error( sprintf( __( ‘%1$s was called incorrectly. %2$s %3$s’ ), $function, $message, $version ) );

    #174393
    designvibe
    Participant

    Hi,

    I’ve added the nickname field to profile so people can add it.

    Now I need it to display on the topic and replies under bbp-reply-author.

    Everything I’ve tried shows username. Is there a way of tweaking to below to nickname?

    <?php $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo "@".$user_nicename;
    } ?>
    Manuel Fritsch
    Participant

    Thank you, I just cancelled the whole padding. It looks good now. Would you confirm this, hope I did not miss something?

    #wp-link,
    #wp-link p {
      font-size: 15px;
      line-height: normal;
    }
    
    #wp-link h1, .h1, .title h1 {
    color:#000;
    }
    
    #wp-link .screen-reader-text, .screen-reader-text span,
    #wp-link .ui-helper-hidden-accessible {
      position: absolute;
      margin: -1px;
      padding: 0;
      height: 1px;
      width: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      border: 0;
      word-wrap: normal!important;
    }
    Robkk
    Moderator

    adjust the padding for the input

    #wp-link,
    #wp-link p {
      font-size: 13px;
      line-height: 1;
    }
    
    #wp-link input {
      padding: 0 5px;
    }
    
    #wp-link .screen-reader-text, .screen-reader-text span,
    #wp-link .ui-helper-hidden-accessible {
      position: absolute;
      margin: -1px;
      padding: 0;
      height: 1px;
      width: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      border: 0;
      word-wrap: normal!important;
    }
    Manuel Fritsch
    Participant

    Dear Robkk,

    the code is almost perfect. Thank you. Only the button text for the submit button is out of place, would you have another look?

    #174384
    Robkk
    Moderator

    @zimmermannc

    Moderators cannot see the forums menu in the WordPress backend. To see the Forums menu item they need the keep_gate capability which only Keymasters have.

    Moderators can create forums on the frontend of your site if you used the [bbp-forum-form] shortcode in a page

    Editing forums, I am not sure how they are supposed to do that on the frontend, maybe bbPress had some functionality for managing BuddyPress group forums that is broken. Have to look into it.

    Robkk
    Moderator

    Try this custom CSS instead.

    #wp-link,
    #wp-link p {
      font-size: 13px;
      line-height: 1;
    }
    
    #wp-link input {
      padding: 6px;
    }
    
    #wp-link .screen-reader-text, .screen-reader-text span,
    #wp-link .ui-helper-hidden-accessible {
      position: absolute;
      margin: -1px;
      padding: 0;
      height: 1px;
      width: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      border: 0;
      word-wrap: normal!important;
    }
    JaneAkshar
    Participant

    These are my plugins
    bbPress
    Category Posts Widget
    Contact Form 7
    Display Posts Shortcode
    iThemes Security
    jetpack by WordPress.com
    Really Simple CAPTCHA
    Wordfence Security
    WP Google Maps
    WP-Members
    Yoast SEO

    #174379
    investacube
    Participant

    Hi @daveodea did you find a solution? I have exactly the same situation. So far, I have verified that:

    1. there are no errors being logged anywhere server side and
    2. the issue isn’t related to caching, either server side or via a wordpress plugin.

    I have also:

    1. disabled all plugins except buddypress;
    2. enabled my main theme, in case I had some conflicted code in my child theme;
    3. tried with the twenty sixteen theme.

    But I still can’t resolve this issues. Does any one have anymore advice they could give me?

    Robkk
    Moderator

    I used the plugin wp-members

    Is it this plugin??

    https://wordpress.org/plugins/wp-members/

    I cannot seem to figure out how you did the members area thing with this plugin (if it is the correct plugin).

    So I have done loads more searching and it is known problem which BBPress do nothing about

    Well there might be related issues to search redirecting to the home page, some had issues with the search query having a url structure and query different than intended by default, and some had issues with search plugins on their site, and I think some I tried to contact personally to help them since they had a premium theme and it is hard to just figure it out on premium themes that might have some kind of fancy ajax search having conflicts with the default bbPress search for example. Your issue could be somewhat related to the url structure.

    Do you have any steps that maybe I can try to replicate to find the cause of this issue, like explain how you set everything up?

    So you ditch the BBPress function, it does not work. And amend the normal search to include forums.

    Yes this can be a workaround for some, but since you may have private members only content this solution may not be practical.

    Does the default bbPress search work fine on a fresh installation with just your theme and no other plugins like wp-members?

    If you haven’t already known if bbPress search works by default with just your theme and bbPress activated, consider created a localhost setup to test the default bbPress search to see if it works on a default fresh installation, then we can work backwards and try to find the cause of this issue that you are experiencing.

    https://codex.bbpress.org/getting-started/testing-your-bbpress-installation/creating-a-test-site/

    #174367
    Robkk
    Moderator

    I’ve added a new site to my multisite installation, set the language to German and activated bbPress. The ‘by’ did not show.

    Was the word “by” turned into “von”, or was there an entirely different layout when you activated your theme on new site install? If it was “von” by default in the new site installation then, then maybe it could be a possible cache issue on your original site, so flushing the cache could then update the word to “von”.

    Could it be that the theme only causes the ‘by’ to show if two (or more) languages are active or that a plugin is causing it?

    Are you planning to have a multilingual single site? You might be on to something here if you are trying to run a multilingual single site.

    Just so you know, I thought the root issue could be the “by” not changing in your forums is because it might have outputted the text using code from a custom phpbb starter pack theme created by @lynq, here is an example of the custom forum freshness column from the starter pack.

    https://gist.github.com/ntwb/3133450

    itsasiak
    Participant

    Hi all,

    I hope you can help me. I am trying to create and attach a bbp forum automatically after a BuddyPress group is created.

    I have “unset” the BuddyPress group creation steps, and only the “group settings” step remains.

    I have been digging in bbp code to try to reproduce the forum creation process, and this is what I put together (though it is not working):

    <?php $bbpforum = new BBP_Forums_Group_Extension; ?>
    <?php $bbpforum->__construct(); ?>

    <!-- Reproducing parts of public edit_screen() -->

    <!-- Reproducing fieldset return -->

    <?php $_POST['bbp-edit-group-forum'] = true; ?> <!-- this comes from the edit screen; this form field is sent -->

    <!-- end of fieldset return -->

    <!-- start of edit_screen_save -->

    <?php

    if ( empty( $group_id ) ) {
    $group_id = bp_get_new_group_id();
    }

    $create_forum = true; // Changed this to true (there was a switch structure down and I kept the true case only
    $forum_id = 0;
    $forum_ids = bbp_get_group_forum_ids( $group_id );

    if ( !empty( $forum_ids ) )
    $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;

    // Set the default forum status

    $status = bbp_get_public_status_id();

    // Create the initial forum
    $forum_id = bbp_insert_forum( array(
    'post_parent' => bbp_get_group_forums_root_id(),
    'post_title' => bp_get_new_group_name(),
    'post_content' => bp_get_new_group_description(),
    'post_status' => $status
    ) );

    // Run the BP-specific functions for new groups
    $bbpforum->new_forum( array( 'forum_id' => $forum_id ) );

    // Update forum active
    groups_update_groupmeta( bp_get_new_group_id(), '_bbp_forum_enabled_' . $forum_id, true );

    // Toggle forum on
    $bbpforum->toggle_group_forum( bp_get_new_group_id(), true );

    ?>

    It is placed in create.php, right after the create group form submission entry.

    As you see, I have erased the wp_nonce_field functions and the associated admin_referrer functions to avoid the “Are you sure you want to do this?” screen.

    If it is not clear, please, let me know what else would be needed to try get the automatic forum, and of course, if you know a better and easier way of doing it.

    Thank you very much!

    #174357
    semperaye
    Participant

    Hello. What would the code be to change the color of the “Submit” button? I’m assuming the same code but with a change to the 1st line.

    Is it this:

    #bbpress-forums .submit {
    background-color: #1e73be;
    color: #FFFFFF;
    float: center;
    vertical-align: middle;
    border-radius: 4px;
    height: 35px;
    width: 120px;
    font-size: 14px !important;
    }

    Because it didn’t work..

    #174352
    siparker
    Participant

    Hi, Can you please advise how to extend the Vbulletin importer.

    I know the fields i want to get and where i want them to go. but i am unsure how to add this to the import routine.

    Example is to get from vbulletin the user signature (which is a simple lookup to sigparsed field in the db by userid) and insert that into an xprofile field for that user.

    Secondly i ahd an issue importing which i believe was because the mycred plugin adds fields to the user table. It might be worth adding some validation of the user fields as the insert is hardcoded with the default fields.

    JaneAkshar
    Participant

    I used the plugin wp-members and put the forums in the member area. I have been speaking to the author of that plugin who is brilliant with support and he had problems at the begining as well. So I have done loads more searching and it is known problem which BBPress do nothing about

    There is no solution out there BUT what you can do is change the main search function to include forums and that is what I have eventually done. I do think BBPress should provide a proper solution

    So you ditch the BBPress function, it does not work. And amend the normal search to include forums. I used this code snippet to help.

    /**
    * Include bbPress 'topic' custom post type in WordPress' search results */
    
    function ntwb_bbp_topic_cpt_search( $topic_search ) {
            $topic_search['exclude_from_search'] = false;
            return $topic_search;
    }
    add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
    
    /**
    * Include bbPress 'forum' custom post type in WordPress' search results */
    
    function ntwb_bbp_forum_cpt_search( $forum_search ) {
            $forum_search['exclude_from_search'] = false;
            return $forum_search;
    }
    add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );
    
    /**
    * Include bbPress 'reply' custom post type in WordPress' search results  */
    
    function ntwb_bbp_reply_cpt_search( $reply_search ) {
            $reply_search['exclude_from_search'] = false;
            return $reply_search;
    }
    add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );
    #174348
    tharsheblows
    Participant

    @pathardepavan — post_parent is in the posts table rather than postmeta so instead of updating post meta, update the object in wp_posts. So your update callback function (update_topic_post_parent) would be something like:

    
    function update_topic_post_parent( $value, $object, $field_name ){
    $update_post_parent = array(
    'ID' => (int)$object->ID, // the ID of the topic you just created
    'post_parent' => (int)$value ); // whatever you want your post_parent to be as an int. You could use $field_name for 'post_parent' here but I tend to whitelist 
    
    wp_update_post( $update_post_parent )
    }

    and you should be able to get the post_parent from the $object directly in your get callback I think.

    Also if you’re using one of the latest versions of the plugin, you should use register_rest_field as register_api_field has been deprecated.

    (I’m doing this without any testing, sorry, so it might be incorrect! But I think that’s somewhere close to the answer maybe 🙂 )

    Manuel Fritsch
    Participant

    Hi Robkk,

    thanks for your suggestion. No, this code does not change anything, not even with !important after the font size.

    Robkk
    Moderator

    Does this custom CSS help any?? This is what I have making a custom theme in twentytwelve.

    #bbpress-forums #wp-link {
      font-size: 13px;
    }
    
    #bbpress-forums #wp-link .screen-reader-text, .screen-reader-text span,
    #bbpress-forums #wp-link .ui-helper-hidden-accessible {
      position: absolute;
      margin: -1px;
      padding: 0;
      height: 1px;
      width: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      border: 0;
      word-wrap: normal!important;
    }
    Manuel Fritsch
    Participant

    Hello,

    if you look at our latest topic, you will see the blue notice bar. In in, the time is formatted incorrect. There should be a comma, or even better, the word “und” between the hours and the minutes, not a full stop. I tried to change it in the translation, but there is only a code for the whole timestamp. I would suggest to update bbpress in this regard, so the timestamp becomes localizable.

    Best
    Manuel

    Manuel Fritsch
    Participant

    Hello there,

    I use WP 4.4.2, bbpress 2.5.8, this is a post in our forums.

    To insert a link in my copy, there is this popup window. Apparently, it gets its styling from various sources, including my theme’s settings, where for regular text, I set the font-size to 17px, while line-height of 26px is hard-coded into the theme. As you can see (if you click the link-button in the reply form below the sample post given above), this disturbs the styling of this popup.

    Is there any way to a) make this popup draw its styling from the back-end CSS (where the same window is used, and looks fine), which in any case I would like to suggest for future updates of bbpress, or b) style it with custom CSS?

    Thank you
    Manuel

    #174341
    zimmermann.c
    Participant

    I just tried: The moderator cannot see ‘forums’ in the dashboard
    He can only see topics and replies
    the doc in the codex is saying the opposite
    But i would like to change the name of the forum author (this name appears in the forum list, etc…)

    #174337
    Robin W
    Moderator

    Do you agree with the fact that “Moderator – Cannot create and edit forums”?

    Not sure I either agree or disagree, or that it is a fact – I’m trying to help here, I’m not trying win an argument in a bar, but as a user of this software I haven’t tested every feature 🙂

    The documentation for bbpress says that moderators can publish and edit forums

    https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/

    Is it this that you are asserting isn’t true?

    #174325
    Robkk
    Moderator

    Edit the code in the Gist and add style to the Span tag like so.

      // Span
    ‘span’ => array(
    ‘class’ => true,
    ‘style’ => true,
    ),
    

    I am not sure why you would even want the more tag, as it might be useless in the frontend of your site and bbPress forum posts.

Viewing 25 results - 6,476 through 6,500 (of 32,519 total)
Skip to toolbar