Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,951 through 10,975 (of 32,521 total)
  • Author
    Search Results
  • #150605
    giuseppe23
    Participant

    Hi , Is there any way to chnge the breadcumb link color?
    I tried

    .bbp-breadcrumb a{
    	color: #fff;
    }

    The code above does not change the color.

    #150603
    ttmt
    Participant

    Hi all

    Is there a template in the bbpress theme that appears on every page

    I’m using the following code in loop-topics.php to show a link to the users profile page

    
    <a class="bbp-profile-button" href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>">Profile Settings</a>
    

    This works but only appears on the topics page.

    I would like the link to be on every page.

    #150597
    Robkk
    Moderator

    really any plugin that has an included insertable template tag will work.

    im going to use jetpack sharing as an example .

    first i take every instance of each default area jetpack sharing shows.(also jetpack likes)

    function jptweak_remove_share() {
        remove_filter( 'the_content', 'sharing_display',19 );
        remove_filter( 'the_excerpt', 'sharing_display',19 );
        if ( class_exists( 'Jetpack_Likes' ) ) {
            remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
        }
    }
     
    add_action( 'loop_start', 'jptweak_remove_share' );

    and then i could just display it anywhere on the reply. in loop-single-reply.php

    with this

    if ( function_exists( 'sharing_display' ) ) {
        sharing_display( '', true );
    }

    this code also removes it from content like posts and pages. but you can just manually insert it into your wordpress templates to with the above code.

    #150596

    In reply to: Help with styling css

    Robkk
    Moderator

    bumping too soon ?

    at least you did not create an entirely new topic

    bbpress has that tabled layout by default , its your child theme

    Stargazer Colloquium added that kind of layout to your theme.

    what you can do is find each changed template you dont want and just replace it with some of the original bbpress template code by copying it there.

    and also check on the bbpress.css in your child theme

    #150595
    ALBCODERS
    Participant

    I read many articles here but couldn’t try any solution.
    I’m triùying to change the background color of bbpress header and footer and I found this article here
    I’m using propanel and a custom-style.php iùwith the code below I can change the color but not background..

    #bbpress-forums li.bbp-header,
    #bbpress-forums li.bbp-footer {
    background: <?php echo $bbpbg; ?>;
    color: <?php echo $bdcolor; ?>;
    }

    Do you have any idea I used also this one but I didnt get success.

    #bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer {
    background: none repeat scroll 0% 0% <?php echo $bbpbg; ?>;
    color: fff;
    }
    Halo Diehard
    Participant

    So far, so good! But is it supposed to show the label if the user hasn’t put anything in the field?

    Also, something maybe to note in the description (if you haven’t already): In the Profile Fields, the Base (Primary) group has a primary, required label and field that it allows you to edit and rename, but it appears that is always the user’s “nick name”. There was confusion when I was testing because I’d originally put that one as “Gamertag” when testing, and all of a sudden everyone was showing their username the same as their gamertag. At first I thought we still had a problem, but then I figured it out.

    It looks great!

    Now if you’re feeling really ambitious you could include the option to add the @mention automatically, so it pulls it from the users’ profile. I certainly don’t think any but a teensy fraction of my forum users will make the effort to set it themselves, but at least I’ve got mine now with the help of your plugin! 😀

    Awesome work, and I hope someday to be able to get in and play around with plugin code.

    #150574
    MarximusMG
    Participant

    I was able to accomplish this by inserting the following code

    <?php $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo "@".$user_nicename;
    } ?>

    beneath the line

    <?php do_action( 'bbp_theme_after_reply_author_details' ); ?>

    in loop-single-reply.php

    #150559
    ajbuono
    Participant

    Thanks, I checked into the activity loop and it looks like that would do the job. All this time I’ve been messing around with bbPress.

    Could you give me any guidance on how to simply add the activity loop? As is probably obvious, I am very new at these things (and have been ‘winging it’ so far with code and whatnot).

    Jerry
    Participant

    Because I am trying to use a filter to change the wording within the file activity.php, within the bbpress directory, I think I’m in the correct forum.
    I am trying the change the wording for the activity stream in buddypress: “jerry started the topic Doctor Sleep in the forum Horror” to “jerry added the book Doctor Sleep in the category Horror.”
    I can go to bbpress/includes/extend/buddypress/activity.php and make the change there. But I prefer to do this via a filter in bp-custom.php. I am ALMOST there. Here is the filter code I have in bp-custom.php:

    add_filter( 'bbp_activity_topic_create', 'change_activity_wording', 1, 4 );
    function change_activity_wording($activity_text, $user_link, $topic_link, $forum_link ) {
    	$activity_text    = sprintf( esc_html__( '%1$s added the book %2$s in the category %3$s', 'bbpress' ), $user_link, $topic_link, $forum_link );
    	return $activity_text;
    }

    What this produces is: “added the book in the category” and removes “jerry”, “Doctor Sleep”, and “Horror.” Basically, my filter is removing $user_link, $topic_link, and $forum_link. I’m thinking I need to redefine them in my function change_activity_wording? Or am I off track here?
    If someone feels I should post this in the buddypress forum, let me know and I will do so.

    Halo Diehard
    Participant

    Ok, I created the second Label with the same name and it does the same thing.

    Then, just as a test, I created another Profile Field with a different name, “Gamertag2”, labeling it in the plugin. To further test, I created a separate Profile Group and made another Profile Field in there, “@mention”. I went into the plugin and labeled that as the fourth one. All the labels show up under the profiles, but none of the info, even though everything is checked to show in the plugin.

    It would be SO awesome to have this work. I searched for quite awhile today to find something, and found a thread by Jacob Jacoby from like five years ago talking about integrating BuddyPress and bbPress profile fields! So it’s well overdue to have something for non-coders, and that would be sweet for it to work.

    I’ll keep testing whatever you ask, so just let me know how I can help.

    Edit: I kept it all set up, so you can see it at the same link above.

    #150538
    Stephen Edgar
    Keymaster

    Pretty much anything can be done regarding bbPress/BuddyPress integration, they both play extremely well with each other, it is just really a matter of coming up with what you actually want

    A couple of recent things that come to mind:

    To add the @halo-diehard usernames add the following to loop-single-reply.php just after bbp_reply_author_link()

    <?php bbp_user_nicename( bbp_get_reply_author_id(), array( 'before' => '<p class="bbp-user-nicename">@', 'after' => '</p>' ) ); ?>

    What else did you have in mind?

    #150537
    Brandon Moner
    Participant

    Ok I think I solved my issue. I made sure the Forum Root slug was the same as the slug for the page I created to hold the forum index shortcode. It seems to be working seamlessly now.

    If this WASN’T the way to do it and might give me trouble down the line, please leave a comment and let me know other ways you guys have solved this.

    #150536
    Brandon Moner
    Participant

    I have a page named “The Hive” that I placed the shortcode [bbp-forum-index] onto in order to make that my forum index page. However when i go into a forum and then back out via the breadcrumbs at the top of the page, I’m no longer on the “The Hive” page index, but the “Forums” index.

    I’m pretty sure I’m doing something wrong, so how can I have it to where…
    1) I create a page to host the forum index named “The Hive”
    2) When I click into a forum, the breadcrumbs read “Home/The Hive/[Forum Topic]”
    3) When I click on “The Hive” in the breadcrumbs, it takes me back to “The Hive” page I created.

    Now I am brand new to bbPress and as such, the method I outlined above might not be the way to do it. I’m not concerned with the process so much as the end result which can hopefully be something that doesn’t confuse the visitors when I launch the site.

    #150534
    cybarmitzvah
    Participant

    I was more hoping to just add some ready made code that someone on another website would not mind handing out, but thank you.

    #150525
    Bertbig
    Participant

    I seemed to have solved the problem myself: #happy.
    I have made a child theme of twentyfourteen.

    And edited the style.css in the child theme; I added this code:

    
    .site {
    margin: 0 auto;
    }
    .site-content .entry-header,
    .site-content .entry-content,
    .site-content .entry-summary,
    .site-content .entry-meta, .page-content {
     /* Original max-width: 474px */
     max-width: 80%;
    }
    

    The code makes the content area wider and centers the whole website, which was a wish on my list!

    Cheers!

    Bert

    #150524
    Bertbig
    Participant

    Hi there,

    I have been wandering around for a few days on the internet, spending most of the time as a guest on this bbPress forum.

    I am trying to find out a way to expand the very small column containing the bbPress forum in the middle of my website http://2islands.nl/forums/forum/forum-2islands/. To be honest I am a little frustrated to find out kinds of different ways with small pieces of code added here and there in .css and .php files that don’t work for me.

    Viewing from what I find in this and other fora, I am not the only one having this problem.

    I am not a html programmer, but I can copy and paste very well. 🙂

    Can anyone help me get my bbPress on full with (keeping my left sidebar) in a neat way, for instance by editing a bbpress.php file of something like that.

    Believe me; i tried at least twenty of the tricks found in this and other fora. Nothing works. Let’s get this over with once and for all :-).

    THANKS for any help!

    Jerry
    Participant

    Hi Robin. Sorry for the delayed response. It worked! Thanks for the simple fix. Now we know that shortcodes can take two inputs. If you need any of my code for use in a plugin, let me know. Though I have done things that are unique to my website, so they may not be as useful.

    We can close this thread now.

    #150513
    Robin W
    Moderator

    not without some code. I’m deep in creating a new website for a client at the moment, so whilst I would love to I can’t take time out to do this – sorry !

    Robin W
    Moderator

    ok, sorry I’ve been busy earning a living !

    Right I’ve been back through the code and I am fairly sure I’ve found the error.

    Can you download one more time

    bbp buddypress profile information

    and come back and let me know if it works !

    #150507

    In reply to: Last post first

    Stephen Edgar
    Keymaster

    You don’t need to change any files, just add the code from Rob and the code from the link I posted to your functions file.

    #150505
    Stephen Edgar
    Keymaster

    Check your themes FAQ or ask support for what template you should be using and then use that template to create the bbpress.php file.

    #150502
    Stephen Edgar
    Keymaster

    If your using Akismet, Akismet may be blocking them, also check your moderation settings:.

    Moderation and BlackListing

    #150501
    Stephen Edgar
    Keymaster

    Currently phpBB ‘Topic Views’ are not supported as we do not include support in bbPress to track unread forums or topics.

    There are a handful of plugins that add support for this to bbPress listed here, depending on which one you used and the method used a tweak to the phpBB import script could probably import those values.

    #150488
    tazogamer
    Participant

    I am almost sure, you have problems inside your theme’s FUNCTIONS.PHP!
    find this phrase in your functions.php ( or maybe problem can be inside any other activated plugin):

    add_action(‘pre_get_posts’,……………

    there maybe set search query customizations, so if there is set/limited the post types, then bbPress post types maybe left out of scope. So, alter that code (i.e. change to something like this:

    add_action('pre_get_posts','my_search_filterr');
    function my_search_filterr($query) 
    {
    	if ($query->is_search())   //if ($query->is_main_query())
    	{
    		$arrs[]='post';
    		$arrs[]='page';
    		//and etc... 
    		
    		//Then bbPRESS types:
    		$arrs[]='topic';
    		$arrs[]='forum';
    		$arrs[]='reply';
    		$query->set('post_type', $arrs );
    		
    	}
    	return $query;
    }
    #150482
    Robkk
    Moderator

    i dont know about listing it but you might be able to highlight them either using this plugin to show only to keymasters or moderators, or modify it to show to everyone

    https://wordpress.org/plugins/bbpress-new-topics/

    or somehow edit this function from here to add labels to each topic post type

    http://www.wpbeginner.com/wp-themes/how-to-highlight-new-posts-for-returning-visitors-in-wordpress/

    PHP

    function wpb_lastvisit_the_title ( $title, $id ) {
    
    if ( !in_the_loop() || is_singular() || get_post_type( $id ) == 'page' ) return $title;
    
    // if no cookie then just return the title 
    
    if ( !isset($_COOKIE['lastvisit']) ||  $_COOKIE['lastvisit'] == '' ) return $title;
    $lastvisit = $_COOKIE['lastvisit'];
    $publish_date = get_post_time( 'U', true, $id );
    if ($publish_date > $lastvisit) $title .= '<span class="new-article">New</span>';
    return $title;
     
    }
    
    add_filter( 'the_title', 'wpb_lastvisit_the_title', 10, 2);
     
    // Set the lastvisit cookie 
    
    function wpb_lastvisit_set_cookie() {
    
    if ( is_admin() ) return;
    $current = current_time( 'timestamp', 1);
    setcookie( 'lastvisit', $current, time()+60+60*24*7, COOKIEPATH, COOKIE_DOMAIN );
    }
    
    add_action( 'init', 'wpb_lastvisit_set_cookie' );
    

    CSS

    .new-article { 
    background: #feffdd;
    padding: 3px;
    border: 1px solid #eeefd2;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    margin-left:5px;
    font-size: small;
    font-weight: bold;
    }

    or i guess an alternative is get an unread posts plugin like

    https://wordpress.org/plugins/bbpress-mark-as-read/

    which lists all the unread topics in there profile.

Viewing 25 results - 10,951 through 10,975 (of 32,521 total)
Skip to toolbar