بابه‌ت: ریفرێش بوو نەوەی پەرە لە تیکەڵکردنی php بە html

پێشتریش بابەتێکم دانا بۆ کێشەکەم  و گەیشتم بە ئەنجام بەلام من نویگەریم تێکرد بۆیە کێشەی درووست کرد کەوەێش گۆرینی نووسین بە هێمابوو کە لە بڕی نووسین کۆدی وەک

<i class="fa fa-heart" aria-hidden="true"></i>

دابنێم

کە لەبڕی Favorite

<i class="fa fa-heart" aria-hidden="true"></i>

دابنیم

و لەبڕی Remove Favorite

<i class="fa fa-heart-o" aria-hidden="true"></i>

دابنێم بەڵام کە ئەوەدەکەم پەرەکە ڕیفرێش دەبیت لەگەڵ کلیک کردن

وە بۆ زانینی چۆن ئەو کۆدەنە گەیشتوونە ئێرە ئەوە بابەتەکەیە
https://www.webchin.org/Meko/viewtopic.php?id=34243

وه‌ڵام: ریفرێش بوو نەوەی پەرە لە تیکەڵکردنی php بە html

sabaty zhian نووسی:

پێشتریش بابەتێکم دانا بۆ کێشەکەم  و گەیشتم بە ئەنجام بەلام من نویگەریم تێکرد بۆیە کێشەی درووست کرد کەوەێش گۆرینی نووسین بە هێمابوو کە لە بڕی نووسین کۆدی وەک

<i class="fa fa-heart" aria-hidden="true"></i>

دابنێم

کە لەبڕی Favorite

<i class="fa fa-heart" aria-hidden="true"></i>

دابنیم

و لەبڕی Remove Favorite

<i class="fa fa-heart-o" aria-hidden="true"></i>

دابنێم بەڵام کە ئەوەدەکەم پەرەکە ڕیفرێش دەبیت لەگەڵ کلیک کردن

وە بۆ زانینی چۆن ئەو کۆدەنە گەیشتوونە ئێرە ئەوە بابەتەکەیە
https://www.webchin.org/Meko/viewtopic.php?id=34243

وە ئەوەش تەواوی کۆدەکانی ئیستا کاری پێدەکەم

<?php
/**
 * BuddyPress - Activity Stream (Single Item)
 *
 * This template is used by activity-loop.php and AJAX functions to show
 * each activity.
 *
 * @package BuddyPress
 * @subpackage bp-legacy
 */

/**
 * Fires before the display of an activity entry.
 *
 * @since 1.2.0
 */
do_action( 'bp_before_activity_entry' ); ?>

