Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,126 through 8,150 (of 32,508 total)
  • Author
    Search Results
  • Robkk
    Moderator

    1. Not entirely sure what the topic frame is, but I like how the title looks good on your site already.

    2.

    div.bbp-reply-header {
        clear: none;
    }

    If you need help styling your forums you may need to use the bbp style pack plugin. There are a lot of CSS styles on your site that I can see causing some minor issues with other areas on bbPress, like the Forum Header labels that say Topic and Freshness. You may also need to use a darker image/background for your single forum pages.

    #165385
    Stephen Edgar
    Keymaster

    If you select a different forum from the dropdown, e.g. SMF what error do you get?

    Can you also try using an incorrect password, you should be seeing some kind of errors here rather than nothing each time.

    #165381

    In reply to: several forum

    Robkk
    Moderator

    You might need to look into using LearnPress and this plugin. I think it should do what you want, but you may need to leave a support topic on the plugin’s below support forum just to make sure.

    https://wordpress.org/plugins/learnpress-bbpress/

    Or this might be custom development for a plugin.

    But what you can do is at the bottom of each post just insert one of the single forum shortcodes.

    Like this.

    [bbp-single-forum id=$forum_id]

    You can find the forum id by using a plugin like Reveal IDs to make life easier, and all you have to do is go to Forums > All Forums in the WordPress backend to see all of your forums ids.

    Shortcodes

    Same thing with topics if you to assign topics for each post.

    #165380

    In reply to: SMF Import Help Needed

    Robkk
    Moderator

    Since you still need help on this. First do not import SMF to phpbb, just try leaving it in SMF and import from there. users have had problems importing from phpBB lately but not SMF.

    You have to make sure you are not using a remote database.

    Make sure to always check the import troubleshooting.

    Import Troubleshooting

    Run through this topic to see if you have any similar issues others may of have, and Stephen may have answered already.

    https://bbpress.org/forums/topic/smf-import-to-bbpress/

    #165378
    Robkk
    Moderator

    You need help with bbPress using a certain theme template?? Is that what you are saying??

    This guide will help you (I hope), I am not entirely sure you want specifically though. I bet the information is useful to learn though.

    Getting Started in Modifying the Main bbPress Template

    #165369
    Robkk
    Moderator

    Try some troubleshooting, and also link to your site to a forum where the error occurs. Also tell me your WordPress and bbPress versions are.

    Troubleshooting

    #165359
    Robin W
    Moderator

    you can use the shortcode [bbp-topic-index] in a new page – this will show the latest 15 topics across all forums with pagination.

    #165355
    strategeek
    Participant

    Here is a working code. Hooray!

    function displayTagElements($selectedTags, /* $userRole, */ $task){
       $html= array();
    $tags = get_categories(array('hide_empty' => 0, 'taxonomy' => 'topic-tag'));
    $selectedTagsArray = explode(',', $selectedTags);
    if($userRole != 'bbp_participant' || $task != 'edit') {
        $html[] = "";
        foreach($tags as $tag) {
            $selected = '';
            if (in_array($tag->name, $selectedTagsArray)) {
                $selected = 'checked';
            }
            $html[] = "<input type='checkbox' name='bbp_topic_tags[]'".$selected." value=". $tag->name .">". $tag->name;
        }
    } else {
        $html[] = $selectedTags;
    }
    return implode('', $html);
    #165344

    In reply to: bbPress Shortcode

    Robin W
    Moderator
    #165343
    Robin W
    Moderator

    Before Posting

    in particular

    ]https://codex.bbpress.org/getting-started/troubleshooting/

    #165334
    Acs-Yt
    Participant

    Hi,

    I was not able to find a shortcode like [bbPress_forum] to add a forum on a page. Is there a code available?

    #165331
    Robkk
    Moderator

    the bbpress.php template looks fine to me.

    There might be other custom functions for bbPress somewhere though? or cache?

    Try some troubleshooting. See if it is a plugin issue, issue is only present in your custom theme, and maybe run the repair tools to recalculate.

    Troubleshooting

    #165329
    23creative
    Participant

    @strategeek

    its been a while and im not 100% sure this will work (in terms of sanitation checks) but if you change

    $html[] = '<select class="chzn-select" multiple="multiple" name="bbp_topic_tags[]" id="bbp_topic_tags">';
                foreach($tags as $tag){
                    $selected = '';
                    if (in_array($tag->name, $selectedTagsArray)) {
                       $selected = 'selected="selected"';
                    }
                    $html[] = '<option '.$selected.' value="'.$tag->name.'">'.$tag->name.'</option>';
                }
            $html[] = '</select>';

    to

    foreach($tags as $tag){
        $selected = '';
        if (in_array($tag->name, $selectedTagsArray)) {
          $selected = 'checked="selected"';
        }
       $html[] = '<input '.$selected.' type="checkbox" name="bbp_topic_tags" value="'.$tag->name.'">'.$tag->name;
    }

    i haven’t tested it but it should get you close

    #165326
    Robkk
    Moderator

    @casiepa Thanks for creating a plugin to solve this problem for users. It is greatly appreciated. I have a few questions though.

    How do I use it??

    The setting are confusing me a little bit, and it doesn’t seem to show the subscriptions, but I do not really know where to manage them in the plugin. I just see a list of users with a button that says `[has role]’. I also do not think your plugin works for sub-forums/child forums of categories.

    How does it work exactly??

    I try to set it up, but I am still confused. Also there are a few errors while activating it with debug set to true in my wp-config.php file.

    define('WP_DEBUG', true);

    https://codex.wordpress.org/Debugging_in_WordPress

    Robkk
    Moderator

    @leng7881’s code worked for me @ghoush

    Leng7881
    Participant

    Log’s who knew? From further examination due to the log telling me to look I found that I have a gh_ in front of the function name when declaring it. There error is also in your updated code above. Now that I took that out it works great. Here is the code without the minor syntax error and thank you for this.

    function post_published_create_topic( $ID, $post ) {
        $checkduplicate = get_post_meta( $ID, 'gh_topic_created',true);
        if ( empty( $checkduplicate ) ) {
            $author = $post->post_author;
            $name = get_the_author_meta( 'display_name', $author );
            $title = $post->post_title;
            $permalink = get_permalink( $ID );
            $excerpt = $post->post_excerpt;
            $subject = sprintf( '%s: %s', $name, $title );
            $message = sprintf ('[b]%s[/b]' . "\n" . 'By %s' . "\n\n" . '[i]%s[/i]' . "\n\n" . 'View: %s' . "\n\n", $title, $name, $excerpt, $permalink );
            $tags = wp_get_post_tags( $ID, array( 'fields' => 'names' ) );
    
            $new_post = array(
                'post_title'    => $subject,
                'post_content'  => $message,
                'post_parent' => 72,
                'post_status'   => 'publish',
                'post_type' => 'topic'
            );
            $topic_meta = array(
                'forum_id'       => $new_post['post_parent']
            );
            $topic_id = bbp_insert_topic($new_post, $topic_meta);
            if ( !empty( $topic_id ) ) {
                add_post_meta($ID, 'gh_topic_created', 'true', true);
                $term_taxonomy_ids = wp_set_object_terms( $topic_id, $tags, 'topic-tag' );
                bbp_update_forum(array('forum_id' => 72));
            }
        }
    }
    add_action( 'publish_post', 'post_published_create_topic', 10, 2 );
    #165318
    Jake Hall
    Participant

    As I expected, was something to do with the rewrite rules. Was a very simple fix, I simply started messing with the rewrite until it worked. This is how mine works flawlessly should anyone have the same issur and somehow stumble across this thread.

    Note: This is for lighttpd. This is not an Apache or Nginx solution.

    # This is mainly a fix for bbPress and its functions
    url.rewrite = (
        "^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",
        "^/(.*)\.(.+)$" => "$0",
        "^/(.+)/?$" => "/index.php/$1"
      )
    }

    All I did here was remove the additional forward slash within each rule.

    Now my links work perfectly!

    #165316
    Martin Babinec
    Participant

    I’d like to add <link rel="prev" href=".." /> and <link rel="next" href=".." /> tags into <head> of bbpress forum page. So I need to get links for the next and previous pages of my forum. It has to be outputed in wp_head action but in that time the bbPress class is not initialized yet, so I cannot get any information from that. Can you help me?

    ghoush
    Participant

    Are you getting any error messages in your error logs? This code, unmodified, is working fine for me on 4.2.4.

    #165304
    Robkk
    Moderator

    I tried the theme and plugins with bbPress and I didn’t come across any issues.

    I am kind of thinking it could be the index.php in your url causing the issue, but I am not really sure.

    https://codex.wordpress.org/Using_Permalinks#PATHINFO:_.22Almost_Pretty.22

    Since I am not 100% sure, you can try some troubleshooting to see if you can find the solution to your problem.

    Troubleshooting

    Leng7881
    Participant

    I got the id from the Reveal ID’s thank you for that. I am trying to get this to work on my website which currently is on a localhost so can’t send you to it. I have put the code in the functions and changed the number to 72 (my forum id), however, when I post it does not create a new topic in that forum. I have been poking around trying to get it to work and have found that some places say the publish_post is deprecated and others that say to ignore that it still works. I’m currently using wordpress version 4.2.4 and here is the code I put in my functions.

    function gh_post_published_create_topic( $ID, $post ) {
        $checkduplicate = get_post_meta( $ID, 'gh_topic_created',true);
        if ( empty( $checkduplicate ) ) {
            $author = $post->post_author;
            $name = get_the_author_meta( 'display_name', $author );
            $title = $post->post_title;
            $permalink = get_permalink( $ID );
            $excerpt = $post->post_excerpt;
            $subject = sprintf( '%s: %s', $name, $title );
            $message = sprintf ('[b]%s[/b]' . "\n" . 'By %s' . "\n\n" . '[i]%s[/i]' . "\n\n" . 'View: %s' . "\n\n", $title, $name, $excerpt, $permalink );
            $tags = wp_get_post_tags( $ID, array( 'fields' => 'names' ) );
    
            $new_post = array(
                'post_title'    => $subject,
                'post_content'  => $message,
                'post_parent' => 72,
                'post_status'   => 'publish',
                'post_type' => 'topic'
            );
            $topic_meta = array(
                'forum_id'       => $new_post['post_parent']
            );
            $topic_id = bbp_insert_topic($new_post, $topic_meta);
            if ( !empty( $topic_id ) ) {
                add_post_meta($ID, 'gh_topic_created', 'true', true);
                $term_taxonomy_ids = wp_set_object_terms( $topic_id, $tags, 'topic-tag' );
                bbp_update_forum(array('forum_id' => 72));
            }
        }
    }
    add_action( 'publish_post', 'post_published_create_topic', 10, 2 );

    Any help on why this wouldn’t work for me would me much appreciated.

    #165298

    In reply to: Change font size

    Robkk
    Moderator

    This is the default font-size in the bbPress stylesheet. You can overwrite the statment or install a plugin like bbp style pack which I think would take care of this for you.

    #bbpress-forums {
        background: 0 0;
        clear: both;
        margin-bottom: 20px;
        overflow: hidden;
        font-size: 12px;
    }
    #165297
    Robkk
    Moderator

    You can show the topic index on your home page using this shortcode.

    [bbp-topic-index]

    Shortcodes

    #165295
    Robkk
    Moderator

    You can copy the form-topic.php into your theme/child theme into a folder called bbpress to customize the file used on your site.

    Theme Compatibility

    You can scroll all the way to the bottom of the file, and replace the current message

    <div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
        <div class="bbp-template-notice">
            <p>You must be <a href="<?php echo site_url('/wp-login.php') ?>">logged in</a> or <a href="<?php echo site_url('/wp-login.php?action=register') ?>">registered</a> to create new topics.</p>
        </div>
    </div>
    #165293
    Robkk
    Moderator

    In BBpress each user has the ability to edit their profile users/USER/edit/
    Here they can add their name, their website link and their bio by default. However, this information is never actually displayed on their profile. Why is this?

    The bio should show.

    https://bbpress.org/forums/profile/robkk/

    As for most of the other fields, not sure really. I know though they are just going off of WordPress’s profile fields, and whatever is added to that though. I don’t know why the devs haven’t put at least website there. Maybe it is easy for spammers to take advantage of that?? First Name and Last Name could make good choices to display on the users profile too.

    I will probably make a suggestion to the devs later to add more profile data to the user’s profile.

    You can of course display the data in the profile by editing a template or installing a plugin.

    Copy user-profile.php from the bbPress templates in the plugin to your child theme in a folder called bbpress.

    Just surround the code with conditionals to only display the information when the user has inputted any information.

    You have something like this for first name.

    <?php if ( bbp_get_displayed_user_field( 'first_name' ) ) : ?>
    
    	<p class="bbp-user-fname"><?php bbp_displayed_user_field( 'first_name' ); ?></p>
    
    <?php endif; ?>

    YOu can also use the plugin, to display the current fields and also custom fields.

    https://wordpress.org/plugins/bbp-profile-information/

Viewing 25 results - 8,126 through 8,150 (of 32,508 total)
Skip to toolbar