Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '"wordpress"'

Viewing 25 results - 10,726 through 10,750 (of 26,882 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!

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

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

    #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

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

    #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

    #139582
    Matoca
    Participant

    Thank you for you extreme patience with me.

    So am I not supposed to be seeing the Visual Tab inside the forum Topic and Replies now that this recommended plugin is installed? This is from the read me file for bbPress Enable Tinymce-visual-tab:
    “Enabling the full default TinyMCE editor mode will display all the buttons, similar to the editor inside the WordPress admin.” I guess I expected to see this.

    Ok, this gets more complex doesn’t it… Another plug in, I will have to look and see what could be doing this. This function of editing user’s image dimensions in topics right in the forum pages was super for the moderators. They are leery of always using the dashboard to do everything and this made it a simple task. Isn’t it always hard to go backwards…

    The Add Media button information came from the Read Me file for bbPress Enable Tinymce-visual-tab:
    “Enabling the media upload button, “Add Media”, will only enable this button for users who have the ability to upload files. By default this is authors and greater. This means this button will _not_ show for normal forum users. This is simply to give administrators the ability to easily upload and insert images into bbPress.”

    I am giving 4 moderators admin and keymaster privileges to add images to posts, delete spam etc. The forum is being run with no registration required, my choice. The topic and reply traffic has been considerable and this is only a hidden test site by invitation only at this point. I had many choices to pick from for forums, and we definitely agreed we did not want to be using FB or yahoo. So far bbPress has been perfect for this. But the plugin problems have been greater than normal this week.
    Thank you for your help,
    Patrice

    #139578
    Stephen Edgar
    Keymaster

    You also go about it this way by adding it to your themes functions.php file or your bbpress-functions.php file in your theme directory.

    To change from Home › Forums › My ForumSubscribe
    To change to Home › Forums › My Forum (Subscribe)

    function ntwb_forum_subscription_link( $args ) {
        $args['before'] = '&nbsp;(';
        $args['after']  = ')';
     
        return $args;
    }
     
    add_filter( 'bbp_before_get_forum_subscribe_link_parse_args', 'ntwb_forum_subscription_link' );

    If you don’t want to add it manually grab the entire file here and add it as a standalone plugin to your WordPress install.

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

    #139577
    Stephen Edgar
    Keymaster

    @brucedongcaigmailcom Thanks for that info, helps to make sure we have all the bases covered 🙂

    Probably an easier way would be to download the entire file using this link

    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

    p.s. Just let me know if it doesn’t work

    #139575

    Hello Stephen,
    1) I am using XAMPP1.8(3) locally. I chose XAMPP for Windows. I did install it over 1 year ago. so I do not remember well, but it is from the same location: http://www.apachefriends.org/en/xampp.html.
    2)What is “Window Xampp Apache (3.1.0.3.1.0)” – I found this info on XAMPP control panel. it is version 3.1.0.3.1.0. but it is not right information for you. 🙂
    3)We have a patch ready to ship with bbPress 2.5.1
    https://bbpress.trac.wordpress.org/ticket/2481
    I do not know how to install the patch. can you provide the detail steps? I would love to test it. I also do updates/installation inside the wordpress panel. so I do not know how to manually do patch.:)

    4) If the patch is not working, how can un-install it or what should I do? so I can have recovery plan.

    Happy thanksgiving!!!

    thank you

    #139572
    justsayno1
    Participant

    Hi,

    I am in the same situation and I have found a solution. You can apply filters to almost every function in bbpress it seems. I just followed the functions until I found these three filters:

    apply_filters( 'bbp_get_user_profile_link', $user_link, $user_id );
    apply_filters( 'bbp_get_reply_author_display_name', $author_name, $reply_id )
    apply_filters( 'bbp_get_topic_author_link', $author_link, $args );
    

    Using these you can change basically everything. I found it easier to change the avatar ALT text vie the normal wordpress get_avatar filter since I wanted that to happen site wide anyway. Here is an example of the reply filter:

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

    Hope that helps. You can do it through templating but this way you don’t have to worry about doing it in a million different templates and then also dealing the layout of the markup you use to replace the current markup. And if filters confuse you and you don’t understand go read this:

    http://dev.themeblvd.com/tutorial/filters/

    I had zero knowledge of how to do filters when I read this thread 16 hours ago and decided to not go the route the above person mentioned.

    EDIT: I thought I’d add that they really could make this a lot easier with very little effort and make it so that you could configure what to use as a display name…. If anyone reads this from bbPress I’d be happy to get involved and do it for them. Seems so dumb to default to make it peoples full names when 90% people don’t want that. That is what facebook, G+ etc is for.

    #139569
    Stephen Edgar
    Keymaster

    bbPress disabled the visual editor in bbPress 2.3 ~8 months ago.

    Take a look at this plugin if you want to enable it again

    https://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/

    If you think that is what you want to try please use the download link attached to this post in their support forum as it is an updated version https://wordpress.org/support/topic/not-working-in-bbpress-24?replies=9#post-4687693

    #139557

    In reply to: Stylesheet Issues

    Stephen Edgar
    Keymaster

    It looks like you have patched the file correctly.

    Can you view the source and get the stylesheet path and paste it here:

    eg.
    A ‘failed’ example
    <link rel="stylesheet" id="bbp-default-css" href="http://localhost/wordpress37/wp-content/C:devhtdocswordpress37wp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199" type="text/css" media="screen">

    A ‘working’ example:
    <link rel='stylesheet' id='bbp-default-css' href='http://127.0.0.1/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5-5199' type='text/css' media='screen' />

    #139555
    Stephen Edgar
    Keymaster

    Sorry, I forgot to mention I did disable all plugins with no luck. Same results. I did not try twenty thirteen theme. Tried that this morning and still have the same results.

    Thanks for trying this

    Some more info in case any of these things did some damage.

    Plugins: Akismet, Google Analytics for WordPress, Jetpack by WordPress.com, Login With Ajax, Register Plus Redux, WP-reCAPTCHA – (disabled), WP-Syntax

    None of these should remove the titles from your posts particularly as they are disabled.

    WordPress SEO is different though, I am not familiar with it but does this plugin DOES alter titles of posts if I remember correctly.

    Does WordPress SEO keep any logs of what content it has altered? If so can check these logs to see if it changed your titles.

    Stephen Edgar
    Keymaster

    Are you hosting this yourself on Windows?

    If so we have a patch for bbPress 2.5.1 here
    https://bbpress.trac.wordpress.org/ticket/2481

    We have had no known issues of this for bbPress 2.4

    Who is your webhost provider and/or what software package and version are you using locally? eg. XAMPP 1.8.3

    #139548
    Stephen Edgar
    Keymaster

    We have a patch ready to ship with bbPress 2.5.1

    https://bbpress.trac.wordpress.org/ticket/2481

    If you could test that patch that would be great, I have tested it on XAMPP 1.8.3 , Apache, IIS and a couple of other systems but we’d like some feedback on the patch before we release 2.5.1 to make sure we haven’t broken something else. 🙂

    #139545

    In reply to: Stylesheet Issues

    Stephen Edgar
    Keymaster

    Yes, it is a bug in bbPress 2.5, we have a patch in and ready for bbPress 2.5.1

    Details are here if you want to apply the patch yourself:
    https://bbpress.trac.wordpress.org/ticket/2481

    If not bbPress 2.5.1 is not far away….

    #139532

    In reply to: Stylesheet Issues

    Tadas Krivickas
    Participant

    Hi,

    This is definitely a bug in bbp 2.5 on Windows. 2.4.1 does not have this issue. You can reproduce it by reverting to 2.4.1 (works again) -> update to 2.5 (doesn’t work again).

    <link rel="stylesheet" id="bbp-default-css" href="http://localhost/wordpress37/wp-content/C:devhtdocswordpress37wp-contentpluginsbbpress/templates/default/css/bbpress.css?ver=2.5-5199" type="text/css" media="screen">

    Windows 7 x64, httpd+php+mysqld, latest stable WP, BP, BBP

    #139524
    svcslzysh
    Participant

    Some more info in case any of these things did some damage.

    Plugins:
    Akismet
    Google Analytics for WordPress
    Jetpack by WordPress.com
    Login With Ajax
    Register Plus Redux
    WordPress SEO
    WP-reCAPTCHA – (disabled)
    WP-Syntax

    I also use this theme: http://themeforest.net/item/metrostyle-responsive-all-purpose-wordpress-theme/2921313

    #139523
    svcslzysh
    Participant

    3.7.1 WordPress. I did try saving the settings and also deleting bbress then saving. However I never tried to save after I disabled my plugins and themes. Is that worth trying?

    #139522
    FreeWPress
    Participant

    what is your wordpress version? Have you try to save again all bbpress forum options?

    #139521
    svcslzysh
    Participant

    Sorry, I forgot to mention I did disable all plugins with no luck. Same results. I did not try twenty thirteen theme. Tried that this morning and still have the same results.

    I’m on the latest WordPress. Let me know what other information might be useful. Thanks.

    #139519
    robertFudge
    Participant
    #139518
    robertFudge
    Participant

    Thanks for the reply, this theme uses BBpress and the search members (filters) has drop downs. Is this a part of the BBpress plugin? Any help is appreciated.

    Members

    Details:
    http://themeforest.net/item/sweet-date-more-than-a-wordpress-datin

    #139508
    Stephen Edgar
    Keymaster

    Take a look at the Data Parameters of WP_Query https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters

    You can also create custom views in bbPress eg.

    function ntwb_register_custom_views() {
    	bbp_register_view( 'popular-topics', __( 'Popular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num' ), false );
    	bbp_register_view( 'unpopular-topics', __( 'Unpopular Topics' ), array( 'meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num', 'order' => 'asc' ), false );
    	bbp_register_view( 'random-topic', __( 'Random Topic' ), array( 'orderby' => 'rand' ), false );
    	bbp_register_view( 'closed', __( 'Recently Closed' ), array( 'post_status' => 'closed' ), false );
    	
    
    }
    add_action( 'bbp_register_views', 'ntwbc_register_custom_views' );
Viewing 25 results - 10,726 through 10,750 (of 26,882 total)
Skip to toolbar