Julia (@sub0810)

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • @sub0810

    Participant

    Thank you for your advice.

    Your code works well.

    I do appreciate it every time.

    In reply to: Automatic subscribtion

    @sub0810

    Participant

    You 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 Gallery

    @sub0810

    Participant

    How about the GD bbPress Attachments plugin?

    GD-bbpress-attachment

    In reply to: Automatic subscribtion

    @sub0810

    Participant

    How 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.

    @sub0810

    Participant

    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.

    @sub0810

    Participant

    ‘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'      => '&nbsp;|&nbsp;',
    			'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 );
    	}
    

    @sub0810

    Participant

    The resolution here

    $_SESSION — Session variables

    session

    @sub0810

    Participant

    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 ); 
    

    @sub0810

    Participant

    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 ); 
    

    @sub0810

    Participant

    I appreciate it.

    It works completely.

    Thank you for your genius.

    @sub0810

    Participant

    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;
      }
    

    @sub0810

    Participant

    I see. Thank you for your kindness.

    @sub0810

    Participant

    bbp_theme_before_forum_title

    I could not do it.
    It is same loop with bbp_theme_after_forum_title

    bbpress.org shows that “23. Show the bbPress forum search everywhere”.
    Layout and functionality – Examples you can use

    But it may be that there is not hook point to set on the search form above of the title.

    @sub0810

    Participant

    Thank 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 loop

    These are not my target.

    @sub0810

    Participant

    Supplement
    <Customize>

    [Search form]

    [Title]

    [ breadcrumb]

Viewing 15 replies - 1 through 15 (of 15 total)