Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,576 through 6,600 (of 32,585 total)
  • Author
    Search Results
  • #174050
    HoggeHog
    Participant

    So I’ve got

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

    <span class="bbp-topic-started-in"><?php printf( __('%2$s', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>

    "><?php bbp_topic_title(); ?>

    And if the forum id equals 8397, I want to assign a different class to it… <?php if ( bbp_get_topic_forum_id() == 8397 )

    But I’m a bit stuck here. Any suggestions?

    #174049
    HoggeHog
    Participant

    So I figured out how to do it, now I’m trying to color-code every forum.

    #174047
    tech55541
    Participant

    Hello,
    I found some working code, could you please just check it to make sure it is 100% valid and I am not missing anything?

    /*BBPress email fix*/
    add_filter( 'wp_mail_from_name', 'email_sent_from_name' );
    function email_sent_from_name( $name )
    {
        return 'SITE NAME';
    }
    add_filter( 'wp_mail_from', 'email_sent_from' );
    function email_sent_from( $email )
    {
        return 'email@example.com';
    }

    Yes, I did replace the values with required ones such as the address and send from name.

    Thanks.

    #174043
    HoggeHog
    Participant

    Hello!

    I’m looking to output the forum title inside- and before every topic title. So it would read like:
    [Forum 1] Topic title
    [Forum 2] Topic title

    I want to use the shortcode [bbp-topic-index], but then need to visually separate the topics somehow.

    My _very_ basic knowledge of php says to add bbp_forum_title() somewhere around bbp_before_topic_tile(), but I’m not sure how to piece that together into functioning code. Anyone got any ideas or pointers?

    P.S. Please don’t laugh if I sound like an idiot, I’m learning very slowly ๐Ÿ™‚

    #174039
    Pascal Casier
    Moderator

    Hi,
    Something is strange in your theme … Also when I look from it from a smaller screen, everything gets on top of other things.

    A quick and dirty patch ?

    #bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author {
      width: 25%;
    }

    But you need more to fix your whole environment.
    Pascal.

    #174037
    cigar07
    Participant

    Hi,

    I am trying to use [bbp-topic-form] in a page, but the page does not display the form. The shortcode [bbp-forum-form] works properly but not the topic form.

    Please can someone tell me why the page is not displaying the topic form?

    #174033
    j_mo
    Participant

    Solved it! I had to get the ID of the ‘topic’ custom post type and pass it to bbp_topic_reply_count

    <?php if ( 'topic' == get_post_type()  ) : ?>
    
    				<?php $topic = get_the_ID(); ?>
                        		<article class="bit-4 newsPost grid-sizer grid-item">
                                	<div class="eventInner homePost">
                                        <p class="postLabel">Discussion</p>
                        				<h1 class="eventListTitle"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h1>
                                        <p class="postedOn"><?php the_date('d M Y'); ?>, <?php bbp_topic_reply_count(  $topic_id = $topic ); ?></p>
                                		<p><?php echo get_excerpt(); ?></p>
                                    </div>
                            	</article>
    						<?php endif; ?>
    #174030
    officerofthewatch
    Participant

    Hi I’m hoping someone can give me some direction. I should start by saying i’m not a big coder or developer so apologies if this is really simple to solve. Every post in BBpress is accompanies by the user date on the left hand side. On the initial post in a topic this user data column is wide enough to contain all of the relevant data.

    On subsequent posts the column is indented and becomes too narrow to display everything. For an example of this issue on the site I’m developing view

    https://officerofthewatch.co.uk/Officers-Mess/topic/officer-of-the-watch-help-wanted/

    You will note on the second post by ‘aquabon’ the ‘send a message’ text is partially cut off.

    Is there anyway to increase this column width to match that of the original poster?

    #174029
    tech55541
    Participant

    Hello,
    I still need some code to change these 2 items, if you could help me come up with something, that would be great.

    #174028
    j_mo
    Participant

    Thanks

    Is there a show_topic_ID() or something?

    #174015
    tech55541
    Participant

    Hello,
    I am using this plugin.
    https://wordpress.org/plugins/wp-smtp/

    I am trying to change the sender name and sender email address for BBPress. I have successfully done this for BuddyPress, but all the code I have tried for BBPress or all the code I have seen in older topics, is not doing it for me.

    Can you please recommend some code that I can change the sender name and sender email address?

    Thanks.

    j_mo
    Participant

    Hi there,

    I am currently working on my first bbPress site and thoroughly enjoying it! I have one issue though…

    On my home page I have a list of 8 latest posts on the site. They include news (standard WP posts), events (custom post type) and bbPress topics and are displayed with query_posts().

    I am trying to display the reply count of topics but can’t using bbp_topic_reply_count(), it simply returns 0.

    <?php if ( 'topic' == get_post_type()  ) : ?>
    	<article class="bit-4 newsPost grid-sizer grid-item">
        	<div class="eventInner homePost">
            	<p class="postLabel">Discussion</p>
                	<h1 class="eventListTitle"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h1>
                    	<p class="postedOn"><?php bbp_topic_reply_count(); ?> comments, starting on<?php the_date('d M Y'); ?></p>
                        	<p><?php echo get_excerpt(); ?></p>
            	</div>
        </article>
    <?php endif; ?>

    Am I missing something? Can someone help please?

    Thanks

    #173996

    In reply to: Topic & Reply count

    incakola100
    Participant

    Hi guys @robin-w

    I really don’t get it.

    I changed the <?php bbp_list_forums()?> in to

    <?php bbp_list_forums(array (
    'show_topic_count' => false,
    'show_reply_count' => false,
    'separator' => '',
    ));?>

    In the bbpress plugin folder and tried it in the theme folder. Both Didn’t work. What am I doing wrong?

    Got it to work in the functions.php

    #173988
    Robkk
    Moderator

    @sidebarissue

    The bbPress sidebar that you see having the issue, is from your theme. bbPress does not have code in it for a bbPress specific sidebar.

    You haven’t checked and made sure to see if it was in your theme by switching/testing a default theme.

    I still havenโ€™t tried switching to the twentytwelve theme because I donโ€™t want to lose all of my settings for my current theme.

    You can try your current theme and a WordPress default theme in a local installation on your cpu to see where the sidebar is coming from.

    https://codex.bbpress.org/getting-started/testing-your-bbpress-installation/creating-a-test-site/#local-installation

    #173975
    Robin W
    Moderator

    you’ll need to create a role with those capabilities

    see

    https://codex.bbpress.org/custom-capabilities/

    #173973
    Pascal Casier
    Moderator
    #173969
    Pascal Casier
    Moderator

    Hi Marc,
    I didn’t try any of them, but these are some possibilities:
    1) installing bbPress on the us_US and then downloading the nl_NL bbPress translations and adding them in the bbPress folder (https://codex.bbpress.org/getting-started/bbpress-in-your-language/)
    OR
    2) Go MU and have the main site in us_US and create a subsite in nl_NL
    Pascal.

    #173948
    Robkk
    Moderator

    Well not a bbPress specific plugin, but there are a few plugins that can work with custom post types (bbPress uses custom post types).

    A plugin I found and tested is called NS Featured Posts, but like I said many other plugins could possibly work too.

    After installing the plugin make sure to go to Settings > NS Featured Posts and make sure to add the topic custom post type from bbPress in the plugin’s settings.

    Now we can go to Topics > All Topics and see a new column that says Featured. Make sure to click the checkbox near the topic you would want to feature.

    Now we are going to make a custom view to display these featured topics in a topic list, and also be able to display them in pages with a shortcode.

    Add this php code snippet into your child themes functions.php or insert this snippet into a custom plugin like functionality.

    This function displays about 10 featured topics on a single page, change 10 to whatever you want.

    function rkk_register_featured_view() {
     bbp_register_view( 'featured', __( 'Featured Topics' ),  array( 'meta_key' => '_is_ns_featured_post', 'meta_value' => 'yes', 'posts_per_page' => '10', 'max_num_pages' => '1'), false );
    }
    add_action( 'bbp_register_views', 'rkk_register_featured_view' );

    Now in a custom page or widget area that has a widget text area that can handle shortcodes, insert this shortcode.

    [bbp-single-view id='featured']`

    #173942
    Pascal Casier
    Moderator

    In MYSQL with phpmyadmin you would be able to do it. If you would need to add e.g. 4 hours, the idea would be :

    WARNING: Backup your database before doing things
    WARNING: This is just a starting point, not a real query to launch on your DB

    UPDATE poststable SET postfield = DATE_ADD(postfield, INTERVAL 4 HOURS)
    WHERE postfield < '2016-04-01 08:20:00';

    So in the WHERE you need to put the datestamp when you have done the timezone switch.

    Pascal.

    Pascal Casier
    Moderator

    Hi,
    You will have to go with

    {
     position: relative ;
     top : 0px ;
    }

    Pascal.

    Valery Kondakoff
    Participant

    The issue seems to be related to ‘bbl-author-avatar’ class. But I still can not find any reasons, why avatar suddenly ‘jumps’ to the upper left on small screens…

    The only (ugly) workaround I found until now is to hide avatars on the small screens:

    @media screen and (max-width: 375px) {
        .bbp-author-avatar {
          display: none; 
        }
    }

    Any other ideas? Thank you.

    #173904
    Robkk
    Moderator

    @bethannon1

    You can put this bbPress default themes CSS from the plugin into a folder called css in your child theme and edit the css file to your liking.

    https://codex.bbpress.org/themes/theme-compatibility/

    #173899
    Bet Hannon
    Participant

    Hi Pascal! Thanks for your quick reply!

    Unfortunately, no — these forums are locked down to only approved users.

    The CSS is in /plugins/bbpress/templates/default/css/bbpress.css, line 896:

    /* =Stickies
    -------------------------------------------------------------- */
    
    .bbp-topics-front ul.super-sticky,
    .bbp-topics ul.super-sticky,
    .bbp-topics ul.sticky,
    .bbp-forum-content ul.sticky {
    	background-color: #ffffe0 !important;
    	font-size: 1.1em;
    }
    

    I need to change that background color. But I’m not a CSS ninja, and I’m not sure how to override that !important from the default plugin CSS. This is when adding a 2nd !important to trump the first would be handy. ๐Ÿ™‚

    Pascal Casier
    Moderator

    Hi, you see this message because your debug is on. This specific message is not a real a minor issue, but it could mean you have somewhere access control issues.

    See https://codex.bbpress.org/bbp_setup_current_user/was-called-incorrectly/

    Pascal.

    #173892
    Bet Hannon
    Participant

    I need to override the default CSS color for
    .bbp-topics-front ul.super-sticky, .bbp-topics ul.super-sticky, .bbp-topics ul.sticky, .bbp-forum-content ul.sticky

    But the default color declaration has an !important in it. What’s the best way to fix this so my color will display? I know I could hack the plugin CSS, but that’s not the best option. ๐Ÿ™‚

Viewing 25 results - 6,576 through 6,600 (of 32,585 total)
Skip to toolbar