/** * Function get and save the repins * @param : <Int> $id * @author : hrishikesh * @return */ public function index($id = false) { $pinDetails = getPinDetails($this->input->post('pin_id')); $value = array('user_id' => $this->session->userdata('login_user_id'), 'pin_url' => $pinDetails->pin_url, 'source_url' => $pinDetails->source_url, 'board_id' => $this->input->post('board_id'), 'type' => $pinDetails->type, 'description' => $this->input->post('description')); if ($value['user_id'] == 0 || !isset($value['user_id'])) { echo json_encode(false); } $id = $this->board_model->saveNewPin($value); $value['insertId'] = $id; $activity['user_id'] = $this->session->userdata('login_user_id'); $activity['log'] = "Repined a pin"; $activity['type'] = "repin"; $activity['action_id'] = $id; $activity['link'] = $pinDetails->pin_url; activityList($activity); $saveRepin = array('repin_user_id' => $this->session->userdata('login_user_id'), 'owner_user_id' => $pinDetails->user_id, 'from_pin_id' => $this->input->post('pin_id'), 'new_pin_id' => $id); $this->board_model->saveRepin($saveRepin); //socialNetworkPost($activity,$value); $description = $this->input->post('description'); $pin_url = $pinDetails->pin_url; $sitelink = site_url('board/pins/' . $this->input->post('board_id') . '/' . $id); $imglink = site_url('application/assets/images/facebook_button.png'); $url = rawurlencode($sitelink . '&via=pinterest clone&text=' . $description); $success = " <h2 style='padding-top:156px; border:none;' >Pinned successfully!!</h2>\n <div>\n <a href='http://twitter.com/share' class='twitter-share-button' data-count='none' data-url={$sitelink} data-text={$description} data-via='pininterest clone' data-size='large'>Tweet</a><script type='text/javascript' src='http://platform.twitter.com/widgets.js'></script>\n <a title='Share this article/post/whatever on Facebook' href='http://www.facebook.com/sharer.php?s=100&p[url]={$sitelink}&p[images][0]={$pin_url}&p[title]={$description}&p[summary]=share from my pinterest clone application' target='_blank'><img src='{$imglink}' width='75px' height='27px' alt='share'/></a>\n </div>"; echo json_encode($success); }
/** * Function display embed pin popup page * @param : <Int> $boardId,$pinId * @author : Anup * @return */ public function embed($boardId, $pinId) { $data['title'] = "Action"; $data['pinId'] = $pinId; $data['boardId'] = $boardId; $pinDetails = getPinDetails($pinId); $data['pin_url'] = $pinDetails->pin_url; $data['source_url'] = $pinDetails->source_url; $data['pin_link'] = site_url('board/pins/' . $boardId . '/' . $pinId); $data['site_link'] = site_url(); $userDetails = userDetails($pinDetails->user_id); $data['user'] = $userDetails['name']; $data['user_link'] = site_url('user/index/' . $pinDetails->user_id); $data['source_name'] = GetDomain($pinDetails->source_url); $this->load->view('embedPin_view', $data); }
public function ajaxEmbed() { $data['title'] = "Action"; $data['pinId'] = $pinId = $this->input->post('pin_id'); $data['boardId'] = $boardId = $this->input->post('board_id'); $pinDetails = getPinDetails($pinId); $data['pin_url'] = $pinDetails->pin_url; $data['source_url'] = $pinDetails->source_url; $data['pin_link'] = site_url('board/pins/' . $boardId . '/' . $pinId); $data['site_link'] = site_url(); $userDetails = userDetails($pinDetails->user_id); $data['user'] = $userDetails['name']; $data['user_link'] = site_url('user/index/' . $pinDetails->user_id); $data['source_name'] = GetDomain($pinDetails->source_url); $value = $this->load->view('embedPin_view', $data, true); echo json_encode($value); }
<div class="clear"></div> <div class="container Mcenter clearfix transitions-enabled masonry" id="alpha" style="position: relative; height: 4727px; width: 1380px;"> <?php $activityList = getActivity($id); ?> <?php 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>
$loggedUserDetails = userDetails(); ?> <?php } ?> <title><?php echo isset($title) ? $title : 'Cubetboard '; ?> </title> <!-- For facebook like button-og meta tags --> <?php if (isset($pinId) && isset($boardId)) { ?> <?php $pinDetails = getPinDetails($pinId, $boardId); ?> <?php if (!empty($pinDetails)) { ?> <meta property="og:title" content="<?php echo $pinDetails->description; ?> "/> <meta property="og:image" content="<?php echo $pinDetails->pin_url; ?> "/> <meta property="og:site_name" content="Cubetboard"/> <meta property="og:type" content="album"/> <meta property="og:url" content="<?php
<h3><?php echo $pinRepinCount; ?> Repins </h3> <ul class="repin_itembox_style"> <?php if ($repinUsers) { ?> <?php foreach ($repinUsers as $key => $value) { ?> <?php $userDetails = userDetails($value->repin_user_id); ?> <?php $repinDetails = getPinDetails($value->new_pin_id); ?> <?php $repinBoardDetails = getBoardDetails($repinDetails->board_id); ?> <li id="addrepin_<?php echo $value->repin_user_id; ?> "> <div class="repin_itembox"> <div class="inside_repin_thumbs"><a href="<?php echo site_url('user/index/' . $userDetails['userId']); ?> "><img src="<?php echo $userDetails['image']; ?>
<div id="Repin_Pop" class="Pop_Up_Blk" style="width:550px;"> <h2 id="h2_heading">Repin</h2> <div class="pop_content"> <?php $pinDetails = getPinDetails($pin); ?> <div id="pop_content"> <div class="left clsFloatLeft"> <p> <img src="<?php echo $pinDetails->pin_url; ?> " height="170" width="170"> </p> </div> <div class="right clsFloatRight" style="float:left;padding-left: 20px;"> <ul class="repin_right" style="width: 247px;"> <li> <label>Board name</label> </li> <li> <select id="board_id" name="board_id"> <?php $userId = $this->session->userdata('login_user_id'); ?> <?php $userBoards = getUserBoard($userId); ?> <?php foreach ($userBoards as $boardKey => $boardValues) {
</div> </div> </div> <div id="Container"> <div id="alpha" class="container Mcenter clearfix transitions-enabled"> <?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
/** * Repin function * @since 31-05-2013 * @author Robin <*****@*****.**> */ public function repin_post() { $key = $this->post('key'); $token = $this->post('token'); $is_authenticated = $this->authapi->authenticate($key, $token); //Check if user is authenticated, if not, return error response if ($is_authenticated == 0) { $this->response(array('error' => 'Authentication Failed'), 401); } $pin_id = $this->post('pin_id'); $user_id = $this->post('user_id'); $board_id = $this->post('board_id'); if (!$pin_id || !$user_id || !$board_id) { $this->response(array('error' => 'Give me the inputs!'), 200); } $pinDetails = getPinDetails($pin_id); $value = array('user_id' => $user_id, 'pin_url' => $pinDetails->pin_url, 'source_url' => $pinDetails->source_url, 'board_id' => $board_id, 'type' => $pinDetails->type, 'description' => $this->get('description') ? $this->get('description') : $pinDetails->description); $id = $this->board_model->saveNewPin($value); $value['insertId'] = $id; $activity['user_id'] = $user_id; $activity['log'] = "Repined a pin"; $activity['type'] = "repin"; $activity['action_id'] = $id; $activity['link'] = $pinDetails->pin_url; activityList($activity); $saveRepin = array('repin_user_id' => $user_id, 'owner_user_id' => $pinDetails->user_id, 'from_pin_id' => $pin_id, 'new_pin_id' => $id); $this->board_model->saveRepin($saveRepin); $this->response(array('success' => 'Succesfully Repined'), 200); }
/** * Function load the pin edit page * @param : $boardId,$pinId * @author : Vishal * @since : 10-04-2012 * @return : */ function pinEdit($boardId, $pinId) { $this->sitelogin->entryCheck(); $data['title'] = "Edit pin"; $data['boardId'] = $boardId; $data['pinId'] = $pinId; $data['userId'] = $this->session->userdata('login_user_id'); $data['result'] = getPinDetails($pinId, $boardId); $this->load->view('editPin_view', $data); }
<div class="fancybox-bg" id="fancybox-bg-e"></div> <div class="fancybox-bg" id="fancybox-bg-se"></div> <div class="fancybox-bg" id="fancybox-bg-s"></div> <div class="fancybox-bg" id="fancybox-bg-sw"></div ><div class="fancybox-bg" id="fancybox-bg-w"></div> <div class="fancybox-bg" id="fancybox-bg-nw"></div> <div style="border-width: 10px; width: 580px; height: auto;" id="fancybox-content"> <div style="width: auto; height: auto; overflow: auto; position: relative;"> <div id="Repin_Pop" class="Pop_Up_Blk"> <h2>Edit Pins</h2> <div class="pop_content"> <div id="pop_content"> <div class="right clsFloatRight" style="float: left;width: auto;"> <div id="edit_user"> <?php $result = getPinDetails($id); ?> <table> <tr> <td><label>Description</label></td> <td><textarea rows="2" name="details" maxlength="500" id="description_pin_edit" cols="40" class="expand autocomplete_desc" style="width:316px;height: 31px;"><?php echo $result->description; ?> </textarea></td> <td><div id="errordetails" class="validation-message"></div></td> </tr> <tr> <td><label>Link</label></td> <td><input type="text" name="link" value="<?php echo $result->source_url; ?>
<th>View</th> <th>Delete</th> </thead> <tbody> <?php foreach ($result as $key => $value) { ?> <tr id="tr_<?php echo $value->pin_id; ?> "> <?php $pinDetails = getPinDetails($value->pin_id); ?> <td><?php echo $pinDetails->id; ?> </td> <td><?php echo $pinDetails->description; ?> </td> <td><?php echo $value->board_id;