Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'bbpress'

Viewing 25 results - 23,226 through 23,250 (of 64,732 total)
  • Author
    Search Results
  • #139631
    justsayno1
    Participant

    How did you get from there to “I just followed…”?

    Unfortunately there is not an easy way to explain this as I am not that familair with wordpress/bbpress core myself. BUT what I mean is that function is obviously somewhere in the bbpress core files. All I did was start going in there. They are quite well documented and have comments that explain the different functions that get used. You are mainly looking for the template tags function files. Also most plugins/php apps use an includes folder to put all the main crux of the things in. While the main file is just simply a link to all those areas an common functions. If you really can’t find it then just use a program with a “search in files” option and just try and find it that way. I think that is what I did to start with.

    For example when I wanted to find the function yo mention above:
    bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => false ) );

    I thought about what the function is saying and where in the folder directories of includes it may be. Since it was “reply” related I figured it would be in the reply section. I just used some common sense to figure out the template-tags.php probably containted template specific functions. Then I just did a search on those files until I found the bbp_reply_author_link. Which then calls bbp_get_reply_author_link which in tern as a return value of:

    return apply_filters( 'bbp_get_reply_author_link', $author_link, $r );

    Meaning that you can basically sub in your own functino for this function by using:

    add_filter( 'bbp_get_reply_author_display_name', 'replace_bbpress_replies_username_filter', 10, 2);

    Where replace_bbpress_replies_username_filter is your replacement filter. Then what I mean by following the functions is that i realised that this function was fine. It was the bpp_get_author_display_name that I was unhappy with. And this would be called in many places (presumably). So I overwrote that function. EG:

    
    function replace_bbpress_replies_username_filter($author_name,$reply_id ){
    $author_id = bbp_get_reply_author_id($reply_id);
    $author_object = get_userdata( $author_id );
    $author_name  = ucfirst($author_object->user_login);
    return $author_name;
    }
    add_filter( 'bbp_get_reply_author_display_name', 'replace_bbpress_replies_username_filter', 10, 2);
    

    Does that help? I know it seems daunting but getting into the core files and seeing what they are doing is I have found the best way when you are thinking “what the fuck!”. Also bear in mind I spend about 4 hours yesterday figuring this stuff out (but I didn’t understand filters really until now). Just to help you out futher. The three filters I added were as follows:

    
    add_filter( 'bbp_get_reply_author_display_name', 'replace_bbpress_replies_username_filter', 10, 2);
    add_filter( 'bbp_get_topic_author_display_name', 'replace_bbpress_topic_author_display_name', 10, 2);
    add_filter( 'bbp_get_user_profile_link', 'replace_bbpress_profile_link_text_filter', 10, 2 );
    

    The display name function I have shown you. The topic display name function:

    
    function replace_bbpress_topic_author_display_name( $topic_id = 0 ) {
    		$topic_id = bbp_get_topic_id( $topic_id );
    
    		// Check for anonymous user
    		if ( !bbp_is_topic_anonymous( $topic_id ) ) {
    
    			// Get the author ID
    			$author_id = bbp_get_topic_author_id( $topic_id );
    			$author_name = get_the_author_meta( 'user_login', $author_id );
    
    		// User does not have an account
    		} else {
    			$author_name = get_post_meta( $topic_id, '_bbp_anonymous_name', true);
    		}
    
    		// If nothing could be found anywhere, use Anonymous
    		if ( empty( $author_name ) )
    			$author_name = __( 'Anonymous', 'bbpress' );
    
    		// Encode possible UTF8 display names
    		if ( seems_utf8( $author_name ) === false )
    			$author_name = utf8_encode( $author_name );
    
    		return $author_name;
    }

    And for the profile link:

    
    function replace_bbpress_profile_link_text_filter($user_link, $user_id){
    		// Validate user id
    		$user_id = bbp_get_user_id( $user_id );
    		$user_object = get_userdata( $author_id );
    		$user_name  = ucfirst($author_object->user_login);
    		if ( empty( $user_id ) )
    			return false;
    
    		$user      = get_userdata( $user_id );
    		$name      = esc_attr( $user_name );
    		$user_link = '<a href="' . bbp_get_user_profile_url( $user_id ) . '" title="' . $name . '">' . $name . '</a>';
    }

    I also changed the default wordpress “get_avatar” function because it returns the gravatar users real name as the alt attr. All you really have to do it replace the function with the same function but get the users login name and replace the alt text name with that. the function is big and I don’t wanna make this post any more ridiculous.

    It’s cool to be the one giving the answers on a WordPress forum! I only really have learned this stuff in the last few months myself. I am more of a Drupal guy. Shock Horror.

    Cheers!

    #139629
    joshnoworries
    Participant

    Thanks for all the suggestions! I will investigate the filter as that would be much more elegant. Here is what i am currently using, it’s ugly but i needed an urgent solution for a client:

    loop-single-forum.php

    REPLACED:
    <?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?>

    WITH:

    <?php if(bbp_get_forum_last_active_id()){?>
    <?php $last_post_id = bbp_get_forum_last_active_id(bbp_get_forum_last_topic_id()); ?>
    <?php $last_user_id = bbp_get_topic_author_id($last_post_id); ?>
    <a href="<?php echo bbp_topic_author_url($last_post_id) ?>"><?php bbp_topic_author_avatar($last_post_id,15); ?>
    <?php $user = get_user_by( 'id',$last_user_id ); echo $user->user_login ; ?></a>
    <?php } else { ?>
    <?php } ?>

    loop-single-topic.php

    REPLACED:

    <?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?>
    

    WITH:
    Started by: <a href="<?php echo bbp_topic_author_url() ?>"><?php bbp_topic_author_avatar(0,15); ?><?php $user = get_user_by( 'id',bbp_get_topic_author_id() ); echo $user->user_login ; ?></a>

    REPLACED:
    <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) );?>

    WITH:

    <?php $last_post_id = bbp_get_topic_last_active_id() ?>
    <?php $last_user_id = bbp_get_topic_author_id($last_post_id) ?>
    <a href="<?php echo bbp_topic_author_url($last_post_id) ?>"><?php bbp_topic_author_avatar($last_post_id,15); ?>
    <?php $user = get_user_by( 'id',$last_user_id ); echo $user->user_login ; ?></a>

    loop-single-reply

    REPLACED:
    <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>

    WITH:

    <a href="<?php echo bbp_reply_author_url() ?>"><?php bbp_reply_author_avatar(0,80); ?><br/>
    <?php $user = get_user_by( 'id',bbp_get_reply_author_id() ); echo $user->user_login ; ?></a>
    <?php bbp_reply_author_role() ?>
    ozgurpolat
    Participant

    Hi Stephen ( @netweb ), Thanks for helping me. I tried the fix with bbpress 2.5 but it doesn’t seem to be working. The strange thing is if I login as admin, there is no problem. :). I have to go back to version 2.3.2 for now but I will set up a test site with the same problem and give you admin/ subscriber access. maybe it would help you better to see the problem. I will do this on the weekend.

    Best regards

    #139625

    In reply to: Menu link to Profile

    FreeWPress
    Participant

    Ok, please report your feedback here please https://bbpress.trac.wordpress.org/ticket/2480
    Many thanks for your time…

    #139623

    In reply to: Lost Formatting

    FreeWPress
    Participant

    Hi, if you have update to 2.5 versions you can find other topics with this issue.. There is a patch.. problem is this:

    <link rel='stylesheet' id='bbp-default-css' href='http://qtippoker.com/wp-content/D:Hosting4710742htmlwp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199' type='text/css' media='screen' />

    Your theme can’t find bbpress css…

    #139619
    QTipPoker
    Participant

    My forum site is:

    http://qtippoker.com/forums/forum/qtip_forums/

    I’ve no idea why, but I’ve recently lost the table type formatting that came with bbpress (the way each forum was in a box and such.) I don’t think I’ve installed anything new or made any css changes since I lost saw bbpress in the table format.

    Any ideas? I’m using twenty thirteen.

    Thanks.

    #139616
    Robin W
    Moderator

    @justsayno1

    I just followed the functions until I found these three filters: 🙂

    Ok, so given that loop-single-reply has

    bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => false ) );

    How did you get from there to “I just followed…”?

    I’ve never got into this area (have only been playing with wordpress since March this year, so am still a newbie), and would love to, but can’t find any tutorials that get you from a line on a display php to the backend function that creates it. I understand how a filter works (and that link is the best explanation I’ve seen so far!), but have you got a logical way to then backtrack to find out what you’re going to create a filter for? – I’ve looked through bbpress and there are lots of “function.php”s, the most obvious being bbpress/includes/common/functions.php, but a search for ‘bbp_get_user_profile_link’ comes up blank.

    If you could explain how you get from a to b, I be really grateful !

    glyndavidson
    Participant

    I’m using:

    • WPMS 3.7.14
    • bbPress 2.5
    • BuddyPress 1.8.1

    I’d like each site on the network to have its own users, groups, forums etc.

    At present, if I create a user on one site, that user appears in all other sites. This is also true for groups. This is not what I want.

    Could anybody tell me how to achieve what I want, and also, point me to some documentation so that I can get a clear understanding of how users are managed within WPMS, bbPress and BuddyPress.

    Many thanks

    Glyn

    #139613
    traderhotel
    Participant

    Hello,
    I just updated to the bbPress 2.5 version and now Im wondering where the settings tab is located?
    I cannot find it on the left side of the backend and neither on the WP-plugin site.

    Thanks

    #139610
    mistercyril
    Participant

    Hello Stephen,

    I am experiencing the same issue on a WP + BP + BBPress setup.

    What I have found so far is the the ul.bbp-replies (used to display topic replies) outputs the “li” (answers) in the wrong order. So its obviously not .css related.

    I haven’t been able to determine for sure if the user rôle has anything to do with the order, but as far as I can tell it doesn’t.

    Hope this helps,

    C.

    #139608
    mouffles
    Participant

    I use a plugin to display pictures in lightbox (plugin name litebox).

    I have modified bbpress post tool bar, to include the class tag to the url.
    I also find the way to allow class tag for images and link in bbpress but i have to modify core files : \bbpress\includes\common\formatting.php

    i already googled a way to override this function in my theme function.php

    and what i did is :

    
    function my_filter_bbpress_allowed_tags() {
    	return array(
     
    		// Links
    		'a' => array(
    			'class'    => true,
    			'href'     => array(),
    			'title'    => array(),
    			'rel'      => array()
    		),
    
    		// Quotes
    		'blockquote'   => array(
    			'cite'     => array()
    		),
    
    		// Code
    		'code'         => array(),
    		'pre'          => array(),
    
    		// Formatting
    		'em'           => array(),
    		'strong'       => array(),
    		'del'          => array(
    			'datetime' => true,
    		),
    
    		// Lists
    		'ul'           => array(),
    		'ol'           => array(
    			'start'    => true,
    		),
    		'li'           => array(),
    
    		// Images
    		'img'          => array(
    			'class'    => true,
    			'src'      => true,
    			'border'   => true,
    			'alt'      => true,
    			'height'   => true,
    			'width'    => true,
    		)
    	);
    }
    add_filter( 'bbp_kses_allowed_tags', 'my_filter_bbpress_allowed_tags' );
    

    But today i updated to bbpress 2.5 and i saw that it didin’t work :/
    What is the correct function to allow this without hacking the bbpress core ?
    Could you in the future add a class tag allowed for link and images ?

    #139606
    mouffles
    Participant

    Hi,

    I updated my forum and i have issues with url redirection.

    When user post to topic (with many replies and many pages) they are redirected to the first page of the topic. It don’t do this for topics with a fex pages (less than 10).

    I saw that this bug exist since years, and i’d like to know how to fix this.

    #139604
    Stephen Edgar
    Keymaster

    Can you give us some more detailed information please.

    Another topic similar I have been looking into is here:

    Edit topic reply, changes post order

    Is this what your seeing or something different?

    #139603
    hyperzzz
    Participant

    Good Morning Folks
    I have setup a brand new website for my local gaming club and I have installed BBpress as an alternative forum to phppress ( to get rid of adverts without having to pay) users are starting to migrate across to the new bbpress however i have noticed that some posts are not appearing in linear order, example – date & time posts listed on the forum its not on all of the forums but it is annoying to see posts not showing as and when folks replied.
    Can anyone offer any thoughts on how to fix this?

    #139601
    Cars10
    Participant

    ok, here my latest uüdates to custom CSS field of my theme:

    #bbpress-forums > #subscription-toggle{
       float:right;
    }
    
    #bbpress-forums div.bbp-reply-content a.subscription-toggle,
    #subscription-toggle a{
       font-weight:bold;
       padding: 0 2px 0 2px;
       border: 1px solid navy;
       background-color: white;
    }
    
    #bbpress-forums div.bbp-reply-content .is-subscribed a.subscription-toggle,
    #subscription-toggle .is-subscribed a.subscription-toggle{
       background-color: #FFE000;
    }
    #139600
    eduardosilva
    Participant

    Hello Stephen,

    Following your recommendations, I disabled all the plugins (except for bbpress) and runned all the repair tools. No change.

    afaik, this happens, on all posts that are edited by any reason.
    One post was created yesterday, edited and have the same issue. Even the answers that I posted today appears before yesterdays edit.

    I migrated from bbpress 1.x around 2 months ago.

    You can see one example at: http://endian.eth0.com.br/forums/topic/novato/
    (also changed the template to twentythirteen now)

    Thank you!

    #139596
    FreeWPress
    Participant

    Stephen, Twenty Thirteen theme is clean, no customization , i never used this theme, folder is original no extra additions here…

    I see same image above with only difference wich i have subscribed 2 topics and see that.. But for forums i see only “You are not currently subscribed to any forums.”

    switched to the Twenty Thirteen remove all customizations for my theme and bbpress template.. it use all original files..

    #139595

    In reply to: Menu link to Profile

    mmichael1991
    Participant

    Hi

    I already tried that. Doesn’t work. Only when replacing the updated bbPress plugin folder back to the previous version.

    I started a Topic of this on my theme support page. So maybe they can find a solution.
    Here.

    #139594

    In reply to: Forum subscriptions

    Stephen Edgar
    Keymaster

    I wonder, have I misunderstood this new (2.5) feature.

    No 🙂

    I expected that once I am subscribed to a forum I would receive email notification of any new post or reply in that forum. But I haven’t received any (and yes, there were posts overnight to forums I have subscribed to)

    Indeed you should receive an email containing something like “You are receiving this email because you subscribed to a forum.”

    You will only get ‘New Topic’ emails, if you want replies you also have to subscribe to that specific topic.

    I had assumed that the subscription feature would mean I could deactivate ‘bbPress Notify’ plugin, but it seems I still need it.

    Essentially yes, you should no longer need to use the ‘bbPress Notify’ plugin

    #139593

    In reply to: Stylesheet Issues

    Stephen Edgar
    Keymaster

    A probably quicker and easier way to test the patch is to download the following file:
    https://bbpress.trac.wordpress.org/export/5210/branches/2.5/includes/core/template-functions.php

    Save that to your PC and then with an FTP program upload it to your web host in this folder /public_html/wp-content/plugins/bbpress/includes/core

    #139592

    In reply to: Stylesheet Issues

    Bright Thought, LLC
    Participant

    Thanks for the reply’s I am going to try what @focallocal did with the new patch that was released to see if that fixes it. I had moved the stylesheet for bbpress into my theme for now and linked it that way so that I could continue working on it for now. I’ll try the fix the mentioned above tomorrow and see what that does for me. I appreciate all of the responses.

    #139591
    Stephen Edgar
    Keymaster

    If you have switched to the Twenty Thirteen you should the same image that I posted above using bbPress 2.5.

    I know you have some custom templates in your normal themes child theme and I have a suspicion that you might also have some in your Twenty Thirteen theme folder and they need to be removed (or backed up), you need to find a theme that is ‘clean’ and has no extra additions in its folder structure, either in the root of the theme or a sub-folder bbpress.

    Stephen Edgar
    Keymaster

    Thanks for the reply, MediaTemple DV should not be a problem and I won’t need the other info.

    Can you try this for me please 🙂 Download the following file and save it to your PC.
    https://bbpress.trac.wordpress.org/export/5210/branches/2.5/includes/core/template-functions.php

    With an FTP program upload it to your web host in this folder /public_html/wp-content/plugins/bbpress/includes/core

    Does this fix the issue for you in either bbPress 2.4 or 2.5 (Preferably 2.5)?

    #139588
    Stephen Edgar
    Keymaster

    Also new replies are inserted before the edits:

    TOPIC A
    – Post 1
    – Post 3
    – Post 4
    – Post 5
    – Post 6
    – Post 2

    In this case was/is ‘Topic A’ a newly created topic in bbPress 2.5 or a migrated topic from v1.x?

    Also can you run the repair tools following the instructions here:
    https://codex.bbpress.org/repair-forums/

    Does this fix the order?

    If the order was fixed and a reply is edited what happens?

    #139585
    eduardosilva
    Participant

    Hello,

    When I was using 1.1 alpha, this problem wasn’t happening.

    After importing the old forum to 2.x, I did noticed this issue.
    Yesterday I also upgraded bbpress to latest version 2.5

    The addons that I have enabled are:
    – BBPress Close Old Posts
    – bbpress Simple Advert Units
    – Captcha
    – Custom Meta Widget
    – Google Analytics for WordPress

    Template: Lobster (bootstrap 3)
    – switched templates and issue stills there

    Also new replies are inserted before the edits:

    TOPIC A
    – Post 1
    – Post 3
    – Post 4
    – Post 5
    – Post 6
    – Post 2

    Thank you

Viewing 25 results - 23,226 through 23,250 (of 64,732 total)
Skip to toolbar