<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
    <div class="activity-avatar">
        <a href="<?php bp_activity_user_link(); ?>">

            <?php bp_activity_avatar(); ?>

        </a>
    </div>

    <div class="activity-content">

        <div class="activity-header">

            <?php bp_activity_action(); ?>

        </div>

        <?php if ( bp_activity_has_content() ) : ?>

            <div class="activity-inner">

                <?php bp_activity_content_body(); ?>

            </div>

        <?php endif; ?>

        <?php

        /**
         * Fires after the display of an activity entry content.
         *
         * @since 1.2.0
         */
        do_action( 'bp_activity_entry_content' ); ?>
    
    <div class="favorite-and-comment">
               
               <script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .like").click(function(){
                            if( jQuery(this).html('<?php _e( 'Favorite', 'thrive' ); ?>') ) {
                                jQuery(this).html('<i class="material-icons md-24 top-5 md-dark">filter_list</i>');
                            }else{
                                jQuery(this).html('<?php _e( 'Favorite', 'thrive' ); ?>');
                            }
                        });
                    });
                </script>
                <?php if ( bp_activity_can_favorite() ) : ?>

                    <?php if ( !bp_get_activity_is_favorite() ) : ?>
                        
                        <a href="<?php bp_activity_favorite_link(); ?>" class="like button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'thrive' ); ?>"><?php _e( 'Favorite', 'thrive' ); ?></a>

                    <?php else : ?>

                        <a href="<?php bp_activity_unfavorite_link(); ?>" class="unlike button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'boss' ); ?>"><?php _e( 'Remove Favorite', 'thrive' ); ?></a>

                    <?php endif; ?>

                <?php endif; ?>
            <style>
                .w3-modal{z-index:9999999;display: none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#fff;background-color:#fff;
                 background-size: cover;  height: 677px;
                 background-position: center center;}
    
                .w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important}
                .w3-btn,.w3-btn-block,.w3-button{border:none;display:inline-block;outline:0;padding:6px 16px;vertical-align:middle;overflow:hidden;text-decoration:none!important;color:#fff;background-color:#000;text-align:center;cursor:pointer;white-space:nowrap}
                .w3-button{color:#000;background-color:#f1f1f1;padding:8px 16px}.w3-button:hover{color:#000!important;background-color:#ccc!important}
                .w3-btn,.w3-btn-floating,.w3-btn-floating-large,.w3-closenav,.w3-opennav,.w3-btn-block,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}   
                .w3-disabled,.w3-btn:disabled,.w3-button:disabled,.w3-btn-floating:disabled,.w3-btn-floating-large:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none}
                .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;background-color:inherit;color:inherit;padding:6px 2px 6px 16px}
                .w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000}
                .w3-bar .w3-button{background-color:inherit;color:inherit;white-space:normal}
                .w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}}
                .w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important}
                .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}
                
                a.like.button.fav.bp-secondary-action {
                width: 48px;
                height: 48px;
                background: none;
                box-shadow: none;
                color: #000;
                padding: 7px 0px;
                font-size: 10px;
                margin: 0px 10px 0px -50px;
                }
            </style>
                 <a href="javascript:void(0)" class="w3-bar-item w3-button w3-dark-grey w3-button w3-hover-black w3-left-align" onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='block'">New Message <i class="w3-padding fa fa-pencil"></i></a>

    <div>
        <div class="activity-meta">

            <?php if ( bp_get_activity_type() == 'activity_comment' ) : ?>

                <a href="<?php bp_activity_thread_permalink(); ?>" class="button view bp-secondary-action"><?php _e( 'View Conversation', 'buddypress' ); ?></a>

            <?php endif; ?>

            <?php if ( is_user_logged_in() ) : ?>

                <?php if ( bp_activity_can_comment() ) : ?>

                    <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment %s', 'buddypress' ), '<span>' . bp_activity_get_comment_count() . '</span>' ); ?></a>

                <?php endif; ?>

                

                <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>

                <?php

                /**
                 * Fires at the end of the activity entry meta data area.
                 *
                 * @since 1.2.0
                 */
                do_action( 'bp_activity_entry_meta' ); ?>

            <?php endif; ?>

        </div>

    </div>

    <?php

    /**
     * Fires before the display of the activity entry comments.
     *
     * @since 1.2.0
     */
    do_action( 'bp_before_activity_entry_comments' ); ?>

    <?php if ( ( bp_activity_get_comment_count() || bp_activity_can_comment() ) || bp_is_single_activity() ) : ?>

        <div class="activity-comments">

            <?php bp_activity_comments(); ?>

            <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>

                <form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
                    <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
                    <div class="ac-reply-content">
                        <div class="ac-textarea">
                            <label for="ac-input-<?php bp_activity_id(); ?>" class="bp-screen-reader-text"><?php
                                /* translators: accessibility text */
                                _e( 'Comment', 'buddypress' );
                            ?></label>
                            <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
                        </div>
                        <input type="submit" name="ac_form_submit" value="<?php esc_attr_e( 'Post', 'buddypress' ); ?>" /> &nbsp; <a href="#" class="ac-reply-cancel"><?php _e( 'Cancel', 'buddypress' ); ?></a>
                        <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
                    </div>

                    <?php

                    /**
                     * Fires after the activity entry comment form.
                     *
                     * @since 1.5.0
                     */
                    do_action( 'bp_activity_entry_comments' ); ?>

                    <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>

                </form>

            <?php endif; ?>

        </div>

    <?php endif; ?>

    <?php

    /**
     * Fires after the display of the activity entry comments.
     *
     * @since 1.2.0
     */
    do_action( 'bp_after_activity_entry_comments' ); ?>

