Ejemplo n.º 1
0
    function comments_data_id($story_id, $comment_id)
    {
        $ci =& get_instance();
        $pop = '';
        $html = '  <div id="comment_show_' . $comment_id . '">';
        $comment_reply = $ci->db->query("select * from comments where section_type_id='" . $story_id . "' and section_type='2' and parent_comment_id='" . $comment_id . "' order by id desc")->result_array();
        foreach ($comment_reply as $comment_reply_val) {
            $comment_reply_user = user_allinfo_id($comment_reply_val['user_id']);
            if ($ci->session->userdata('user_logged') != '') {
                $htmlsecondreply = 'onclick="increase_comment(3,' . $comment_reply_val['id'] . ',' . $ci->session->userdata('_current_user_id') . ');"';
            } else {
                $htmlsecondreply = 'data-toggle="modal" data-target="#common-form"';
            }
            $html .= '<div class="comment-box-css-reply">
					<div class="col-lg-1 col-md-2 col-sm-2">
					<a href="javascript:;"  class="avatar-image-css">' . username_photo_by_id($comment_reply_val['user_id']) . '
					</a>
					</div>
					<div class="col-lg-11 col-md-10 col-sm-10">
					<div class="comment-main-box">
					<div class="name-user">' . $comment_reply_user['first_name'] . ' ' . $comment_reply_user['last_name'] . '<span class="color-grey">  ' . $comment_reply_user['professional_skills'] . ' </span></div> 
					<p>' . $comment_reply_val['comments'] . '</p>
					<div class="share-list">
					<a ' . $htmlsecondreply . ' href="javascript:;" ><i class="fa  fa-caret-up"></i>Upvote <span id="comments_3_' . $comment_reply_val['id'] . '">' . vote_count_by_id('3', $comment_reply_val['id']) . '</span> </a>
					<a href="javascript:;" class="days-after">' . get_days_count_from_dates($comment_reply_val['created_date'], date('Y-m-d')) . '</a>
					</div>
					</div> 
					</div>
					</div>  ';
        }
        $html .= ' <div> ';
        return $html;
    }
Ejemplo n.º 2
0
        ?>
" target="_blank" class="color-pink"><?php 
        echo $story_user['first_name'] . ' ' . $story_user['last_name'];
        ?>
</a></li>
                             <li><a href="https://twitter.com/share?url=<?php 
        echo $twitter_url;
        ?>
&text=<?php 
        echo $val['title'];
        ?>
" target="_blank" data-toggle="tooltip" title="<?php 
        echo $val['title'];
        ?>
" class="color-blue"><i class="fa fa-twitter"></i> Tweet</a><span class="grey-color"> <?php 
        echo get_days_count_from_dates($val['updated_at'], date('Y-m-d'));
        ?>
</span> </li>                     
                             <li><a href="javascript:;" rel="#share-main-id" class="share-box-slide color-pink" id="<?php 
        echo $val['id'];
        ?>
"><i class="fa fa-share"></i> Share</a></li>
                             <li><a href="javascript:;" class="common-story-section foo" rel="#comment-target" id="<?php 
        echo $val['id'] . '_' . $val['url_slug'];
        ?>
"><i class="fa fa-comment-o"></i> <span class="story_comment_<?php 
        echo $val['id'];
        ?>
"><?php 
        echo comment_count_html($val['id']) != '' ? comment_count_html($val['id']) : ' Comment';
        ?>
Ejemplo n.º 3
0
        ?>
                                                              
                                                                </a>
                                                             </div>
                                                            </div>
                                                            
                                                             </span>
                                                        
                                                  </li>
                                                  
                             <li><span class="grey-color">by</span> <a href="javascript:;" class="color-pink"><?php 
        echo $story_user['first_name'] . ' ' . $story_user['last_name'];
        ?>
</a></li>
                             <li><a href="javascript:;" data-toggle="tooltip" title="Dummy Text!" class="color-blue"><i class="fa fa-twitter"></i> Tweet</a><span class="grey-color"> <?php 
        echo get_days_count_from_dates($val['created_date'], date('Y-m-d'));
        ?>
</span> </li>                     
                             <li><a href="javascript:;" rel="#share-main-id" class="share-box-slide color-pink" id="<?php 
        echo $val['id'];
        ?>
