Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,851 through 9,875 (of 32,522 total)
  • Author
    Search Results
  • #156308
    Robin W
    Moderator

    ok, I’d do two things

    1. move the code to above </form> line
    2. Try it with the following to force bbpress to take the id

    <p class=”bbp-user-topic-count”><?php printf( __( ‘Topics Started: %s’, ‘bbpress’ ), bbp_get_user_topic_count_raw($user_id) ); ?></p>
     <p class=”bbp-user-reply-count”><?php printf( __( ‘Replies Created: %s’, ‘bbpress’ ), bbp_get_user_reply_count_raw($user_id) ); ?></p>

    `

    #156306
    siddardha
    Participant

    hey robin, here is the entire code:

    <div class=”userpro userpro-<?php echo $i; ?> userpro-id-<?php echo $user_id; ?> userpro-<?php echo $layout; ?>” <?php userpro_args_to_data( $args ); ?>>

    <?php _e(‘Close’,’userpro’); ?>

    <div class=”userpro-centered <?php if (isset($header_only)) { echo ‘userpro-centered-header-only’; } ?>”>

    <?php if ( userpro_get_option(‘lightbox’) && userpro_get_option(‘profile_lightbox’) ) { ?>
    <div class=”userpro-profile-img” data-key=”profilepicture”>profile_photo_url($user_id); ?>” class=”userpro-tip-fade lightview” data-lightview-caption=”<?php echo $userpro->profile_photo_title( $user_id ); ?>” title=”<?php _e(‘View member photo’,’userpro’); ?>”><?php echo get_avatar( $user_id, $profile_thumb_size ); ?></div>
    <?php } else { ?>
    <div class=”userpro-profile-img” data-key=”profilepicture”>permalink($user_id); ?>” title=”<?php _e(‘View Profile’,’userpro’); ?>”><?php echo get_avatar( $user_id, $profile_thumb_size ); ?></div>
    <?php } ?>
    <div class=”userpro-profile-img-after”>
    <div class=”userpro-profile-name”>
    permalink($user_id); ?>”><?php echo userpro_profile_data(‘display_name’, $user_id); ?><?php echo userpro_show_badges( $user_id ); ?>
    </div>
    <?php do_action(‘userpro_after_profile_img’ , $user_id); ?>
    <?php if ( userpro_can_edit_user( $user_id ) ) { ?>
    <div class=”userpro-profile-img-btn”>
    <?php if (isset($header_only)){ ?>
    permalink($user_id, ‘edit’); ?>” class=”userpro-button secondary”><?php _e(‘Edit Profile’,’userpro’) ?>
    <?php } else { ?>
    id_to_member($user_id); ?>” data-template=”edit” class=”userpro-button secondary”><?php _e(‘Edit Profile’,’userpro’); ?>
    <?php } ?>
    skin_url(); ?>loading.gif” alt=”” class=”userpro-loading” />
    </div>
    <?php } ?>
    </div>

    <div class=”userpro-profile-icons top”>
    <?php if (isset($args[‘permalink’])) {
    userpro_logout_link( $user_id, $args[‘permalink’], $args[‘logout_redirect’] );
    } else {
    userpro_logout_link( $user_id );
    } ?>
    </div>

    <?php echo $userpro->show_social_bar( $args, $user_id, ‘userpro-centered-icons’ ); ?>

    <div class=”userpro-clear”></div>

    </div>

    <?php if (!isset($header_only)) { ?>

    <?php
    // action hook after user header
    if (!isset($args[‘disable_head_hooks’])){
    if (!isset($user_id)) $user_id = 0;
    $hook_args = array_merge($args, array(‘user_id’ => $user_id, ‘unique_id’ => $i));
    do_action(‘userpro_after_profile_head’, $hook_args);
    }
    ?>

    <div class=”userpro-body”>

    <?php do_action(‘userpro_pre_form_message’); ?>

    <form action=”” method=”post” data-action=”<?php echo $template; ?>”>

    <input type=”hidden” name=”user_id-<?php echo $i; ?>” id=”user_id-<?php echo $i; ?>” value=”<?php echo $user_id; ?>” />

    <?php // Hook into fields $args, $user_id
    if (!isset($user_id)) $user_id = 0;
    $hook_args = array_merge($args, array(‘user_id’ => $user_id, ‘unique_id’ => $i));
    do_action(‘userpro_before_fields’, $hook_args);
    ?>

    <?php foreach( userpro_fields_group_by_template( $template, $args[“{$template}_group”] ) as $key => $array ) { ?>

    <?php if ($array) echo userpro_show_field( $key, $array, $i, $args, $user_id ) ?>

    <?php } ?>

    <?php // Hook into fields $args, $user_id
    if (!isset($user_id)) $user_id = 0;
    $hook_args = array_merge($args, array(‘user_id’ => $user_id, ‘unique_id’ => $i));
    do_action(‘userpro_after_fields’, $hook_args);
    ?>

    <?php // Hook into fields $args, $user_id
    if (!isset($user_id)) $user_id = 0;
    $hook_args = array_merge($args, array(‘user_id’ => $user_id, ‘unique_id’ => $i));
    do_action(‘userpro_before_form_submit’, $hook_args);
    ?>

    <?php if ( userpro_can_delete_user($user_id) || $userpro->request_verification($user_id) || isset( $args[“{$template}_button_primary”] ) || isset( $args[“{$template}_button_secondary”] ) ) { ?>
    <div class=”userpro-field userpro-submit userpro-column”>

    <?php if ( $userpro->request_verification($user_id) ) { ?>
    <input type=”button” value=”<?php _e(‘Request Verification’,’userpro’); ?>” class=”popup-request_verify userpro-button secondary” data-up_username=”<?php echo $userpro->id_to_member($user_id); ?>” />
    <?php } ?>

    <?php if ( userpro_can_delete_user($user_id) ) { ?>
    <input type=”button” value=”<?php _e(‘Delete Profile’,’userpro’); ?>” class=”userpro-button red” data-template=”delete” data-up_username=”<?php echo $userpro->id_to_member($user_id); ?>” />
    <?php } ?>

    <?php if (isset($args[“{$template}_button_primary”]) ) { ?>
    <input type=”submit” value=”<?php echo $args[“{$template}_button_primary”]; ?>” class=”userpro-button” />
    <?php } ?>

    <?php if (isset( $args[“{$template}_button_secondary”] )) { ?>
    <input type=”button” value=”<?php echo $args[“{$template}_button_secondary”]; ?>” class=”userpro-button secondary” data-template=”<?php echo $args[“{$template}_button_action”]; ?>” />
    <?php } ?>

    skin_url(); ?>loading.gif” alt=”” class=”userpro-loading” />
    <div class=”userpro-clear”></div>

    </div>
    <?php } ?>

    </form>

    </div>

    <?php } ?>

    </div>
    <p class=”bbp-user-topic-count”><?php printf( __( ‘Topics Started: %s’, ‘bbpress’ ), bbp_get_user_topic_count_raw() ); ?></p>
    <p class=”bbp-user-reply-count”><?php printf( __( ‘Replies Created: %s’, ‘bbpress’ ), bbp_get_user_reply_count_raw() ); ?></p>

    #156304

    In reply to: How to start?

    Toni
    Participant

    Because of the intructions I got from the forum – I knew what to look for and found this:

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


    So I have now The Shortcode. I don’t want to even read the “other” method in detail.
    My opinion: I don’t understand why this set-up must be so laborious.

    #156303
    Toni
    Participant

    Somehow the menu is in order this time. And…

    I found what you were explaining to me, and the shortcode (what I was searching for):

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

    Thanks again, I knew exactly what to look for this time.

    #156300
    2cats
    Participant

    I am using WP 4.0.1 and bbPress 2.5.4; forums are for members only so I can’t send you a link. I have topics and replies set to show 20; this limitation is also applying to my search results, even if there are more than 20 results for a search term, when I search I am told I’m viewing 20 of 20 found, with no option to see anything more. Is there a way around this? Have I missed a setting, or is there a code snippet I can slip in somewhere? Ideally I’d get 20 results per page, with pagination and the total number of results found. Any help would be greatly appreciated!

    #156295
    Toni
    Participant

    Wait – what is the shortcode? I know how to use them – but I don’t know them.

    #156294

    In reply to: How to start?

    Toni
    Participant

    Also – I had to get instruction from the forum about the purpose and what to do with the /forums/ page that is blank. I still have not found the shortcode.

    #156291

    In reply to: How to start?

    Toni
    Participant

    https://codex.bbpress.org/getting-started-with-bbpress/

    Odd that it takes a couple of links to get there.

    #156286
    Robin W
    Moderator

    can you post the view.php template with your added code here please

    #156280
    Robin W
    Moderator

    ok, the function needs the existence of a variable called $user_id (being the wordpress usreid of the profile user.

    How/where are you adding this code?

    #156274
    Robin W
    Moderator

    That is what the original code does in profile – what happens when you click the links?

    #156267

    In reply to: New Topic/Reply button

    Robin W
    Moderator

    you can call the page using an html button

    Just get the permalink for the new topic page (at the top of the dit screen for that page)

    the where you want it put

    <button type="button" onclick="window.location.href='http://www.mysite.com/page1'">Read More</button>
    

    with the correct url

    #156265
    Robin W
    Moderator

    the code that profile uses is

    <p class="bbp-user-topic-count"><?php printf( __( 'Topics Started: %s',  'bbpress' ), bbp_get_user_topic_count_raw() ); ?></p>
    			<p class="bbp-user-reply-count"><?php printf( __( 'Replies Created: %s', 'bbpress' ), bbp_get_user_reply_count_raw() ); ?></p>

    The function is expecting the profile user to be in a variable called $user_id

    Suggest you refer to the userpro support site for how to integrate this

    #156250
    Doulacare
    Participant

    This also doesn’t explain why this shortcode doesn’t work either http://ontariodoulas.org/forums/

    [bbp-forum-index]

    #156211
    siddardha
    Participant

    yes, i have done that, but with no result.

    ok, first i created a new page and put the short code [bbp-single-forum id=105] as per my forum id and then changed the required parent page and published. thats it right?

    #156203
    siddardha
    Participant

    hello,

    i am using a plugin “user pro for social login”

    with custom css the profile of bbpress is changed into user pro profile page, you can have a look at cahive.com/profile/siddardha

    i want to insert the “topics and replies posted” by the user using shortcodes or any other method possible on the users profile page.

    thank you for your help.

    #156183
    Robin W
    Moderator

    Depends what the issue is.

    I suggest this approach as it helps define whether on a ‘clean’ default theme with no other plugins bbpress is experiencing issues.

    If it is ok in a clean site, then I’d suggest talking to your host provider – most are good with wordpress, and may identify any issues.

    If you can identify a conflict, then we can look at a solution, sometimes it is easy, often it might be harder 🙂

    I presume your test site is on a local server?

    If you’re ok/good with web stuff, then you might consider putting a test site on-line so that it is an exact match for the live environment, most host providers allow sub-domains and if you switch on discourage search then it doesn’t interfere see

    https://codex.bbpress.org/creating-a-test-site/

    then you can be happier that live will work.

    Anyway just a thought !!

    medousa
    Participant

    Hi and thanks for your reply but I have a parent theme and can not create a child theme.
    Can I paste this code into a parent theme and if yes, at what function file?
    There are plenty into the dashboard.There is bbpress-functions, there is theme functions, functionsbu.php. Can you pls specify? I would deeply appreciate this!

    #156166
    yarashicr
    Participant

    It worked Robin. The problem was with the stylish single quotes in the shortcode on the link, I copied it as it is in the site. I changed it to normal single quotes and it started working. Thank you so much for your help and for such an awesome plugin.

    #156164
    HighRollerUSA
    Participant

    I just installed bbpress 2.5.4 on WordPress 4.1, on two different websites.

    On my test site, everything is working as expected, but on my live site (which has SSL) every time I try to access the default https://mysite.com/forums/ I get the following error:

    Fatal error: ob_end_flush(): Cannot use output buffering in output buffering display handlers in /homepages/wordpress/wp-includes/functions.php on line 3269

    I can create a new page with a different name than “forums” and use the shortcode successfully, but the breadcrumbs have a direct link to the “/forums” and it gives the same error.

    Any idea what may be going on?

    Thanks!

    #156162
    Piani
    Participant

    Thanks for the tip! Problem solved 🙂

    I also found this code to put in my custom functions.php to to solve this withouth the extra plugin.

    
    function fix_auto_subscribe( $checked, $topic_subscribed  ) {
    
        if( $topic_subscribed == 0 )
            $topic_subscribed = true;
    
        return checked( $topic_subscribed, true, false );
    }
    add_filter( 'bbp_get_form_topic_subscribed', 'fix_auto_subscribe', 10, 2 );
    
    #156155
    yarashicr
    Participant

    And I also want to know whether these shortcodes work on a wordpress widget.

    #156154
    yarashicr
    Participant

    Thanks a lot Robin. I tried the shortcodes as mentioned in the above page after installing and activating the plugin. It did not work for me. I used putting respective forum ID as well. Can you kindly help me on this. I am stuck fixing this for a long time now.

    #156145
    siddardha
    Participant

    Thanks for the info robin.
    I have a small doubt, pls clarify.
    So I will create a new page and paste the required short code and select the parent page, right? That’s all?
    Thank you once more.

    #156137
    Zemi12
    Participant

    Thank you, I solved it.

    #bbpress-forums div.odd,
    #bbpress-forums ul.odd {
    font-size:12px;
    margin-top:0;
    }
    
    #bbpress-forums div.even,
    #bbpress-forums ul.even {
    font-size:12px;
    margin-top:0;
    }
Viewing 25 results - 9,851 through 9,875 (of 32,522 total)
Skip to toolbar