Search Results for '+.+default+.+'
-
Search Results
-
Hello,
I would like to know the correct method to add a filter in a child theme for a template function.
For this example lets use ‘bbp_get_user_subscribe_link()’
I would like to insert
<icon class="icon-user"></i>
into the following before the %s
<span id="subscribe-%d" %s>%s
$html = sprintf( '%s<span id="subscribe-%d" %s>%s</span>%s', $r['before'], $topic_id, $sub, $url, $topic_id, $text, $r['after'] );
of this function bbp_get_user_subscribe_link()
function bbp_get_user_subscribe_link( $args = '', $user_id = 0, $wrap = true ) { if ( !bbp_is_subscriptions_active() ) return; // Parse arguments against default values $r = bbp_parse_args( $args, array( 'subscribe' => __( 'Subscribe', 'bbpress' ), 'unsubscribe' => __( 'Unsubscribe', 'bbpress' ), 'user_id' => 0, 'topic_id' => 0, 'before' => ' | ', 'after' => '' ), 'get_user_subscribe_link' ); // Validate user and topic ID's $user_id = bbp_get_user_id( $r['user_id'], true, true ); $topic_id = bbp_get_topic_id( $r['topic_id'] ); if ( empty( $user_id ) || empty( $topic_id ) ) { return false; } // No link if you can't edit yourself if ( !current_user_can( 'edit_user', (int) $user_id ) ) { return false; } // Decide which link to show $is_subscribed = bbp_is_user_subscribed( $user_id, $topic_id ); if ( !empty( $is_subscribed ) ) { $text = $r['unsubscribe']; $query_args = array( 'action' => 'bbp_unsubscribe', 'topic_id' => $topic_id ); } else { $text = $r['subscribe']; $query_args = array( 'action' => 'bbp_subscribe', 'topic_id' => $topic_id ); } // Create the link based where the user is and if the user is // subscribed already if ( bbp_is_subscriptions() ) { $permalink = bbp_get_subscriptions_permalink( $user_id ); } elseif ( bbp_is_single_topic() || bbp_is_single_reply() ) { $permalink = bbp_get_topic_permalink( $topic_id ); } else { $permalink = get_permalink(); } $url = esc_url( wp_nonce_url( add_query_arg( $query_args, $permalink ), 'toggle-subscription_' . $topic_id ) ); $sub = $is_subscribed ? ' class="is-subscribed"' : ''; $html = sprintf( '%s<span id="subscribe-%d" %s>%s</span>%s', $r['before'], $topic_id, $sub, $url, $topic_id, $text, $r['after'] ); // Initial output is wrapped in a span, ajax output is hooked to this if ( !empty( $wrap ) ) { $html = '<span id="subscription-toggle">' . $html . '</span>'; } // Return the link return apply_filters( 'bbp_get_user_subscribe_link', $html, $r, $user_id, $topic_id ); }So how would I construct my_custom_bbp_get_user_subscribe_link() function to add_filter( ‘bbp_get_user_subscribe_link’, ‘my_custom_bbp_get_user_subscribe_link’ ); ?
I hope the answer will serve as a general example to correctly add filters to many other template functions.
Thanks for your assistance.
Topic: french translation
Hello,
As part of a project for a forum in French which will be online soon, I completed the translation in French of bbPress and I improved (at least I hope) many strings already translated so that they are more true to the original english meaning and context.
I’m entering the translations one by one on translate.wordpress.org/projects/bbpress/2.4.x/fr/default and I would like to discuss with the french translation team about a number of aspects of the project, eg nomenclature, accents, etc.
Thank you and good day.
Topic: Forum Index Customization
When looking at the settings, I see that I can “customize” the forum index with shortcodes. I did that, and when its just its own page, then it works. When I try and change the settings to display that page as the forum index, it overwrites it with a weird looking search result instead of the index.
All I want it to do is to display the forums that I have, and to be the forum link that is displayed when you go into a topic.
Here is the page with the shortcode (and not yet assigned to the forum root):


Topic: phpBB Import speed
Hi all. I’m having some problems importing my phpBB forum into bbPress. My forum is quite big, those are my stats:
Posts: 576133 | Topics: 32722 | Users: 12306I first tried a default import with 1000row/1sec setting. It ran for an entire day, however after around 60000 posts it just started giving me dashes (‘-‘ char) and I really didn’t know what to do or if it was normal. So i just stopped it.
After this I wanted to try more rows, assuming it was going to be faster. So I started (2 tries) a 5000 and a 10000 row imports. However I had it on starting conversion for an hours or more, and never actually started converting. I don’t have memory problems or errors, it’s just very slow I guess.
So my question is: Is there a way to import all together, maybe directly with some bash script, from shell without using a webserver. Or something else to speed it up instead of waiting days in my browser?
Thanks.
Currently the Forum Root is titled Forum Archive by default and there is no way to change it from the back-end. This is still impossible even when the Forum Root is partnered with a wordpress page optimized with a SEO pluggin like All In One SEO or WordPress SEO By Yoast.
So I think I going to modify the code to get this done, but I need your instruction, please help.
And how can I request this possibility as a default feature in the next BBPress realease? I think many people will thank it.
Thanks in advance,
Hung.Hi all,
I can’t find where the title output is coming from. I want to wrap it in a <h1>. In the default templates it starts with
<div id="bbpress-forums">and the title’s output is before that. But where is it coming from? I can’t find it.I imported a huge forum from PHPBB (Over 1M posts and 100K users). It’s very slow to load and submit posts. Any suggestions on the indexes that should be created? It doesn’t look like the default BBPress indexes are sufficient for forums this size. I thought BBPress would be able to handle it with it’s default structure. Thanks in advance.
Guys, I’ve searched goodness knows how many threads, read the two standard documentation posts and I cannot for the life of me fathom how to activate a simple bbpress theme. Every thread I read tells of others with the same problem or notes that the documentation is out of date.
Has anyone written a concise and easy to follow step my step instruction post on how to install and activate a theme using the current release of bbpress? Or a video? I just can’t figure how I can spend an entire day googling and searching the site for something which virtually every new user would look for within the first phase of bbpress installation and setup? Have a I missed it?
As far as I’m aware I’ve done everything asked for in these two posts:
http://codex.bbpress.org/theme-compatibility/
http://codex.bbpress.org/step-by-step-guide-to-creating-a-custom-bbpress-theme/
yet having followed them to letter as best I could I can’t quite see how the newly installed “blue static” is to be called into play as functions.php is calling for the default theme?
The two posts above seem to get you about 90% there and then fail to explain the last few steps required to actually make everything work. Or it could be I’m going senile very early in life, in which case please for give me but could someone help me anyway? 🙂
Many thanks in advance for any help you might offer.



