Forum Replies Created
-
Thank you for your advice.
Your code works well.
I do appreciate it every time.
In reply to: Automatic subscribtionYou can customze two file form-reply.php and form-topic.php .
bbress> templates > default > form-topic.php at line 170
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> /> ↓ <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox"checked value="bbp_subscribe" <?php bbp_form_topic_subscribed(); ?> />
bbress> templates > default > form-reply.php at line 104
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox" value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> /> ↓ <input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox"checked value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> />
Then the topic and reply are automatically subscribed simply.
But the participant can uncheck the checkbox about subscription by himself.
If you do not want participant uncheck the checkbox, you can delete checkbox by CSS.Put these customized files in your child theme’s folder-bbpress.
In reply to: User Photo GalleryHow about the GD bbPress Attachments plugin?
In reply to: Automatic subscribtionHow about this code?
type="checkbox" ⇒ type="checkbox"checked
You can customize the form-reply.php and form-topic.php .
<input name="bbp_topic_subscription" id="bbp_topic_subscription" type="checkbox"checked value="bbp_subscribe"<?php bbp_form_topic_subscribed(); ?> />
You can change the code simply and put both files in your child theme’s bbpress folder.
In reply to: How to enable Unsubscription link only to Topic ?Your code works quite well. How simple they are!
I tried to customize it , but I couldn’t. I couldn’t get strpos code.Thank you for your kindness.
In reply to: How to enable Unsubscription link only to Topic ?‘reply page’ means content-single-topic.php .
<?php bbp_topic_subscription_link(); ?>
includes> topics > template.php
function bbp_topic_subscription_link( $args = array() ) { echo bbp_get_topic_subscription_link( $args ); } /** * Get the topic subscription link * * A custom wrapper for bbp_get_user_subscribe_link() * * @since 2.5.0 bbPress (r5156) * @since 2.6.0 bbPress (r6308) Add 'redirect_to' support */ function bbp_get_topic_subscription_link( $args = array() ) { // Defaults $retval = false; $user_id = bbp_get_current_user_id(); $redirect_to = bbp_is_subscriptions() ? bbp_get_subscriptions_permalink( $user_id ) : ''; // Parse the arguments $r = bbp_parse_args( $args, array( 'user_id' => $user_id, 'object_id' => bbp_get_topic_id(), 'object_type' => 'post', 'before' => ' | ', 'after' => '', 'subscribe' => esc_html__( 'Subscribe', 'bbpress' ), 'unsubscribe' => esc_html__( 'Unsubscribe', 'bbpress' ), 'redirect_to' => $redirect_to ), 'get_topic_subscribe_link' ); // Get the link $retval = bbp_get_user_subscribe_link( $r ); // Filter & return return apply_filters( 'bbp_get_topic_subscribe_link', $retval, $r, $args ); }
In reply to: How can I get topic’s picture URL?I could get the code to set on the thumbnails in the topic index page using GD bbPress Attachments.
function action_bbp_topic_row_actions() { $medias = get_attached_media( 'image', bbp_get_topic_id() ); foreach($medias as $media){ the_attachment_link( $media->ID,false ); } } add_action( 'bbp_theme_before_topic_title', 'action_bbp_topic_row_actions', 10, 0 );
In reply to: How can I get topic’s picture URL?Add other method.
I have succeeded to set the images on topic index page.
but I have no idea to change images to thumbnails.Do you have any ideas for thumbnails?
function action_bbp_topic_row_actions() { if ( have_posts() ) while ( have_posts() ) : the_post(); $medias = get_attached_media( 'image', bbp_get_topic_id() ); foreach($medias as $media){ the_attachment_link( $media->ID ); } endwhile; } add_action( 'bbp_theme_before_topic_title', 'action_bbp_topic_row_actions', 10, 0 );
In reply to: How to close or open topic by the author ?I appreciate it.
It works completely.
Thank you for your genius.
In reply to: How to close or open topic by the author ?Thank you for your help. Thanks to your code, I manage to set up open close button in the reply page .
So in bbp style pack or my customized code, the open close status button sets on all comments in the reply page.
It would be un-displayable by using CSS code except for top comment[topic author comment].Do you have some sample code to hide unnecessary open close status buttons by CSS(Cascading Style Sheet) ?
Example
//topic author <a href="http://~ #post-1762" class="bbp-reply-header">#1762</a> class="bbp-topic-close-link" //------------------------------------------------------------------------ //reply first <a href="http://~ #post-1763" class="bbp-reply-header">#1763</a> class="bbp-topic-close-link" #bbpress-forums XXX.bbp-topic-close-link { display: none; }
In reply to: Setting on search function above of the breadcrumbI see. Thank you for your kindness.
In reply to: Setting on search function above of the breadcrumbbbp_theme_before_forum_title
I could not do it.
It is same loop withbbp_theme_after_forum_title
bbpress.org shows that “23. Show the bbPress forum search everywhere”.
Layout and functionality – Examples you can useBut it may be that there is not hook point to set on the search form above of the title.
In reply to: Setting on search function above of the breadcrumbThank you for your help.
But your code does not work correctly.bbp_template_before_replies_loop
in reply page
[Title]
[Breadcrumb]
[Search form]bbp_theme_after_forum_title
in forum page
[Forum title]
[Search form]
[Forum title]
[Search form]
[Forum title]
and loopThese are not my target.
In reply to: Setting on search function above of the breadcrumbSupplement
<Customize>[Search form]
↓
[Title]
↓
[ breadcrumb]