Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 3,526 through 3,550 (of 32,517 total)
  • Author
    Search Results
  • #204864
    Robin W
    Moderator

    ok, a better filter might be – try adding this to your functions file

    add_filter ('bbp_before_has_search_results_parse_args', 'rew_amend_search') ;
    
    function rew_amend_search ($args) {
    	$args['post_type'] =  bbp_get_topic_post_type() ;
    return $args ;
    }
    #204854
    stoffer_dev
    Participant

    I put this:

    add_filter ('bbp_before_get_search_terms_parse_args', 'pluus_amend_search') ;
    
    function pluus_amend_search ($args) {
    	$args['post_type'] =  bbp_get_topic_post_type() ;
    return $args ;
    }

    in my wp-content/themes/<ThemeName>/functions.php

    But Forum names (“bbp_get_forum_post_type()”) are still included in the search results on the frontend.

    Only editing “plugins/bbpress/includes/search/template.php” works 🙂

    Robin W
    Moderator

    to get rid of that bit, put this in your custom css part fo your theme

    div.bbp-template-notice.info {
    	border : none !important ;
    	display: none;
    }

    you might also want

    .bbp-pagination {
    	display: none;
    }
    #204834
    Robin W
    Moderator

    It is not being maintained, but I presume it still works?

    Wordpress removes plugins that are not maintained, but most continue to work and are based on stable code.

    or is this one now not working ?

    #204819
    nothere
    Participant

    Is it possible to download or install the same or similar code as this bbpress support form layout has? I like the layout, and would like to incorporate it on my site. Not sure if this is a possibility? Thanks.

    #204811
    brunov99
    Participant

    For the record.
    I found it but no idea at all where it came from.
    It was a style="display:none;" CSS inline declaration inside the generated code.
    Generated by what ? Don’t know.
    Anyway, I had to force the display with a display:inline-block; and !important tag to bypass it.

    **Resolved**

    #204807
    Chuckie
    Participant

    Sorted it. I added this second style:

    #bbpress-forums li.bbp-header div {
    	background: #7A7A78 !important;
    	border:  none;
    }
    #204806
    Chuckie
    Participant

    I have this styling:

    #bbpress-forums div.bbp-reply-content {
    	border-left: solid 1px black;
    	background: whitesmoke !important;
    	padding-left: 5px;
    }
    
    #bbpress-forums div.bbp-reply-author {
    	background: whitesmoke !important;
    }
    
    #bbpress-forums div.bbp-reply-content li {
    	color: #000 !important;
    }
    
    #bbpress-forums div.bbp-reply-content a {
    	color: blue !important;
    }
    
    #bbpress-forums div.bbp-reply-content a:hover {
    	text-decoration: underline;
    }
    

    The problem is that it applies it to the very first row with the headings and I don’t want it to. Ideally I want to set the background of just the replies themselves to whitesmoke.

    #204789
    jbrandsma
    Participant

    I am using bbpress in conjunction with buddypress and I noticed that the forums have different avatars for users than their profile avatar. Is there a way to use the avatars from buddypress and not from bbpress?

    I found this topic and its exactly what I’m referring too, but it was never marked as resolved and the answer was only for replies. The code snippet in this post works for me, but I need it to go further and apply to all avatars. I tried adding a filter to ‘bbp_get_current_user_avatar’ but I can’t get it to work.

    Wordpress, buddypress, and bbpress are all up-to-date – I also have the Youzer plugin installed

    Thanks in advance!

    #204788

    In reply to: Fetch different avatar

    jbrandsma
    Participant

    I hope you’re still around but I’m trying to accomplish the same goal. Your code snippet works for the replies, as you said, but I’m still trying to use the bp avatars for ALL avatars – like you. I am just curious how you handled that! Thanks!

    #204787
    Robin W
    Moderator

    hmmm… quite a puzzle

    so you could try putting your customised file here

    wp-content/languages/plugins/bbpress-fr_FR.mo

    plugins load code from only two places, but no idea which loads first, but looks like that location loads last, so it might work. but again might be overwritten by WordPress updates

    #204768

    In reply to: Custom Topic Sorting

    Robin W
    Moderator

    depends on how you define complicated – solutions are frequently only a few lines of code, but getting there takes the time 🙂

    #204767
    Robin W
    Moderator

    you need to pick up the forum id

    so

    $forum_id = bbp_get_forum_id(); 
        if (( $forum_id == 123) or ( $forum_id == 456)){

    etc…

    and then you would add the

    Custom action hook to add in the template file where the div shall be displayed:
    <?php do_action( 'different_div' ); ?>

    in the appropriate forum template

    #204730
    tejt99
    Participant

    Hi, I’m so sorry for not responding I thought the thread was closed but yes now it is using the shortcode.

    #204729
    demonboy
    Participant

    Hi Robin. Yes, you have a good point. My functions.php file is filling up with these and it’s making no difference on load times. TBH I’m not sure how I would edit the above function to pull the correct forum ID as this one seems to deal with topic ID instead. Does it treat topic ID and forum ID as the same? As in, can I just change the ID number within this part:

    if (( $topic_id == 123)

    #204725

    In reply to: Custom Topic Sorting

    tapiohuuhaa
    Participant

    Exactly I think this code:

    function my_custom_display_topic_index_query () {
    global $_GET;
    if($_GET[‘myOrderBy’])$myOrderBy=$_GET[‘myOrderBy’];else $myOrderBy=’last_edited’;
    if($_GET[‘myOrder’])$myOrder=$_GET[‘myOrder’];else $myOrder=’DESC’;
    $args[‘orderby’] = $myOrderBy;
    $args[‘order’] = $myOrder;

    return $args;
    }
    add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query’ );

    function printSelections(){
    global $_SERVER;
    return ‘<div class=”queries”><form action=”https://&#8217; . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’].'”><table class=”querytable”><tr><td><select name=”myOrderBy”><option value=”post_modified”>Viimeisin muutos</option><option value=”post_date”>Luontipäivä</option><option value=”post_title”>Nimi/option><option value=”post_author”>Tekijä/option></select></td><td><input name=”myOrder” type=”radio” value=”DESC” />Laskeva</td><td><input name=”myOrder” type=”radio” value=”ASC” />Nouseva</td></tr></table></form>’;
    }

    add_shortcode( ‘printSelections’, ‘printSelections’ );
    // Add do_shortcode(‘printSelections’); to loop-forums.php
    <li class=”bbp-header”>

    <ul class=”forum-titles”>
    <li class=”bbp-forum-info”><?php _e( ‘Forum’, ‘bbpress’ ); ?><?php topPostLinksEcho(); ?>
    <li class=”bbp-forum-topic-count”><?php _e( ‘Topics’, ‘bbpress’ ); ?>
    <li class=”bbp-forum-reply-count”><?php bbp_show_lead_topic() ? _e( ‘Replies’, ‘bbpress’ ) : _e( ‘Posts’, ‘bbpress’ ); ?>
    <li class=”bbp-forum-freshness”><?php _e( ‘Freshness’, ‘bbpress’ ); ?>

    <?php do_shortcode(‘[printSelections]’); ?>

    #204723
    Robin W
    Moderator

    given the speed of most servers, I doubt that you would notice any time delay in processing the code in is a few lines of many thousand that get processed on each page load and one DB call.

    best solution would be to time with and without and see if you can spot anything – but run it many times to get an average

    #204721
    demonboy
    Participant

    In single-loop-forum.php I want to style my first forum differently to the rest by removing the voices/topics/freshness columns. As it happens this forum is only visible to non-logged in users by using this code:

    .logged-in #bbp-forum-40250 {
    	display: none;
    }

    I found this code here:

    /*Different divs for all topics of specific forums*/
    
    function add_different_div() {
        
    $topic_id = bbp_get_topic_forum_id(); 
        if (( $topic_id == 123) or ( $topic_id == 456)){
    ?>
           <div> this is some custom div text </div>
    <?php
        }
    
    elseif ( $topic_id == 789){?>
    <div> this is some OTHER custom div text </div>
    <?php
    }}  
        
    add_action( 'different_div', 'add_different_div' );

    … but creating a function seems overkill. I think I just need an if() statement that says ‘if this forum ID then style it this way; else…’.

    Any pointers?

    Thanks.

    #204718
    tapiohuuhaa
    Participant

    I just too would like to add 1-3 buttons to the forum topics listing in order to change the default order. I would code it to changed template, if I would know what functions to use.

    #204672
    ghoush
    Participant

    Just a note to everyone who might find this. It’s been more than 4 years, and this code still works great.

    For anyone looking to add signatures on BuddyBoss Platform instead of bbPress/BuddyPress, this works too.

    berry metal
    Participant

    How do I get bbPress to return to the same page when someone presses Favorite from within the Bbpress single topic shortcode?
    I want to avoid the redirect to the topic page after pressing the Favorite link.

    #204461
    evelioml3
    Participant

    Hi All !!
    I have upgraded phpBB 3.0.4 to 3.2.8 recently following steps on Upgrading from 3.0 to 3.2

    When trying to import to bbpress 2.5.4 on a WP 5.2.3 I get this message:

    Error en la base de datos de WordPress: [Unknown column 'forums.forum_topics' in 'field list']
    SELECT convert(forums.forum_id USING "utf8mb4") AS forum_id,convert(forums.parent_id USING "utf8mb4") AS parent_id,convert(forums.forum_topics USING "utf8mb4") AS forum_topics,convert(forums.forum_posts USING "utf8mb4") AS forum_posts,convert(forums.forum_topics_real USING "utf8mb4") AS forum_topics_real,convert(forums.forum_name USING "utf8mb4") AS forum_name,convert(forums.forum_desc USING "utf8mb4") AS forum_desc,convert(forums.left_id USING "utf8mb4") AS left_id,convert(forums.forum_type USING "utf8mb4") AS forum_type,convert(forums.forum_status USING "utf8mb4") AS forum_status FROM phpbb_forums AS forums LIMIT 0, 100
    No hay foros que convertir
    No hay datos que limpiar

    Effectively column forum_topics was on table forum in phpbb version 3.0.4 but it is not anymore on phpbb version 3.2.8.
    Script to import from phpbb must have a bug or expect a different database structure for phpbb.

    Any suggestions?
    Thanks in advance

    #204460

    In reply to: Hidding outgoing links

    Manuel Camargo
    Participant

    @casiepa yes I mean that… but the guy mentions that that code is not working 😛

    #204404
    stracy2
    Participant

    Can someone else confirm that importing a post where the content contains brackets [] causes the custom importer to hang (get stuck actually)?

    Related post

    #204388
    Giannis Kipouros
    Participant

    Hello all,

    I am using BuddyPress with bbPress and I am noticing an issue when I have a forum topic with multiple pages. When I add a new reply it creates a BuddyPress activity that stores in the DB a primary_link of the type /forums/topic/topic-name/page/XX/#post-YYYY. For example /forums/topic/test-notification-for-reply/page/2/#post-3063

    The problem is that if I delete some previous replies from page 1 and this reply moves to the first page from the second page it was previously, its activity permalink (primary_link) remains the same and the activity still points to page 2 of the topic (not page 1 that is its new page).

    Is there any fix for this?

Viewing 25 results - 3,526 through 3,550 (of 32,517 total)
Skip to toolbar