/** * @see Page::readData() */ public function readData() { parent::readData(); // get smileys $this->smileyList->sqlOffset = ($this->pageNo - 1) * $this->itemsPerPage; $this->smileyList->sqlLimit = $this->itemsPerPage; $this->smileyList->sqlOrderBy = 'smiley.' . $this->sortField . " " . $this->sortOrder; $this->smileyList->readObjects(); // get categories $this->smileyCategories = SmileyCategory::getSmileyCategories(); // get default smileys $sql = "SELECT\tCOUNT(*) AS count\n\t\t\tFROM\twcf" . WCF_N . "_smiley\n\t\t\tWHERE\tsmileyCategoryID = 0"; $row = WCF::getDB()->getFirstRow($sql); $this->defaultSmileys = $row['count']; }
/** * @see Page::assignVariables() */ public function assignVariables() { parent::assignVariables(); WCF::getTPL()->assign(array('title' => $this->title, 'code' => $this->code, 'showOrder' => $this->showOrder, 'filename' => $this->filename, 'smileyCategoryID' => $this->smileyCategoryID, 'availableSmileyCategories' => SmileyCategory::getSmileyCategories())); }