Search Results for 'code'
-
Search Results
-
Topic: Subtopics in main forum
Hi I am using shortcode [bbp-forum-index] in my wp-page to display my forum.
My objective is to show sub topics in my main forum homepage
[IMG]http://i63.tinypic.com/2mcfwnq.jpg[/IMG]
How can I achieve this? I tried using bb stylepack and its now showing my subtopics.
Thanks!
Dear Sir/Madam,
I install the bbPress and find the search box and button are in separate line, I review the code of form-search.php
<form role="search" method="get" id="bbp-search-form" action="<?php bbp_search_url(); ?>"> <div> <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'bbpress' ); ?></label> <input type="hidden" name="action" value="bbp-search-request" /> <input tabindex="<?php bbp_tab_index(); ?>" type="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="bbp_search" /> <input tabindex="<?php bbp_tab_index(); ?>" class="button" type="submit" id="bbp_search_submit" value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>" /> </div> </form>There is not line break tag <br> between the input element, does anyone know how I can remove the break?
Best regards,
Kelvin.
WordPress Version: 4.5.3
bbPress Version: 2.5.9
Website Link: http://www.sva.bc.ca/newforums/Hello,
After setting up bbPress I “imported” forum posts manually from an older system, setting the “Published On” date to match the date of each original topic/reply. I then found that bbPress’s “freshness” ignored this date and used the date/time I had manually added these posts.
So I installed the bbPress last post plugin ( https://en-gb.wordpress.org/plugins/bbp-last-post/ ) and modified it a little. The following code is what is currently being used, and is almost what I want:
<?php //this function changes the bbp freshness data (time since) into a last post date for forums function change_freshness_forum ($forum_id = 0 ) { // Verify forum and get last active meta $forum_id = bbp_get_forum_id( $forum_id ); $reply_id = bbp_get_forum_last_reply_id( $forum_id ); if ( !empty( $reply_id ) ) { $last_active_date = get_the_date( '', $reply_id ); } else { $topic_id = bbp_get_forum_last_topic_id( $forum_id ); if ( !empty( $topic_id ) ) { $last_active_date = get_the_date('', $topic_id ); } } if ( !empty( $reply_id ) ) { $last_active_time = get_the_time( '', $reply_id ); } else { if ( !empty( $topic_id ) ) { $last_active_time = get_the_time('', $topic_id ); } } $last_active_date = bbp_convert_date( $last_active_date ) ; $last_active_time = bbp_convert_date( $last_active_time ) ; $date_format = get_option( 'date_format' ); $time_format = get_option( 'time_format' ); $date= date_i18n( "{$date_format}", $last_active_date ); $time=date_i18n( "{$time_format}", $last_active_time ); $active_time = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbp-last-post' ), $date, $time ); return $active_time ; } add_filter( 'bbp_get_forum_last_active', 'change_freshness_forum', 10, 2 ); //this function changes the bbp freshness data (time since) into a last post date for topics function change_freshness_topic ($last_active, $topic_id) { $topic_id = bbp_get_topic_id( $topic_id ); // Try to get the most accurate freshness date possible if ( empty( $last_active_date ) ) { $reply_id = bbp_get_topic_last_reply_id( $topic_id ); if ( !empty( $reply_id ) ) { $last_active_date = get_the_date( '', $reply_id ); } else { $last_active_date = get_the_date( '', $topic_id ); } } // Try to get the most accurate freshness time possible if ( empty( $last_active_time ) ) { $reply_id = bbp_get_topic_last_reply_id( $topic_id ); if ( !empty( $reply_id ) ) { $last_active_time = get_the_time( '', $reply_id ); } else { $last_active_time = get_the_time( '', $topic_id ); } } $last_active_date = bbp_convert_date( $last_active_date ) ; $last_active_time = bbp_convert_date( $last_active_time ) ; $date_format = get_option( 'date_format' ); $time_format = get_option( 'time_format' ); $date= date_i18n( "{$date_format}", $last_active_date ); $time=date_i18n( "{$time_format}", $last_active_time ); $active_time = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbp-last-post' ), $date, $time ); return $active_time ; } add_filter( 'bbp_get_topic_last_active', 'change_freshness_topic', 10, 2 ); //This function changes the heading "Freshness" to the name created in Settings>bbp last post function change_translate_text( $translated_text ) { $text = 'Freshness' ; if ( $translated_text == $text ) { global $rlp_options; $translated_text = $rlp_options['heading_label']; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );The only problem now is that from the forum index view, the “Last Post” column will show the date of the most recent reply, even if there is a newer topic.
Is there a way to compare the dates and make sure the Last Post column displays the most recent topic or reply, whichever is newer?
Thanks!
Topic: CSS & HTML As Admin
Hi All,
I just created a really nice working table that I wanted to post as a sticky topic on my bbpress forums. I’m set up as an admin and have full html capabilities.
When I preview my html & css in Coda, it works great! Upon typing in the code as a new sticky topic, it is not inheriting any of the CSS styling.
Is this possible? I’m positive that styling and everything is done correctly. The forum just isn’t seeing it.
Thanks for the help.
– Boomer
Hi,
When searching through the forum and not being logged in, a message appears at the bottom saying you must be logged in to post a reply……
Is there any way you can send me the code, so that there is a direct link to the forum login from this message or next to the message.bbPress version is up to date. and wordpress version is a unique one created by web dev company.
Thanks in advance for your helpTopic: List Followed Posts?
Hi all!
I’m using bbPress as part of a membership website. I know that a member can select to have post responses sent to their email. But is it possible to include a list of each specific member’s posts on the dashboard (account) page that I’m creating? This seems like an easy way for them to access what they’re posted, and track responses. Is there a shortcode for this, or will it require customization?
Thanks!
Topic: Date Issue: 1970
I’ve seen a few people post about this issue I can’t seem to find a resolution however. I’m using 2.5.9 and when you click on a users profile it shows the date they joined as January 1, 1970. However, when I look at my profile it shows the correct date. What could I be missing?
This is a snippet of code I have in the user-profile.php page.
<?php
echo '<b>Joined:</b> '.date("F, Y", strtotime(get_userdata(bbp_get_reply_author_id())->user_registered));?>Does that look correct?