"><i class="fa fa-share"></i> Share</a></li>
                             <li><a href="javascript:;" class="comments-show common-story-section" rel="#comment-target" id="<?php 
        echo $val['id'];
        ?>
"><i class="fa fa-comment-o"></i> <?php 
        echo comment_count($val['id']) > 0 ? comment_count($val['id']) . ' Comments' : ' Comments';
        ?>
</a></li>
                         </ul>
                        
        function comments_data_id_col($story_id, $comment_id, $limit = '0')
        {
            $ci =& get_instance();
            $pop = '';
            if ($limit > 0) {
                $limit_data = 'LIMIT ' . $limit;
            } else {
                $limit_data = '';
            }
            $html2 = '  <div id="comment_show_' . $comment_id . '">';
            $comment_reply = $ci->db->query("select * from comments where section_type_id='" . $story_id . "' and section_type='0' and parent_comment_id='" . $comment_id . "' order by id desc {$limit_data}")->result_array();
            foreach ($comment_reply as $comment_reply_val) {
                $user_link1 = base_url() . 'usersinfo/' . $comment_reply_val['user_id'];
                $comment_reply_user = user_allinfo_id($comment_reply_val['user_id']);
                $onclick_comment2 = array('user_id' => $ci->session->userdata('user_logged'), 'section_title' => $comment_reply_val['comments'], 'section_type' => '3', 'section_type_action' => 'upvote', 'section_action_id' => $comment_reply_val['id']);
                $vote2 = vote_count_by_id('3', $comment_reply_val['id']);
                $vote_msg2 = $vote2 > 0 ? '<span id="comment_3_' . $comment_reply_val['id'] . '">' . $vote2 . '</span>' : '<span id="comment_3_' . $comment_reply_val['id'] . '">Upvote</span>';
                $html2 .= '<div class="comment-box-css-reply">
					<div class="col-lg-1 col-md-2 col-sm-2">
					<a href="' . $user_link1 . '"  class="avatar-image-css" target="_blank">' . username_photo_by_id($comment_reply_val['user_id']) . '
					</a>
					</div>
					<div class="col-lg-11 col-md-10 col-sm-10">
					<div class="comment-main-box">
					<div class="name-user"><a href="' . base_url() . 'usersinfo/' . $comment_reply_user['id'] . '" target="_blank" >' . $comment_reply_user['first_name'] . ' ' . $comment_reply_user['last_name'] . '</a><span class="color-grey">  ' . $comment_reply_user['professional_skills'] . ' </span></div> 
					<p>' . $comment_reply_val['comments'] . '</p>
					<div class="share-list">
					<a ' . onclick_upvote($onclick_comment2) . ' href="javascript:;" ><i class="fa  fa-caret-up"></i>' . $vote_msg2 . '</a>

					<a href="javascript:;" class="days-after">' . get_days_count_from_dates($comment_reply_val['created_date'], date('Y-m-d')) . '</a>
					</div>
					</div> 
					</div>
					</div>  ';
            }
            $html2 .= ' </div> ';
            return $html2;
        }
Ejemplo n.º 5
0
                                                                         </span>
                                                                    
                                                              </li>
                                                              
                                         <li><span class="grey-color">by</span> <a class="color-pink" href="<?php 
        echo base_url();
        ?>
usersinfo/<?php 
        echo $story_user['id'];
        ?>
" target="_blank"><?php 
        echo $story_user['first_name'] . ' ' . $story_user['last_name'];
        ?>
</a></li>
                                         <li><a class="color-blue" title="" data-toggle="tooltip" href="javascript:;" data-original-title="Dummy Text!"><i class="fa fa-twitter"></i> Tweet</a><span class="grey-color"> <?php 
        echo get_days_count_from_dates($users_story_val['updated_at'], date('Y-m-d 00:00'));
        ?>
</span> </li>                     
                                         <li><a class="share-box-slide color-pink" rel="#share-main-id" href="javascript:;"  id="<?php 
        echo $users_story_val['id'];
        ?>
"><i class="fa fa-share"></i> Share</a></li>
                                         <li><a rel="#comment-target" class="comments-show common-story-section" href="javascript:;" id="<?php 
        echo $users_story_val['id'];
        ?>
"><i class="fa fa-comment-o"></i><?php 
        echo comment_count($users_story_val['id']) > 0 ? comment_count($users_story_val['id']) . ' Comments' : ' Comments';
        ?>
</a></li>
                                     </ul>