Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 10,126 through 10,150 (of 32,519 total)
  • Author
    Search Results
  • #154652

    In reply to: Photo in Latest posts

    Robkk
    Moderator

    since you have custom bbpress templates in your theme

    you would have to look at the loop-single-topic.php file in your bbpress folder and compare it to this one which is the plugins version of the file

    https://raw.githubusercontent.com/ntwb/bbPress/master/src/templates/default/bbpress/loop-single-topic.php

    basically you need this for the started by author avatar

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

    and this for the freshness author avatar

    <?php do_action( 'bbp_theme_before_topic_freshness_author' ); ?>
    
    <span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>
    
    <?php do_action( 'bbp_theme_after_topic_freshness_author' ); ?>
    izzyian
    Participant

    Hi, what code can I add to my functions that would basically allow all other roles tags to show but keep the tag participant at a display none ?

    ( note: hopefully there is a function for this so core files could be avoided ? but if not what is the name of the core file id be looking for )

    – Thank you

    #154642

    In reply to: bbp-forum-index issues

    Robkk
    Moderator

    i found this function doing a search , i havent tested though.

    plop the code into your child themes functions.php file or your functionality plugin
    and change 100 to whatever you like

    function bbp_increase-forum-per-page( $args = array() ) {
    $args['posts_per_page'] = get_option( ‘_bbp_forums_per_page’, 100 );
    return $args;
    }
    add_filter( ‘bbp_before_has_forums_parse_args’, ‘bbp_increase-forum-per-page’ );

    code is from this topic

    Hitting 50 forum limit? What can I do?

    #154641
    Robkk
    Moderator

    the font is light gray because you closed the topic.

    add this css anywhere you can add custom css,
    also maybe change #000 to whatever shade of black you use for your fonts on your content.

    #bbpress-forums .status-closed, 
    #bbpress-forums .status-closed a {
    color: #000;
    }
    Robin W
    Moderator

    I’m having trouble finding a way to get the current user’s role for bbPress

    use

    bbp_get_user_role()

    in

    \bbpress\bbpress\includes\users\capabilities.php

    #154634
    Robin W
    Moderator

    sorry for the late reply, I have been busy elsewhere.

    Read private forums is fine, and as it should be.

    I have carefully read through the above, and am struggling to help you further.

    The best I can suggest is that you set up a test site

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

    so that you can try with a default theme and not break you live site

    #154633
    Robin W
    Moderator

    Without spending hours in code, as a moderator I can trash or spam, but having ‘spam’med an entry, I cannot then trash.

    Is this not what you are getting?

    #154631
    ten9inc
    Participant

    I am new to bbPress and am troubleshooting some issues. I created a page and am using the [bbp-forum-index] shortcode, but only around 50 of 80 forums are listed and there is no pagination to list the rest on successive pages. What am I missing and/or doing wrong?

    #154629
    pplegend
    Participant

    i use twentythirteen theme as my parent theme and bbpress plugin to bulid my forum. In the search results page, the first result format is a bit different with the others.
    according to my understanding, the execute order is: page.php->content-search.php->loop-search.php->loop-search-topic.php
    in page.php:

          <div class="entry-content">
               <?php the_content(); ?>
           </div><!-- .entry-content -->

    in content-search.php:
    <?php bbp_get_template_part( 'loop', 'search' ); ?>

    in loop-search.php:

    
              <?php while ( bbp_search_results() ) : bbp_the_search_result(); ?>
    
                   <?php bbp_get_template_part( 'loop', 'search-' . get_post_type() ); ?>
    
              <?php endwhile; ?>
    

    in loop-search-topic.php:

    
        <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
    
        </div>
    

    If there are three topics,the results should be:

    
        <div class="entry-content">
          <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
          <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
          <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
        </div>
    

    However, the result is:

    
        <div class="entry-content">
          <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
          </div>
        </div>
        <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
        <div id="post-<?php bbp_topic_id(); ?>" <?php bbp_topic_class(); ?>>
    

    The first element is inside <div class=”entry-content”> tag.

    #154626
    m_elghag
    Participant

    Ok, thought there might be an easy way to just add an conditional to the whole code and test if the forum has a certain parameter.

    #154624
    Robin W
    Moderator

    That’s great! 🙂 how? 🙂

    Spend several years learning to code PHP 🙂

    Sorry but there isn’t a better answer to your question, so the short answer to your original question is NO, unless you learn to code or the particular plugin has been written to do that.

    #154586
    Robin W
    Moderator

    lots of different users here with same symptoms but probably different problems.

    Suggest you all start with

    Step by step guide to setting up a bbPress forum – Part 1

    and if that doesn’t fix, start a fresh thread so that we can fix these individually.

    #154585
    Robkk
    Moderator

    well its not really a limit on having a certain number of forums
    i think its just a limit of it being on the root page since it doesn’t have pagination.

    for example if you have over 50 forums displayed in the forum root page any additional forum will not display

    i found this function doing a search , i havent tested though.

    plop the code into your child themes functions.php file or your functionality plugin
    and change 100 to whatever you like

    function bbp_increase-forum-per-page( $args = array() ) {
    $args['posts_per_page'] = get_option( ‘_bbp_forums_per_page’, 100 );
    return $args;
    }
    add_filter( ‘bbp_before_has_forums_parse_args’, ‘bbp_increase-forum-per-page’ );

    code is from this topic

    Hitting 50 forum limit? What can I do?

    #154583
    webUI1
    Participant

    My domain is:
    forum.mydomain.com

    I have set an static page as Front Page Displays with following short-codes:

    Some Welcome text….
    [bbp-forum-index]
    [bbp-topic-index]

    Also I have set an URL to restrict users to redirect if they are not logged in (Under plugin: bbP Members Only).

    Now I am facing following issue:
    1. If someone visits forum.mydomain.com first time by entering the URL: forum.mydomain.com, yet they are not redirected to page specified under plugin bbP Members Only
    Infect they get following info:

    Some Welcome text….
    You do not have permission to view this.
    You do not have permission to view this.

    So they should have redirected to page specified under plugin bbP Members Only. Although if I click on sidebar forums list then they are redirected.

    This can be solved out by:
    Either redirect to page specified.
    Or, this text “You do not have permission to view this.” must display only once.

    Please help guys to fix me.

    Thanks.

    #154580
    Robkk
    Moderator

    @evilhare probably , i would just use the custom sidebars plugin by itself though.

    unless you really care the login links widget , which if you do you can create simple html links to your login form in the text widget.

    example:

    <a href="http://example.com/login" title="login">Login</a>

    #154566
    Robkk
    Moderator

    try combining the two into this and try it.

    i tested in twenty-fourteen and it worked.

    #bbpress-forums ul.bbp-lead-topic li.bbp-body div.topic {
        background-color: #0099FF;
        border: 1px solid #dd6;
    }
    #154565
    Robkk
    Moderator

    @pilxy the uppercase thing is in your themes css

    like i said if your theme author just changes every instance of .reply in his theme to .comment-reply-link everything should be fine.

    #154562
    Robkk
    Moderator

    @melanie-bund

    if you are a web designer from the website thats mentioned at the bottom of the website

    you can do alot of things to make it where a forum doesnt look awkward

    changing posts, voices, freshess, topics lalbes at the top to just icons

    and more depending on where your imagination takes you.

    i suggest maybe only showing the topic count in the forum archive

    and move the freshness stats below the title of each forum

    and showing only the posts stats for any forum you have just entered

    and move the freshness stats below the title of each topic.

    more info on designing can be found at the docs

    Codex

    #154560
    Robkk
    Moderator

    @priom

    it worked when i tryed it

    remember to make sure you add the right css

    like for example for the keymaster role use this

    .bbp-author-role-keymaster {
    background:blue;
    color:white;
    padding:0 5px;
    }
    Preston
    Participant

    I’m finally getting back around to working on this and realized I’ll need to hide the topics from a specific user role as well. I can’t just remove spectate/participate capabilities because I need them to be able to post topics, just like users who aren’t logged in.

    I’m having trouble finding a way to get the current user’s role for bbPress so I can use it in the same manner I used the user’s ID above.

    I found this function, but it returns the WordPress role (administrator, editor, etc):

    function get_user_role() {
        global $current_user;
    
        $user_roles = $current_user->roles;
        $user_role = array_shift($user_roles);
    
        return $user_role;
    }

    Can I somehow adapt it to return the bbPress role instead? (keymaster, moderator, etc.)

    #154558

    In reply to: Truncated usernames

    Robkk
    Moderator

    long characters are going to show up like this anyway

    splitboard.co
    m

    you could lower the font-size a little bit more with css to allow maybe 2-3 more characters
    but its still going to break the word apart if there is a certain amount of characters anyway

    you could add more width to div.reply-author
    maybe to about 150px

    add this anywhere where you can put custom css

    #bbpress-forums div.bbp-topic-author, 
    #bbpress-forums div.bbp-reply-author {
    width: 150px;
    }

    you also might have to add some @media query css too if i missed it.

    #154555

    In reply to: Activate page

    Robin W
    Moderator

    there is no [bbp-activate] shortcode

    https://codex.bbpress.org/shortcodes/

    what are you trying to do?

    #154541
    AnneMarie
    Participant

    Do you know how to count the number of unique people who comment per day/week/month?

    Is there a plug-in that will do that?

    Or code I can use?

    #154496
    Nicolas Korobochkin
    Participant

    I have solution for this issue!

    First of all — in web published a lot of strange and bad solutions for this issue. Add some rules to .htaccess, change wp-signup.php directly, blah blah blah…

    I dig into the source code and found something interesting. WordPress have wp_signup_location filter which set up the signup page URL (location).

    require_once (TEMPLATEPATH . '/wp-signup.php');
    function selena_signup_page () {
    	return home_url () . '/signup/';
    }
    add_filter ('wp_signup_location', 'selena_signup_page');

    After this create page-signup.php template in your theme folder with your custom forms (buttons, inputs, etc). Forms and other stuff can be grabbed from wp-signup.php. So I took wp-signup.php from root WP folder and put them to my theme folder. But it needs to edit. I remove some requires, functions and function calls (checkout the wp-signup.php). Be careful!

    Right now I dont know how this technique works with caching (but I use Memcached and Batcache on my sites and all works great).

    Next problem is – activate account page. Similar solution. Create page-activate.php template with require_once ( TEMPLATEPATH . '/wp-activate.php'); call inside. And copy wp-activate.php to your theme folder and then edit them (remove requires, filters and actions). Don’t delete this:

    if ( is_object( $wp_object_cache ) )
    $wp_object_cache->cache_enabled = false;

    This line for caching (I write about this above). Maybe someone tell us about object caching in WP? 🙂

    Now you need disable activation letters (WP sends its twice after this manipulations :). Use wpmu_signup_user_notification filter and your function needs to send emails and return FALSE (or WP send second activation email).

    And that’s all!

    Working example is my sites:

    1. http://armyofselenagomez.com/signup/
    2. http://selenaselena.ru/signup/

    Activation:

    1. http://armyofselenagomez.com/activate/
    2. http://selenaselena.ru/activate/

    It’s a multisite! And both sites also have:

    1. http://armyofselenagomez.com/wp-signup.php
    2. http://armyofselenagomez.com/wp-activate.php
    1. http://selenaselena.ru/wp-signup.php
    2. http://selenaselena.ru/wp-activate.php
    #154470
    Robkk
    Moderator

    you add this to your themes functions.php or a functionality plugin.

    you then use css to style the roles from there.

    add_filter('bbp_before_get_reply_author_role_parse_args', 'ntwb_bbpress_reply_css_role' );
    function ntwb_bbpress_reply_css_role() {
    
    	$role = strtolower( bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) ) );
    	$args['class']  = 'bbp-author-role bbp-author-role-' . $role;
    	$args['before'] = '';
    	$args['after']  = '';
    
    	return $args;
    }
    
    add_filter('bbp_before_get_topic_author_role_parse_args', 'ntwb_bbpress_topic_css_role' );
    function ntwb_bbpress_topic_css_role() {
    
    	$role = strtolower( bbp_get_user_display_role( bbp_get_topic_author_id( $topic_id ) ) );
    	$args['class']  = 'bbp-author-role bbp-author-role-' . $role;
    	$args['before'] = '';
    	$args['after']  = '';
    
    	return $args;
    }

    It grabs the topic or reply author role and adds another CSS class with prefix bbp-role- so you now have a new set of CSS classes e.g. bbp-role-keymaster, bbp-role-moderator, bbp-role-participant etc that you can then add your custom CSS styles to.

    link this was from

    Topic background color depending on role

    more info about a functionality plugin

    How to create your own WordPress functionality plugin

Viewing 25 results - 10,126 through 10,150 (of 32,519 total)
Skip to toolbar