Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,451 through 7,475 (of 32,505 total)
  • Author
    Search Results
  • #168411
    Robkk
    Moderator

    It works for me if I passed the reply/topic post author’s ID, it doesn’t update immediately though. Running the repair tools for calculating each users counts one by one in Tools > Forums fixed that.

    I think auto-updating the count is part of the latest dev version though.

    Here is the code I used to test it very quick. I just placed this in loop-single-reply.php.

    <?php print bbp_get_user_reply_count( bbp_get_reply_author_id() ) ?>

    #168410
    Rourke
    Participant

    Actually just found the answer by looking at another plugin. There is a hook for it: mce_external_plugins.

    I had some trouble finding it, so it might be usefull for someone else.

    #168409
    Loc Pham
    Participant

    Hi Pascal,
    Yes, I passed in the user id for admin and I’ve always got “0” back and admin had created many topics already.

    bbp_get_user_post_count(1, false);

    Thanks.

    #168408
    Rourke
    Participant

    I want to customize the TinyMCE editor with so called mini-plugins. For example, I have the emoticons mini-plugin that I want to use. When I place it in the folder /wp-includes/js/tinymce/plugins I’m able to use it through a custom wordpress plugin or the functions.php from my theme. But as far as I know this mini-plugin can get removed when wordpress gets updated.

    That’s why I want to know if it’s possible to use these TinyMCE mini-plugins inside my (child) theme instead of just throwing them into core?

    #168404
    o.m.j
    Participant

    unless I’m missing something…I added the below code to my child theme style.css & now pagination top & bottom is gone…

    .bbp-pagination-count {
    display: none;
    }

    #168401
    Pascal Casier
    Moderator

    Hi o.m.j,

    CSS will not help you in this case, not even nth-child or things like

    #bbpress-forums .bbp-pagination-count {
    	display: none;
    }
    #bbpress-forums .bbp-pagination-count ~ .bbp-pagination-count {
    	display: block;
    }

    will not work because the pagination is inside different divs and other elements.

    The only possibility would be somewhere going for a javascript like

    window.onload = function(){
        document.getElementsByClassName('bbp-pagination-count')[0].style.display = 'none';
    }

    (not tested yet) or go for some coding.

    Pascal.

    #168395

    In reply to: Delete “Header”

    Robkk
    Moderator

    You can use this custom CSS to hide it.

    #bbpress-forums li.bbp-header {
        display: none;
    }

    Or you can copy loop-topics.php to your child theme in a folder called bbpress. And remove these lines.

    <li class="bbp-header">
    
    		<ul class="forum-titles">
    			<li class="bbp-topic-title"><?php _e( 'Topic', 'bbpress' ); ?></li>
    			<li class="bbp-topic-voice-count"><?php _e( 'Voices', 'bbpress' ); ?></li>
    			<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li>
    			<li class="bbp-topic-freshness"><?php _e( 'Freshness', 'bbpress' ); ?></li>
    		</ul>
    
    	</li>
    #168392
    Loc Pham
    Participant

    Are these three functions broken because I’m receiving zero posts/topics/replies when they’re executed:

    bbp_get_user_post_count()
    bbp_get_user_reply_count()
    bbp_get_user_topic_count()
    #168385
    o.m.j
    Participant

    can someone pls post the code to achieve this using a filter in child theme functions.php

    or maybe a style edit?

    *EDIT* disregard…I used this to remove both

    .bbp-pagination-count {
    display: none;
    }

    #168384
    sucre
    Participant

    Hi all you guys,
    i’ve been trying to display a specific forum in a specific category. Like all categories must have a different forum.

    To do this, i added a text field to the category with Advanced Custom Fields plugin. Then i write [bbp-single-forum id=196] in that field. (196 is the id number of the forum that i want to display for this category)

    To show this, i added this codes to category page in my theme

    <?php 
    $category_id = 'category_' . get_queried_object_id();
    $dforum = get_field( 'forum', $category_id ); 
    ?>
    <?php echo do_shortcode($dforum);
    ?>
    

    it’s working great. However, if you enter a topic (ex. a topic)the page goes to sitename.com/topic/a. But i want to read this topic in the category page. I tried to use iframe but i doesnt work. Please help.

    my site (click forum tab) : http://www.dizimoon.com/kategori/yabanci-diziler/game-of-thrones

    #168378
    ynteligent
    Participant

    Hello,

    I have a page, where I wanted to use shortcode [bbp-single-topic id=$topic_id]. I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    Is there any way how to display Lead topic only (no replies)?

    Thank you for any peply… Peter

    PS: I tried to use <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> but I did not find out how to use it with specific topic_id….

    #168375
    ynteligent
    Participant

    Hello,

    I have a page, where I wanted to use shortcode [bbp-single-topic id=$topic_id]. I expected that only lead topic appears, but it does not. There is a lead topic with all replies.

    Is there any way how to display Lead topic only (no replies).

    Thank you for any peply… Peter

    PS: I tried to use <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> but I did not find out how to use it with specific topic_id….

    #168372
    Pascal Casier
    Moderator

    Sorry, that page doesn't exist!

    #168366
    Robkk
    Moderator

    The “Forums” page lists all the topics – not the Forums, is that normal?

    It is if you set in Settings > FOrums for the forum root to display topics by freshness.

    Using that shortcode can work too I guess.

    #168364
    Robkk
    Moderator

    It might be better to create a bbpress.php instead of a regular static WordPress page, because that 1 static page will not work for all of the bbPress pages. If you create a bbpress.php, all your bbPress pages will use that template instead.

    See if this guide helps you any.

    Getting Started in Modifying the Main bbPress Template

    Since you using shortcodes you can echo the shortcodes in the bbPRess template like this.

    <?php echo do_shortcode("[shortcode]"); ?>

    #168360

    In reply to: Author avatar issue

    Robkk
    Moderator

    @leirof

    Add this anywhere you can put custom css like in your themes style.css file or in a custom css plugin.

    #bbpress-forums div.bbp-the-content-wrapper input{
      color: #000;
    }
    #168359

    In reply to: 404 error

    Robkk
    Moderator

    Can you see the forums on the frontend of your site??
    Are you saying you cannot see it in the backend in Forums > All FOrums??

    While testing your theme everything works fine for me.

    You can try some troubleshooting to see if this is hopefully not a cache issue, or see if a plugin is causing the conflict, or if running the repair tools in Tools > Forums helps.

    Troubleshooting

    #168356
    Robkk
    Moderator

    Try this php code snippet. Add it to your child themes functions.php file or in a functionality plugin that can hold custom php code snipppets.

    add_filter ('bbp_get_title_max_length','rkk_change_title') ;
    
    Function rkk_change_title ($default) {
    $default=90 ;
    return $default ;
    }
    #168351
    Robkk
    Moderator

    Are you talking about where it says something similar to this in the body class. Most themes add this not really bbPress itself. If you are missing this <?php body_class(); ?> in your theme you not be able to see the post id.

    postid-652

    Or for the topic list of the forum where it shows this.

    bbp-forum-652

    If you have been heavily editing bbPress templates in your child theme you may not have this in correctly in loop-single-forum.

    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>

    #168331

    In reply to: Author avatar issue

    Pascal Casier
    Moderator

    Adapt the ’20px’ to the size you want:

    .bbp-forum-title {
    	font-size: 20px;
    }

    PS. ne jamais dire ‘last question’… you never know what comes up next 🙂

    #168328
    o.m.j
    Participant

    sorry to bump such a old topic, but can someone show the specifc code to add to child theme functions.php? still learning here…

    I tried adding this to functions, but produced an error…

    function bbp_title_max_length( $default = 90 ) {
    	echo bbp_get_title_max_length( $default );
    }
    	/**
    	 * Return the maximum length of a title
    	 *
    	 * @since bbPress (r3246)
    	 * @param $default bool Optional. Default value 90
    	 * @uses get_option() To get the maximum title length
    	 * @return int Is anonymous posting allowed?
    	 */
    	function bbp_get_title_max_length( $default = 90 ) {
    		return (int) apply_filters( 'bbp_get_title_max_length', (int) get_option( '_bbp_title_max_length', $default ) );
    	}

    thx!

    #168326
    Pascal Casier
    Moderator

    OOOPS! THAT PAGE CAN NOT BE FOUND

    #168322

    In reply to: Author avatar issue

    Pascal Casier
    Moderator

    Encore ? :-p

    .bbp-footer {
    	display: none;
    }

    Pascal.

    leev
    Participant

    If you inspect the body tag of this website in this/the “request and feedback” forum page, you can see that the id number for the forum is 652. If you go to any topic in this “request and feedback” forum and inspect the code in there, you can see that there is a number, 652, identifying that the topic is posted in the “request and feedback” forum.

    Basically, I want to add the forum id number class to the <body> depending on the forum, or the topic that is posted in that forum.

    Example, <body class=”[forum_id_number]”>.

    #168313

    In reply to: Author avatar issue

    Pascal Casier
    Moderator

    For the avator, it will be something like this to add as CSS somewhere:

    .bbp-author-avatar .avatar-14 {
    	width: 30px;
    }

    A+

Viewing 25 results - 7,451 through 7,475 (of 32,505 total)
Skip to toolbar