</li>
<a class="w3-button w3-red" onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='none'">Cancel  <i class="fa fa-remove"></i></a>
        <a class="w3-button w3-light-grey w3-right" onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='none'">Send  <i class="fa fa-paper-plane"></i></a> 
      </div>    
    </div>
  </div>
<?php

/**
 * Fires after the display of an activity entry.
 *
 * @since 1.2.0
 */
do_action( 'bp_after_activity_entry' );

وه‌ڵام: ریفرێش بوو نەوەی پەرە لە تیکەڵکردنی php بە html

لە جیاتی ئەمە

<script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .bp-secondary-action").click(function(){
                            if( jQuery(this).text('Favorite') ) {
                                jQuery(this).text('Remove Favorite');
                            }else{
                                jQuery(this).text('Favorite');
                            }
                        });
                    });
                </script>

ئەمە دابنێ بزانە کار دەکات

<script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .bp-secondary-action").click(function(){
                            if( jQuery(this).text('<i class="fa fa-heart" aria-hidden="true"></i>') ) {
                                jQuery(this).text('<i class="fa fa-heart-o" aria-hidden="true"></i>');
                            }else{
                                jQuery(this).text('<i class="fa fa-heart" aria-hidden="true"></i>');
                            }
                        });
                    });
                </script>
ئاسۆ نادری، ڕۆحت هەر لەگەڵمانە.

وه‌ڵام: ریفرێش بوو نەوەی پەرە لە تیکەڵکردنی php بە html

ڕێنوار نووسی:

لە جیاتی ئەمە

<script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .bp-secondary-action").click(function(){
                            if( jQuery(this).text('Favorite') ) {
                                jQuery(this).text('Remove Favorite');
                            }else{
                                jQuery(this).text('Favorite');
                            }
                        });
                    });
                </script>

ئەمە دابنێ بزانە کار دەکات

<script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .bp-secondary-action").click(function(){
                            if( jQuery(this).text('<i class="fa fa-heart" aria-hidden="true"></i>') ) {
                                jQuery(this).text('<i class="fa fa-heart-o" aria-hidden="true"></i>');
                            }else{
                                jQuery(this).text('<i class="fa fa-heart" aria-hidden="true"></i>');
                            }
                        });
                    });
                </script>

نا کار ناکات تەنها دەبێت text بگۆڕیت بە html بۆ ئەوەی کۆدەکان بخوینیتەوە وەک ئەوە

<script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .bp-secondary-action").click(function(){
                            if( jQuery(this).html('<i class="fa fa-heart" aria-hidden="true"></i>') ) {
                                jQuery(this).html('<i class="fa fa-heart-o" aria-hidden="true"></i>');
                            }else{
                                jQuery(this).html('<i class="fa fa-heart" aria-hidden="true"></i>');
                            }
                        });
                    });
                </script>

وە هێشتانیش تەنها ئەوەیان کاردەکات

  jQuery(this).html('<i class="fa fa-heart-o" aria-hidden="true"></i>');

وه‌ڵام: ریفرێش بوو نەوەی پەرە لە تیکەڵکردنی php بە html

گەر تۆ کۆدەکانت دانەنابێت لە ناو ماڵپەرەکەت ئێمە چۆن بتوانین کاری لەسەر بکەین!
دووبارەی دەکەمەوە، لەجیاتی Favorite و Unfavoite کۆدەکان دابنێ با چاوی لێ بکەین، ئێمە دەسەڵاتی کۆدی phpمان نیە تابیگۆڕین.

ئاسۆ نادری، ڕۆحت هەر لەگەڵمانە.

وه‌ڵام: ریفرێش بوو نەوەی پەرە لە تیکەڵکردنی php بە html

ڕێنوار نووسی:

