예제 #1
0
 protected function getUserSettingsDB()
 {
     $start = "";
     $limit = "";
     $where = "#__quipforum_user_settings.user_id = '" . $this->userData->id . "'";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_user_settings.*, " . "FROM #__quipforum_user_settings ", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->userSettings = $db->loadObject();
 }
예제 #2
0
 protected function getBoardsDataDB()
 {
     $start = "";
     $limit = "";
     $where = "";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_boards.* " . "FROM #__quipforum_boards", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->data = $db->loadObjectList('id');
 }
예제 #3
0
 protected function getForumObjectListDB($order = null)
 {
     $start = "";
     $limit = "";
     $where = "published = '1' ";
     if ($order == null) {
         $order = "#__quipforum_boards.ordering";
     }
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_boards.id, " . "#__quipforum_boards.topic, " . "#__quipforum_boards.description, " . "#__quipforum_boards.tag, " . "#__quipforum_boards.thread_count " . "FROM #__quipforum_boards", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->forumObjectList = $db->loadObjectList();
 }
예제 #4
0
 protected function getPostDataDB($id = null)
 {
     if (!$id) {
         JError::raiseError('404', JText::_('Post not found'));
     }
     $start = "";
     $limit = "";
     $where = "#__quipforum_posts.id = '" . $id . "'";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_posts.* " . "FROM #__quipforum_posts ", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->postData = $db->loadObject();
     // Now for the board ID code(s) #plural after singular works..
     $start = "";
     $limit = "";
     $where = "#__quipforum_post_references.id = '" . $id . "'";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_post_references.board_id " . "FROM #__quipforum_post_references ", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->postData->board_id = $db->loadObject()->board_id;
     return $this->postData;
 }
예제 #5
0
 public static function getLog($post_id)
 {
     $log = null;
     $start = "";
     $limit = "";
     $where = "post_id = '" . $post_id . "' ";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_post_logs.log " . "FROM #__quipforum_post_logs ", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $logs = $db->loadObjectList();
     foreach ((array) $logs as $k => $v) {
         $log .= " <li>" . $v->log . "</li>";
     }
     $log = "<h3>Post activity log</h3> <ul>" . $log . "</ul>";
     return $log;
 }
예제 #6
0
 protected function getBlobConversionDB()
 {
     $start = "";
     $limit = "15000";
     $where = "#__text_duplicate.checked = '0'";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__text_duplicate.body, " . "#__text_duplicate.id, " . "#__text_duplicate.checked, " . "#__text_duplicate.compressed, " . "#__text_duplicate.bodyblob " . "FROM #__text_duplicate ", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->boardData = $db->loadObjectList();
 }
예제 #7
0
 protected function getPostLinksDB($id)
 {
     $start = "";
     $limit = "";
     $where = "#__quipforum_links.post_id = '" . $id . "'";
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT #__quipforum_links.id, " . "#__quipforum_links.url " . "FROM #__quipforum_links", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     return $db->loadObjectList();
 }
예제 #8
0
 protected function getThreadDB()
 {
     $query = comQuipForumHelper::buildQuery("SELECT " . "#__quipforum_threads.thread_cache " . "FROM #__quipforum_threads " . "WHERE #__quipforum_threads.id = '" . $this->postData->thread_id . "'");
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->threadData = $db->loadObjectList();
 }
예제 #9
0
 protected function getPreBoardDB()
 {
     $admin_where = "";
     $userData = JFactory::getUser();
     if ($userData->authorise('core.manage', 'com_quipforum')) {
         $admin_where = "";
     } else {
         $admin_where = " AND (#__quipforum_flagged_posts.type = 'sticky' OR #__quipforum_flagged_posts.type = 'announcement') ";
     }
     $start = "";
     $limit = "";
     $where = "#__quipforum_flagged_posts.board_id = '" . JRequest::getInt('id') . "'" . $admin_where;
     $order = "";
     $query = comQuipForumHelper::buildQuery("SELECT " . "#__quipforum_flagged_posts.*, " . "#__quipforum_posts.* " . "FROM #__quipforum_flagged_posts " . "LEFT JOIN #__quipforum_posts " . "ON #__quipforum_posts.id = " . "#__quipforum_flagged_posts.post_id ", $start, $limit, $where, $order);
     $db =& JFactory::getDBO();
     $db->setQuery($query);
     $this->preBoardData = $db->loadObjectList();
 }