Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,701 through 11,725 (of 32,521 total)
  • Author
    Search Results
  • #147366

    I see two possible ways this *might* fail:

    * Multisite & calls to switch_to_blog
    * bbp_get_user_role() is returning multiple bbPress roles (either because some third party role editor plugin was used to manipulate things, or there’s some crusty old role data somewhere in there.)

    #147365

    @josiahw That’s pretty odd. If you want to debug, check inside the bbp_set_current_user_default_role function, hooked to bbp_setup_current_user. There are several redundant checks to ensure what you’re seeing doesn’t happen, so I’m curious where it might be failing and how.

    #147363
    ryan360
    Participant

    My hack job solution was to just modify the plugin itself. Line 356 in template.php contains the permalink structure which you can modify to suit your needs.

    	// Pretty permalinks
    		if ( $wp_rewrite->using_permalinks() ) {
    			$url = $wp_rewrite->root . bbp_get_user_slug() . '/%' . bbp_get_user_rewrite_id() . '%';
    yoosuke
    Participant

    Thanks for two of you!
    That was familiar and interesting topic for me as a web designer!

    Well…

    Thanks to you, Mr Robin W,
    I could display ‘Website:’ part in User’s profile page!

    Now, Along with it, 2 new wishes came up to my mind.
    Would you please grant my wishes again?

    (I really appreciate from Japan! that you always help me, Mr Robin W! )

    1. When the ‘Website’ field is blank, I want it be invisible.

    Now, When it’s blank, it’s displayed like Website:_____.

    2. Is it possible to add ‘Where you live:’ part before the ‘Website:’ part?

    Showing the living place is helpful for deepening relations between users, I think…
    I wish I could add just <input> tag, neither <textarea> tag nor <select> tag.

    many thanks.

    ryan360
    Participant

    I was able to accomplish this by writing a custom query. I was unable to find a solution ANYWHERE else on this forum despite numerous people asking the same question so I’m hoping this will help everyone out until the bbpress team fixes the bbp_get_template_part functions.

    		<?php
        
                    $args = array(
                       'post_type' => 'reply',
                       'post_status' => 'publish',
                       'orderby' => 'title',
                       'order' => 'ASC',
                       'author' => $curauth->ID,
                    );
                    $bbpressquery = new WP_Query($args);
                    while ($bbpressquery->have_posts()) : $bbpressquery->the_post();
                ?>
                    
                    	<?php the_content(); ?>
                    	
              	 <?php endwhile; ?>   

    Obviously you can modify the code above to show topics created, I was just trying to return all the forum posts created by a user.

    #147346
    Stephen Edgar
    Keymaster

    I should have said the ‘bbPress templates’ in your Twenty Eleven theme

    <link rel="stylesheet" id="bbp-child-bbpress-css" href="http://www.assorpas.it/wp-content/themes/twentyeleven/css/bbpress.css?ver=2.3.2" type="text/css" media="screen">

    #147342
    aborruso
    Participant

    Ok, then I do not see the reply button, because I have an old version.

    Where do you see in the code that I use a child theme?

    Thank you

    #147338
    Stephen Edgar
    Keymaster

    No, we use the same version, I think we may have our terminology crossed.

    If you want the topic displayed at the top of every page like we do here so that you can still see the original topic when you are page 3 for example you want to use bbp_show_lead_topic

    See the following article and add that code to your themes functions.php file.
    (I think this is what you are after 🙂 )

    bbp_show_lead_topic

    #147327
    Robin W
    Moderator

    yes the links are set as white in the display

    try adding this to your style.css

    #bbpress-forums .reply a  {
    color : blue !important ;
    }
    
    #bbpress-forums .reply a:hover  {
    color : green !important ;
    }
    

    I haven’t tested, but should work, come back if you need more help !

    Stephen Edgar
    Keymaster

    Mine didn’t have “Website: ” now it does 😉 yours should also be ‘Website : ‘ (i.e. Capital W) 😉

    It won’t be a link in a new window (i.e. target="_blank"), a big pet peeve of my mine, see this for more background on when to and not to use it.

    #147324

    In reply to: Hide role in the forum

    Robin W
    Moderator

    Try this – it should work

    Function hide_author_url () {
    $retval='' ;
    return $retval ;
    }
    
    add_filter( 'bbp_get_topic_author_url', 'hide_author_url' );
    add_filter( 'bbp_get_reply_author_url', 'hide_author_url' );
    Robin W
    Moderator

    Ok, this is what you wanted

    function user_profile_bbp_website_information()
    //this function adds the website to the profile display menu
    			{
    			
    			$label1 =  $rpi_options['item1_label'] ;
    			echo "<p>" ;
    			printf ( __( 'website : ', 'bbpress' ));
    			$url=bbp_get_displayed_user_field( 'user_url' ) ;
    			$url='<a href="'.$url.'">'.$url.'</a>';
    			echo $url; 
    			echo"</p>" ;
    			}
    			
    add_action ('bbp_template_after_user_profile', 'user_profile_bbp_website_information') ;
    #147313
    Stephen Edgar
    Keymaster

    bbPress doesn’t actually create any WordPress pages.

    You should be able to create a page titled ‘forums’ add the shortcode and bbPress will use that page.

    If you can only create a page with the slug forums-2 then there is another page using the forums slug or is in the trash.

    #147310
    Stephen Edgar
    Keymaster

    This is most likely an avatar plugin:

    eg
    <img src="http://www.passingrass.com/wp-content/uploads/avatars/460/5ed932eb9e1a5b11af2d1b9e7029b68e-bpthumb.jpg" class="avatar user-460-avatar avatar-20 photo" width="20" height="20" alt="Profile picture of PassinGrass">

    And or your themes CSS at Line #1044
    http://www.passingrass.com/wp-content/themes/sweetdate/custom_buddypress/_inc/css/default.css?ver=20140430

    table.forum td img.avatar {
    float: none;
    margin: 0 5px -8px 0;
    }

    A quick change of that to the following fixes it:

    table.forum td img.avatar {
    float: none;
    margin: 0 5px -8px 0;
    width: 20px;
    }

    You’ll want to find out if it is the plugin or theme and find a more permanent way to keep those changes such as creating a child theme.

    #147304

    In reply to: Importing from Vanilla

    Stephen Edgar
    Keymaster

    @nippi9 I edited your post above just to remove a large code block for readability.

    It looks like the issue above is that some of the user passwords include a quote " string and that is causing the SQL error which is entirely valid.

    
    UPDATE wp_users SET user_pass = "62138e180a81452f40bf419b5a66c359"l$" WHERE ID = "96451"
    UPDATE wp_users SET user_pass = "27e42027c6eb6008426fbe96b5fdca08;"/" WHERE ID = "96468"
    UPDATE wp_users SET user_pass = "8cc902ac070d040e1a3231803d09a9411K"" WHERE ID = "96471"
    UPDATE wp_users SET user_pass = "da19b051d168e44b5833c703e1feb37dE"@" WHERE ID = "96502"
    UPDATE wp_users SET user_pass = "32f81a53cc20309e9c4d3553d3ba64cb1FA#N~A{J<"@TD:]]5o#vEXQ2v46ct" WHERE ID = "96511"
    UPDATE wp_users SET user_pass = "d1ea441db666ef80506a70bfcc890e10Ut"" WHERE ID = "96530"
    UPDATE wp_users SET user_pass = "97eefae85da1e2ea818556577c1dbb42"!m" WHERE ID = "96540"
    UPDATE wp_users SET user_pass = "edbb4ce3d20b74ca8ab9e141c46f25nW"" WHERE ID = "96572"
    

    I’ll take a look and see if there is something we can do to fix this.

    That said, it appears only to be a password issue, if you continue you should get all the users imported and users who are affected by the password issue above would need to reset their password rather than using their existing password.

    Robin W
    Moderator

    The following should do it – put this in your functions file

    function bbp_website_information () 
    //This function adds the website to the avatar display of topics/replies
    {
    	echo '<li>' ; 
    	$user_id = bbp_get_reply_author_id( $reply_id );
    	global $wpdb;
    	$url = get_userdata($user_id) ;
    	$url=$url->user_url ;
    	$url='<a href="'.$url.'">'.$url.'</a>';
    	echo $url ;
    	echo '</li>' ;
    }
    		
    add_action ('bbp_theme_after_reply_author_details', 'bbp_website_information') ;
    #147301

    In reply to: Hide role in the forum

    yu
    Participant

    Thanks for this. Works just great. Just right now I found out that the author’s name in the forum is linked to his profile. How do I delete the link? Unfortunately my programming knowledge is not good enough to find it out by myself using the codex.

    yoosuke
    Participant

    I’m here again!
    It’s great I have a place to come back!

    Now, I’m looking for advice on How to show “Website” part at User Profile page.
    By default, 4 sections are displayed on User Profile page.

    1.user-description, 2.forum-role, 3.topic-count, 4.reply-count

    In edit page, There is a section for entering users “Website”.
    in spite of entering the section, it would not be display at User’s Profile page.
    How can I display it at the User’s Profile page.

    I found that I need to add some PHPcodes into “user-profile.php”.
    But as you know, I have no idea What codes I have to put in.

    would you please advice me…

    WordPress: ver3.9.1
    bbPress: ver2.5.3

    #147296
    @mercime
    Moderator

    @eherman24 thank you for your input.


    @cronhound
    thanks for your feedback.


    @gautamgupta
    Thank you 🙂 Congratulations on being accepted again to the Google Summer of Code and choosing to contribute to bbPress development again! Cheers!

    #147284
    demonboy
    Participant

    Strange. Why does this code…

    .bbp-parent-forum-2881 .bbp-reply-content {font-family:Verdana, Geneva, sans-serif; font-size:0.7em;line-height:1.2em;}

    …only style recent replies? It doesn’t seem to affect replies 2 months old. It’s the very last line in my child’s style sheet. Is there something else I haven’t read in the manual?

    #147266

    In reply to: Importing from Vanilla

    Stephen Edgar
    Keymaster

    @nippi9 It looks like you are using GDN as the tabke prefix, try GDN_

    #147262
    Stephen Edgar
    Keymaster

    If you take a look at the HTML source of a topic in that forum you should see bbp-parent-forum-2881 (based on your forum id mentioned).

    eg.

    
    .bbp-parent-forum-2881 {
    background-color: red;
    }
    
    #147259
    Stephen Edgar
    Keymaster

    bbPress uses custom post types, create a forum, then a topic and reply in that forum.

    Go take a look at the forum, topic & reply custom post types in wp_posts, then take a look at the metadata for each post in wp_postmeta

    Jerry
    Participant

    Okay, working like you said. This issue was, which I didn’t catch completely in one of your above posts, is that it only shows in my reply section, not in the original topic section at all. Like you mention, we can probably figure that one out. I do know javascript/ajax a little, so I’ll play around in that area to see what is what. I like your idea of making this a bbpress plugin; much needed in my opinion.

    Update! I’m editing this post. I just used the following, replacing some wording in your filter:

    add_filter('bbp_get_topic_content', 'spr_filter');

    It is showing in my topics and not my replies! Bravo. That is because of your previous help with the if statements and $countr variable. I will share that full code with you via email if you like. Now to the javascript. That could take me a few hours, or a few days. Sigh…

    Robin W
    Moderator

    I’ve put the code that is working for me on my site

    Rating plugin

    Download it, unzip and then ftp it to overwrite the plugins rating.php – I’d take a copy of that first !

    It would be good to get this working, and if when we get it going I’ll wrap a version as an official plugin if the original author doesn’t want to add the functionality to his plugin !

    I’ll continue to play, as it’s annoying me now !

Viewing 25 results - 11,701 through 11,725 (of 32,521 total)
Skip to toolbar