Exemple #1
0
                echo osc_comment_title();
                ?>
 <em>
                            <?php 
                _e("by", 'osclasswizards');
                ?>
                            <?php 
                echo osc_comment_author_name();
                ?>
:</em></h4>
                    <p><?php 
                echo nl2br(osc_comment_body());
                ?>
 </p>
                    <?php 
                if (osc_comment_user_id() && osc_comment_user_id() == osc_logged_user_id()) {
                    ?>
                    <p> <a rel="nofollow" href="<?php 
                    echo osc_delete_comment_url();
                    ?>
" title="<?php 
                    _e('Delete your comment', 'osclasswizards');
                    ?>
">
                            <?php 
                    _e('Delete', 'osclasswizards');
                    ?>
                        </a> </p>
                    <?php 
                }
                ?>
Exemple #2
0
function comment_picture_show()
{
    // Configuration - Your Options ///////////////////////////////////////////////////////
    $width = '100';
    $height = '';
    // height is optional. If you use a height, *MAKE SURE* it's proportional to the WIDTH
    ////// ***** No modifications below here should be needed ***** /////////////////////
    // First, check to see if user has existing profile picture...
    $user_id = osc_comment_user_id();
    // the user id of the user profile we're at
    $conn = getConnection();
    $result = $conn->osc_dbFetchResult("SELECT user_id, pic_ext FROM %st_profile_picture WHERE user_id = {$user_id} ", DB_TABLE_PREFIX, $user_id);
    if ($result > 0) {
        $upload_path = osc_plugins_path() . 'profile_picture/images/';
        $modtime = filemtime($upload_path . 'profile' . $user_id . $result['pic_ext']);
        //ensures browser cache is refreshed if newer version of picture exists
        // This is the picture HTML code displayed on page
        echo '<img src="' . osc_base_url() . 'oc-content/plugins/profile_picture/images/profile' . $user_id . $result['pic_ext'] . '?' . $modtime . '">';
        //  width="'.$width.'" height="'.$height.'"display picture
    } else {
        echo '<img src="' . osc_base_url() . 'oc-content/plugins/profile_picture/no_picture.jpg">';
        // width="'.$width.'" height="'.$height.'"
    }
}
Exemple #3
0
function dd_commentpic()
{
    if (function_exists("profile_picture_show")) {
        comment_picture_show();
    } else {
        ?>
    <a href="<?php 
        echo osc_user_public_profile_url(osc_comment_user_id());
        ?>
"><img class="img-responsive" src="http://www.gravatar.com/avatar/<?php 
        echo md5(strtolower(trim(osc_comment_author_email())));
        ?>
?s=60&d=<?php 
        echo osc_current_web_theme_url('images/user-default.jpg');
        ?>
" /></a>
<?php 
    }
}
Exemple #4
0
function item_comments()
{
    if (osc_reg_user_post_comments() && osc_is_web_user_logged_in() || !osc_reg_user_post_comments()) {
        ?>
        <div id="comments" class="box">
            <?php 
        if (osc_count_item_comments() >= 1) {
            ?>
            <h2>
                <?php 
            _e('Comments', 'pop');
            ?>
 (<?php 
            echo osc_count_item_comments();
            ?>
)
            </h2>
            <?php 
        }
        ?>
         
            <?php 
        CommentForm::js_validation();
        ?>
            <?php 
        if (osc_count_item_comments() >= 1) {
            ?>
            <div class="comments_list">
                <?php 
            while (osc_has_item_comments()) {
                ?>
                <div class="comment">
                    
                     <div class="user-avatar" style="background-image: url('<?php 
                echo osc_current_web_theme_url('images/seller-default.png');
                ?>
')"></div>
                    <?php 
                if (osc_comment_author_name()) {
                    ?>
                    <h4><em><?php 
                    echo osc_comment_author_name();
                    ?>
:</em></h4>
                    <?php 
                } else {
                    ?>
                    <h4><em><?php 
                    echo osc_comment_author_email();
                    ?>
:</em></h4>
                    <?php 
                }
                ?>
                    <div class="date">
                    <?php 
                echo osc_comment_pub_date();
                ?>
                    </div>
                    <p class="body"><?php 
                echo nl2br(osc_comment_body());
                ?>
 </p>
                    <?php 
                if (osc_comment_user_id() && osc_comment_user_id() == osc_logged_user_id()) {
                    ?>
                    <a rel="nofollow" href="<?php 
                    echo osc_delete_comment_url();
                    ?>
" title="<?php 
                    _e('Delete your comment', 'pop');
                    ?>
">
                            <?php 
                    _e('Delete', 'pop');
                    ?>
                        </a>
                    <?php 
                }
                ?>
                </div>
                <?php 
            }
            ?>
                <div class="pagination">
                    <?php 
            echo osc_comments_pagination();
            ?>
                </div>
            </div>
            <?php 
        }
        ?>
            <div class="comment_form">
               
                <h2>
                    <?php 
        _e('Leave your comment', 'pop');
        ?>
                </h2>
                <div class="resp-wrapper">
                     <ul id="comment_error_list" class="error_list">
                    </ul>
                    <form action="<?php 
        echo osc_base_url(true);
        ?>
" method="post" name="comment_form" id="comment_form">
                        <fieldset>
                            <input type="hidden" name="action" value="add_comment" />
                            <input type="hidden" name="page" value="item" />
                            <input type="hidden" name="id" value="<?php 
        echo osc_item_id();
        ?>
" />
                            <?php 
        if (osc_is_web_user_logged_in()) {
            ?>
                            <input type="hidden" name="authorName" value="<?php 
            echo osc_esc_html(osc_logged_user_name());
            ?>
" />
                            <input type="hidden" name="authorEmail" value="<?php 
            echo osc_logged_user_email();
            ?>
" />
                            <?php 
        } else {
            ?>
                            <div class="form-group col-md-6">
                                <label class="control-label" for="authorName">
                                    <?php 
            _e('Name', 'pop');
            ?>
                                </label>
                                <div class="controls">
                                    <?php 
            CommentForm::author_input_text();
            ?>
                                </div>
                            </div>
                            <div class="form-group col-md-6">
                                <label class="control-label" for="authorEmail">
                                    <?php 
            _e('Email', 'pop');
            ?>
                                </label>
                                <div class="controls">
                                    <?php 
            CommentForm::email_input_text();
            ?>
                                </div>
                            </div>
                            <?php 
        }
        ?>

                            <div class="form-group col-md-12">
                                <label class="control-label" for="body">
                                    <?php 
        _e('Comment', 'pop');
        ?>
                                </label>
                                <div class="controls textarea">
                                    <?php 
        CommentForm::body_input_textarea();
        ?>
                                </div>
                            </div>
                            <div class="actions col-md-12">
                                <button type="submit" class="btn btn-primary">
                                    <?php 
        _e('Send', 'pop');
        ?>
                                </button>
                            </div>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
        <?php 
    }
    ?>
 <?php 
}