گەر تۆ کۆدەکانت دانەنابێت لە ناو ماڵپەرەکەت ئێمە چۆن بتوانین کاری لەسەر بکەین!
دووبارەی دەکەمەوە، لەجیاتی Favorite و Unfavoite کۆدەکان دابنێ با چاوی لێ بکەین، ئێمە دەسەڵاتی کۆدی phpمان نیە تابیگۆڕین.

زۆر سپاس کێشەکە بەم شێوەیە چارە بوو

<?php
/**
 * BuddyPress - Activity Stream (Single Item)
 *
 * This template is used by activity-loop.php and AJAX functions to show
 * each activity.
 *
 * @package BuddyPress
 * @subpackage bp-legacy
 */

/**
 * Fires before the display of an activity entry.
 *
 * @since 1.2.0
 */
do_action( 'bp_before_activity_entry' ); ?>
<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
    <div class="activity-avatar">
        <a href="<?php bp_activity_user_link(); ?>">

            <?php bp_activity_avatar(); ?>

        </a>
    </div>

    <div class="activity-content">

        <div class="activity-header">
<a dir="ltr" href="javascript:void(0)" class="see-other" onclick="document.getElementById('id-other-<?php bp_activity_id(); ?>').style.display='block'"><i class="other-more material-icons">more_horiz</i></a>

            <?php bp_activity_action(); ?>



        </div>

        <?php if ( bp_activity_has_content() ) : ?>

            <div class="activity-inner">
                <?php bp_activity_content_body(); ?>

            </div>

        <?php endif; ?>

        <?php

        /**
         * Fires after the display of an activity entry content.
         *
         * @since 1.2.0
         */
        do_action( 'bp_activity_entry_content' ); ?>

        
        
                    <div class="favorite-and-comment">
            <hr class="zherababt">
            <div class="comment-post">
            <a href="javascript:void(0)" id="acomment-comment-<?php bp_activity_id(); ?>" class="acomment-reply comentt w3-button" onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='block'"><?php _e( 'Comment', 'buddypress' ); ?> <img class="comment-image" src="<?php echo esc_url( home_url( '/' ) ); ?>image/comment.png" width="30" height="30"></a>
            </div>

               <script>
                    jQuery(document).ready(function(){
                        jQuery("#activity-<?php bp_activity_id(); ?> .lanab").click(function(){
                            if( jQuery(this).html('<i class="fa fa-heart" aria-hidden="true"></i>') ) {
                                jQuery(this).html('<i class="fa fa-heart" aria-hidden="true"style="font-size:25px"></i>');
                            }else{
                                jQuery(this).html('<i class="fa fa-heart" aria-hidden="true"></i>');
                            }
                        });
                    });
                </script>
               <div class="larm"></div>
                <?php if ( bp_activity_can_favorite() ) : ?>

                    <?php if ( !bp_get_activity_is_favorite() ) : ?>
                        
                        <a href="<?php bp_activity_favorite_link(); ?>" class="lanab button fav bp-secondary-action"><?php printf( __( 'Favorite %s', 'buddypress' ), '<i href="#" class="fav love-favorite fa fa-heart-o" aria-hidden="true" style="font-size: 25px;"></i>' ); ?></a>

                    <?php else : ?>

                        <a href="<?php bp_activity_unfavorite_link(); ?>" class="lanab button unfav bp-secondary-action"><?php printf( __( 'Remove Favorite %s', 'buddypress' ), '<i href="#" class="unfav love-unfavorite fa fa-heart" aria-hidden="true" style="color:#bb00b0; font-size: 25px;"></i>' ); ?></a>

                    <?php endif; ?>

                <?php endif; ?>
            <style>
                .w3-modal{z-index:9999999;display: none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#fff;background-color:#fff;
                 background-size: cover;  height: 677px;
                 background-position: center center;}
    
                .w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important}
                .w3-btn,.w3-btn-block,.w3-button{border:none;display:inline-block;outline:0;padding:6px 16px;vertical-align:middle;overflow:hidden;text-decoration:none!important;color:#fff;background-color:#000;text-align:center;cursor:pointer;white-space:nowrap}
                .w3-button{color:#000;background-color:#f1f1f1;padding:8px 16px}
                .w3-btn,.w3-btn-floating,.w3-btn-floating-large,.w3-closenav,.w3-opennav,.w3-btn-block,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}   
                .w3-disabled,.w3-btn:disabled,.w3-button:disabled,.w3-btn-floating:disabled,.w3-btn-floating-large:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none}
                .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;background-color:inherit;color:inherit;padding:6px 2px 6px 16px}
                .w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000}
                .w3-bar .w3-button{background-color:inherit;color:inherit;white-space:normal}
                .w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}}
                .w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important}
                .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}
                
                .comment-post {
                position: absolute;
                margin-left: 30%;
                                 } 
                a.button.bp-secondary-action.fav {
                direction: rtl;
                color: #000;
                background: #fff;
                box-shadow: none;
                margin: 0px 0px 15px 0px;
                }
                i.love-unfavorite.fa.fa-heart {
                margin: 0px 20px 0px 0px;
                }
                i.love-favorite.fa.fa-heart-o {
                margin: 0px 20px 0px 0px;
                }
                .favorite-and-comment {
                margin-left: -60px;
                }
                a.button.bp-secondary-action.fav {
                direction: rtl;
                color: #000;
                background: #fff;
                box-shadow: none;
                margin: 0px 0px 15px 0px;
                font-size: 14px;
                text-transform: capitalize;
                }
                a.button.bp-secondary-action.unfav {
                direction: rtl;
                color: #000;
                background: #fff;
                box-shadow: none;
                margin: 0px 0px 15px 0px;
                font-size: 14px;
                text-transform: capitalize;
                }
                a.button.unfav.bp-secondary-action {
                direction: rtl;
                color: #000;
                background: #fff;
                box-shadow: none;
                margin: 0px 0px 15px 0px;
                font-size: 14px;
                text-transform: capitalize;
                }
                .larm {
                background: rgba(0, 0, 0, 0);
                width: 40px;
                height: 40px;
                position: absolute;
                margin: 0px 0px 0px 18px;
                }
                img.comment-image {
                margin: 0px 20px 10px 0px;
                }
                a.comentt {
                direction: rtl;
                margin-top: -10px;
                color: #000;
                background: #fff;
                height: 40px;
                }
                hr.zherababt {
                border-top: 1px solid #999;
                }
                a.see-comment {
                color: #000;
                background: white;
                text-align-last: center;
                width: 100%;
                border: 1px solid #999;
                border-radius: 3px;
                padding: 3px 0px 0px 0px;
                }
                li.activity-item {
                border: 1.4px solid rgba(153, 153, 153, 0.4);
                border-radius: 2px;
                }
                a.view.activity-time-since.bp-tooltip {
    display: flex;
}
i.other-more {
    float: right!important;
    color: #000;
}
span.w3-button.w3-red.w3-right.w3-xxlarge {
    float: right!important;
}
.more-other {
    z-index: 3;
    display: none;
    padding-top: 100px;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}
