Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,501 through 13,525 (of 32,521 total)
  • Author
    Search Results
  • jazinsa
    Participant

    Is it possible to show a user’s forum topic count(or post count) in the buddypress profile page? It feels like it should be simple enough but hours of googling and reading topics here has left me more confused than when I started.

    I can see its possible on a bbpress profile page, where it’s using:

    <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>

    Should I be calling a different function altogether, or is there a specific way to put bbPress functions inside a BuddyPress template page?

    A good example of what I mean is at Tamriel Foundry, where the various counts are listed under the heading Post Details. (The design of that site in general is amazing)

    Any help would be greatly, greatly appreciated! And apologies if you are reading this for a second time, I wasn’t sure whether to post my query at the Buddypress or bbPress forums.

    pekmez
    Participant

    the path is just like for the version 2.4.1

    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php

    As JarretC wrote before

    Change the line 30

    <?php bbp_list_forums(); ?>

    to

    <?php bbp_list_forums( array ( 'separator' => '<br />' ) ); ?>

    Thanx JarretC

    #138611

    In reply to: Remove Sidebar

    Robin W
    Moderator

    ok, try this – I have culled it from varous other posts, in particular

    Full-Width Forum

    Don’t swear it will work, but give it a go

    1. Create a page called “forums”,
    2. make this page a full width page – if your theme doesn’t support this, then you’ll need to create a child theme and add a full page template.
    3. Put this shortcode on the page [bbp-forum-index]
    4. edit the following file
    wp-content/plugins/bbpress/templates/default/css/bbpress.css
    by removing the left float from div.bbp-breadcrumb(line 405)
    5. In your style.css add the following

    .bbPress #primary {
    display: none;
    }
    .bbp-forums {
    width: 100%;
    }

    let us know if that works

    #138610
    FreeWPress
    Participant

    Is not good idea to change core code… And when bbpress is updated you lost all your modifies…

    #138609
    pekmez
    Participant

    as garindan post, pls try this file to edit.

    wp-content/plugins/bbpress/includes/common/template.php

    Line 2249

    change

    // Add the breadcrumb
    // $crumbs[] = '<a href="' . esc_url( $root_url ) . '">' . $r['root_text'] . '</a>';

    to this

    // Add the breadcrumb
    // $crumbs[] = '<a href="' . esc_url( $root_url ) . '">' . $r['root_text'] . '</a>';
    $crumbs[] = '<a href="/forum/">Forum</a>';
    #138602

    In reply to: Remove Sidebar

    Robin W
    Moderator

    you can add this function to your functions.php

    function disable_all_widgets( $sidebars_widgets ) {       
        if ( function_exists('is_bbpress') ) {
            if (is_bbpress()) {
                $sidebars_widgets = array(false);
                remove_all_actions('bp_register_widgets');
                unregister_sidebar( 'bp_core_widgets' );
            }
        }
        return $sidebars_widgets;
    }
    
    add_filter('sidebars_widgets', 'disable_all_widgets', 1, 1);

    or this to your style.css

    .bbPress #primary {
    display: none;
    }
    #138599

    In reply to: Custom Import

    Stephen Edgar
    Keymaster

    Where does it say that? 😉 I just changed it to MySQL 😉

    https://codex.bbpress.org/import-forums/custom-import/

    Take a look at the following for some reading material to help get you going.

    Importing from DotNetNuke Active Forum

    The basis of what ended up being used is here.

    Mix all that in with this on converting from Microsoft SQL to MySQL (This was Access but the same tools should do MSSQL fine)

    Documented import from snitz access database

    Let me know how that all goes for you and I will follow up with more 🙂

    #138593

    In reply to: Persistant login form

    baylock
    Participant

    Thank you for your answer Robin W.
    I would rather use the shortcode as I don’t even use a sidebar.
    How come I can’t see the login form through all the views as they are all part of the same WP page (which has the shortcode) ?

    Thank you.

    #138581
    Rogelio
    Participant

    Hi,

    I managed to create a TinyMCE plugin and add it to wordpress editor (which is the same as bbpress).

    So far so good.

    Using

    $ args ['teeny'] = false;

    config, my tinymce plugin’s button show normal.

    But, I need to be displayed in the default editor for bbpress, in teeny editor.

    Any ideas?

    Thanks a lot.

    #138580
    Button9
    Participant

    I got it to work now! The solution was to put the code you guys gave me in the beginning of the functions.php. I should probably have known that 🙂

    Now one more thing; what can I add to also remove the link that is on your own name/profile after you have logged in to the forum?

    Thank you!

    Best regards,
    Button9

    #138570

    In reply to: bbPress 2.4.1

    Stephen Edgar
    Keymaster

    @unklee Thnaks for your feedback, all great ideas and it is just really a time issue, our 9-5 day jobs get in the way of spending more time with bbPress 😉

    Anyone with a WordPress/bbPress/BuddyPress username & password can edit and update the codex so we may not mention this fact as often as we should and are extremely grateful when new contributions occur.

    Just go to https://codex.bbpress.org/ and click ‘login’ and have at it 🙂

    #138569

    In reply to: bbPress 2.4.1

    unklee
    Participant

    Guys, I have been a WordPress user for a couple of years, but just beginning to work out bbpress. It looks great (thanks!) but I’m finding a few difficulties working out a few things.

    I want to suggest that you enlarge the Codex slightly to assist new users, with a section titled something like “Some common issues”. It could include your recommendations and suggestions on the following:

    Getting sidebars the way you want them:
    Outline the various common problems and the recommended approaches/plugins to solving them (there are many threads on this, not all resolved):

    • remove all sidebars
    • Get the same sidebars as your blog
    • Different sidebar to blog

    Styling
    Do we need a special CSS or can we use the CSS from the blog?

    Features of most forums
    Most forums have features that it is sometimes hard for newbies to find the right way to get them, so giving us some good advice would really help:

    • List of forums in sidebar
    • List of recent posts in sidebar
    • Login/register box
    • HTML/BBCode buttons – is a separate plugin useful?
    • Admin & moderation

    I know you probably don’t want to favour some plugins over others, but giving us your best advice, and maybe listing a couple of alternatives, would be very helpful.

    Thanks.

    #138566
    #138563
    unklee
    Participant

    Hi Robin, I tried what you said (exactly, including logging out) and I’m afraid it didn’t work for me. I still see the blog sidebar with about 8 widgets in it, and not the bbpress sidebar with just one (trial) widget in it.

    I note that others talk about changing the permalinks and I haven’t done that because I’m not sure exactly what they mean.

    I really want to get this sorted, and I’d prefer not to have to do it by changing some of the php files, because I’m a very rough php coder! I wonder whether there’s anything else I should do that is so obvious to everyone that they’re not saying it, but it’s not obvious to me.It would be good if we could work out a definitive set of instructions, because a lot of people seem to have this issue.

    #138558
    baylock
    Participant

    Ok, thank you!

    I achieved what I wanted, this way:

    Forums list:

    <p class="bbpx-topic-meta">
        <?php
        $forum_id  = bbp_get_forum_id();
        $last_active = get_post_meta( $forum_id, '_bbp_last_active_time', true );
        if ( empty( $last_active ) ) {
            $reply_id = bbp_get_forum_last_reply_id( $forum_id );
    	if (!empty( $reply_id)){$last_active = get_post_field( 'post_date', $reply_id );} 
            else 
            {
    	    $topic_id = bbp_get_forum_last_topic_id( $forum_id );
                if (!empty( $topic_id)){$last_active = bbp_get_topic_last_active_time( $topic_id );};
    	};
        };
        $date= date('d/m/Y',bbp_convert_date( $last_active ));
        $active_id = bbp_get_forum_last_active_id( $forum_id );
        $link_url  = $title = '';
    
        //these two next lines are beyond me: same condition, two results for the same variable...
        if (empty($active_id)){$active_id = bbp_get_forum_last_reply_id( $forum_id );};	
        if (empty($active_id)){$active_id = bbp_get_forum_last_topic_id( $forum_id );};
    
        if (bbp_is_topic($active_id)) 
        {
    	$link_url = bbp_get_forum_last_topic_permalink( $forum_id );
    	$title    = bbp_get_forum_last_topic_title( $forum_id );
        } 
        elseif (bbp_is_reply($active_id)) 
        {
    	$link_url = bbp_get_forum_last_reply_url( $forum_id );
    	$title    = bbp_get_forum_last_reply_title( $forum_id );
        };
        $time_since = bbp_get_forum_last_active_time( $forum_id );
        if (!empty($time_since) && !empty($link_url) 
        {
    	$anchor = '<a href="'.esc_url($link_url).'" title="'.esc_attr($title).'">'.$date.'</a>';		
            ?>
            <span class="bbp-topic-freshness-author">
              <?php
                  bbp_author_link(array('post_id'=>bbp_get_forum_last_active_id(),'size'=> 14));
              ?>
            </span>
            <?php	
        }
        else {$anchor = 'esc_html__( 'No Topics', 'bbpress' );};
        ?>
    </p>
    		
    <?php
    echo apply_filters( 'bbp_get_post_time', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );
    ?>

    Topics list:

    <p class="bbp-topic-meta">
        <span class="bbp-topic-freshness-author"><?php bbp_author_link(array('post_id =>bbp_get_topic_last_active_id(),'size'=>14)); ?></span>
            <?php
    	$topic_id   = bbp_get_topic_id();
    	$reply_id   = bbp_get_topic_last_reply_id();
    	$title      = bbp_get_topic_last_reply_title( $topic_id );
    	$link_url   = bbp_get_topic_last_reply_url( $topic_id );
    	$date   = get_post_time( 'd/m/Y', $gmt, $reply_id, true );
    	$anchor = '<a href="'.esc_url($link_url).'" title="'.esc_attr($title).'">'.esc_html($date).'</a>';
    	echo apply_filters( 'bbp_get_topic_freshness_link', $anchor, $reply_id, $result, $link_url, $title );	
    	?>
    </p>

    As you can see, I didn’t hook anything already. So far I just got rid of the “bbp_topic_freshness_link()” in the templates and simply replaced the initial function by these lines, just to make a test. I still have to make a function out of these.

    Not happy with this mess as I’m sure it’s more complicated that it should be, but it works.

    Thank you for your guidance koendb!

    #138553
    FreeWPress
    Participant

    Hi, search this code in css:

    li.bbp-forum-info, li.bbp-topic-title {
        float: left;
        text-align: left;
        width: 49%;
    }

    Set width like 49% and correct visibility problems….

    #138551
    ga13ush
    Participant

    Hi, i dont undertand how to use the profil link. Is it like (its not working) :

    <?php echo '<a href="'.get_profile_tab_link( bb_get_current_user_info( 'id' ), "edit" ).'">edit your profile</a>' ?>

    Thanks for your help

    #138548

    Topic: Head

    in forum Themes
    Mailhilfe
    Participant

    I looked in a lot of template files and try to delete the organge rounded (see picture) area but without any success.
    Could someone please tell me in what template file I can remove the area?

    I try it also here:

    
    <?php ############################################################################################################################ ?>
    
    <?php do_action( 'bbp_template_before_topics_loop' ); ?>
    
    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" class="bbp-topics" style="clear: right;">
    
    	<li class="bbp-body">
    
    		<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
    
    			<?php //bbp_get_template_part( 'loop', 'single-topic' ); ?>
    <?php ############################################################################################################################ ?>
    Stephen Edgar
    Keymaster

    Onto the ‘other’ bits of your last post.

    For the most part the standard /wp-admin/users.php user admin dashboard panel is ‘enough’ to get day to day tasks done for ‘most’ situations as it does have search (top right) to make this usable.

    The delete users wp-admin/users.php?action=delete&user=123 is all WordPress and bbPress does not alter this behaviour though as you state it would be nice if this could be improved for sites with large user bases. To resolve this we will have to wait until WordPress implements some changes here.

    None of the bbPress widgets do this Widgets – the list of users is loaded under one or more widgets

    So yes, these things are not just under consideration they are actively thought about constantly and we have tried to keep from implementing this pain in bbPress, but for now until we can get some changes upstream in WordPress core some of this pain will remain.

    As I mentioned above on the ‘clobber-spam-users’ plugin I mentioned this plugin as it is not very complex and could be modified to ‘help’ with your cleaning up of 17,000 users topics & replies.

    #138539
    Martyn_
    Participant

    After upgrading to 2.4.1 I seem to have lost the “edit” post link in forums.

    admins still see the links, “participants” don’t (for their own posts). I think its falling foul of


    // User cannot edit or it is past the lock time
    if ( empty( $reply ) || !current_user_can( 'edit_reply', $reply->ID ) || bbp_p\
    ast_edit_lock( $reply->post_date_gmt ) ) {
    return;
    }

    in particular the current_user_can check. A bit confusing because that doesn’t seem to have changed…

    #138535
    FreeWPress
    Participant

    Hi, add this code in your css;

    .avatar-14 {
        width: 14px;
    }

    refresh your page one, or two or more time to cancel browser cache…

    I hope help you… 🙂

    #138521
    RealitiesCrossed
    Participant

    I’ve got the bbPress post toolbar plugin installed to bbPress on my WordPress site, which is a private roleplay site for myself and a couple of friends…but two out of the current three of us are feeling a bit OCD about the arrangement of the smilies.

    We have emotes I have created and/or some I have gotten permission to use that represent each character we play with, a full range of emotions, hug emotes etc. for each character, which right now is probably 60 odd smilies, all characters combined.

    I have worked out how to arrange the names of the smilies in the package-config file to keep the characters relatively organized, but I’ve tried adding line breaks between each of the character sets and all that does is break the entire website down until I remove them, I can’t seem to edit package-config outside adding new smilie codes without crashing the site…but what I would love to know is this:

    Is there a way that I can insert line breaks or separate the smilies into tabs somehow by character rather than having them all smushed into one big group?

    edit: WordPress 3.6 and bbPress 2.3.2 are running on my site, I haven’t gotten around to the WP update and refused to upgrade bbPress because a plugin I was using was incompatible with the new version and I didn’t wish to break it.

    #138519
    koendb
    Participant

    Hey.

    If you haven’t created a child theme, start with doing that.

    Create the file bbpress.php in your child theme.
    Copy the content of your page.php file into this new file.
    Remove the line

    <?php get_sidebar(); ?>

    You’ve removed the sidebar 🙂

    Now you only need to change / add some classes / ID’s and adjust your CSS file to give the forum a 100% width.

    Keep me updated 🙂

    #138507
    baylock
    Participant

    Hello,

    I read a lot of questions around here related to the change of the freshness to a simple date.
    But each one of the answers are related to a forum posts lists.
    What I want is to display the last post date in the freshness column of the forums lists.

    How would i do that?

    I believes this has something to do with this line:
    $time_since = bbp_get_forum_last_active_time( $forum_id );

    Or maybe this one:
    apply_filters( 'bbp_get_post_time', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );

    But how to get the normal date from that (d-m-Y), it’s a mystery to me.

    Thank you for your help.

    BBPress: 2.4
    WP: 3.7

    #138504

    Topic: Theme issues

    in forum Themes
    tansu
    Participant

    Hello,
    I am very new to bbpress.
    I have successfully convert my 54000 user vbulletin forum in to bbpress. Also converted more than 1 gigabyte contents database without issues. There were some problematic turkish characters but i solved that issue too.
    But, i am sure it was a very well written document about how to modify and adding new themes to bbpress, I understand completely nothing from them. I also read forum topics about the issue, but most of them pointing the links where the docs are.
    I also tried copying folders and files in to wordpress themes directory or my theme’s directory, nothing is happening. Most probably i did not understand anything from the docs here:
    http://codex.bbpress.org/theme-compatibility/
    Can someone please explain to me what to do like explaining to an idiot.Assume my wordpress theme’s name is “wptheme” and please direct me into it by real examples like: Put your wp-content/plugins/bbpress/templates/bbpress folder to wp-content/themes/wordpresstheme folder. or whatever is true 🙂
    Best regards

Viewing 25 results - 13,501 through 13,525 (of 32,521 total)
Skip to toolbar