$this->load->view('popup_js');
?>
    <div id="top"></div>
    <div id="Container">
        <div id="alpha" class="container Mcenter clearfix transitions-enabled">
            <?php 
$searchResult = $result;
?>
            <?php 
if (is_array($searchResult)) {
    ?>
                <?php 
    foreach ($searchResult as $searchResultKey => $searchResultValue) {
        ?>
                    <?php 
        $comments = getPinComments($searchResultValue->id);
        ?>
                    <div class="pin_item">
                        <div class="action">
                            <?php 
        $likeId = 'like-' . $searchResultValue->id;
        ?>
                            <?php 
        $unlikeId = 'unlike-' . $searchResultValue->id;
        ?>
                            <?php 
        $like = $searchResultValue->user_id;
        ?>
                            <span id="like_action<?php 
        echo $searchResultValue->id;
        ?>
 foreach ($board as $key => $value) {
     ?>
                 <?php 
     $boardPin = getEachBoardPins($value->id);
     ?>
                 <?php 
     if (!empty($boardPin)) {
         ?>
                     <?php 
         $empty = 1;
         ?>
                     <?php 
         foreach ($boardPin as $boardPinKey => $boardPinValue) {
             ?>
                         <?php 
             $comments = getPinComments($boardPinValue->id);
             ?>
                         <div class="pin_item">
                             <!--Display the like/comment/repin actions -->
                             <div class="action">
                                 <?php 
             $likeId = 'like-' . $boardPinValue->id;
             ?>
                                 <?php 
             $unlikeId = 'unlike-' . $boardPinValue->id;
             ?>
                                 <?php 
             $like = $boardPinValue->user_id;
             ?>
                                 <span id="like_action<?php 
             echo $boardPinValue->id;
            </div>
        </div>
    </div>
    <div id="Container">
        <div id="alpha" class="container Mcenter clearfix transitions-enabled">
            <?php 
$sourcePin = getPinsByType('video');
?>
            <?php 
if (is_array($sourcePin)) {
    ?>
                <?php 
    foreach ($sourcePin as $sourcePinKey => $sourcePinValue) {
        ?>
                    <?php 
        $comments = getPinComments($sourcePinValue->id);
        ?>
                    <div class="pin_item">
                        <div class="action">
                            <?php 
        $likeId = 'like-' . $sourcePinValue->id;
        ?>
                            <?php 
        $unlikeId = 'unlike-' . $sourcePinValue->id;
        ?>
                            <?php 
        $like = $sourcePinValue->user_id;
        ?>
                            <span id="like_action<?php 
        echo $sourcePinValue->id;
        ?>
if (!empty($activityList)) {
    ?>
            <?php 
    foreach ($activityList as $activityListKey => $activityListValue) {
        ?>
                <?php 
        if ($activityListValue->type == 'pin' || $activityListValue->type == 'like' || $activityListValue->type == 'repin' || $activityListValue->type == 'video' || $activityListValue->type == 'image') {
            ?>
                    <?php 
            $activityValue = getPinDetails($activityListValue->action_id);
            ?>
                    <?php 
            if ($activityValue) {
                ?>
                        <?php 
                $comments = getPinComments($activityValue->id);
                ?>
                        <div class="pin_item">
                            
                            <!--Display the activity of the user -->
                            <div class="convo_blk comments">
                                <p><?php 
                echo $activityListValue->log . ' on ' . $activityListValue->timestamp;
                ?>
</p>
                            </div>
                            
                            <!--Like comment repin action -->
                            <!--
                            <div class="action">
                                <?php 
    ?>
"><strong>Edit Board</strong><span></span></a>
        <?php 
}
?>
    </div>
</div><!-- #BoardMeta -->
</div><!-- #BoardTitle -->

<div id="Container">
    <div id="alpha" class="container Mcenter clearfix transitions-enabled">
        <?php 
foreach ($result as $key => $value) {
    ?>
        <?php 
    $comments = getPinComments($value->id);
    ?>
        <div class="pin_item">
            <div class="action">
                <?php 
    $likeId = 'like-' . $value->id;
    ?>
                <?php 
    $unlikeId = 'unlike-' . $value->id;
    ?>
                <?php 
    $like = $value->user_id;
    ?>
                <span id="like_action<?php 
    echo $value->id;
    ?>
                <p><?php 
echo $pinDetails->description;
?>
</p>
            </span>
            <div class="clear"></div>
            <?php 
if ($this->session->userdata('login_user_id')) {
    ?>

                <div class="pin_item" style="width: 610px;background:none;border: none;">
                    <?php 
    $commentBoxId = 'comments_box_' . $pinDetails->id;
    ?>
                    <?php 
    $comments = getPinComments($pinDetails->id);
    ?>
                    <?php 
    if (!empty($comments)) {
        ?>
                    <?php 
        foreach ($comments as $key => $cmt) {
            ?>
                         <?php 
            $commentuser = userDetails($cmt->user_id);
            ?>
                         <div id="<?php 
            echo $commentBoxId;
            ?>
">
                        <!-- Comment List -->
        <?php 
echo $this->pagination->create_links();
?>
        <div id="alpha" class="container Mcenter clearfix transitions-enabled">

            <?php 
$giftPin = $result;
?>
            <?php 
if (is_array($giftPin)) {
    ?>
                <?php 
    foreach ($giftPin as $giftPinKey => $giftPinValue) {
        ?>
                    <?php 
        $comments = getPinComments($giftPinValue->id);
        ?>
                    <div class="pin_item">

                        <!--Display the like/comment/repin actions -->
                        <div class="action">
                            <?php 
        $likeId = 'like-' . $giftPinValue->id;
        ?>
                            <?php 
        $unlikeId = 'unlike-' . $giftPinValue->id;
        ?>
                            <?php 
        $like = $giftPinValue->user_id;
        ?>
                            <span id="like_action<?php 
$pinLike = getPinsLike($id);
?>
            <?php 
if ($pinLike) {
    ?>
                <?php 
    foreach ($pinLike as $pinLikeKey => $pinLikeValue) {
        ?>
                    <?php 
        $likeValue = getPinDetails($pinLikeValue->pin_id);
        ?>
                    <?php 
        if ($likeValue) {
            ?>
                        <?php 
            $comments = getPinComments($likeValue->id);
            ?>
                        <div class="pin_item" id="pin_item_<?php 
            echo $likeValue->id;
            ?>
">

                            <!--Display the like/comment/repin actions -->
                            <div class="action">
                                <?php 
            $likeId = 'like-' . $likeValue->id;
            ?>
                                <?php 
            $unlikeId = 'unlike-' . $likeValue->id;
            ?>
                                <?php 
Esempio n. 9
0
    /**
     * Function to a insert comments for each pins
     * @param   :
     * @author : Vishal
     * @since  : 29-03-2012
     * @return
     */
    function addComment($induvidual = false)
    {
        $this->sitelogin->entryCheck();
        $array['user_id'] = $this->session->userdata('login_user_id');
        $array['pin_id'] = $this->input->post('id');
        $array['comments'] = $this->input->post('comment');
        $lastInsertId = $this->board_model->insertPinComments($array);
        $loggedUserDetails = userDetails();
        $name = $loggedUserDetails['name'];
        $id = $loggedUserDetails['userId'];
        $image = $loggedUserDetails['image'];
        $link = site_url('user/index/' . $id);
        //induvidual meant for, we are adding a comment from an induvidual pin page
        if ($induvidual) {
            $addDiv = '<div class="comment" style="background-color: rgb(242, 240, 240);">

                                <a data=' . $lastInsertId . ' href="board/deletecomment/' . $lastInsertId . '" title="Remove Comment" class="DeleteComment floatRight tipsyHover">X</a>
                                <a class="CommenterImage" href=' . $link . '><img alt="Thumbnail of ' . $name . '" src=' . $image . '></a>
                                <p class="CommenterMeta"><a class="CommenterName" href=' . $link . '>' . $name . '</a><br>' . $array['comments'] . '</p>

                            </div>';
        } else {
            $addDiv = '<div comment-id="18577623340816386" class="comment convo clearfix">
                                <a class="ImgLink" href=' . $link . '>
                                    <img alt="Picture of ' . $name . '" src=' . $image . '>
                                </a>
                                <p><a href=' . $link . '>' . $name . '</a> ' . $array['comments'] . '</p>
                            </div>';
        }
        $count[0] = count(getPinComments($array['pin_id']));
        $count[1] = $lastInsertId;
        echo json_encode($count);
    }