.w3-modal-content.w3-animate-zoom {
    width: 45%;
    margin: auto;
    background-color: #fff;
    
}
.sara-bzharda {
    color: #fff;
    background-color: #bb00b0;
    padding: 25px 25px 10px 16px;
}
.w3-button {
    color: #fff;
    background-color: rgba(241, 241, 241, 0);
    padding: 8px 16px;
}
.w3-button-l:hover {
    color: #000;
    background-color: #bd78b5;
    padding: 8px 16px;
}

a.w3-button.w3-red {
    color: #000;
    background-color: #fff;
    border: 1.4px solid #000;
    width: 95%;
    margin: 5px 5px 15px 15px;
}

            </style>
            
            

    <div>
    <!--لێرە کۆمێنتەکان دەبینرێت-->
    <div>
    
                <a href="javascript:void(0)" class="w3-bar-item see-comment w3-button" onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='block'"><?php _e( 'See All Comments', 'thrive' ); ?></a>
    
    </div>
        
        
        
    <div class="zhur-activity-comments"></div>
        
            <div id="id-comment-<?php bp_activity_id(); ?>" class="w3-modal" style="z-index:999999">
  <div class="w3-modal-content w3-animate-zoom">
    
       <span onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='none'"
       class="w3-button-l w3-red w3-right w3-xxlarge"><i class="fa fa-remove"></i></span>

       <?php if ( bp_activity_can_comment() ) : ?>

                    <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment %s', 'buddypress' ), '<span>' . bp_activity_get_comment_count() . '</span>' ); ?></a>

        <?php endif; ?>
        
    <?php if ( ( bp_activity_get_comment_count() || bp_activity_can_comment() ) || bp_is_single_activity() ) : ?>

        <div class="activity-comments">

            <?php bp_activity_comments(); ?>

            <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>

                <form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
                    <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
                    <div class="ac-reply-content">
                        <div class="ac-textarea">
                            <label for="ac-input-<?php bp_activity_id(); ?>" class="bp-screen-reader-text"><?php
                                /* translators: accessibility text */
                                _e( 'Comment', 'buddypress' );
                            ?></label>
                            <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
                        </div>
                        <input type="submit" name="ac_form_submit" value="<?php esc_attr_e( 'Post', 'buddypress' ); ?>" /> &nbsp; <a href="#" class="ac-reply-cancel"><?php _e( 'Cancel', 'buddypress' ); ?></a>
                        <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
                    </div>

                    <?php

                    /**
                     * Fires after the activity entry comment form.
                     *
                     * @since 1.5.0
                     */
                    do_action( 'bp_activity_entry_comments' ); ?>

                    <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>

                </form>

            <?php endif; ?>

        </div>

    <?php endif; ?>
    
       <?php if ( bp_activity_can_comment() ) : ?>

                    <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'More Comment', 'buddypress' ), '<span>' . bp_activity_get_comment_count() . '</span>' ); ?></a>

        <?php endif; ?>
        
