Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,101 through 9,125 (of 32,505 total)
  • Author
    Search Results
  • #160330
    Shaktimaan
    Participant

    Thanks it is fixed.

    I used patch below for bbPress: Version 2.5.6

    // Get the activity stream item, bail if it doesn't exist
    $existing = bp_activity_get_specific( array( 'activity_ids' => $activity_id, 'show_hidden' => true, 'spam' => 'all', ) ); 
    if ( empty( $existing['total'] ) || ( 1 !== (int) $existing['total'] ) ) { 
    $existing = new BP_Activity_Activity( $activity_id ); 
    if ( empty( $existing->component ) )
    return null; 
    }
    #160320

    Check in bbpress/templates/default/bbpress/content-search.php

    bbPress employs some “theme compatibility” magic to insert itself into your existing WordPress theme, and that directory is where those template parts live to try and fill in the gaps

    #160319
    patifonik
    Participant

    Hi!
    PLease, help me to fix this!

    I don’t understand: bbpress in my site uses template page.php. In this template we have:
    <?php get_template_part('inc/page-title'); ?>.
    In /inc/page-title.php we have:
    <?php elseif ( is_page() ): ?><h2><?php echo alx_page_title(); ?></h2>

    But in http://muzl.it/forums/ we have title
    <div class="page-title pad group"><h2>Темы</h2></div>
    and in http://muzl.it/forums/topic/lorem-ipsum/ we haven’t title:
    <div class="page-title pad group"><ul class="meta-single group"><li class="category"></div>

    How to fix it?

    Chad R. Schulz
    Participant

    I’m building what while be a discussion board style website. I will embed a single forum through a shortcode in each/every post.

    This will allow standard WordPress navigation and give each forum its own post/page.

    I will not allow users access to any part of the natural bbpress forum hierarchy (categories/forums/subforums/etc.) and will use redirects to ensure that all requests for specific forums end up on the appropriate post/page that uses the embedded shortcode.

    My question: Without the need to query numerous (potentially hundreds) of individual forums through traditional forum navigation, do I still need to spread the forums out among multiple categories/sub-categories when building the forums on the backend.

    Remember, no user will ever need, nor get, access to the forum hierarchy/structure. ALL forums links will redirect to the appropriate post.

    Having to create a needlessly complex hierarchy/structure is daunting and would make a mess for moderators to dig through.

    Just curious. Appreciate any guidance in this matter.

    Thanks,
    Chad Schulz

    #160316

    In reply to: Not the heading I want

    manavforum
    Participant

    Where to put the above code?

    #160314
    screenwavemedia
    Participant

    I’m extending an existing WordPress theme with bbpress functionality. I’ve gotten everything up and running except I can’t seem to find the base template for search results to customize everything AROUND the BBPress search results code. It looks like by default it’s pulling from page.php or single.php, but I would like to use a more specific template for it. I’m not seeing anything in Extras that fits the bill.

    #160310
    goclones
    Participant

    Thanks. I replace the code with what you suggested and I don’t see any changes. Although the file is in the bbpress > templates > defauly > bbpress folder. Is that where it should be?

    #160308
    goclones
    Participant

    Robkk, can you tell me which file this code is in?

    #160305
    Robkk
    Moderator

    @andrew55

    I’m still hungup on getting the overflow figured out.

    link to your site and i could help with that.

    It appears they have the avatar somehow wrapped in a span, and the span has the overflow assigned to it.

    i dont think you need a span for it , i could add it into the code but im sure it will be fine with just a float:left;


    @stagger-lee

    what is that ? Is that bbPress forum ?

    that was not a bbPress forum, its something else.

    #160300
    Stagger Lee
    Participant

    This is for custom info block above comment form:

    function ntwb_custom_topic_form_notice() {
    	?>
    	<div class="bbp-template-notice">
    		<p>Something here...</p>
    		<p>Something else...</p>
    	</div>
    	<?php
    
    }
    add_action( 'bbp_theme_before_topic_form_notices', 'ntwb_custom_topic_form_notice' );
    #160298
    Stagger Lee
    Participant

    Try with this:
    (I am not sure if it is this 100%, but try)

    //* Notice the line 7, 8, 10 and 11
    function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
        $author_avatar = '';
        if ($size == 14) {
            return $author_avatar;
        }
        if ($size == 80) {
            $size = 110;
        }
        $topic_id = bbp_get_topic_id( $topic_id );
        if ( !empty( $topic_id ) ) {
            if ( !bbp_is_topic_anonymous( $topic_id ) ) {
                $author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
            } else {
                $author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
            }
        }
        return $author_avatar;
    }
    
    /* Add priority (default=10) and number of arguments */
    add_filter('bbp_get_topic_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
    add_filter('bbp_get_reply_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
    add_filter('bbp_get_current_user_avatar', 'my_bbp_change_avatar_size', 20, 3);
    #160292

    In reply to: Default users' role

    Robin W
    Moderator
    #160284
    lanhuong11022
    Participant

    You can refer to the source code in http://camaushop.net/

    #160282
    Robkk
    Moderator

    only thing i can think of is changing this

    <?php do_action( 'bbp_theme_before_topic_title' ); ?>
    
    		<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a>
    
    		<?php do_action( 'bbp_theme_after_topic_title' ); ?>

    to this

    <?php do_action( 'bbp_theme_before_topic_title' ); ?>
    
    		<a class="bbp-topic-permalink" title="<?php bbp_topic_excerpt?>" href="<?php bbp_topic_permalink(); ?>"><?php bbp_topic_title(); ?></a>
    
    		<?php do_action( 'bbp_theme_after_topic_title' ); ?>
    #160278
    Robkk
    Moderator

    1.

    change the size to a 48

    put this into your child themes functions.php file or a functionality plugin

    function rkk_topic_av() {
    	    	echo bbp_get_topic_author_link( array( 'size' => '48' , 'type' => 'avatar'));
    }
    add_action('bbp_theme_before_topic_title','rkk_topic_av');

    then use this CSS

    put this into anywhere you can put custom CSS

    a child themes style.css
    jetpacks custom css module
    any standalone custom css plugin.

    li.bbp-topic-title .avatar-48 {
      float: left;
      margin-right: 5px;
    }

    2. i guess use the text-overflow property in CSS

    here is an example.

    http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_text-overflow

    #160275
    Stagger Lee
    Participant

    functions.php:

    /**
    * webdeveloperswall.com/buddypress/check-if-a-user-is-online
    **/
    function is_user_online($user_id, $time=5){
    	global $wp, $wpdb;
    	
    	$user_login = $wpdb->get_var( $wpdb->prepare( "
    SELECT u.user_login FROM $wpdb->users u JOIN $wpdb->usermeta um ON um.user_id = u.ID
    WHERE u.ID = $user_id
    AND um.meta_key = 'last_activity'
    AND DATE_ADD( um.meta_value, INTERVAL $time MINUTE ) >= UTC_TIMESTAMP()
    " ,APP_POST_TYPE
    ));
    	if(isset($user_login) && $user_login !=""){
    		return true;
    	}
    	else {return false;}
    }

    pastebin.com/hEfRfKGe
    members-loop-php (BuddyPress)

    pastebin.com/9AyQJHBe
    member-header.php (BuddyPress)

    Probably the same process for bbPress alone. Cannot ruin now all to test it.
    Font Awesome needs to be activated for frontend. Or more easy, activate Dashicons for frontend and use some other SVG icon.

    s14.postimg.org/i6oixhaj5/2015_03_27_220006.jpg

    s21.postimg.org/xde02ec6v/2015_03_27_221745.jpg

    Some CSS:

    .bp-user #buddypress .online .fa-wifi {
    	color:green; 
    	font-size:22px;
    }
    .bp-user #buddypress .offline .fa-wifi {
    	color:#cf4d35; 
    	font-size:22px;
    }
    .bp-user #buddypress .online, 
    .bp-user #buddypress .offline {display:inline-block; text-align:right;float:right;}
    .members #buddypress .online-list .fa-wifi {color:green; font-size:15px;}
    .members #buddypress .offline-list .fa-wifi {color:#cf4d35; font-size:15px;}
    
    #buddypress .online-list,
    #buddypress .offline-list,
    #buddypress .offline,
    #buddypress .online {font-size:12px;}
    #160271
    mrbrooks89
    Participant

    1,i have several problems atm i am using bbpress and buddypress one i have a random yellow block on my forum page

    http://lexmotoownersclub.com/forums/

    2, my topics show up under all parents ie lexmoto adrenaline show stay under lexmoto adrenaline and not show up under all category

    3, This forum contains 1 topic, and was last updated by Profile photo of ADMINB ADMINB 1 day, 16 hours ago. want this removed

    i have tried changing themes and also pluging im no good at messing around in code noobie here
    thanks 🙂

    #160258
    andrew55
    Participant

    Great – thank you very much. Works fine and looks great.

    A couple quick questions:

    1. Any suggestions on how to get the “Started by” text and username to display right under the topic title, to the right of the avatar, just like the topic title? Right now it is under the avatar.

    2. Long topic tiles are now wrapping under the avatar. Any suggestion on how to style the second line of title so it doesn’t wrap, but stays indented as the first line of the topic?

    I’m looking at the code and css and can’t figure it out. Thanks!

    #160256
    Robkk
    Moderator

    you can use this PHP function

    function rkk_topic_av() {
    	    	echo bbp_get_topic_author_link( array( 'size' => '32' , 'type' => 'avatar'));
    }
    add_action('bbp_theme_before_topic_title','rkk_topic_av');

    here is some custom CSS you can use.

    li.bbp-topic-title .avatar-32 {
      margin-right: 5px;
    }

    then to remove the small one you can copy loop-single-topic.php into your child theme into a folder called bbpress.

    look for

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'sie' => '14' ) ) ); ?></span>

    change it to.

    <span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'type' => 'name' ) ) ); ?></span>

    #160249
    Robin W
    Moderator

    I did end up creating a local test environment to find that solution

    Having a test environment is something that every site should have !!

    https://codex.bbpress.org/creating-a-test-site/

    #160243
    Robin W
    Moderator

    Not one I’ve heard of.

    I can’t find the word ‘unable’ in this context within bbpress at all – can you get your user to get the EXACT wording including capitals, spaces and punctuation, so that I can track whereabouts in the code it appears.

    Also what plugins are you running that could have this in them?

    #160218

    In reply to: @mentions feature

    Robkk
    Moderator

    bbPress i think will have @mentions in a future release, but for now you can use BuddPress’s own scripts for bbPress using this function.

    add it to your child theme functions.php or a functionality plugin

    function custom_bbpress_maybe_load_mentions_scripts( $retval = false ) {
    	if ( function_exists( 'bbpress' ) && is_bbpress() ) {
    		$retval = true;
    	}
     
    	return $retval;
    }
    add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );
    #160209
    Robin W
    Moderator

    ok, suggest you create a test site and try to fix there

    https://codex.bbpress.org/creating-a-test-site/

    #160207
    andrew55
    Participant

    I’ve been searching, and there seems to be no solution for creating a unique topic icon for each individual forum (i.e – to be displayed to the left of each forum title/description). There is a plugin which pulls the image from the first topic, but that want work for many such as myself.

    I’m no coder by any means, but my idea was to insert some simple php (if statement) in the template file, maybe right after “bbp-forum-info” in loop-forums.php

    Something such as this:


    <?php
    global $post;
    if ( is_single('17', $post->ID) ) {
    echo '<div class="forum_pic1"></div>';
    } elseif ( is_single('19', $post->ID) ) {
    echo '<div class="forum_pic2"></div>';
    } elseif ( is_single('18', $post->ID) ) {
    echo '<div class="forum_pic3"></div>';
    } else {
    echo '<div class="forum_pic_default"></div>';
    }
    ?>

    The topic numbers would equal the forum topics. This would allow a unique topic icon to be shown for each unique forum. The “forum_pic” divs could be used to display a background image or even a font-awesome font (using css background property).

    Anyone have any suggestions for this? Will the idea (with proper code) work? Anybody with some php under their belt willing to take a shot?

    Or, is there another completely different method to accomplish this, which is easier?

    Thanks for any suggestions.

    FlyFishersCorner
    Participant

    I’ve looked all through the theme and been unable to find it, but they do advertise it as being bb Press ready, so it may be something on the back end I can’t see.

    The CSS is brilliant though! I don’t know why I didn’t think to try that! (Though I suppose I wouldn’t have known what the function causing it to display is without you identifying it).

    I’ve already got custom CSS to get the forums to inherit my background color, so 3 little lines of code added there took care of my issue!

    Thanks so much for the help and for bearing with me!

Viewing 25 results - 9,101 through 9,125 (of 32,505 total)
Skip to toolbar