/** * Get Users Profile URL for $username if an App with profile is installed * * @param int $username * * @return string The URL of a user's profile */ function profile_link($username = FALSE) { if (check_app_installed('people')) { $profile_url = base_url() . 'people/' . $username; } else { $profile_url = base_url() . 'settings/profile'; } return $profile_url; }
function modify_authd_post() { $content = $this->social_igniter->get_content($this->get('id')); // Access Rules //$this->social_auth->has_access_to_modify($this->input->post('type'), $this->get('id') $this->oauth_user_id); $content_data = array('content_id' => $this->get('id'), 'parent_id' => $this->input->post('parent_id'), 'category_id' => $this->input->post('category_id'), 'order' => $this->input->post('order'), 'title' => $this->input->post('title'), 'title_url' => form_title_url($this->input->post('title'), $this->input->post('title_url'), $content->title_url), 'content' => $this->input->post('content'), 'details' => $this->input->post('details'), 'canonical' => $this->input->post('canonical'), 'access' => $this->input->post('access'), 'comments_allow' => $this->input->post('comments_allow'), 'geo_lat' => $this->input->post('geo_lat'), 'geo_long' => $this->input->post('geo_long'), 'viewed' => 'Y', 'approval' => 'Y', 'status' => form_submit_publish($this->input->post('status'))); // Insert $update = $this->social_igniter->update_content($content_data, $this->oauth_user_id); if ($update) { // Process Tags if ($this->input->post('tags')) { if (check_app_installed('tags')) { $this->load->library('tags/tags_library'); $this->tags_library->process_tags($this->input->post('tags'), $this->get('id')); } } $message = array('status' => 'success', 'message' => 'Awesome, we updated your ' . $this->input->post('type'), 'data' => $update); } else { $message = array('status' => 'error', 'message' => 'Oops, we were unable to post your ' . $this->input->post('type')); } $this->response($message, 200); }