<a class="w3-button w3-red" onclick="document.getElementById('id-comment-<?php bp_activity_id(); ?>').style.display='none'">Cancel  <i class="fa fa-remove"></i></a>
      </div>    
    </div>
    
    <div id="id-other-<?php bp_activity_id(); ?>" class="more-other" style="z-index:999999">
     <div class="w3-modal-content w3-animate-zoom">
    <div class="sara-bzharda">
       <span onclick="document.getElementById('id-other-<?php bp_activity_id(); ?>').style.display='none'"
       class="w3-button-l w3-red w3-right w3-xxlarge"><i class="fa fa-remove"></i></span>
        <h1><?php  _e( 'Other', 'buddypress' ); ?></h1>
    </div>
        <div class="activity-meta">

            <?php if ( bp_get_activity_type() == 'activity_comment' ) : ?>

                <a href="<?php bp_activity_thread_permalink(); ?>" class="button view bp-secondary-action"><?php _e( 'View Conversation', 'buddypress' ); ?></a>

            <?php endif; ?>

            <?php if ( is_user_logged_in() ) : ?>


                <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>

                <?php

                /**
                 * Fires at the end of the activity entry meta data area.
                 *
                 * @since 1.2.0
                 */
                do_action( 'bp_activity_entry_meta' ); ?>

            <?php endif; ?>

        </div>
<a class="w3-button w3-red" onclick="document.getElementById('id-other-<?php bp_activity_id(); ?>').style.display='none'">Cancel  <i class="fa fa-remove"></i></a>
      </div>    
    </div>
    </div>

    <?php

    /**
     * Fires before the display of the activity entry comments.
     *
     * @since 1.2.0
     */
    do_action( 'bp_before_activity_entry_comments' ); ?>

    

    <?php

    /**
     * Fires after the display of the activity entry comments.
     *
     * @since 1.2.0
     */
    do_action( 'bp_after_activity_entry_comments' ); ?>

</li>

<?php

/**
 * Fires after the display of an activity entry.
 *
 * @since 1.2.0
 */
do_action( 'bp_after_activity_entry' );